Documentation ¶
Index ¶
- Constants
- func BindName(c gtk.Containerer, w gtk.Widgetter, name *string) *gtk.EventBox
- func BindNameDirect(w gtk.Widgetter, hoverer Hoverable, name *string)
- type DMButton
- type Guild
- type GuildFolder
- type GuildFolderIcon
- type Guilds
- type Hoverable
- type RevealerRow
- type UnreadStrip
- func (r *UnreadStrip) FromRow(row *gtk.ListBoxRow)
- func (r *UnreadStrip) SetActive(active bool)
- func (r *UnreadStrip) SetHovered(hovered bool)
- func (r *UnreadStrip) SetPinged()
- func (r *UnreadStrip) SetRead()
- func (r *UnreadStrip) SetSuppress(suppressed bool)
- func (r *UnreadStrip) SetUnread()
- func (r *UnreadStrip) State() (unread, pinged bool)
Constants ¶
View Source
const ( FolderSize = 32 IconSize = 48 IconPadding = 8 TotalWidth = IconSize + IconPadding*3 )
Variables ¶
This section is empty.
Functions ¶
func BindName ¶ added in v0.0.4
func BindName(c gtk.Containerer, w gtk.Widgetter, name *string) *gtk.EventBox
func BindNameDirect ¶ added in v0.0.4
Types ¶
type DMButton ¶
type DMButton struct { *gtk.ListBoxRow Unread *UnreadStrip OnClick func() // contains filtered or unexported fields }
type Guild ¶
type Guild struct { *gtk.ListBoxRow Parent *GuildFolder Unread *UnreadStrip Event *gtk.EventBox Image *avatar.Image IconURL string BannerURL string ID discord.GuildID Name string // contains filtered or unexported fields }
func (*Guild) SetUnavailable ¶
func (*Guild) UpdateImage ¶
func (g *Guild) UpdateImage()
type GuildFolder ¶
type GuildFolder struct { // Row that belongs to the parent list. *RevealerRow Icon *GuildFolderIcon Name string // Child list. List *gtk.ListBox Guilds []*Guild Revealed bool // contains filtered or unexported fields }
type GuildFolderIcon ¶ added in v0.0.4
type GuildFolderIcon struct { // Main stack, switches between "guilds" and "folder" *gtk.Stack Style *gtk.StyleContext Guilds *gtk.Grid // contains 4 images always. Images [4]*avatar.Image // first 4 of folder.Guilds Folder *gtk.Image // contains filtered or unexported fields }
func (*GuildFolderIcon) SetPlayAnimation ¶ added in v0.1.0
func (i *GuildFolderIcon) SetPlayAnimation(play bool)
type Guilds ¶
type Guilds struct { gtk.Widgetter ListBox *gtk.ListBox DMButton *DMButton Guilds []gtk.Widgetter Current *Guild OnSelect func(g *Guild) // contains filtered or unexported fields }
func (*Guilds) FindByID ¶
func (guilds *Guilds) FindByID(guildID discord.GuildID) (*Guild, *GuildFolder)
func (*Guilds) TraverseReadState ¶
func (guilds *Guilds) TraverseReadState(rs *read.UpdateEvent)
type RevealerRow ¶ added in v0.0.4
type RevealerRow struct { *gtk.ListBoxRow Strip *UnreadStrip Button *gtk.Button Revealer *gtk.Revealer }
type UnreadStrip ¶ added in v0.0.4
type UnreadStrip struct { *gtk.Overlay // contains child Revealer *gtk.Revealer Strip *gtk.Box // width IconPadding Style *gtk.StyleContext // contains filtered or unexported fields }
func NewUnreadStrip ¶ added in v0.0.4
func NewUnreadStrip(child gtk.Widgetter) *UnreadStrip
func (*UnreadStrip) FromRow ¶ added in v0.0.4
func (r *UnreadStrip) FromRow(row *gtk.ListBoxRow)
func (*UnreadStrip) SetActive ¶ added in v0.0.4
func (r *UnreadStrip) SetActive(active bool)
func (*UnreadStrip) SetHovered ¶ added in v0.0.4
func (r *UnreadStrip) SetHovered(hovered bool)
func (*UnreadStrip) SetPinged ¶ added in v0.0.4
func (r *UnreadStrip) SetPinged()
func (*UnreadStrip) SetRead ¶ added in v0.0.4
func (r *UnreadStrip) SetRead()
func (*UnreadStrip) SetSuppress ¶ added in v0.0.4
func (r *UnreadStrip) SetSuppress(suppressed bool)
func (*UnreadStrip) SetUnread ¶ added in v0.0.4
func (r *UnreadStrip) SetUnread()
func (*UnreadStrip) State ¶ added in v0.0.4
func (r *UnreadStrip) State() (unread, pinged bool)
Click to show internal directories.
Click to hide internal directories.