Documentation ¶
Index ¶
- type Animation
- type Composer
- func (c Composer) Composing() bool
- func (c *Composer) ComposingConversation() bool
- func (c *Composer) Events() (out []ComposerEvent)
- func (c *Composer) Layout(gtx layout.Context) layout.Dimensions
- func (c *Composer) Reset()
- func (c *Composer) StartConversation()
- func (c *Composer) StartReply(to ds.ReplyData)
- type ComposerEvent
- type MessageList
- type Polyclick
- type Reply
- type ReplyAnimationState
- type ReplyStatus
- type States
- type TextForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animation ¶ added in v0.0.16
type Animation struct { anim.Normal Collection map[*forest.Reply]*ReplyAnimationState // contains filtered or unexported fields }
Animation maintains animation states per reply.
func (*Animation) Lookup ¶ added in v0.0.16
func (a *Animation) Lookup(r *forest.Reply, s ReplyStatus) *ReplyAnimationState
Lookup animation state for the given reply. If state doesn't exist, it will be created with using `s` as the beginning status.
func (*Animation) Update ¶ added in v0.0.16
func (a *Animation) Update(gtx layout.Context, r *forest.Reply, s ReplyStatus) *ReplyAnimationState
Update animation state for the given reply.
type Composer ¶ added in v0.0.4
type Composer struct { CommunityList layout.List Community widget.Enum SendButton, CancelButton, PasteButton widget.Clickable widget.Editor ReplyingTo ds.ReplyData // contains filtered or unexported fields }
Composer holds the state for a widget that creates new arbor nodes.
func (Composer) Composing ¶ added in v0.0.15
Composing indicates whether the composer is composing a message of any kind.
func (*Composer) ComposingConversation ¶ added in v0.0.15
ComposingConversation returns whether the composer is currently creating a conversation (rather than a new reply within an existing conversation)
func (*Composer) Events ¶ added in v0.0.15
func (c *Composer) Events() (out []ComposerEvent)
Events returns state change events for the composer since the last call to events.
func (*Composer) Layout ¶ added in v0.0.15
func (c *Composer) Layout(gtx layout.Context) layout.Dimensions
Layout updates the state of the composer
func (*Composer) Reset ¶ added in v0.0.15
func (c *Composer) Reset()
Reset clears the internal state of the composer.
func (*Composer) StartConversation ¶ added in v0.0.15
func (c *Composer) StartConversation()
StartConversation configures the composer to write a new conversation.
func (*Composer) StartReply ¶ added in v0.0.15
StartReply configures the composer to write a reply to the provided ReplyData.
type ComposerEvent ¶ added in v0.0.15
type ComposerEvent uint
ComposerEvent represents a change in the Composer's state
const ( ComposerSubmitted ComposerEvent = iota ComposerCancelled )
type MessageList ¶ added in v0.0.16
type Polyclick ¶ added in v0.0.13
Polyclick can detect and report a variety of gesture interactions within a single pointer input area.
func (*Polyclick) Layout ¶ added in v0.0.13
func (p *Polyclick) Layout(gtx layout.Context) layout.Dimensions
func (*Polyclick) LongPressed ¶ added in v0.0.13
type Reply ¶
type Reply struct { Hash *fields.QualifiedHash Content string Polyclick }
Reply holds ui state for each reply.
func (*Reply) WithContent ¶ added in v0.0.12
type ReplyAnimationState ¶ added in v0.0.16
type ReplyAnimationState struct { *anim.Normal Begin, End ReplyStatus }
ReplyAnimationState holds the state of an in-progress animation for a reply. The anim.Normal field defines how far through the animation the node is, and the Begin and End fields define the two states that the node is transitioning between.
type ReplyStatus ¶ added in v0.0.16
type ReplyStatus int
const ( None ReplyStatus = 1 << iota Sibling Selected Ancestor Descendant ConversationRoot // Anchor indicates that this node is visible, but its descendants have been // hidden. Anchor // Hidden indicates that this node is not currently visible. Hidden )
type States ¶ added in v0.0.16
States implements a buffer of reply states such that memory is reused each frame, yet grows as the view expands to hold more replies.
type TextForm ¶ added in v0.0.9
type TextForm struct { TextField materials.TextField SubmitButton widget.Clickable PasteButton widget.Clickable // contains filtered or unexported fields }
TextForm holds the theme-independent state of a simple form that allows a user to provide a single text value and supports pasting. It can be submitted with either the submit button or pressing enter on the keyboard.