Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
9289ed7f2c | |
|
809f2e564d |
|
@ -3,15 +3,47 @@
|
||||||
|
|
||||||
package gadgets
|
package gadgets
|
||||||
|
|
||||||
// This model works for 99.9% of all windows
|
|
||||||
// This is the Default Standard Window Model
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// This model works for 99.9% of all windows
|
||||||
|
// This is the Default Standard Window Model
|
||||||
|
//
|
||||||
|
/////////////////////// Win /////////////////////////////////
|
||||||
|
// / / //
|
||||||
|
// / Top / ///////////////////////////////////////
|
||||||
|
// / / / //
|
||||||
|
// / / / Group //
|
||||||
|
// / / / //////////////////////////////////
|
||||||
|
// / / / // //
|
||||||
|
// / / / // //
|
||||||
|
// ////////////////////////////////////////////////////
|
||||||
|
// / / // // // // //
|
||||||
|
// Shelf / / // // // // //
|
||||||
|
// / Middle / // // // // .... //
|
||||||
|
// / / // // // // //
|
||||||
|
// / / // // // // //
|
||||||
|
// ////////////////////////////////////////////////////
|
||||||
|
// / / //
|
||||||
|
// / Bottom //////////////////////////////////////////
|
||||||
|
// / / //
|
||||||
|
// / //////////////////////////////////////////
|
||||||
|
// / / //
|
||||||
|
// / / | //
|
||||||
|
// / / v //
|
||||||
|
// / / //
|
||||||
|
// ////////////////////////////////////////////////////
|
||||||
|
// / //
|
||||||
|
// / //
|
||||||
|
// ////////////////////////////////////////////////////
|
||||||
|
// / //
|
||||||
|
// / | //
|
||||||
|
// / v //
|
||||||
|
// / //
|
||||||
|
/////////////////////////////////////////////////////////////
|
||||||
type GenericWindow struct {
|
type GenericWindow struct {
|
||||||
// Win *BasicWindow // the window widget itself
|
// Win *BasicWindow // the window widget itself
|
||||||
Win *gui.Node // the window widget itself
|
Win *gui.Node // the window widget itself
|
||||||
|
@ -111,9 +143,12 @@ func NewGenericWindow(title string, grouptxt string) *GenericWindow {
|
||||||
// gw.Win.Make()
|
// gw.Win.Make()
|
||||||
|
|
||||||
gw.Win.Custom = func() {
|
gw.Win.Custom = func() {
|
||||||
log.Log(WARN, "Found Window close. setting hidden=true")
|
log.Log(WARN, "GenericWindow.Custom()")
|
||||||
// sets the hidden flag to false so Toggle() works
|
// sets the hidden flag to false so Toggle() works
|
||||||
gw.Win.Hide()
|
gw.Win.Hide()
|
||||||
|
if gw.Custom != nil {
|
||||||
|
gw.Custom()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gw.Shelf = gw.Win.NewHorizontalBox("Shelf")
|
gw.Shelf = gw.Win.NewHorizontalBox("Shelf")
|
||||||
// gw.Shelf.Vertical().SetProgName("ShelfBox")
|
// gw.Shelf.Vertical().SetProgName("ShelfBox")
|
||||||
|
|
Loading…
Reference in New Issue