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

Method Initialize

gui/control_folder.go:41–52  ·  view source on GitHub ↗

Initialize initializes the control folder with the specified text and initial width It is normally used when the control folder is embedded in another object

(text string, width float32)

Source from the content-addressed store, hash-verified

39// Initialize initializes the control folder with the specified text and initial width
40// It is normally used when the control folder is embedded in another object
41func (f *ControlFolder) Initialize(text string, width float32) {
42
43 f.styles = &StyleDefault().ControlFolder
44 f.tree.Initialize(width, width)
45 f.tree.SetStyles(f.styles.Tree)
46 f.tree.SetAutoHeight(600)
47 f.tree.SetAutoWidth(400)
48
49 f.Folder.Initialize(text, width, &f.tree)
50 f.Folder.SetStyles(f.styles.Folder)
51 f.Folder.SetAlignRight(false)
52}
53
54// Clear clears the control folder's tree
55func (f *ControlFolder) Clear() {

Callers 1

NewControlFolderFunction · 0.45

Calls 5

StyleDefaultFunction · 0.85
SetAlignRightMethod · 0.80
SetStylesMethod · 0.45
SetAutoHeightMethod · 0.45
SetAutoWidthMethod · 0.45

Tested by

no test coverage detected