mustard

package module
Version: v0.0.0-...-beb2b4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	//DefaultCursor - Default arrow cursor
	DefaultCursor cursorType = iota
	//PointerCursor - Pointer cursor
	PointerCursor
)
View Source
const (
	PositionRelative widgetPosition = iota
	PositionAbsolute
)

Variables

This section is empty.

Functions

func SetGLFWHints

func SetGLFWHints()

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func CreateNewApp

func CreateNewApp(name string) *App

func (*App) AddWindow

func (app *App) AddWindow(window *Window)

func (*App) DestroyWindow

func (app *App) DestroyWindow(window *Window)

func (*App) Run

func (app *App) Run(callback func())

type ButtonWidget

type ButtonWidget struct {
	// contains filtered or unexported fields
}

func CreateButtonWidget

func CreateButtonWidget(label string, asset []byte) *ButtonWidget

CreateButtonWidget - Creates and returns a new Button Widget

func (*ButtonWidget) AttachWidget

func (widget *ButtonWidget) AttachWidget(wd Widget)

func (*ButtonWidget) BaseWidget

func (widget *ButtonWidget) BaseWidget() *baseWidget

func (*ButtonWidget) Buffer

func (widget *ButtonWidget) Buffer() *image.RGBA

func (*ButtonWidget) Click

func (button *ButtonWidget) Click()

func (*ButtonWidget) ComputedBox

func (widget *ButtonWidget) ComputedBox() *box

func (*ButtonWidget) DetachWidget

func (widget *ButtonWidget) DetachWidget(wd Widget) Widget

func (*ButtonWidget) GetContent

func (button *ButtonWidget) GetContent() string

GetContent - Gets the button content

func (*ButtonWidget) GetHeight

func (widget *ButtonWidget) GetHeight() float64

func (*ButtonWidget) GetLeft

func (widget *ButtonWidget) GetLeft() float64

func (*ButtonWidget) GetRect

func (widget *ButtonWidget) GetRect() (float64, float64, float64, float64)

func (*ButtonWidget) GetTop

func (widget *ButtonWidget) GetTop() float64

func (*ButtonWidget) GetWidth

func (widget *ButtonWidget) GetWidth() float64

func (*ButtonWidget) IsPointInside

func (widget *ButtonWidget) IsPointInside(x, y float64) bool

func (*ButtonWidget) NeedsRepaint

func (widget *ButtonWidget) NeedsRepaint() bool

func (*ButtonWidget) RequestReflow

func (widget *ButtonWidget) RequestReflow()

func (*ButtonWidget) RequestRepaint

func (widget *ButtonWidget) RequestRepaint()

func (*ButtonWidget) SetBackgroundColor

func (button *ButtonWidget) SetBackgroundColor(backgroundColor string)

SetBackgroundColor - Sets the button background color

func (*ButtonWidget) SetBuffer

func (widget *ButtonWidget) SetBuffer(buffer *image.RGBA)

func (*ButtonWidget) SetContent

func (button *ButtonWidget) SetContent(content string)

SetContent - Sets the button content

func (*ButtonWidget) SetFontColor

func (button *ButtonWidget) SetFontColor(fontColor string)

SetFontColor - Sets the button font color

func (*ButtonWidget) SetFontSize

func (button *ButtonWidget) SetFontSize(fontSize float64)

SetFontSize - Sets the button font size

func (*ButtonWidget) SetHeight

func (button *ButtonWidget) SetHeight(height float64)

SetHeight - Sets the button height

func (*ButtonWidget) SetNeedsRepaint

func (widget *ButtonWidget) SetNeedsRepaint(value bool)

func (*ButtonWidget) SetPadding

func (button *ButtonWidget) SetPadding(padding float64)

SetFontSize - Sets the button font size

func (*ButtonWidget) SetWidth

func (button *ButtonWidget) SetWidth(width float64)

SetWidth - Sets the button width

func (*ButtonWidget) SetWindow

func (widget *ButtonWidget) SetWindow(window *Window)

func (*ButtonWidget) Widgets

func (widget *ButtonWidget) Widgets() []Widget

type CanvasWidget

type CanvasWidget struct {
	// contains filtered or unexported fields
}

func CreateCanvasWidget

func CreateCanvasWidget(renderer func(*CanvasWidget)) *CanvasWidget

CreateImageWidget - Creates and returns a new Image Widget

func (*CanvasWidget) AttachWidget

func (widget *CanvasWidget) AttachWidget(wd Widget)

func (*CanvasWidget) BaseWidget

func (widget *CanvasWidget) BaseWidget() *baseWidget

func (*CanvasWidget) Buffer

func (widget *CanvasWidget) Buffer() *image.RGBA

func (*CanvasWidget) ComputedBox

func (widget *CanvasWidget) ComputedBox() *box

func (*CanvasWidget) DetachWidget

func (widget *CanvasWidget) DetachWidget(wd Widget) Widget

func (*CanvasWidget) DisableScrolling

func (canvas *CanvasWidget) DisableScrolling()

func (*CanvasWidget) EnableScrolling

func (canvas *CanvasWidget) EnableScrolling()

func (*CanvasWidget) GetContext

func (canvas *CanvasWidget) GetContext() *gg.Context

func (*CanvasWidget) GetHeight

func (widget *CanvasWidget) GetHeight() float64

func (*CanvasWidget) GetLeft

func (widget *CanvasWidget) GetLeft() float64

func (*CanvasWidget) GetOffset

func (canvas *CanvasWidget) GetOffset() int

func (*CanvasWidget) GetRect

func (widget *CanvasWidget) GetRect() (float64, float64, float64, float64)

func (*CanvasWidget) GetTop

func (widget *CanvasWidget) GetTop() float64

func (*CanvasWidget) GetWidth

func (widget *CanvasWidget) GetWidth() float64

func (*CanvasWidget) IsPointInside

func (widget *CanvasWidget) IsPointInside(x, y float64) bool

func (*CanvasWidget) NeedsRepaint

func (widget *CanvasWidget) NeedsRepaint() bool

func (*CanvasWidget) RequestReflow

func (widget *CanvasWidget) RequestReflow()

func (*CanvasWidget) RequestRepaint

func (widget *CanvasWidget) RequestRepaint()

func (*CanvasWidget) SetBuffer

func (widget *CanvasWidget) SetBuffer(buffer *image.RGBA)

func (*CanvasWidget) SetContext

func (canvas *CanvasWidget) SetContext(ctx *gg.Context)

func (*CanvasWidget) SetDrawingRepaint

func (cavas *CanvasWidget) SetDrawingRepaint(repaint bool)

func (*CanvasWidget) SetHeight

func (canvas *CanvasWidget) SetHeight(height float64)

SetHeight - Sets the label height

func (*CanvasWidget) SetNeedsRepaint

func (widget *CanvasWidget) SetNeedsRepaint(value bool)

func (*CanvasWidget) SetOffset

func (canvas *CanvasWidget) SetOffset(offset int)

func (*CanvasWidget) SetWidth

func (canvas *CanvasWidget) SetWidth(width float64)

SetWidth - Sets the label width

func (*CanvasWidget) SetWindow

func (widget *CanvasWidget) SetWindow(window *Window)

func (*CanvasWidget) Widgets

func (widget *CanvasWidget) Widgets() []Widget

type Frame

type Frame struct {
	// contains filtered or unexported fields
}

Frame - Layout frame type

func CreateFrame

func CreateFrame(orientation FrameOrientation) *Frame

CreateFrame - Creates and returns a new Frame

func ParseMui

func ParseMui(muiString string) *Frame

func (*Frame) AttachWidget

func (widget *Frame) AttachWidget(wd Widget)

func (*Frame) BaseWidget

func (widget *Frame) BaseWidget() *baseWidget

func (*Frame) Buffer

func (widget *Frame) Buffer() *image.RGBA

func (*Frame) ComputedBox

func (widget *Frame) ComputedBox() *box

func (*Frame) DetachWidget

func (widget *Frame) DetachWidget(wd Widget) Widget

func (*Frame) GetHeight

func (frame *Frame) GetHeight() float64

SetHeight - Sets the frame height

func (*Frame) GetLeft

func (widget *Frame) GetLeft() float64

func (*Frame) GetRect

func (widget *Frame) GetRect() (float64, float64, float64, float64)

func (*Frame) GetTop

func (widget *Frame) GetTop() float64

func (*Frame) GetWidth

func (widget *Frame) GetWidth() float64

func (*Frame) IsPointInside

func (widget *Frame) IsPointInside(x, y float64) bool

func (*Frame) NeedsRepaint

func (widget *Frame) NeedsRepaint() bool

func (*Frame) RequestReflow

func (widget *Frame) RequestReflow()

func (*Frame) RequestRepaint

func (widget *Frame) RequestRepaint()

func (*Frame) SetBackgroundColor

func (frame *Frame) SetBackgroundColor(backgroundColor string)

SetBackgroundColor - Sets the frame background color

func (*Frame) SetBuffer

func (widget *Frame) SetBuffer(buffer *image.RGBA)

func (*Frame) SetHeight

func (frame *Frame) SetHeight(height float64)

SetHeight - Sets the frame height

func (*Frame) SetNeedsRepaint

func (widget *Frame) SetNeedsRepaint(value bool)

func (*Frame) SetWidth

func (frame *Frame) SetWidth(width float64)

SetWidth - Sets the frame width

func (*Frame) SetWindow

func (widget *Frame) SetWindow(window *Window)

func (*Frame) Widgets

func (widget *Frame) Widgets() []Widget

type FrameOrientation

type FrameOrientation int
const (
	//VerticalFrame - Vertical frame orientation
	VerticalFrame FrameOrientation = iota

	//HorizontalFrame - Horizontal frame orientation
	HorizontalFrame
)

type ImageWidget

type ImageWidget struct {
	// contains filtered or unexported fields
}

func CreateImageWidget

func CreateImageWidget(path []byte) *ImageWidget

CreateImageWidget - Creates and returns a new Image Widget

func (*ImageWidget) AttachWidget

func (widget *ImageWidget) AttachWidget(wd Widget)

func (*ImageWidget) BaseWidget

func (widget *ImageWidget) BaseWidget() *baseWidget

func (*ImageWidget) Buffer

func (widget *ImageWidget) Buffer() *image.RGBA

func (*ImageWidget) ComputedBox

func (widget *ImageWidget) ComputedBox() *box

func (*ImageWidget) DetachWidget

func (widget *ImageWidget) DetachWidget(wd Widget) Widget

func (*ImageWidget) GetHeight

func (widget *ImageWidget) GetHeight() float64

func (*ImageWidget) GetLeft

func (widget *ImageWidget) GetLeft() float64

func (*ImageWidget) GetRect

func (widget *ImageWidget) GetRect() (float64, float64, float64, float64)

func (*ImageWidget) GetTop

func (widget *ImageWidget) GetTop() float64

func (*ImageWidget) GetWidth

func (widget *ImageWidget) GetWidth() float64

func (*ImageWidget) IsPointInside

func (widget *ImageWidget) IsPointInside(x, y float64) bool

func (*ImageWidget) NeedsRepaint

func (widget *ImageWidget) NeedsRepaint() bool

func (*ImageWidget) RequestReflow

func (widget *ImageWidget) RequestReflow()

func (*ImageWidget) RequestRepaint

func (widget *ImageWidget) RequestRepaint()

func (*ImageWidget) SetBuffer

func (widget *ImageWidget) SetBuffer(buffer *image.RGBA)

func (*ImageWidget) SetHeight

func (label *ImageWidget) SetHeight(height float64)

SetHeight - Sets the label height

func (*ImageWidget) SetNeedsRepaint

func (widget *ImageWidget) SetNeedsRepaint(value bool)

func (*ImageWidget) SetWidth

func (label *ImageWidget) SetWidth(width float64)

SetWidth - Sets the label width

func (*ImageWidget) SetWindow

func (widget *ImageWidget) SetWindow(window *Window)

func (*ImageWidget) Widgets

func (widget *ImageWidget) Widgets() []Widget

type InputWidget

type InputWidget struct {
	// contains filtered or unexported fields
}

func CreateInputWidget

func CreateInputWidget() *InputWidget

CreateInputWidget - Creates and returns a new Input Widget

func (*InputWidget) AttachWidget

func (widget *InputWidget) AttachWidget(wd Widget)

func (*InputWidget) BaseWidget

func (widget *InputWidget) BaseWidget() *baseWidget

func (*InputWidget) Buffer

func (widget *InputWidget) Buffer() *image.RGBA

func (*InputWidget) ComputedBox

func (widget *InputWidget) ComputedBox() *box

func (*InputWidget) DetachWidget

func (widget *InputWidget) DetachWidget(wd Widget) Widget

func (*InputWidget) GetCursorPos

func (input *InputWidget) GetCursorPos() int

func (*InputWidget) GetHeight

func (widget *InputWidget) GetHeight() float64

func (*InputWidget) GetLeft

func (widget *InputWidget) GetLeft() float64

func (*InputWidget) GetRect

func (widget *InputWidget) GetRect() (float64, float64, float64, float64)

func (*InputWidget) GetTop

func (widget *InputWidget) GetTop() float64

func (*InputWidget) GetValue

func (input *InputWidget) GetValue() string

SetFontColor - Sets the input font color

func (*InputWidget) GetWidth

func (widget *InputWidget) GetWidth() float64

func (*InputWidget) IsPointInside

func (widget *InputWidget) IsPointInside(x, y float64) bool

func (*InputWidget) NeedsRepaint

func (widget *InputWidget) NeedsRepaint() bool

func (*InputWidget) RequestReflow

func (widget *InputWidget) RequestReflow()

func (*InputWidget) RequestRepaint

func (widget *InputWidget) RequestRepaint()

func (*InputWidget) SetBackgroundColor

func (input *InputWidget) SetBackgroundColor(backgroundColor string)

SetBackgroundColor - Sets the input background color

func (*InputWidget) SetBuffer

func (widget *InputWidget) SetBuffer(buffer *image.RGBA)

func (*InputWidget) SetFontColor

func (input *InputWidget) SetFontColor(fontColor string)

SetFontColor - Sets the input font color

func (*InputWidget) SetFontSize

func (input *InputWidget) SetFontSize(fontSize float64)

SetFontSize - Sets the input font size

func (*InputWidget) SetHeight

func (input *InputWidget) SetHeight(height float64)

SetHeight - Sets the input height

func (*InputWidget) SetNeedsRepaint

func (widget *InputWidget) SetNeedsRepaint(value bool)

func (*InputWidget) SetReturnCallback

func (input *InputWidget) SetReturnCallback(returnCallback func())

func (*InputWidget) SetValue

func (input *InputWidget) SetValue(value string)

SetFontColor - Sets the input font color

func (*InputWidget) SetWidth

func (input *InputWidget) SetWidth(width float64)

SetWidth - Sets the input width

func (*InputWidget) SetWindow

func (widget *InputWidget) SetWindow(window *Window)

func (*InputWidget) Widgets

func (widget *InputWidget) Widgets() []Widget

type LabelWidget

type LabelWidget struct {
	// contains filtered or unexported fields
}

func CreateLabelWidget

func CreateLabelWidget(content string) *LabelWidget

CreateLabelWidget - Creates and returns a new Label Widget

func (*LabelWidget) AttachWidget

func (widget *LabelWidget) AttachWidget(wd Widget)

func (*LabelWidget) BaseWidget

func (widget *LabelWidget) BaseWidget() *baseWidget

func (*LabelWidget) Buffer

func (widget *LabelWidget) Buffer() *image.RGBA

func (*LabelWidget) ComputedBox

func (widget *LabelWidget) ComputedBox() *box

func (*LabelWidget) DetachWidget

func (widget *LabelWidget) DetachWidget(wd Widget) Widget

func (*LabelWidget) GetContent

func (label *LabelWidget) GetContent() string

GetContent - Gets the label content

func (*LabelWidget) GetHeight

func (widget *LabelWidget) GetHeight() float64

func (*LabelWidget) GetLeft

func (widget *LabelWidget) GetLeft() float64

func (*LabelWidget) GetRect

func (widget *LabelWidget) GetRect() (float64, float64, float64, float64)

func (*LabelWidget) GetTop

func (widget *LabelWidget) GetTop() float64

func (*LabelWidget) GetWidth

func (widget *LabelWidget) GetWidth() float64

func (*LabelWidget) IsPointInside

func (widget *LabelWidget) IsPointInside(x, y float64) bool

func (*LabelWidget) NeedsRepaint

func (widget *LabelWidget) NeedsRepaint() bool

func (*LabelWidget) RequestReflow

func (widget *LabelWidget) RequestReflow()

func (*LabelWidget) RequestRepaint

func (widget *LabelWidget) RequestRepaint()

func (*LabelWidget) SetBackgroundColor

func (label *LabelWidget) SetBackgroundColor(backgroundColor string)

SetBackgroundColor - Sets the label background color

func (*LabelWidget) SetBuffer

func (widget *LabelWidget) SetBuffer(buffer *image.RGBA)

func (*LabelWidget) SetContent

func (label *LabelWidget) SetContent(content string)

SetContent - Sets the label content

func (*LabelWidget) SetFontColor

func (label *LabelWidget) SetFontColor(fontColor string)

SetFontColor - Sets the label font color

func (*LabelWidget) SetFontSize

func (label *LabelWidget) SetFontSize(fontSize float64)

SetFontSize - Sets the label font size

func (*LabelWidget) SetHeight

func (label *LabelWidget) SetHeight(height float64)

SetHeight - Sets the label height

func (*LabelWidget) SetNeedsRepaint

func (widget *LabelWidget) SetNeedsRepaint(value bool)

func (*LabelWidget) SetWidth

func (label *LabelWidget) SetWidth(width float64)

SetWidth - Sets the label width

func (*LabelWidget) SetWindow

func (widget *LabelWidget) SetWindow(window *Window)

func (*LabelWidget) Widgets

func (widget *LabelWidget) Widgets() []Widget

type MustardKey

type MustardKey int
const (
	MouseLeft MustardKey = iota
	MouseRight
)

type Overlay

type Overlay struct {
	// contains filtered or unexported fields
}

func CreateStaticOverlay

func CreateStaticOverlay(ref string, ctx *gg.Context, position image.Point) *Overlay

type ScrollBarOrientation

type ScrollBarOrientation int
const (
	VerticalScrollBar ScrollBarOrientation = iota
	HorizontalScrollBar
)

type ScrollBarWidget

type ScrollBarWidget struct {
	// contains filtered or unexported fields
}

func CreateScrollBarWidget

func CreateScrollBarWidget(orientation ScrollBarOrientation) *ScrollBarWidget

CreateScrollBarWidget - Creates and returns a new ScrollBar Widget

func (*ScrollBarWidget) AttachWidget

func (widget *ScrollBarWidget) AttachWidget(wd Widget)

func (*ScrollBarWidget) BaseWidget

func (widget *ScrollBarWidget) BaseWidget() *baseWidget

func (*ScrollBarWidget) Buffer

func (widget *ScrollBarWidget) Buffer() *image.RGBA

func (*ScrollBarWidget) ComputedBox

func (widget *ScrollBarWidget) ComputedBox() *box

func (*ScrollBarWidget) DetachWidget

func (widget *ScrollBarWidget) DetachWidget(wd Widget) Widget

func (*ScrollBarWidget) GetHeight

func (widget *ScrollBarWidget) GetHeight() float64

func (*ScrollBarWidget) GetLeft

func (widget *ScrollBarWidget) GetLeft() float64

func (*ScrollBarWidget) GetRect

func (widget *ScrollBarWidget) GetRect() (float64, float64, float64, float64)

func (*ScrollBarWidget) GetTop

func (widget *ScrollBarWidget) GetTop() float64

func (*ScrollBarWidget) GetWidth

func (widget *ScrollBarWidget) GetWidth() float64

func (*ScrollBarWidget) IsPointInside

func (widget *ScrollBarWidget) IsPointInside(x, y float64) bool

func (*ScrollBarWidget) NeedsRepaint

func (widget *ScrollBarWidget) NeedsRepaint() bool

func (*ScrollBarWidget) RequestReflow

func (widget *ScrollBarWidget) RequestReflow()

func (*ScrollBarWidget) RequestRepaint

func (widget *ScrollBarWidget) RequestRepaint()

func (*ScrollBarWidget) SetBuffer

func (widget *ScrollBarWidget) SetBuffer(buffer *image.RGBA)

func (*ScrollBarWidget) SetHeight

func (scrollBar *ScrollBarWidget) SetHeight(height float64)

SetHeight - Sets the scrollBar height

func (*ScrollBarWidget) SetNeedsRepaint

func (widget *ScrollBarWidget) SetNeedsRepaint(value bool)

func (*ScrollBarWidget) SetScrollerOffset

func (scrollBar *ScrollBarWidget) SetScrollerOffset(scrollerOffset float64)

func (*ScrollBarWidget) SetScrollerSize

func (scrollBar *ScrollBarWidget) SetScrollerSize(scrollerSize float64)

func (*ScrollBarWidget) SetThumbColor

func (scrollBar *ScrollBarWidget) SetThumbColor(thumbColor string)

func (*ScrollBarWidget) SetThumbSize

func (scrollBar *ScrollBarWidget) SetThumbSize(thumbSize float64)

func (*ScrollBarWidget) SetTrackColor

func (scrollBar *ScrollBarWidget) SetTrackColor(backgroundColor string)

SetBackgroundColor - Sets the scrollBar background color

func (*ScrollBarWidget) SetWidth

func (scrollBar *ScrollBarWidget) SetWidth(width float64)

SetWidth - Sets the scrollBar width

func (*ScrollBarWidget) SetWindow

func (widget *ScrollBarWidget) SetWindow(window *Window)

func (*ScrollBarWidget) Widgets

func (widget *ScrollBarWidget) Widgets() []Widget

type TextWidget

type TextWidget struct {
	// contains filtered or unexported fields
}

func CreateTextWidget

func CreateTextWidget(content string) *TextWidget

CreateTextWidget - Creates and returns a new Text Widget

func (*TextWidget) AttachWidget

func (widget *TextWidget) AttachWidget(wd Widget)

func (*TextWidget) BaseWidget

func (widget *TextWidget) BaseWidget() *baseWidget

func (*TextWidget) Buffer

func (widget *TextWidget) Buffer() *image.RGBA

func (*TextWidget) ComputedBox

func (widget *TextWidget) ComputedBox() *box

func (*TextWidget) DetachWidget

func (widget *TextWidget) DetachWidget(wd Widget) Widget

func (*TextWidget) GetContent

func (text *TextWidget) GetContent() string

GetContent - Gets the text content

func (*TextWidget) GetHeight

func (widget *TextWidget) GetHeight() float64

func (*TextWidget) GetLeft

func (widget *TextWidget) GetLeft() float64

func (*TextWidget) GetRect

func (widget *TextWidget) GetRect() (float64, float64, float64, float64)

func (*TextWidget) GetTop

func (widget *TextWidget) GetTop() float64

func (*TextWidget) GetWidth

func (widget *TextWidget) GetWidth() float64

func (*TextWidget) IsPointInside

func (widget *TextWidget) IsPointInside(x, y float64) bool

func (*TextWidget) NeedsRepaint

func (widget *TextWidget) NeedsRepaint() bool

func (*TextWidget) RequestReflow

func (widget *TextWidget) RequestReflow()

func (*TextWidget) RequestRepaint

func (widget *TextWidget) RequestRepaint()

func (*TextWidget) SetBackgroundColor

func (text *TextWidget) SetBackgroundColor(backgroundColor string)

SetBackgroundColor - Sets the text background color

func (*TextWidget) SetBuffer

func (widget *TextWidget) SetBuffer(buffer *image.RGBA)

func (*TextWidget) SetContent

func (text *TextWidget) SetContent(content string)

SetContent - Sets the text content

func (*TextWidget) SetFontColor

func (text *TextWidget) SetFontColor(fontColor string)

SetFontColor - Sets the text font color

func (*TextWidget) SetFontSize

func (text *TextWidget) SetFontSize(fontSize float64)

SetFontSize - Sets the text font size

func (*TextWidget) SetHeight

func (text *TextWidget) SetHeight(height float64)

SetHeight - Sets the text height

func (*TextWidget) SetNeedsRepaint

func (widget *TextWidget) SetNeedsRepaint(value bool)

func (*TextWidget) SetWidth

func (text *TextWidget) SetWidth(width float64)

SetWidth - Sets the text width

func (*TextWidget) SetWindow

func (widget *TextWidget) SetWindow(window *Window)

func (*TextWidget) Widgets

func (widget *TextWidget) Widgets() []Widget

type TreeWidget

type TreeWidget struct {
	// contains filtered or unexported fields
}

func CreateTreeWidget

func CreateTreeWidget() *TreeWidget

CreateTreeWidget - Creates and returns a new Tree Widget

func (*TreeWidget) AddNode

func (widget *TreeWidget) AddNode(childNode *TreeWidgetNode)

func (*TreeWidget) AttachWidget

func (widget *TreeWidget) AttachWidget(wd Widget)

func (*TreeWidget) BaseWidget

func (widget *TreeWidget) BaseWidget() *baseWidget

func (*TreeWidget) Buffer

func (widget *TreeWidget) Buffer() *image.RGBA

func (*TreeWidget) Click

func (tree *TreeWidget) Click()

func (*TreeWidget) ComputedBox

func (widget *TreeWidget) ComputedBox() *box

func (*TreeWidget) DetachWidget

func (widget *TreeWidget) DetachWidget(wd Widget) Widget

func (*TreeWidget) GetHeight

func (widget *TreeWidget) GetHeight() float64

func (*TreeWidget) GetLeft

func (widget *TreeWidget) GetLeft() float64

func (*TreeWidget) GetRect

func (widget *TreeWidget) GetRect() (float64, float64, float64, float64)

func (*TreeWidget) GetTop

func (widget *TreeWidget) GetTop() float64

func (*TreeWidget) GetWidth

func (widget *TreeWidget) GetWidth() float64

func (*TreeWidget) IsPointInside

func (widget *TreeWidget) IsPointInside(x, y float64) bool

func (*TreeWidget) NeedsRepaint

func (widget *TreeWidget) NeedsRepaint() bool

func (*TreeWidget) RemoveNodes

func (widget *TreeWidget) RemoveNodes()

func (*TreeWidget) RequestReflow

func (widget *TreeWidget) RequestReflow()

func (*TreeWidget) RequestRepaint

func (widget *TreeWidget) RequestRepaint()

func (*TreeWidget) SelectNode

func (tree *TreeWidget) SelectNode(node *TreeWidgetNode)

func (*TreeWidget) SelectNodeByValue

func (tree *TreeWidget) SelectNodeByValue(value string)

func (*TreeWidget) SetBackgroundColor

func (tree *TreeWidget) SetBackgroundColor(backgroundColor string)

SetBackgroundColor - Sets the tree background color

func (*TreeWidget) SetBuffer

func (widget *TreeWidget) SetBuffer(buffer *image.RGBA)

func (*TreeWidget) SetFontColor

func (tree *TreeWidget) SetFontColor(fontColor string)

SetFontColor - Sets the tree font color

func (*TreeWidget) SetFontSize

func (tree *TreeWidget) SetFontSize(fontSize float64)

SetFontSize - Sets the tree font size

func (*TreeWidget) SetHeight

func (tree *TreeWidget) SetHeight(height float64)

SetHeight - Sets the tree height

func (*TreeWidget) SetNeedsRepaint

func (widget *TreeWidget) SetNeedsRepaint(value bool)

func (*TreeWidget) SetSelectCallback

func (tree *TreeWidget) SetSelectCallback(selectCallback func(*TreeWidgetNode))

func (*TreeWidget) SetWidth

func (tree *TreeWidget) SetWidth(width float64)

SetWidth - Sets the tree width

func (*TreeWidget) SetWindow

func (widget *TreeWidget) SetWindow(window *Window)

func (*TreeWidget) Widgets

func (widget *TreeWidget) Widgets() []Widget

type TreeWidgetNode

type TreeWidgetNode struct {
	Key      string
	Value    string
	Parent   *TreeWidgetNode
	Children []*TreeWidgetNode
	// contains filtered or unexported fields
}

func CreateTreeWidgetNode

func CreateTreeWidgetNode(key, value string) *TreeWidgetNode

func (*TreeWidgetNode) AddNode

func (node *TreeWidgetNode) AddNode(childNode *TreeWidgetNode)

func (*TreeWidgetNode) Close

func (node *TreeWidgetNode) Close()

func (*TreeWidgetNode) NextSibling

func (node *TreeWidgetNode) NextSibling() *TreeWidgetNode

func (*TreeWidgetNode) Open

func (node *TreeWidgetNode) Open()

func (*TreeWidgetNode) PreviousSibling

func (node *TreeWidgetNode) PreviousSibling() *TreeWidgetNode

func (*TreeWidgetNode) Toggle

func (node *TreeWidgetNode) Toggle()

type Widget

type Widget interface {
	Buffer() *image.RGBA
	SetBuffer(*image.RGBA)
	SetNeedsRepaint(bool)
	NeedsRepaint() bool
	Widgets() []Widget
	ComputedBox() *box
	SetWindow(*Window)
	BaseWidget() *baseWidget
	// contains filtered or unexported methods
}

type Window

type Window struct {
	// contains filtered or unexported fields
}

func CreateNewWindow

func CreateNewWindow(title string, width int, height int, hiDPI bool) *Window

func (*Window) AddContextMenuEntry

func (window *Window) AddContextMenuEntry(entryText string, action func())

func (*Window) AddOverlay

func (window *Window) AddOverlay(overlay *Overlay)

func (*Window) AddStaticOverlay

func (window *Window) AddStaticOverlay(overlay *Overlay)

func (*Window) AttachClickEventListener

func (window *Window) AttachClickEventListener(callback func(MustardKey))

func (*Window) AttachPointerPositionEventListener

func (window *Window) AttachPointerPositionEventListener(callback func(pointerX, pointerY float64))

func (*Window) AttachScrollEventListener

func (window *Window) AttachScrollEventListener(callback func(direction int))

func (*Window) DeselectEntries

func (window *Window) DeselectEntries()

func (*Window) DestroyContextMenu

func (window *Window) DestroyContextMenu()

func (*Window) DrawContextMenu

func (window *Window) DrawContextMenu()

func (*Window) EnableContextMenus

func (window *Window) EnableContextMenus()

func (*Window) GetCursorPosition

func (window *Window) GetCursorPosition() (float64, float64)

func (*Window) GetSize

func (window *Window) GetSize() (int, int)

SetRootFrame - Sets the window root frame

func (*Window) ProcessArrowKeys

func (window *Window) ProcessArrowKeys(arrowKey string)

func (*Window) ProcessButtonClick

func (window *Window) ProcessButtonClick()

func (*Window) ProcessButtons

func (window *Window) ProcessButtons()

func (*Window) ProcessContextMenu

func (window *Window) ProcessContextMenu()

func (*Window) ProcessContextMenuClick

func (window *Window) ProcessContextMenuClick()

func (*Window) ProcessInputActivation

func (window *Window) ProcessInputActivation()

func (*Window) ProcessInputs

func (window *Window) ProcessInputs()

func (*Window) ProcessPointerClick

func (window *Window) ProcessPointerClick(button glfw.MouseButton)

func (*Window) ProcessPointerPosition

func (window *Window) ProcessPointerPosition()

func (*Window) ProcessReturnKey

func (window *Window) ProcessReturnKey()

func (*Window) ProcessScroll

func (window *Window) ProcessScroll(x, y float64)

func (*Window) ProcessTreeClick

func (window *Window) ProcessTreeClick()

func (*Window) ProcessTrees

func (window *Window) ProcessTrees()

func (*Window) RecreateContext

func (window *Window) RecreateContext()

func (*Window) RegisterButton

func (window *Window) RegisterButton(button *ButtonWidget, callback func())

func (*Window) RegisterInput

func (window *Window) RegisterInput(input *InputWidget)

func (*Window) RegisterTree

func (window *Window) RegisterTree(tree *TreeWidget)

func (*Window) RemoveOverlay

func (window *Window) RemoveOverlay(overlay *Overlay)

func (*Window) RemoveStaticOverlay

func (window *Window) RemoveStaticOverlay(ref string)

func (*Window) RequestReflow

func (window *Window) RequestReflow()

func (*Window) SelectEntry

func (window *Window) SelectEntry(entry *menuEntry)

func (*Window) SetContextMenuOverlay

func (window *Window) SetContextMenuOverlay(overlay *Overlay)

func (*Window) SetCursor

func (window *Window) SetCursor(cursorType cursorType)

func (*Window) SetRootFrame

func (window *Window) SetRootFrame(frame *Frame)

SetRootFrame - Sets the window root frame

func (*Window) SetTitle

func (window *Window) SetTitle(title string)

func (*Window) Show

func (window *Window) Show()

Show - Show the window

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL