tree

package module
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TREE *log.LogFlag
View Source
var TREEWARN *log.LogFlag

Functions

func ListWidgets added in v0.20.2

func ListWidgets()

func ShowButtons added in v0.20.2

func ShowButtons()

Types

type Node

type Node struct {
	Parent *Node

	WidgetId   int // widget ID
	WidgetType widget.WidgetType
	ParentId   int // parent ID

	State widget.State

	// the internal plugin toolkit structure
	// in the gtk plugin, it has gtk things like margin & border settings
	// in the text console one, it has text console things like colors for menus & buttons
	TK any
	// contains filtered or unexported fields
}

func FindWidgetId added in v0.20.2

func FindWidgetId(id int) *Node

searches the binary tree for a WidgetId

func (*Node) Bool

func (n *Node) Bool() bool

func (*Node) CurrentS added in v0.20.1

func (n *Node) CurrentS() string

func (*Node) DeleteNode

func (n *Node) DeleteNode()

func (*Node) DumpWidget

func (n *Node) DumpWidget(pad string)

func (*Node) FindWidgetId

func (n *Node) FindWidgetId(id int) *Node

searches the binary tree for a WidgetId

func (*Node) GetLabel

func (n *Node) GetLabel() string

func (*Node) GetProgName

func (n *Node) GetProgName() string

func (*Node) Hidden added in v0.20.0

func (n *Node) Hidden() bool

func (*Node) Json

func (n *Node) Json() []string

func (*Node) ListWidgets

func (n *Node) ListWidgets()

func (*Node) ProgName added in v0.20.0

func (n *Node) ProgName() string

func (*Node) SetCurrentS added in v0.20.0

func (n *Node) SetCurrentS(s string)

func (*Node) ShowButtons

func (n *Node) ShowButtons()

func (*Node) String

func (n *Node) String() string

func (*Node) Strings

func (n *Node) Strings() []string

type TreeInfo

type TreeInfo struct {
	PluginName string

	// ActionFromChannel func(widget.Action)
	NodeAction   func(*Node, widget.ActionType)
	Add          func(*Node)
	AddText      func(*Node, string)
	SetText      func(*Node, string)
	SetTitle     func(*Node, string)
	SetLabel     func(*Node, string)
	SetChecked   func(*Node, bool)
	ToolkitClose func()
	// contains filtered or unexported fields
}

func New

func New() *TreeInfo

func (*TreeInfo) AddNode

func (me *TreeInfo) AddNode(a *widget.Action) *Node

this is in common.go, do not move it

func (*TreeInfo) Callback

func (me *TreeInfo) Callback(guiCallback chan widget.Action)

Other goroutines must use this to access the GUI

You can not acess / process the GUI thread directly from other goroutines. This is due to the nature of how Linux, MacOS and Windows work (they all work differently. suprise. surprise.)

this sets the channel to send user events back from the plugin

func (*TreeInfo) PluginChannel

func (me *TreeInfo) PluginChannel() chan widget.Action

func (*TreeInfo) SendEnableDebugger

func (me *TreeInfo) SendEnableDebugger()

func (*TreeInfo) SendFromUser added in v0.19.2

func (me *TreeInfo) SendFromUser(n *Node)

func (*TreeInfo) SendToolkitLoad

func (me *TreeInfo) SendToolkitLoad(s string)

func (*TreeInfo) SendToolkitPanic

func (me *TreeInfo) SendToolkitPanic()

func (*TreeInfo) SendUserEvent

func (me *TreeInfo) SendUserEvent(n *Node)

Other goroutines must use this to access the GUI

func (*TreeInfo) SendWidgetEvent added in v0.19.2

func (me *TreeInfo) SendWidgetEvent(n *Node)

The user clicked on something. Or typed something

func (*TreeInfo) SendWindowCloseEvent

func (me *TreeInfo) SendWindowCloseEvent(n *Node)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL