Versions in this module Expand all Collapse all v0 v0.0.2 Jun 14, 2024 v0.0.1 Jun 14, 2024 Changes in this version + const DrawDefaultMiterLimit + const TableModelColumnAlwaysEditable + const TableModelColumnNeverEditable + func LibuiFreeText(c uintptr) + func Main(f func()) error + func MsgBox(w *Window, title string, description string) + func MsgBoxError(w *Window, title string, description string) + func OnShouldQuit(f func() bool) + func OpenFile(w *Window) string + func QueueMain(f func()) + func Quit() + func SaveFile(w *Window) string + type Align int + const AlignCenter + const AlignEnd + const AlignFill + const AlignStart + type Area struct + func NewArea(handler AreaHandler) *Area + func NewScrollingArea(handler AreaHandler, width int, height int) *Area + func (a *Area) Destroy() + func (a *Area) QueueRedrawAll() + func (a *Area) ScrollTo(x float64, y float64, width float64, height float64) + func (a *Area) SetSize(width int, height int) + type AreaDrawParams struct + AreaHeight float64 + AreaWidth float64 + ClipHeight float64 + ClipWidth float64 + ClipX float64 + ClipY float64 + Context *DrawContext + type AreaHandler interface + DragBroken func(a *Area) + Draw func(a *Area, dp *AreaDrawParams) + KeyEvent func(a *Area, ke *AreaKeyEvent) (handled bool) + MouseCrossed func(a *Area, left bool) + MouseEvent func(a *Area, me *AreaMouseEvent) + type AreaKeyEvent struct + ExtKey ExtKey + Key rune + Modifier Modifiers + Modifiers Modifiers + Up bool + type AreaMouseEvent struct + AreaHeight float64 + AreaWidth float64 + Count uint + Down uint + Held []uint + Modifiers Modifiers + Up uint + X float64 + Y float64 + type At int + const Bottom + const Leading + const Top + const Trailing + type Attribute interface + type AttributedString struct + func NewAttributedString(initialString string) *AttributedString + func (s *AttributedString) AppendUnattributed(str string) + func (s *AttributedString) Delete(start, end int) + func (s *AttributedString) Free() + func (s *AttributedString) InsertAtUnattributed(str string, at int) + func (s *AttributedString) SetAttribute(a Attribute, start, end int) + func (s *AttributedString) String() string + type Box struct + func NewHorizontalBox() *Box + func NewVerticalBox() *Box + func (b *Box) Append(child Control, stretchy bool) + func (b *Box) Delete(n int) + func (b *Box) Destroy() + func (b *Box) Padded() bool + func (b *Box) SetPadded(padded bool) + type Button struct + func NewButton(text string) *Button + func (b *Button) OnClicked(f func(*Button)) + func (b *Button) SetText(text string) + func (b *Button) Text() string + type Checkbox struct + func NewCheckbox(text string) *Checkbox + func (c *Checkbox) Checked() bool + func (c *Checkbox) OnToggled(f func(*Checkbox)) + func (c *Checkbox) SetChecked(checked bool) + func (c *Checkbox) SetText(text string) + func (c *Checkbox) Text() string + type ColorButton struct + func NewColorButton() *ColorButton + func (b *ColorButton) Color() (r, g, bl, a float64) + func (b *ColorButton) OnChanged(f func(*ColorButton)) + func (b *ColorButton) SetColor(r, g, bl, a float64) + type Combobox struct + func NewCombobox() *Combobox + func (c *Combobox) Append(text string) + func (c *Combobox) OnSelected(f func(*Combobox)) + func (c *Combobox) Selected() int + func (c *Combobox) SetSelected(index int) + type Control interface + Destroy func() + Disable func() + Enable func() + Enabled func() bool + Handle func() uintptr + Hide func() + LibuiControl func() uintptr + Show func() + Visible func() bool + func ControlFromLibui(c uintptr) Control + type ControlBase struct + func NewControlBase(iface Control, c uintptr) ControlBase + func (c *ControlBase) Destroy() + func (c *ControlBase) Disable() + func (c *ControlBase) Enable() + func (c *ControlBase) Enabled() bool + func (c *ControlBase) Handle() uintptr + func (c *ControlBase) Hide() + func (c *ControlBase) LibuiControl() uintptr + func (c *ControlBase) Show() + func (c *ControlBase) Visible() bool + type DateTimePicker struct + func NewDatePicker() *DateTimePicker + func NewDateTimePicker() *DateTimePicker + func NewTimePicker() *DateTimePicker + func (d *DateTimePicker) OnChanged(f func(*DateTimePicker)) + func (d *DateTimePicker) SetTime(t time.Time) + func (d *DateTimePicker) Time() time.Time + type DrawBrush struct + A float64 + B float64 + G float64 + OuterRadius float64 + R float64 + Stops []DrawGradientStop + Type DrawBrushType + X0 float64 + X1 float64 + Y0 float64 + Y1 float64 + type DrawBrushType int + const DrawBrushTypeImage + const DrawBrushTypeLinearGradient + const DrawBrushTypeRadialGradient + const DrawBrushTypeSolid + type DrawContext struct + func (c *DrawContext) Clip(p *DrawPath) + func (c *DrawContext) Fill(p *DrawPath, b *DrawBrush) + func (c *DrawContext) Restore() + func (c *DrawContext) Save() + func (c *DrawContext) Stroke(p *DrawPath, b *DrawBrush, sp *DrawStrokeParams) + func (c *DrawContext) Text(tl *DrawTextLayout, x, y float64) + func (c *DrawContext) Transform(m *DrawMatrix) + type DrawFillMode uint + const DrawFillModeAlternate + const DrawFillModeWinding + type DrawGradientStop struct + A float64 + B float64 + G float64 + Pos float64 + R float64 + type DrawLineCap int + const DrawLineCapFlat + const DrawLineCapRound + const DrawLineCapSquare + type DrawLineJoin int + const DrawLineJoinBevel + const DrawLineJoinMiter + const DrawLineJoinRound + type DrawMatrix struct + M11 float64 + M12 float64 + M21 float64 + M22 float64 + M31 float64 + M32 float64 + func DrawNewMatrix() *DrawMatrix + func (m *DrawMatrix) Invert() bool + func (m *DrawMatrix) Invertible() bool + func (m *DrawMatrix) Multiply(m2 *DrawMatrix) + func (m *DrawMatrix) Rotate(x float64, y float64, amount float64) + func (m *DrawMatrix) Scale(xCenter float64, yCenter float64, x float64, y float64) + func (m *DrawMatrix) SetIdentity() + func (m *DrawMatrix) Skew(x float64, y float64, xamount float64, yamount float64) + func (m *DrawMatrix) TransformPoint(x float64, y float64) (xout float64, yout float64) + func (m *DrawMatrix) TransformSize(x float64, y float64) (xout float64, yout float64) + func (m *DrawMatrix) Translate(x float64, y float64) + type DrawPath struct + func DrawNewPath(fillMode DrawFillMode) *DrawPath + func (p *DrawPath) AddRectangle(x float64, y float64, width float64, height float64) + func (p *DrawPath) ArcTo(xCenter float64, yCenter float64, radius float64, startAngle float64, ...) + func (p *DrawPath) BezierTo(c1x float64, c1y float64, c2x float64, c2y float64, endX float64, endY float64) + func (p *DrawPath) CloseFigure() + func (p *DrawPath) End() + func (p *DrawPath) Free() + func (p *DrawPath) LineTo(x float64, y float64) + func (p *DrawPath) NewFigure(x float64, y float64) + func (p *DrawPath) NewFigureWithArc(xCenter float64, yCenter float64, radius float64, startAngle float64, ...) + type DrawStrokeParams struct + Cap DrawLineCap + DashPhase float64 + Dashes []float64 + Join DrawLineJoin + MiterLimit float64 + Thickness float64 + type DrawTextAlign int + const DrawTextAlignCenter + const DrawTextAlignLeft + const DrawTextAlignRight + type DrawTextLayout struct + func DrawNewTextLayout(p *DrawTextLayoutParams) *DrawTextLayout + func (tl *DrawTextLayout) Free() + type DrawTextLayoutParams struct + Align DrawTextAlign + DefaultFont *FontDescriptor + String *AttributedString + Width float64 + type EditableCombobox struct + func NewEditableCombobox() *EditableCombobox + func (e *EditableCombobox) Append(text string) + func (e *EditableCombobox) OnChanged(f func(*EditableCombobox)) + func (e *EditableCombobox) SetText(text string) + func (e *EditableCombobox) Text() string + type Entry struct + func NewEntry() *Entry + func NewPasswordEntry() *Entry + func NewSearchEntry() *Entry + func (e *Entry) OnChanged(f func(*Entry)) + func (e *Entry) ReadOnly() bool + func (e *Entry) SetReadOnly(ro bool) + func (e *Entry) SetText(text string) + func (e *Entry) Text() string + type ExtKey int + const Delete + const Down + const End + const Escape + const F1 + const F10 + const F11 + const F12 + const F2 + const F3 + const F4 + const F5 + const F6 + const F7 + const F8 + const F9 + const Home + const Insert + const Left + const N0 + const N1 + const N2 + const N3 + const N4 + const N5 + const N6 + const N7 + const N8 + const N9 + const NAdd + const NDivide + const NDot + const NEnter + const NMultiply + const NSubtract + const PageDown + const PageUp + const Right + const Up + type FontButton struct + func NewFontButton() *FontButton + func (b *FontButton) Font() *FontDescriptor + func (b *FontButton) OnChanged(f func(*FontButton)) + type FontDescriptor struct + Family TextFamily + Italic TextItalic + Size TextSize + Stretch TextStretch + Weight TextWeight + type Form struct + func NewForm() *Form + func (f *Form) Append(label string, child Control, stretchy bool) + func (f *Form) Delete(n int) + func (f *Form) Destroy() + func (f *Form) Padded() bool + func (f *Form) SetPadded(padded bool) + type Grid struct + func NewGrid() *Grid + func (g *Grid) Append(child Control, left, top int, xspan, yspan int, hexpand bool, halign Align, ...) + func (g *Grid) InsertAt(child Control, existing Control, at At, xspan, yspan int, hexpand bool, ...) + func (g *Grid) Padded() bool + func (g *Grid) SetPadded(padded bool) + type Group struct + func NewGroup(title string) *Group + func (g *Group) Destroy() + func (g *Group) Margined() bool + func (g *Group) SetChild(child Control) + func (g *Group) SetMargined(margined bool) + func (g *Group) SetTitle(title string) + func (g *Group) Title() string + type Image struct + func NewImage(width, height float64) *Image + func (i *Image) Append(img *image.RGBA) + func (i *Image) Free() + type Label struct + func NewLabel(text string) *Label + func (l *Label) SetText(text string) + func (l *Label) Text() string + type Modifiers uint + const Alt + const Ctrl + const Shift + const Super + type MultilineEntry struct + func NewMultilineEntry() *MultilineEntry + func NewNonWrappingMultilineEntry() *MultilineEntry + func (m *MultilineEntry) Append(text string) + func (m *MultilineEntry) OnChanged(f func(*MultilineEntry)) + func (m *MultilineEntry) ReadOnly() bool + func (m *MultilineEntry) SetReadOnly(ro bool) + func (m *MultilineEntry) SetText(text string) + func (m *MultilineEntry) Text() string + type OpenTypeFeatures map[OpenTypeTag]uint32 + type OpenTypeTag uint32 + func ToOpenTypeTag(a, b, c, d byte) OpenTypeTag + type ProgressBar struct + func NewProgressBar() *ProgressBar + func (p *ProgressBar) SetValue(value int) + func (p *ProgressBar) Value() int + type RadioButtons struct + func NewRadioButtons() *RadioButtons + func (r *RadioButtons) Append(text string) + func (r *RadioButtons) OnSelected(f func(*RadioButtons)) + func (r *RadioButtons) Selected() int + func (r *RadioButtons) SetSelected(index int) + type Separator struct + func NewHorizontalSeparator() *Separator + func NewVerticalSeparator() *Separator + type Slider struct + func NewSlider(min int, max int) *Slider + func (s *Slider) OnChanged(f func(*Slider)) + func (s *Slider) SetValue(value int) + func (s *Slider) Value() int + type Spinbox struct + func NewSpinbox(min int, max int) *Spinbox + func (s *Spinbox) OnChanged(f func(*Spinbox)) + func (s *Spinbox) SetValue(value int) + func (s *Spinbox) Value() int + type Tab struct + func NewTab() *Tab + func (t *Tab) Append(name string, child Control) + func (t *Tab) Delete(n int) + func (t *Tab) Destroy() + func (t *Tab) InsertAt(name string, n int, child Control) + func (t *Tab) Margined(n int) bool + func (t *Tab) NumPages() int + func (t *Tab) SetMargined(n int, margined bool) + type Table struct + func NewTable(p *TableParams) *Table + func (t *Table) AppendButtonColumn(name string, buttonModelColumn int, buttonClickableModelColumn int) + func (t *Table) AppendCheckboxColumn(name string, checkboxModelColumn int, checkboxEditableModelColumn int) + func (t *Table) AppendCheckboxTextColumn(name string, checkboxModelColumn int, checkboxEditableModelColumn int, ...) + func (t *Table) AppendImageColumn(name string, imageModelColumn int) + func (t *Table) AppendImageTextColumn(name string, imageModelColumn int, textModelColumn int, ...) + func (t *Table) AppendProgressBarColumn(name string, progressModelColumn int) + func (t *Table) AppendTextColumn(name string, textModelColumn int, textEditableModelColumn int, ...) + type TableColor struct + A float64 + B float64 + G float64 + R float64 + type TableImage struct + I *Image + type TableInt int + const TableFalse + const TableTrue + type TableModel struct + func NewTableModel(handler TableModelHandler) *TableModel + func (m *TableModel) Free() + func (m *TableModel) RowChanged(index int) + func (m *TableModel) RowDeleted(index int) + func (m *TableModel) RowInserted(index int) + type TableModelHandler interface + CellValue func(m *TableModel, row, column int) TableValue + ColumnTypes func(m *TableModel) []TableValue + NumRows func(m *TableModel) int + SetCellValue func(m *TableModel, row, column int, value TableValue) + type TableParams struct + Model *TableModel + RowBackgroundColorModelColumn int + type TableString string + type TableTextColumnOptionalParams struct + ColorModelColumn int + type TableValue interface + type TextBackground struct + A float64 + B float64 + G float64 + R float64 + type TextColor struct + A float64 + B float64 + G float64 + R float64 + type TextFamily string + type TextItalic int + const TextItalicItalic + const TextItalicNormal + const TextItalicOblique + type TextSize float64 + type TextStretch int + const TextStretchCondensed + const TextStretchExpanded + const TextStretchExtraCondensed + const TextStretchExtraExpanded + const TextStretchNormal + const TextStretchSemiCondensed + const TextStretchSemiExpanded + const TextStretchUltraCondensed + const TextStretchUltraExpanded + type TextWeight int + const TextWeightBold + const TextWeightBook + const TextWeightHeavy + const TextWeightLight + const TextWeightMaximum + const TextWeightMedium + const TextWeightMinimum + const TextWeightNormal + const TextWeightSemiBold + const TextWeightThin + const TextWeightUltraBold + const TextWeightUltraHeavy + const TextWeightUltraLight + type Underline int + const UnderlineDouble + const UnderlineNone + const UnderlineSingle + const UnderlineSuggestion + type UnderlineColor int + const UnderlineColorAuxiliary + const UnderlineColorGrammar + const UnderlineColorSpelling + type UnderlineColorCustom struct + A float64 + B float64 + G float64 + R float64 + type Window struct + func NewWindow(title string, width int, height int, hasMenubar bool) *Window + func (w *Window) Borderless() bool + func (w *Window) Destroy() + func (w *Window) Margined() bool + func (w *Window) OnClosing(f func(*Window) bool) + func (w *Window) SetBorderless(borderless bool) + func (w *Window) SetChild(child Control) + func (w *Window) SetMargined(margined bool) + func (w *Window) SetTitle(title string) + func (w *Window) Title() string