Documentation ¶
Overview ¶
Package compose contains widgets used for composing a Matrix message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionData ¶
ActionData is the data that the action button in the composer bar is currently doing.
type Composer ¶
type Composer struct { *gtk.Box // contains filtered or unexported fields }
Composer is a message composer.
func (*Composer) Edit ¶
Edit switches the composer to edit mode and grabs an older message's body. If the message cannot be fetched from just the timeline state, then it will not be shown to the user. This means that editing backlog messages will behave weirdly.
TODO(diamond): allow editing older messages. TODO(diamond): lossless Markdown editing (no mentions are lost).
func (*Composer) ReplyTo ¶
ReplyTo sets the event ID that the to-be-sent message is supposed to be replying to. It replaces the previously-set event ID. The event ID is cleared when the message is sent. An empty string clears the replying state.
func (*Composer) SetPlaceholder ¶ added in v0.1.2
SetPlaceholder sets the composer's placeholder. The default is used if an empty string is given.
type Controller ¶
type Controller interface { message.MessageViewer // FocusLatestUserEventID returns the latest event ID of the current user, // or an empty string if none. FocusLatestUserEventID() matrix.EventID // AddSendingMessage adds the given RawEvent as a sending message and // returns a mark that is given to BindSendingMessage. AddSendingMessage(ev event.RoomEvent) (mark interface{}) // AddSendingMessageCustom adds the given RawEvent as a sending message and // the given widget as the widget body, returning a mark that is given to // BindSendingMessage. AddSendingMessageCustom(ev event.RoomEvent, w gtk.Widgetter) (mark interface{}) // StopSendingMessage stops sending the message with the given mark. StopSendingMessage(mark interface{}) bool // BindSendingMessage takes in the mark value returned by AddSendingMessage. BindSendingMessage(mark interface{}, evID matrix.EventID) (replaced bool) }
Controller describes the parent component that the Composer controls.
type Input ¶
type Input struct { *gtk.TextView // contains filtered or unexported fields }
Input is the input component of the message composer.
type InputController ¶
type InputController interface { Controller // IsEditing returns true if we're currently editing a message. IsEditing() bool }
InputController extends Controller to provide additional state getters.