Documentation
¶
Index ¶
- func Button(disabled *bool, w glui.Widget, onClick func(ctx *glui.Context, area geom.Rect)) glui.Widget
- func ChangeColorAlpha(c glen.Color, a float32) glen.Color
- func CheckDisabled(disabled *bool, widget glui.Widget) glui.Widget
- func Checkbox(disabled, checked *bool, onChange func(checked bool)) glui.Widget
- func Color(c string) glen.Color
- func Input(disabled *bool, placeholder glui.Widget, text string, ...) glui.Widget
- func InputFunc(disabled *bool, placeholder glui.Widget, content func() string, ...) glui.Widget
- func IsValidColor(c string) bool
- func Label(text string) glui.Widget
- func LabelWithStyle(text string, style FontStyle) glui.Widget
- func OnDoubleClick(onSingleClick, onDoubleClick func(ctx *glui.Context, area geom.Rect)) func(ctx *glui.Context, area geom.Rect)
- func OnDoubleClickT[T any](onSingleClick, onDoubleClick func(item T, ctx *glui.Context, area geom.Rect)) func(item T, ctx *glui.Context, area geom.Rect)
- func Slider(disabled *bool, axis glui.Axis, ratio *float32, ...) glui.Widget
- func Strings(s ...string) glui.WidgetList
- func Text(text string) glui.Widget
- func TextFunc(text func() string) glui.Widget
- func TextFuncWithStyle(text func() string, style FontStyle) glui.Widget
- func TextWithStyle(text string, style FontStyle) glui.Widget
- func Tooltip(disabled *bool, widget, tip glui.Widget) glui.Widget
- func TreeFS(fsys fs.FS, ready *atomic.Bool, ...) glui.Widget
- type BackgroundStyle
- type ButtonStyle
- type CheckboxStyle
- type Dropdown
- type DropdownStyle
- type FontStyle
- type InputStyle
- type List
- type ListStyle
- type Palette
- type ProgressBar
- type SliderStyle
- type Split
- type SplitStyle
- type Tabs
- type TabsStyle
- type Theme
- type TooltipStyle
- type Tree
- type TreeStyle
- type Wrap
- type WrapStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidColor ¶
func OnDoubleClick ¶
func OnDoubleClickT ¶
func Strings ¶
func Strings(s ...string) glui.WidgetList
Types ¶
type BackgroundStyle ¶
func (BackgroundStyle) Widget ¶
func (bg BackgroundStyle) Widget() glui.Widget
type ButtonStyle ¶
type ButtonStyle struct {
Padding float32
Background BackgroundStyle
Hover glui.Rect
}
type CheckboxStyle ¶
type DropdownStyle ¶
type DropdownStyle struct {
PopupClosed glui.Widget
PopupOpen glui.Widget
PopupBackground BackgroundStyle
}
type FontStyle ¶
type InputStyle ¶
type Palette ¶
type Palette struct {
BG glen.Color
FG glen.Color
Selection glen.Color
Comment glen.Color
BGLight glen.Color
BGLighter glen.Color
BGDark glen.Color
BGDarker glen.Color
Cyan glen.Color
Green glen.Color
Orange glen.Color
Pink glen.Color
Purple glen.Color
Red glen.Color
Yellow glen.Color
Disabled func(glen.Color) glen.Color
}
type ProgressBar ¶
TODO ProgressBar
type SliderStyle ¶
type SliderStyle struct {
Padding float32
Background BackgroundStyle
Handle glui.Widget
}
type SplitStyle ¶
type SplitStyle struct {
Padding float32
Background BackgroundStyle
Resizing BackgroundStyle
Hover BackgroundStyle
HandleHor glui.Widget
HandleVer glui.Widget
}
type Theme ¶
type Theme struct {
Palette Palette
Busy glui.Widget
Body1 FontStyle
H1 FontStyle
H2 FontStyle
H3 FontStyle
H4 FontStyle
H5 FontStyle
Small FontStyle
Strong FontStyle
Button ButtonStyle
Checkbox CheckboxStyle
Dropdown DropdownStyle
Input InputStyle
List ListStyle
Slider SliderStyle
Split SplitStyle
Tabs TabsStyle
Tooltip TooltipStyle
Tree TreeStyle
Wrap WrapStyle
}
var Default *Theme
type TooltipStyle ¶
type TooltipStyle struct {
Padding float32
Background BackgroundStyle
Delay time.Duration
Label FontStyle
}
Click to show internal directories.
Click to hide internal directories.