Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct { *gtk.Overlay Button *gtk.Button IconOverlay *gtk.Overlay Icon *onlineimage.Avatar Mentions *MentionsIndicator Pill *Pill // contains filtered or unexported fields }
Button is a widget showing a single guild icon.
func (*Button) Context ¶
Context returns the context of the button that was passed in during construction.
func (*Button) IsSelected ¶
IsSelected returns true if the guild is selected.
func (*Button) SetIndicator ¶
func (g *Button) SetIndicator(indicator ningen.UnreadIndication)
SetIndicator sets the button's unread indicator.
func (*Button) SetMentions ¶
SetMentions sets the button's mention indicator.
func (*Button) SetSelected ¶
SetSelected sets the button's selected state.
type MentionsIndicator ¶
type MentionsIndicator struct { *gtk.Revealer Label *gtk.Label // contains filtered or unexported fields }
MentionsIndicator is a small indicator that shows the mention count.
func NewMentionsIndicator ¶
func NewMentionsIndicator() *MentionsIndicator
NewMentionsIndicator creates a new mention indicator.
func (*MentionsIndicator) Count ¶
func (m *MentionsIndicator) Count() int
Count returns the mention count.
func (*MentionsIndicator) SetCount ¶
func (m *MentionsIndicator) SetCount(count int)
SetCount sets the mention count.
func (*MentionsIndicator) SetRevealChild ¶
func (m *MentionsIndicator) SetRevealChild(reveal bool)
SetRevealChild sets whether the indicator should be revealed. This lets the user hide the indicator even if there are mentions.
type Pill ¶
type Pill struct { *gtk.Box // width IconPadding State PillState Attrs PillAttributes // contains filtered or unexported fields }
func (*Pill) Invalidate ¶
func (r *Pill) Invalidate()
Invalidate reads the 2 fields inside Pill and updates the widget accordingly.
type PillAttributes ¶
type PillAttributes uint8
const ( PillUnread PillAttributes = 1 << iota PillMentioned )
Additional pill attributes.
func PillAttrsFromUnread ¶
func PillAttrsFromUnread(state ningen.UnreadIndication) PillAttributes
PillAttrsFromUnread creates a new PillAttributes reflecting the correct unread indication state.
func (PillAttributes) CSSClasses ¶
func (a PillAttributes) CSSClasses() []string
CSSClasses returns the CSS classes that corresponds to the current state of the pill.
func (PillAttributes) Has ¶
func (a PillAttributes) Has(these PillAttributes) bool
Has returns true if a has these in its bits.