Documentation
¶
Index ¶
- func AtoiDef(s string, def int) int
- func ClearChildren(container gtk.Container)
- func ConfirmDialog(parent gtk.IWindow, title, text string) bool
- func Default(def string, value interface{}) string
- func EditDialog(parent gtk.IWindow, title, value, okButton string) (string, bool)
- func EntryText(entry *gtk.Entry, def string) string
- func ErrorDialog(parent gtk.IWindow, text string)
- func FormatSeconds(seconds float64) string
- func FormatSecondsStr(seconds string) string
- func GetTextBufferText(buf *gtk.TextBuffer) (string, error)
- func IsStreamURI(uri string) bool
- func ListBoxScrollToSelected(listBox *gtk.ListBox)
- func MapAttrsToSlice(attrs []mpd.Attrs, attr string) []string
- func MaxInt(a, b int) int
- func NewBoxToggleButton(box *gtk.Box, label, name, icon string, active bool, onClicked func()) *gtk.ToggleButton
- func NewButton(label, tooltip, name, icon string, onClicked func()) *gtk.Button
- func NewLabel(label string) *gtk.Label
- func NewListBoxRow(listBox *gtk.ListBox, useMarkup bool, label, name, icon string, ...) (*gtk.ListBoxRow, *gtk.Box, error)
- func ParseFloatDef(s string, def float64) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtoiDef ¶
AtoiDef converts a string into an int, returning the given default value if conversion failed
func ClearChildren ¶
ClearChildren removes all container's children
func ConfirmDialog ¶
ConfirmDialog shows a confirmation message dialog
func EditDialog ¶
EditDialog show a dialog with a single text entry
func ErrorDialog ¶
ErrorDialog shows an error message dialog
func FormatSeconds ¶
FormatSeconds formats a number seconds as a string
func FormatSecondsStr ¶
FormatSecondsStr formats a number seconds as a string given string input
func GetTextBufferText ¶
func GetTextBufferText(buf *gtk.TextBuffer) (string, error)
GetTextBufferText returns the entire text stored in a text buffer
func IsStreamURI ¶
IsStreamURI returns whether the given URI refers to an Internet stream
func ListBoxScrollToSelected ¶
ListBoxScrollToSelected scrolls the provided list box so that the selected row is centered in the window
func MapAttrsToSlice ¶
MapAttrsToSlice converts a list of Attrs into a string slice by extracting only the provided attribute
func NewBoxToggleButton ¶
func NewBoxToggleButton(box *gtk.Box, label, name, icon string, active bool, onClicked func()) *gtk.ToggleButton
NewBoxToggleButton creates, adds to a box and returns a new toggle button
func NewListBoxRow ¶
func NewListBoxRow(listBox *gtk.ListBox, useMarkup bool, label, name, icon string, widgets ...gtk.IWidget) (*gtk.ListBoxRow, *gtk.Box, error)
NewListBoxRow adds a new row to the list box, a horizontal box, an image and a label to it listBox: list box instance useMarkup: whether label is markup label: text for the row name: name of the row icon: optional icon name for the row widgets: extra widgets to insert into the beginning of the row
func ParseFloatDef ¶
ParseFloatDef converts a string into a float64, returning the given default value if conversion failed
Types ¶
This section is empty.