Documentation ¶
Overview ¶
The gui package is currently expiramental. it provides components and drawing functions to build UIs.
Index ¶
- type ButtonOptions
- type Components
- type Draw
- func (d *Draw) Button(options ButtonOptions) bool
- func (d *Draw) DrawCircle(x, y, radius int, op *DrawOptions)
- func (d *Draw) DrawCurve(start, control, end Position, op *DrawOptions)
- func (d *Draw) DrawLine(points []Position, op *DrawOptions)
- func (d *Draw) DrawRectangle(x, y, width, height int, op *DrawOptions)
- func (d *Draw) DrawSegment(x1, y1, x2, y2 int, op *DrawOptions)
- func (d *Draw) DrawText(text string, options *banana.TextRenderOptions)
- func (d *Draw) DrawTriangle(x1, y1, x2, y2, x3, y3 int, op *DrawOptions)
- func (d *Draw) DrawWave(waveFunc func(x float64) float64, amplitude, frequency, phase float64, ...)
- func (d *Draw) GetTheme() *Theme
- func (d *Draw) IsActive(id string) bool
- func (d *Draw) IsHot(id string) bool
- func (d *Draw) IsOwner(id string) bool
- func (d *Draw) Label(options LabelOptions)
- func (d *Draw) SetActive(id string)
- func (d *Draw) SetHot(id string)
- func (d *Draw) SetOwner(id string)
- func (d *Draw) SetTheme(t *Theme)
- func (d *Draw) Slider(options SliderOptions)
- func (d *Draw) TextBox(options TextBoxOptions)
- func (d *Draw) Toggle(options ToggleOptions)
- type DrawContext
- type DrawOptions
- type LabelOptions
- type Position
- type Shapes
- type SliderOptions
- type State
- type Style
- type TextBoxOptions
- type Theme
- type ToggleOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ButtonOptions ¶
type Components ¶
type Components interface { Label(options LabelOptions) Button(options ButtonOptions) bool Slider(options SliderOptions) TextBox(options TextBoxOptions) Toggle(options ToggleOptions) }
type Draw ¶
func (*Draw) Button ¶
func (d *Draw) Button(options ButtonOptions) bool
func (*Draw) DrawCircle ¶
func (d *Draw) DrawCircle(x, y, radius int, op *DrawOptions)
func (*Draw) DrawCurve ¶
func (d *Draw) DrawCurve(start, control, end Position, op *DrawOptions)
func (*Draw) DrawLine ¶
func (d *Draw) DrawLine(points []Position, op *DrawOptions)
func (*Draw) DrawRectangle ¶
func (d *Draw) DrawRectangle(x, y, width, height int, op *DrawOptions)
func (*Draw) DrawSegment ¶
func (d *Draw) DrawSegment(x1, y1, x2, y2 int, op *DrawOptions)
func (*Draw) DrawTriangle ¶
func (d *Draw) DrawTriangle(x1, y1, x2, y2, x3, y3 int, op *DrawOptions)
func (*Draw) Label ¶
func (d *Draw) Label(options LabelOptions)
func (*Draw) Slider ¶
func (d *Draw) Slider(options SliderOptions)
func (*Draw) TextBox ¶
func (d *Draw) TextBox(options TextBoxOptions)
func (*Draw) Toggle ¶
func (d *Draw) Toggle(options ToggleOptions)
type DrawContext ¶
type DrawContext interface { State Shapes Components DrawText(text string, options *banana.TextRenderOptions) GetTheme() *Theme SetTheme(t *Theme) }
func NewDrawContext ¶
func NewDrawContext(width, height int) DrawContext
type DrawOptions ¶
type DrawOptions struct {
Style
}
type LabelOptions ¶
type Shapes ¶
type Shapes interface { DrawCircle(x int, y int, radius int, op *DrawOptions) DrawLine(points []Position, op *DrawOptions) DrawCurve(start, control, end Position, op *DrawOptions) DrawWave(waveFunc func(x float64) float64, amplitude, frequency, phase float64, startX, endX, y int, op *DrawOptions) DrawRectangle(x int, y int, width int, height int, op *DrawOptions) DrawSegment(x1 int, y1 int, x2 int, y2 int, op *DrawOptions) DrawTriangle(x1, y1, x2, y2, x3, y3 int, op *DrawOptions) }
type SliderOptions ¶
type TextBoxOptions ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.