set prognames
This commit is contained in:
parent
f98a8fdd89
commit
9ad2d8247f
|
@ -13,14 +13,15 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type GenericWindow struct {
|
type GenericWindow struct {
|
||||||
Win *BasicWindow // the window widget itself
|
// Win *BasicWindow // the window widget itself
|
||||||
Shelf *gui.Node // the overall box: the shelf
|
Win *gui.Node // the window widget itself
|
||||||
Stack *gui.Node // the first box is a stack
|
Shelf *gui.Node // the overall box: the shelf
|
||||||
Top *gui.Node // the first item in the stack is always a shelf like box
|
Stack *gui.Node // the first box is a stack
|
||||||
Group *gui.Node // the first item top box is always a group
|
Top *gui.Node // the first item in the stack is always a shelf like box
|
||||||
Middle *gui.Node // the middle box (shelf style)
|
Group *gui.Node // the first item top box is always a group
|
||||||
Bottom *gui.Node // the bottom box (stack style)
|
Middle *gui.Node // the middle box (shelf style)
|
||||||
Custom func() // a user defined close() window function
|
Bottom *gui.Node // the bottom box (stack style)
|
||||||
|
Custom func() // a user defined close() window function
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gw *GenericWindow) Hidden() bool {
|
func (gw *GenericWindow) Hidden() bool {
|
||||||
|
@ -83,21 +84,23 @@ func (gw *GenericWindow) Enable() {
|
||||||
|
|
||||||
func NewGenericWindow(title string, grouptxt string) *GenericWindow {
|
func NewGenericWindow(title string, grouptxt string) *GenericWindow {
|
||||||
gw := new(GenericWindow)
|
gw := new(GenericWindow)
|
||||||
gw.Win = RawBasicWindow(title)
|
// gw.Win = RawBasicWindow(title)
|
||||||
gw.Win.Make()
|
gw.Win = gui.RawWindow(title)
|
||||||
|
gw.Win.SetVisable(false)
|
||||||
|
// gw.Win.Make()
|
||||||
|
|
||||||
gw.Win.Custom = func() {
|
gw.Win.Custom = func() {
|
||||||
log.Warn("Found Window close. setting hidden=true")
|
log.Warn("Found Window close. setting hidden=true")
|
||||||
// sets the hidden flag to false so Toggle() works
|
// sets the hidden flag to false so Toggle() works
|
||||||
gw.Win.Hide()
|
gw.Win.Hide()
|
||||||
}
|
}
|
||||||
gw.Shelf = gw.Win.Box()
|
gw.Shelf = gw.Win.NewHorizontalBox("Shelf")
|
||||||
// gw.Shelf.Vertical().SetProgName("ShelfBox")
|
// gw.Shelf.Vertical().SetProgName("ShelfBox")
|
||||||
gw.Stack = gw.Shelf.NewVerticalBox("Stackbox")
|
gw.Stack = gw.Shelf.NewVerticalBox("Stack")
|
||||||
|
|
||||||
gw.Top = gw.Stack.NewVerticalBox("Stackbox")
|
gw.Top = gw.Stack.NewVerticalBox("Top")
|
||||||
gw.Middle = gw.Stack.Box()
|
gw.Middle = gw.Stack.Box().SetProgName("Middle")
|
||||||
gw.Bottom = gw.Stack.Box()
|
gw.Bottom = gw.Stack.Box().SetProgName("Bottom")
|
||||||
|
|
||||||
gw.Group = gw.Top.NewGroup(grouptxt)
|
gw.Group = gw.Top.NewGroup(grouptxt)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue