Documentation ¶
Index ¶
- Constants
- func NewMessage(s *message.State, before container.MessageRow) container.MessageRow
- func NewPresendMessage(s *message.PresendState, before container.MessageRow) container.PresendMessageRow
- type Avatar
- type CollapsedMessage
- type CollapsedSendingMessage
- type Container
- func (c *Container) AddMessageAt(msgr container.MessageRow, ix int)
- func (c *Container) CreateMessage(msg cchat.MessageCreate)
- func (c *Container) DeleteMessage(msg cchat.MessageDelete)
- func (c *Container) NewPresendMessage(state *message.PresendState) container.PresendMessageRow
- func (c *Container) UpdateMessage(msg cchat.MessageUpdate)
- type FullMessage
- type FullSendingMessage
Constants ¶
View Source
const AvatarSize = message.AvatarSize
Variables ¶
This section is empty.
Functions ¶
func NewMessage ¶
func NewMessage( s *message.State, before container.MessageRow) container.MessageRow
NewMessage creates a new message.
func NewPresendMessage ¶
func NewPresendMessage( s *message.PresendState, before container.MessageRow) container.PresendMessageRow
NewPresendMessage creates a new presend message.
Types ¶
type Avatar ¶
type Avatar struct { roundimage.Button Image *roundimage.StillImage // contains filtered or unexported fields }
func NewAvatar ¶
func NewAvatar(parent primitives.Connector) *Avatar
func (*Avatar) SetImage ¶
func (a *Avatar) SetImage(img rich.LabelImage)
SetImage sets the avatar from the given label image.
type CollapsedMessage ¶
Collapsed is a message that follows after FullMessage. It does not show the header, and the avatar is invisible.
func WrapCollapsedMessage ¶
func WrapCollapsedMessage(gc *message.State) *CollapsedMessage
WrapCollapsedMessage wraps the given message state to be a collapsed message.
func (*CollapsedMessage) Revert ¶
func (c *CollapsedMessage) Revert() *message.State
type CollapsedSendingMessage ¶
type CollapsedSendingMessage struct { *CollapsedMessage message.Presender }
func WrapCollapsedSendingMessage ¶
func WrapCollapsedSendingMessage(pstate *message.PresendState) *CollapsedSendingMessage
type Container ¶
type Container struct {
*container.ListContainer
}
func NewContainer ¶
func NewContainer(ctrl container.Controller) *Container
func (*Container) AddMessageAt ¶
func (c *Container) AddMessageAt(msgr container.MessageRow, ix int)
AddMessage adds the given message.
func (*Container) CreateMessage ¶
func (c *Container) CreateMessage(msg cchat.MessageCreate)
func (*Container) DeleteMessage ¶
func (c *Container) DeleteMessage(msg cchat.MessageDelete)
func (*Container) NewPresendMessage ¶
func (c *Container) NewPresendMessage(state *message.PresendState) container.PresendMessageRow
func (*Container) UpdateMessage ¶
func (c *Container) UpdateMessage(msg cchat.MessageUpdate)
type FullMessage ¶
type FullMessage struct { *message.State // Grid widgets. Avatar *Avatar MainBox *gtk.Box // wraps header and content HeaderLabel *labeluri.Label // contains filtered or unexported fields }
func NewFullMessage ¶
func NewFullMessage(msg cchat.MessageCreate) *FullMessage
func WrapFullMessage ¶
func WrapFullMessage(gc *message.State) *FullMessage
func (*FullMessage) Revert ¶
func (m *FullMessage) Revert() *message.State
type FullSendingMessage ¶
type FullSendingMessage struct { *FullMessage message.Presender }
func WrapFullSendingMessage ¶
func WrapFullSendingMessage(pstate *message.PresendState) *FullSendingMessage
Click to show internal directories.
Click to hide internal directories.