Documentation ¶
Overview ¶
Package client contains the MVC for the client's overall state.
Index ¶
- type Channel
- type Client
- func (c *Client) FocusDefault() tui.Widget
- func (c *Client) FocusNext(w tui.Widget) tui.Widget
- func (c *Client) FocusPrev(w tui.Widget) tui.Widget
- func (c *Client) GetNetwork(name string) *Network
- func (c *Client) OnKeyEvent(ev tui.KeyEvent)
- func (c *Client) RemoveNetwork(name string)
- func (c *Client) UpdateChannel(ch data.ChannelState)
- func (c *Client) UpdateNetwork(n data.NetworkState)
- type Network
- type UIController
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { tui.Widget // contains filtered or unexported fields }
func NewChannel ¶
func (*Channel) OnKeyEvent ¶
func (c *Channel) OnKeyEvent(ev tui.KeyEvent)
func (*Channel) SetFocused ¶
func (*Channel) UpdateChannel ¶
func (c *Channel) UpdateChannel(ch data.ChannelState)
type Client ¶
type Client struct { tui.Widget // contains filtered or unexported fields }
func New ¶
func New(ctl UIController, provider backend.DataPublisher) *Client
func (*Client) FocusDefault ¶
func (c *Client) FocusDefault() tui.Widget
func (*Client) GetNetwork ¶
func (*Client) OnKeyEvent ¶
func (c *Client) OnKeyEvent(ev tui.KeyEvent)
func (*Client) RemoveNetwork ¶
func (*Client) UpdateChannel ¶
func (c *Client) UpdateChannel(ch data.ChannelState)
func (*Client) UpdateNetwork ¶
func (c *Client) UpdateNetwork(n data.NetworkState)
type Network ¶
type Network struct { *tui.Box // contains filtered or unexported fields }
Network is the implementation of a NetworkView.
func NewNetwork ¶
NewNetwork gives a new Network view.
func (*Network) GetChannel ¶
func (*Network) RemoveChannel ¶
func (*Network) SetFocused ¶
func (*Network) UpdateNetwork ¶
func (n *Network) UpdateNetwork(state data.NetworkState)
type UIController ¶
type UIController interface { Update(func()) ActivateChannel(network, channel string) SetWidget(tui.Widget) Quit() }
UIController handles UI events from a client View. All its methods should be called within an Update closure.
Click to show internal directories.
Click to hide internal directories.