Documentation ¶
Index ¶
- func ActionPopover(p *gtk.Popover, actions [][2]string)
- func AddClass(styleCtx StyleContexter, classes ...string)
- func AppendMenuItems(menu interface{ ... }, items []gtk.IMenuItem)
- func AttachCSS(ctx StyleContexter, prov *gtk.CssProvider)
- func BinLeftAlignLabel(bin Bin)
- func BindDynamicMenu(connector Connector, constr func(menu *gtk.Menu))
- func BindMenu(connector Connector, menu *gtk.Menu)
- func ChildrenLen(w Container) int
- func DestroyChildren(w Container)
- func EachChildren(w Container, fn func(i int, v interface{}) bool)
- func ForeachChild(w Container, fn func(interface{}) (stop bool))
- func ForeachChildBackwards(w Container, fn func(interface{}) (stop bool))
- func GetName(namer Namer) string
- func HiddenDisabledMenuItem(label string, fn interface{}) *gtk.MenuItem
- func HiddenMenuItem(label string, fn interface{}) *gtk.MenuItem
- func InlineCSS(ctx StyleContexter, css string)
- func LeafletOnFold(leaflet *handy.Leaflet, foldedFn func(folded bool))
- func MenuItem(label string, fn interface{}) *gtk.MenuItem
- func NewActionButton(iconName string, actions [][2]string) *gtk.MenuButton
- func NewButtonIcon(icon string) *gtk.Image
- func NewImageIconPx(icon string, sizepx int) *gtk.Image
- func NewMenuActionButton(actions [][2]string) *gtk.MenuButton
- func NthChild(w Container, n int) interface{}
- func OnRightClick(connector Connector, fn func())
- func PrepareCSS(css string) *gtk.CssProvider
- func PrepareClassCSS(class, css string) (attach func(StyleContexter))
- func PrependMenuItems(menu interface{ ... }, items []gtk.IMenuItem)
- func RemoveChildren(w Container)
- func RemoveClass(styleCtx StyleContexter, classes ...string)
- func SetImageIcon(img ImageIconSetter, icon string, sizepx int)
- func SuggestAction(styleCtx StyleContextFocuser)
- type Bin
- type ClassEnum
- type Connector
- type Container
- type ImageIconSetter
- type LabelTweaker
- type Namer
- type StyleContextFocuser
- type StyleContexter
- type WidgetDestroyer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionPopover ¶
func AddClass ¶
func AddClass(styleCtx StyleContexter, classes ...string)
func AppendMenuItems ¶
func AttachCSS ¶
func AttachCSS(ctx StyleContexter, prov *gtk.CssProvider)
func BinLeftAlignLabel ¶
func BinLeftAlignLabel(bin Bin)
func BindDynamicMenu ¶
func ChildrenLen ¶
ChildrenLen gets the total count of children for the given container.
func DestroyChildren ¶
func DestroyChildren(w Container)
DestroyChildren destroys all children of the given container, removing and freeing them at the same time.
func EachChildren ¶
func ForeachChild ¶
ForeachChildBackwards iterates the list. If the callback returns true, then the loop is broken.
func ForeachChildBackwards ¶
ForeachChildBackwards iterates the list backwards. If the callback returns true, then the loop is broken.
func HiddenDisabledMenuItem ¶
func HiddenMenuItem ¶
func InlineCSS ¶
func InlineCSS(ctx StyleContexter, css string)
func LeafletOnFold ¶
LeafletOnFold binds a callback to a leaflet that would be called when the leaflet's folded state changes.
func NewActionButton ¶
func NewActionButton(iconName string, actions [][2]string) *gtk.MenuButton
NewActionButton creates a new menu button that spawns a popover with the listed actions.
func NewButtonIcon ¶
func NewMenuActionButton ¶
func NewMenuActionButton(actions [][2]string) *gtk.MenuButton
NewMenuActionButton is the same as NewActionButton, but it uses the open-menu-symbolic icon.
func OnRightClick ¶
func OnRightClick(connector Connector, fn func())
func PrepareCSS ¶
func PrepareCSS(css string) *gtk.CssProvider
func PrepareClassCSS ¶
func PrepareClassCSS(class, css string) (attach func(StyleContexter))
func PrependMenuItems ¶
func RemoveChildren ¶
func RemoveChildren(w Container)
RemoveChildren removes all children from the given container. Most of the time, DestroyChildren should be preferred if no children will be reused.
func RemoveClass ¶
func RemoveClass(styleCtx StyleContexter, classes ...string)
func SetImageIcon ¶
func SetImageIcon(img ImageIconSetter, icon string, sizepx int)
func SuggestAction ¶
func SuggestAction(styleCtx StyleContextFocuser)
SuggestAction styles the element to have the suggeested action class.
Types ¶
type ClassEnum ¶
type ClassEnum struct {
// contains filtered or unexported fields
}
func (*ClassEnum) SetClass ¶
func (c *ClassEnum) SetClass(ctx StyleContexter, class string)
type Connector ¶
type Connector interface { Connect(string, interface{}) glib.SignalHandle ConnectAfter(string, interface{}) glib.SignalHandle HandlerDisconnect(glib.SignalHandle) }
type ImageIconSetter ¶
type LabelTweaker ¶
LabelTweaker is used for ActionPopover and other functions that may need to change the alignment of children widgets.
type StyleContextFocuser ¶
type StyleContextFocuser interface { StyleContexter GrabFocus() }
type StyleContexter ¶
type StyleContexter interface {
GetStyleContext() (*gtk.StyleContext, error)
}