diff options
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 106 |
1 files changed, 58 insertions, 48 deletions
@@ -29,62 +29,72 @@ var me config // it got me here, but now it's time to clean it up for good // I can't get a GO plugins that use protobuf to load yet (versioning mismatch) type config struct { - baseGui *gocui.Gui // the main gocui handle - treeRoot *tree.Node // the base of the binary tree. it should have id == 0 - myTree *tree.TreeInfo // ? - ctrlDown *tree.Node // shown if you click the mouse when the ctrl key is pressed - currentWindow *guiWidget // this is the current tab or window to show - helpLabel *gocui.View // ? - showHelp bool // toggle boolean for the help menu (deprecate?) - dropdownW *guiWidget // grab the dropdown choices from this widget - FramePadW int `default:"1" dense:"0"` // When the widget has a frame, like a button, it adds 2 lines runes on each side - FramePadH int `default:"1" dense:"0"` // When the widget has a frame, like a button, it adds 2 lines runes on each side - PadW int `default:"1" dense:"0"` // pad spacing - PadH int `default:"1" dense:"0"` // pad spacing - WindowW int `default:"8" dense:"0"` // how far down to start Window or Tab headings - WindowH int `default:"-1"` // how far down to start Window or Tab headings - TabW int `default:"5" dense:"0"` // how far down to start Window or Tab headings - TabH int `default:"1" dense:"0"` // how far down to start Window or Tab headings - WindowPadW int `default:"8" dense:"0"` // additional amount of space to put between window & tab widgets - TabPadW int `default:"4" dense:"0"` // additional amount of space to put between window & tab widgets - GroupPadW int `default:"2" dense:"1"` // additional amount of space to indent on a group - BoxPadW int `default:"2" dense:"1"` // additional amount of space to indent on a box - GridPadW int `default:"2" dense:"1"` // additional amount of space to indent on a grid - RawW int `default:"1"` // the raw beginning of each window (or tab) - RawH int `default:"5"` // the raw beginning of each window (or tab) - FakeW int `default:"20"` // offset for the hidden widgets - padded bool // add space between things like buttons - bookshelf bool // do you want things arranged in the box like a bookshelf or a stack? - canvas bool // if set to true, the windows are a raw canvas - menubar bool // for windows - stretchy bool // expand things like buttons to the maximum size - margin bool // add space around the frames of windows - writeMutex sync.Mutex // writeMutex protects writes to *guiWidget (it's global right now maybe) - dtoggle bool // is a dropdown or combobox currently active? - ecount int // counts how many mouse and keyboard events have occurred - supermouse bool // prints out every widget found while you move the mouse around - depth int // used for listWidgets() debugging - globalMouseDown bool // yep, mouse is pressed - newWindowTrigger chan bool // work around hack to redraw windows a bit after NewWindow() - stdout stdout // information for the STDOUT window - showDebug bool // todo: move this into config struct + baseGui *gocui.Gui // the main gocui handle + treeRoot *tree.Node // the base of the binary tree. it should have id == 0 + myTree *tree.TreeInfo // ? + ctrlDown *tree.Node // shown if you click the mouse when the ctrl key is pressed + currentWindow *guiWidget // this is the current tab or window to show + helpLabel *gocui.View // ? + showHelp bool // toggle boolean for the help menu (deprecate?) + // dropdownW *guiWidget // grab the dropdown choices from this widget + FramePadW int `default:"1" dense:"0"` // When the widget has a frame, like a button, it adds 2 lines runes on each side + FramePadH int `default:"1" dense:"0"` // When the widget has a frame, like a button, it adds 2 lines runes on each side + PadW int `default:"1" dense:"0"` // pad spacing + PadH int `default:"1" dense:"0"` // pad spacing + WindowW int `default:"8" dense:"0"` // how far down to start Window or Tab headings + WindowH int `default:"-1"` // how far down to start Window or Tab headings + TabW int `default:"5" dense:"0"` // how far down to start Window or Tab headings + TabH int `default:"1" dense:"0"` // how far down to start Window or Tab headings + WindowPadW int `default:"8" dense:"0"` // additional amount of space to put between window & tab widgets + TabPadW int `default:"4" dense:"0"` // additional amount of space to put between window & tab widgets + GroupPadW int `default:"2" dense:"1"` // additional amount of space to indent on a group + BoxPadW int `default:"2" dense:"1"` // additional amount of space to indent on a box + GridPadW int `default:"2" dense:"1"` // additional amount of space to indent on a grid + RawW int `default:"1"` // the raw beginning of each window (or tab) + RawH int `default:"5"` // the raw beginning of each window (or tab) + FakeW int `default:"20"` // offset for the hidden widgets + padded bool // add space between things like buttons + bookshelf bool // do you want things arranged in the box like a bookshelf or a stack? + canvas bool // if set to true, the windows are a raw canvas + menubar bool // for windows + stretchy bool // expand things like buttons to the maximum size + margin bool // add space around the frames of windows + writeMutex sync.Mutex // writeMutex protects writes to *guiWidget (it's global right now maybe) + ecount int // counts how many mouse and keyboard events have occurred + supermouse bool // prints out every widget found while you move the mouse around + depth int // used for listWidgets() debugging + globalMouseDown bool // yep, mouse is pressed + newWindowTrigger chan bool // work around hack to redraw windows a bit after NewWindow() + stdout stdout // information for the STDOUT window + showDebug bool // todo: move this into config struct + dropdown dropdown // the dropdown menu } // settings for the stdout window type stdout struct { tk *guiWidget // where to show STDOUT w int // the width - h int // the width + h int // the height outputOnTop bool // is the STDOUT window on top? outputOffscreen bool // is the STDOUT window offscreen? - // offscreenW int // where to place the window offscreen - // offscreenH int // where to place the window offscreen - lastW int // the last 'w' location (used to move from offscreen to onscreen) - lastH int // the last 'h' location (used to move from offscreen to onscreen) - mouseOffsetW int // the current 'w' offset - mouseOffsetH int // the current 'h' offset - init bool // moves the window offscreen on startup - resize bool // user is resizing the window + lastW int // the last 'w' location (used to move from offscreen to onscreen) + lastH int // the last 'h' location (used to move from offscreen to onscreen) + mouseOffsetW int // the current 'w' offset + mouseOffsetH int // the current 'h' offset + init bool // moves the window offscreen on startup + resize bool // user is resizing the window +} + +// settings for the dropdown window +type dropdown struct { + tk *guiWidget // where to show STDOUT + callerTK *guiWidget // which widget called the dropdown menu + items []string // what is currently in the menu + w int // the width + h int // the height + active bool // is the dropdown menu currently in use? + init bool // moves the window offscreen on startup + // dtoggle bool // is a dropdown or combobox currently active? } // this is the gocui way |
