Documentation
¶
Index ¶
- Constants
- type CollapsibleLabel
- type ToggleButton
- func (b *ToggleButton) GetShowLabel() bool
- func (b *ToggleButton) SetClicked(clicked func(bool))
- func (b *ToggleButton) SetClickedIfTrue(clickedIfTrue func())
- func (b *ToggleButton) SetFailed(err error, retry func())
- func (b *ToggleButton) SetLoading()
- func (b *ToggleButton) SetNormal()
- func (b *ToggleButton) SetPlaceholderIcon(iconName string, iconSzPx int)
- func (b *ToggleButton) SetSelected(selected bool)
- func (b *ToggleButton) SetShowLabel(showLabel bool)
- func (b *ToggleButton) SetUnreadUnsafe(unread, mentioned bool)
- func (b *ToggleButton) UseEmptyIcon()
Constants ¶
View Source
const IconSize = 38
View Source
const UnreadColorDefs = `
@define-color mentioned rgb(240, 71, 71);
`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollapsibleLabel ¶
type CollapsibleLabel struct{}
type ToggleButton ¶
type ToggleButton struct { gtk.ToggleButton Label *rich.Label // These fields are nil if image is false. Image *roundimage.StillImage Box *gtk.Box // contains filtered or unexported fields }
func NewToggleButton ¶
func NewToggleButton(state rich.LabelStateStorer) *ToggleButton
NewToggleButton creates a new toggle button.
func (*ToggleButton) GetShowLabel ¶
func (b *ToggleButton) GetShowLabel() bool
GetShowLabel gets whether or not the label is being shown.
func (*ToggleButton) SetClicked ¶
func (b *ToggleButton) SetClicked(clicked func(bool))
SetClicked sets the callback to run when clicked. It overrides the previous callback.
func (*ToggleButton) SetClickedIfTrue ¶
func (b *ToggleButton) SetClickedIfTrue(clickedIfTrue func())
func (*ToggleButton) SetFailed ¶
func (b *ToggleButton) SetFailed(err error, retry func())
func (*ToggleButton) SetLoading ¶
func (b *ToggleButton) SetLoading()
SetLoading sets the button's state to loading.
func (*ToggleButton) SetNormal ¶
func (b *ToggleButton) SetNormal()
SetNormal sets the button's state to normal from either loading or failed.
func (*ToggleButton) SetPlaceholderIcon ¶
func (b *ToggleButton) SetPlaceholderIcon(iconName string, iconSzPx int)
func (*ToggleButton) SetSelected ¶
func (b *ToggleButton) SetSelected(selected bool)
SetSelected sets the button's intermediate state and appearance to look like it's clicked without triggering the callback.
func (*ToggleButton) SetShowLabel ¶
func (b *ToggleButton) SetShowLabel(showLabel bool)
SetShowLabel sets whether or not to show the button's label. If the button does not have an image, then the label is always shown.
func (*ToggleButton) SetUnreadUnsafe ¶
func (b *ToggleButton) SetUnreadUnsafe(unread, mentioned bool)
func (*ToggleButton) UseEmptyIcon ¶
func (b *ToggleButton) UseEmptyIcon()
UseEmptyIcon forces the ToggleButton to show an icon, even if it's a placeholder.
Click to show internal directories.
Click to hide internal directories.