Documentation
¶
Index ¶
- Constants
- type AppMenu
- type Controller
- type Header
- type List
- func (sl *List) AddService(svc cchat.Service)
- func (sl *List) AuthenticateSession(svc *Service)
- func (sl *List) MoveService(targetID, movingID string)
- func (sl *List) OnSessionDisconnect(svc *Service, row *session.Row)
- func (sl *List) OnSessionRemove(svc *Service, row *session.Row)
- func (sl *List) SetSizeRequest(w, h int)
- type ListController
- type Service
- func (s *Service) AddLoadingSession(id, name string) *session.Row
- func (s *Service) AddSession(ses cchat.Session) *session.Row
- func (s *Service) AuthenticateSession()
- func (s *Service) Breadcrumb() string
- func (s *Service) GetRevealChild() bool
- func (s *Service) ID() string
- func (s *Service) MoveSession(id, movingID string)
- func (s *Service) OnSessionDisconnect(row *session.Row)
- func (s *Service) ParentBreadcrumb() traverse.Breadcrumber
- func (s *Service) RemoveSession(row *session.Row)
- func (s *Service) RestoreSession(row *session.Row, id string)
- func (s *Service) SaveAllSessions()
- func (s *Service) Service() cchat.Service
- func (s *Service) SessionSelected(srow *session.Row)
- func (s *Service) SetRevealChild(reveal bool)
- type View
- func (v *View) AddService(svc cchat.Service)
- func (v *View) MessengerSelected(srow *session.Row, srv *server.ServerRow)
- func (v *View) OnSessionDisconnect(s *Service, r *session.Row)
- func (v *View) OnSessionRemove(s *Service, r *session.Row)
- func (v *View) SessionSelected(svc *Service, srow *session.Row)
- type ViewController
Constants ¶
View Source
const IconSize = 42
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMenu ¶
type AppMenu struct {
gtk.MenuButton
}
func NewAppMenu ¶
func NewAppMenu() *AppMenu
func (*AppMenu) SetSizeRequest ¶
type Controller ¶
type Controller interface { // SessionSelected is called when SessionSelected(svc *Service, srow *session.Row) // ClearMessenger is called when a nil slice of servers is set. ClearMessenger(*session.Row) // MessengerSelected is wrapped around session's MessengerSelected. MessengerSelected(*session.Row, *server.ServerRow) // AuthenticateSession is called to spawn the authentication dialog. AuthenticateSession(*List, *Service) // OnSessionRemove is called to remove a session. This should also clear out // the message view in the parent package. OnSessionRemove(*Service, *session.Row) // OnSessionDisconnect is here to satisfy session's controller. OnSessionDisconnect(*Service, *session.Row) }
type Header ¶
type Header struct { handy.HeaderBar MenuModel *glib.MenuModel AppMenu *AppMenu SvcName *gtk.Label SesMenu *actions.MenuButton }
func (*Header) AppMenuBindSize ¶
func (h *Header) AppMenuBindSize(c sizeBinder)
func (*Header) SetBreadcrumber ¶
func (h *Header) SetBreadcrumber(b traverse.Breadcrumber)
func (*Header) SetSessionMenu ¶
type List ¶
type List struct { *gtk.ScrolledWindow // same methods as ListController ViewController ListBox *gtk.Box Services []*Service // TODO: collision check }
List is a list of services. Each service is a revealer that contains sessions.
func NewList ¶
func NewList(vctl ViewController) *List
func (*List) AddService ¶
func (*List) AuthenticateSession ¶
func (*List) MoveService ¶
func (*List) OnSessionDisconnect ¶
func (*List) SetSizeRequest ¶
type ListController ¶
type ListController interface { // ClearMessenger is called when a nil slice of servers is set. ClearMessenger(*session.Row) // MessengerSelected is called when a server message row is clicked. MessengerSelected(*session.Row, *server.ServerRow) // SessionSelected tells the view to change the session view. SessionSelected(*Service, *session.Row) // AuthenticateSession tells View to call to the parent's authenticator. AuthenticateSession(*Service) // MoveService tells the view to shift the service to before the target. MoveService(id, targetID string) OnSessionRemove(*Service, *session.Row) OnSessionDisconnect(*Service, *session.Row) }
type Service ¶
type Service struct { ListController *gtk.Box Button *gtk.ToggleButton Icon *roundimage.StillImage Menu *actions.Menu BodyRev *gtk.Revealer // revealed BodyList *session.List // not really supposed to be here Name rich.NameContainer Configurator cchat.Configurator // contains filtered or unexported fields }
Service holds everything that a single service has.
func NewService ¶
func NewService(svc cchat.Service, svclctrl ListController) *Service
func (*Service) AddLoadingSession ¶
func (*Service) AddSession ¶
AddSession adds the given session. It returns nil if the session already exists with the given ID.
func (*Service) AuthenticateSession ¶
func (s *Service) AuthenticateSession()
func (*Service) Breadcrumb ¶
func (*Service) GetRevealChild ¶
GetRevealChild gets whether or not the service is revealing all sessions.
func (*Service) MoveSession ¶
func (*Service) OnSessionDisconnect ¶
func (*Service) ParentBreadcrumb ¶
func (s *Service) ParentBreadcrumb() traverse.Breadcrumber
func (*Service) RemoveSession ¶
func (*Service) SaveAllSessions ¶
func (s *Service) SaveAllSessions()
func (*Service) SessionSelected ¶
func (*Service) SetRevealChild ¶
SetRevealChild sets whether or not the service should reveal all sessions.
type View ¶
type View struct { *gtk.Box Header *Header BottomPane *gtk.Box // 2 panes, but left-most hard-coded Controller // inherit main controller Services *List ServerView *gtk.ScrolledWindow }
func NewView ¶
func NewView(ctrller Controller) *View
func (*View) AddService ¶
func (*View) MessengerSelected ¶
MessengerSelected is called when a row is selected. It updates the header then calls the application's RowSelected method.
Directories
¶
Path | Synopsis |
---|---|
Package config contains UI widgets and renderers for cchat's Configurator interface.
|
Package config contains UI widgets and renderers for cchat's Configurator interface. |
server/traverse
Package traverse implements an extensible interface that allows children widgets to announce state changes to their parent container.
|
Package traverse implements an extensible interface that allows children widgets to announce state changes to their parent container. |
Click to show internal directories.
Click to hide internal directories.