Documentation ¶
Index ¶
- Variables
- func Loop(w *app.Window) error
- func PaintRect(gtx Gtx, size image.Point, fill color.NRGBA)
- type Accordion
- type AppManager
- type ChatNavItem
- func (n *ChatNavItem) AddChild(item *ChatRoomNavItem)
- func (n *ChatNavItem) Children() []NavItem
- func (n *ChatNavItem) ClickCallback()
- func (n *ChatNavItem) IsSelected() bool
- func (n *ChatNavItem) Layout(gtx Gtx) Dim
- func (n *ChatNavItem) NavTitle() string
- func (n *ChatNavItem) Page() Page
- func (n *ChatNavItem) ReplaceChildren(children []NavItem)
- func (n *ChatNavItem) URL() PageURL
- func (n *ChatNavItem) UpdateAndNavigate()
- type ChatPage
- type ChatRoomNavItem
- func (n *ChatRoomNavItem) AddChild(item NavItem)
- func (n *ChatRoomNavItem) Children() []NavItem
- func (n *ChatRoomNavItem) IsSelected() bool
- func (n *ChatRoomNavItem) Layout(gtx Gtx) Dim
- func (n *ChatRoomNavItem) NavTitle() string
- func (n *ChatRoomNavItem) OnClick()
- func (n *ChatRoomNavItem) Page() Page
- func (n *ChatRoomNavItem) ReplaceChildren(children []NavItem)
- func (n *ChatRoomNavItem) URL() PageURL
- type ChatRoomPage
- type ChatRoomPageItem
- type DetailRow
- type Dim
- type ErrorView
- type Gtx
- type IDDetailsView
- type IDListItem
- type IDPage
- type IDsNavItem
- func (n *IDsNavItem) AddChild(item *IDsNavItem)
- func (n *IDsNavItem) Children() []NavItem
- func (n *IDsNavItem) IsSelected() bool
- func (n *IDsNavItem) Layout(gtx Gtx) Dim
- func (n *IDsNavItem) NavTitle() string
- func (n *IDsNavItem) OnClick()
- func (n *IDsNavItem) Page() Page
- func (n *IDsNavItem) ReplaceChildren(children []NavItem)
- func (n *IDsNavItem) URL() PageURL
- type IconButton
- type Loader
- type NavDrawer
- func (n *NavDrawer) AddRootNavItem(item NavItem)
- func (n *NavDrawer) Appear(when time.Time)
- func (n *NavDrawer) Disappear(when time.Time)
- func (n *NavDrawer) DrawerItems() []NavItem
- func (n *NavDrawer) DrawerLayout(gtx Gtx) Dim
- func (n *NavDrawer) DrawerModalLayout() Dim
- func (n *NavDrawer) Layout(gtx Gtx) Dim
- func (n *NavDrawer) LayoutContents(gtx Gtx, anim *component.VisibilityAnimation) Dim
- func (n *NavDrawer) MaxWidth() int
- func (n *NavDrawer) SelectedItem() NavItem
- func (n *NavDrawer) SetNavDestination(page Page)
- func (n *NavDrawer) SetSelectedItem(item NavItem)
- func (n *NavDrawer) ToggleVisibility(when time.Time)
- type NavItem
- type Page
- type PageURL
- type SettingsNavItem
- func (n *SettingsNavItem) Children() []NavItem
- func (n *SettingsNavItem) ClickCallback()
- func (n *SettingsNavItem) IsSelected() bool
- func (n *SettingsNavItem) Layout(gtx Gtx) Dim
- func (n *SettingsNavItem) NavTitle() string
- func (n *SettingsNavItem) Page() Page
- func (n *SettingsNavItem) URL() PageURL
- type SettingsPage
- type View
Constants ¶
This section is empty.
Variables ¶
var DefaultInset = layout.UniformInset(unit.Dp(8))
Functions ¶
Types ¶
type Accordion ¶
type AppManager ¶
type AppManager struct { *app.Window *component.ModalLayer BottomBar bool *material.Theme Service service.Service Constraints layout.Constraints Metric unit.Metric *explorer.Explorer // contains filtered or unexported fields }
AppManager Always call NewAppManager function to create AppManager instance
func NewAppManager ¶
func NewAppManager(w *app.Window) *AppManager
NewAppManager Always call this function to create AppManager instance
func (*AppManager) CurrentPage ¶
func (a *AppManager) CurrentPage() Page
func (*AppManager) GetWindowWidthInDp ¶
func (a *AppManager) GetWindowWidthInDp() int
func (*AppManager) GetWindowWidthInPx ¶
func (a *AppManager) GetWindowWidthInPx() int
func (*AppManager) Layout ¶
func (a *AppManager) Layout(gtx Gtx) Dim
func (*AppManager) PopUp ¶
func (a *AppManager) PopUp()
func (*AppManager) PushPage ¶
func (a *AppManager) PushPage(page Page)
type ChatNavItem ¶
type ChatNavItem struct { // contains filtered or unexported fields }
func NewChatNavItem ¶
func NewChatNavItem(manager *AppManager, theme *material.Theme) *ChatNavItem
func (*ChatNavItem) AddChild ¶
func (n *ChatNavItem) AddChild(item *ChatRoomNavItem)
func (*ChatNavItem) Children ¶
func (n *ChatNavItem) Children() []NavItem
func (*ChatNavItem) ClickCallback ¶
func (n *ChatNavItem) ClickCallback()
func (*ChatNavItem) IsSelected ¶
func (n *ChatNavItem) IsSelected() bool
func (*ChatNavItem) Layout ¶
func (n *ChatNavItem) Layout(gtx Gtx) Dim
func (*ChatNavItem) NavTitle ¶
func (n *ChatNavItem) NavTitle() string
func (*ChatNavItem) Page ¶
func (n *ChatNavItem) Page() Page
func (*ChatNavItem) ReplaceChildren ¶
func (n *ChatNavItem) ReplaceChildren(children []NavItem)
func (*ChatNavItem) URL ¶
func (n *ChatNavItem) URL() PageURL
func (*ChatNavItem) UpdateAndNavigate ¶
func (n *ChatNavItem) UpdateAndNavigate()
UpdateAndNavigate when a contact is created or deleted,
it should be called for setting selectedNavItem
type ChatPage ¶
type ChatPage struct { widget.List *AppManager Theme *material.Theme // contains filtered or unexported fields }
ChatPage Always call NewChatPage function to create ChatPage page
func NewChatPage ¶
func NewChatPage(manager *AppManager, th *material.Theme) *ChatPage
NewChatPage Always call this function to create ChatPage page
func (*ChatPage) Actions ¶
func (nc *ChatPage) Actions() []component.AppBarAction
func (*ChatPage) DrawAppBar ¶
func (*ChatPage) Overflow ¶
func (nc *ChatPage) Overflow() []component.OverflowAction
type ChatRoomNavItem ¶
type ChatRoomNavItem struct { // contains filtered or unexported fields }
func NewChatRoomItem ¶
func NewChatRoomItem(manager *AppManager, theme *material.Theme, navTitle string) *ChatRoomNavItem
func (*ChatRoomNavItem) AddChild ¶
func (n *ChatRoomNavItem) AddChild(item NavItem)
func (*ChatRoomNavItem) Children ¶
func (n *ChatRoomNavItem) Children() []NavItem
func (*ChatRoomNavItem) IsSelected ¶
func (n *ChatRoomNavItem) IsSelected() bool
func (*ChatRoomNavItem) Layout ¶
func (n *ChatRoomNavItem) Layout(gtx Gtx) Dim
func (*ChatRoomNavItem) NavTitle ¶
func (n *ChatRoomNavItem) NavTitle() string
func (*ChatRoomNavItem) OnClick ¶
func (n *ChatRoomNavItem) OnClick()
func (*ChatRoomNavItem) Page ¶
func (n *ChatRoomNavItem) Page() Page
func (*ChatRoomNavItem) ReplaceChildren ¶
func (n *ChatRoomNavItem) ReplaceChildren(children []NavItem)
func (*ChatRoomNavItem) URL ¶
func (n *ChatRoomNavItem) URL() PageURL
type ChatRoomPage ¶
type ChatRoomPage struct { layout.List *AppManager Theme *material.Theme Title string // contains filtered or unexported fields }
ChatRoomPage Always call NewChatRoomPage function to create ChatRoomPage page
func NewChatRoomPage ¶
func NewChatRoomPage(manager *AppManager, th *material.Theme) *ChatRoomPage
NewChatRoomPage Always call this function to create ChatRoomPage page
func (*ChatRoomPage) Actions ¶
func (cp *ChatRoomPage) Actions() []component.AppBarAction
func (*ChatRoomPage) DrawAppBar ¶
func (cp *ChatRoomPage) DrawAppBar(gtx Gtx) Dim
func (*ChatRoomPage) Layout ¶
func (cp *ChatRoomPage) Layout(gtx Gtx) Dim
func (*ChatRoomPage) Overflow ¶
func (cp *ChatRoomPage) Overflow() []component.OverflowAction
type ChatRoomPageItem ¶
func (*ChatRoomPageItem) Layout ¶
func (c *ChatRoomPageItem) Layout(gtx Gtx) (d Dim)
type DetailRow ¶
type DetailRow struct { // PrimaryWidth is the fraction of the available width that should // be allocated to the primary widget. It should be in the range // (0,1.0]. Defaults to 0.3 if not set. PrimaryWidth float32 // Inset is automatically applied to both widgets. This inset is // required, and will default to a uniform 8DP inset if not set. layout.Inset }
DetailRow lays out two widgets in a horizontal row, with the left widget considered the "Primary" widget.
type Dim ¶
type Dim = layout.Dimensions
type IDDetailsView ¶
type IDDetailsView struct { *material.Theme *AppManager Contents string // contains filtered or unexported fields }
func (*IDDetailsView) Layout ¶
func (i *IDDetailsView) Layout(gtx Gtx) (d Dim)
type IDListItem ¶
type IDListItem struct { *material.Theme Selected bool *AppManager // contains filtered or unexported fields }
type IDPage ¶
type IDPage struct { layout.List *AppManager Theme *material.Theme // contains filtered or unexported fields }
IDPage Always call NewIDPage function to create IDPage page
func NewIDPage ¶
func NewIDPage(manager *AppManager, th *material.Theme) *IDPage
NewIDPage Always call this function to create IDPage page
func (*IDPage) Actions ¶
func (ids *IDPage) Actions() []component.AppBarAction
func (*IDPage) DrawAppBar ¶
func (*IDPage) Overflow ¶
func (ids *IDPage) Overflow() []component.OverflowAction
type IDsNavItem ¶
type IDsNavItem struct { // contains filtered or unexported fields }
func NewIDsNavItem ¶
func NewIDsNavItem(manager *AppManager, theme *material.Theme) *IDsNavItem
func (*IDsNavItem) AddChild ¶
func (n *IDsNavItem) AddChild(item *IDsNavItem)
func (*IDsNavItem) Children ¶
func (n *IDsNavItem) Children() []NavItem
func (*IDsNavItem) IsSelected ¶
func (n *IDsNavItem) IsSelected() bool
func (*IDsNavItem) Layout ¶
func (n *IDsNavItem) Layout(gtx Gtx) Dim
func (*IDsNavItem) NavTitle ¶
func (n *IDsNavItem) NavTitle() string
func (*IDsNavItem) OnClick ¶
func (n *IDsNavItem) OnClick()
func (*IDsNavItem) Page ¶
func (n *IDsNavItem) Page() Page
func (*IDsNavItem) ReplaceChildren ¶
func (n *IDsNavItem) ReplaceChildren(children []NavItem)
func (*IDsNavItem) URL ¶
func (n *IDsNavItem) URL() PageURL
type IconButton ¶
func (*IconButton) Layout ¶
func (b *IconButton) Layout(gtx Gtx) Dim
type NavDrawer ¶
type NavDrawer struct { // contains filtered or unexported fields }
func NewNavDrawer ¶
func NewNavDrawer(title, subtitle string, manager *AppManager, th *material.Theme, layer *component.ModalLayer) *NavDrawer
func (*NavDrawer) AddRootNavItem ¶
func (*NavDrawer) DrawerItems ¶
func (*NavDrawer) DrawerLayout ¶
func (*NavDrawer) DrawerModalLayout ¶
func (*NavDrawer) LayoutContents ¶
func (n *NavDrawer) LayoutContents(gtx Gtx, anim *component.VisibilityAnimation) Dim
func (*NavDrawer) SelectedItem ¶
func (*NavDrawer) SetNavDestination ¶
func (*NavDrawer) SetSelectedItem ¶
func (*NavDrawer) ToggleVisibility ¶
type SettingsNavItem ¶
type SettingsNavItem struct { // contains filtered or unexported fields }
func NewSettingsItem ¶
func NewSettingsItem(manager *AppManager, theme *material.Theme) *SettingsNavItem
func (*SettingsNavItem) Children ¶
func (n *SettingsNavItem) Children() []NavItem
func (*SettingsNavItem) ClickCallback ¶
func (n *SettingsNavItem) ClickCallback()
func (*SettingsNavItem) IsSelected ¶
func (n *SettingsNavItem) IsSelected() bool
func (*SettingsNavItem) Layout ¶
func (n *SettingsNavItem) Layout(gtx Gtx) Dim
func (*SettingsNavItem) NavTitle ¶
func (n *SettingsNavItem) NavTitle() string
func (*SettingsNavItem) Page ¶
func (n *SettingsNavItem) Page() Page
func (*SettingsNavItem) URL ¶
func (n *SettingsNavItem) URL() PageURL
type SettingsPage ¶
type SettingsPage struct { widget.List *AppManager Theme *material.Theme // contains filtered or unexported fields }
SettingsPage Always call NewSettingsPage function to create SettingsPage page
func NewSettingsPage ¶
func NewSettingsPage(manager *AppManager, th *material.Theme) *SettingsPage
NewSettingsPage Always call this function to create SettingsPage page
func (*SettingsPage) Actions ¶
func (s *SettingsPage) Actions() []component.AppBarAction
func (*SettingsPage) DrawAppBar ¶
func (s *SettingsPage) DrawAppBar(gtx Gtx) Dim
func (*SettingsPage) Layout ¶
func (s *SettingsPage) Layout(gtx Gtx) Dim
func (*SettingsPage) Overflow ¶
func (s *SettingsPage) Overflow() []component.OverflowAction
Source Files ¶
- accordion.go
- app_manager.go
- applayout.go
- chat_nav_item.go
- chat_page.go
- chat_room_nav_item.go
- chat_room_page.go
- chat_room_page_item.go
- common_ui.go
- common_views.go
- error_view.go
- icon_button.go
- ids_nav_item.go
- ids_page.go
- loader.go
- loop.go
- nav_drawer.go
- nav_item.go
- page.go
- settings_nav_item.go
- settings_page.go
- view.go