Documentation ¶
Index ¶
- type Controller
- type Page
- func (p *Page) AddSendingMessage(ev event.RoomEvent) interface{}
- func (p *Page) AddSendingMessageCustom(ev event.RoomEvent, w gtk.Widgetter) interface{}
- func (p *Page) BindSendingMessage(mark interface{}, evID matrix.EventID) (replaced bool)
- func (p *Page) Edit(eventID matrix.EventID)
- func (p *Page) FocusLatestUserEventID() matrix.EventID
- func (p *Page) IsActive() bool
- func (p *Page) Load()
- func (p *Page) MarkAsRead()
- func (p *Page) OnRoomEvent(ev event.RoomEvent)
- func (p *Page) OnScrollBottomed()
- func (p *Page) OnTitle(f func(string))
- func (p *Page) ReplyTo(eventID matrix.EventID)
- func (p *Page) RoomID() matrix.RoomID
- func (p *Page) RoomName() string
- func (p *Page) RoomTopic() string
- func (p *Page) ScrollTo(eventID matrix.EventID) bool
- func (p *Page) StopSendingMessage(mark interface{}) bool
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Page ¶
type Page struct { gtk.Widgetter Composer *compose.Composer // contains filtered or unexported fields }
Page describes a tab page, which is a single message view. It satisfies teh MessageViewer interface.
func (*Page) AddSendingMessage ¶
AddSendingMessage adds the given message into the page and returns the row. The user must call BindSendingMessage afterwards to ensure that the added message is merged with the synchronized one.
func (*Page) AddSendingMessageCustom ¶
SetSendingMessageBody sets the body of the message to the given widget. This is useful for sending actions that require displaying some information to the user.
func (*Page) BindSendingMessage ¶
BindSendingMessage is used after the sending message has been sent through the backend, and that an event ID is returned. The page will try to match the message up with an existing event.
func (*Page) FocusLatestUserEventID ¶
FocusLatestUserEventID returns the latest valid event ID of the current user in the room or an empty string if none. It implements compose.Controller.
func (*Page) Load ¶
func (p *Page) Load()
Load asynchronously loads the page. The given callback is called once the page finishes loading.
func (*Page) OnRoomEvent ¶
OnRoomEvent is called on every room timeline event belonging to this room.
func (*Page) OnScrollBottomed ¶
func (p *Page) OnScrollBottomed()
OnScrollBottomed marks the room as read if the page is focused, the window the page is in are focused, and the user is currently scrolled to the bottom.
func (*Page) StopSendingMessage ¶
StopSendingMessage removes the sending message with the given mark.
type View ¶
type View struct { *gtk.Stack // contains filtered or unexported fields }
View describes a view for multiple message views.
func (*View) OpenRoom ¶
OpenRoom opens a Matrix room on the curernt page. If there is no page yet, then a new one is created. If the room already exists in another tab, then that tab is selected.
func (*View) SetPlaceholder ¶
func (v *View) SetPlaceholder(w gtk.Widgetter)
SetPlaceholder sets the placeholder widget.