MCPcopy
hub / github.com/g3n/engine / Initialize

Method Initialize

gui/tree.go:59–65  ·  view source on GitHub ↗

Initialize initializes the tree with the specified initial width and height It is normally used when the folder is embedded in another object.

(width, height float32)

Source from the content-addressed store, hash-verified

57// Initialize initializes the tree with the specified initial width and height
58// It is normally used when the folder is embedded in another object.
59func (t *Tree) Initialize(width, height float32) {
60
61 t.List.initialize(true, width, height)
62 t.SetStyles(&StyleDefault().Tree)
63 t.List.Subscribe(OnKeyDown, t.onKey)
64 t.List.Subscribe(OnKeyUp, t.onKey)
65}
66
67// SetStyles sets the tree styles overriding the default style.
68func (t *Tree) SetStyles(s *TreeStyles) {

Callers 15

InitFunction · 0.45
InitFunction · 0.45
newSplitterFunction · 0.45
NewMenuFunction · 0.45
newMenuItemFunction · 0.45
initializeMethod · 0.45
NewDropDownFunction · 0.45
NewImageLabelFunction · 0.45
initializeMethod · 0.45
NewTreeFunction · 0.45
newTreeNodeFunction · 0.45
NewWindowFunction · 0.45

Calls 4

SetStylesMethod · 0.95
StyleDefaultFunction · 0.85
SubscribeMethod · 0.65
initializeMethod · 0.45

Tested by

no test coverage detected