Documentation ¶
Index ¶
- Constants
- Variables
- type Container
- func (c *Container) IsEmpty() bool
- func (c *Container) RemoveMember(sectionID string, id string)
- func (c *Container) RemoveMemberUnsafe(sectionID string, id string)
- func (c *Container) Reset()
- func (c *Container) SetMember(sectionID string, member cchat.ListMember)
- func (c *Container) SetMemberUnsafe(sectionID string, member cchat.ListMember)
- func (c *Container) SetSections(sections []cchat.MemberSection)
- func (c *Container) SetSectionsUnsafe(sections []cchat.MemberSection)
- func (c *Container) TryAsyncList(server cchat.Messenger)
- type Controller
- type EventQueuer
- type Member
- type Section
Constants ¶
View Source
const AvatarSize = 32
Variables ¶
View Source
var MemberListWidth = 250
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { *gtk.Revealer Scroll *gtk.ScrolledWindow Main *gtk.Box // map id -> *Section Sections map[string]*Section // contains filtered or unexported fields }
func New ¶
func New(ctrl Controller) *Container
func (*Container) RemoveMember ¶
func (*Container) RemoveMemberUnsafe ¶
func (*Container) SetMember ¶
func (c *Container) SetMember(sectionID string, member cchat.ListMember)
func (*Container) SetMemberUnsafe ¶
func (c *Container) SetMemberUnsafe(sectionID string, member cchat.ListMember)
func (*Container) SetSections ¶
func (c *Container) SetSections(sections []cchat.MemberSection)
func (*Container) SetSectionsUnsafe ¶
func (c *Container) SetSectionsUnsafe(sections []cchat.MemberSection)
func (*Container) TryAsyncList ¶
TryAsyncList tries to set the member list from the given server. It does type assertions and handles asynchronicity. Reset must be called before this.
type Controller ¶
type Controller interface {
MemberListUpdated(c *Container)
}
type EventQueuer ¶
type EventQueuer interface { Activate() Deactivate() }
type Member ¶
type Member struct { *gtk.ListBoxRow Main *gtk.Box Avatar *roundimage.StillImage Name *rich.Label // contains filtered or unexported fields }
func NewMember ¶
func NewMember(member cchat.ListMember) *Member
func (*Member) Popup ¶
func (m *Member) Popup(evq EventQueuer)
Popup pops up the mention popover if any.
func (*Member) Update ¶
func (m *Member) Update(member cchat.ListMember)
type Section ¶
type Section struct { *gtk.Box ID string Header *rich.Label Body *gtk.ListBox // map id -> *Member Members map[string]*Member // contains filtered or unexported fields }
func NewSection ¶
func NewSection(sect cchat.MemberSection, evq EventQueuer) *Section
func (*Section) RemoveMember ¶
func (*Section) SetMember ¶
func (s *Section) SetMember(member cchat.ListMember)
func (*Section) Update ¶
func (s *Section) Update(sect cchat.MemberSection)
Click to show internal directories.
Click to hide internal directories.