summaryrefslogtreecommitdiff
path: root/click.go
diff options
context:
space:
mode:
Diffstat (limited to 'click.go')
-rw-r--r--click.go90
1 files changed, 46 insertions, 44 deletions
diff --git a/click.go b/click.go
index c3814e4..d2dc21e 100644
--- a/click.go
+++ b/click.go
@@ -102,16 +102,16 @@ func (w *guiWidget) doWidgetClick() {
case widget.Window:
log.Log(NOW, "doWidgetClick() START on window", w.String())
/*
- if me.currentWindow == w.node {
- return
- }
- if me.currentWindow != nil {
- var curw *guiWidget
- curw = me.currentWindow.TK.(*guiWidget)
- curw.unsetCurrent()
- curw.setColor(&colorWindow)
- curw.hideWidgets()
- }
+ if me.currentWindow == w.node {
+ return
+ }
+ if me.currentWindow != nil {
+ var curw *guiWidget
+ curw = me.currentWindow.TK.(*guiWidget)
+ curw.unsetCurrent()
+ curw.setColor(&colorWindow)
+ curw.hideWidgets()
+ }
*/
me.currentWindow = w.node
@@ -128,43 +128,45 @@ func (w *guiWidget) doWidgetClick() {
w.hideWidgets()
}
/*
- w.redoTabs(me.TabW, me.TabH)
- for _, child := range w.children {
- if child.currentTab == true {
- log.Log(NOW, "FOUND CURRENT TAB", child.String())
- child.setCurrentTab()
- child.placeWidgets(me.RawW, me.RawH)
- child.showWidgets()
- return
+ w.redoTabs(me.TabW, me.TabH)
+ for _, child := range w.children {
+ if child.currentTab == true {
+ log.Log(NOW, "FOUND CURRENT TAB", child.String())
+ child.setCurrentTab()
+ child.placeWidgets(me.RawW, me.RawH)
+ child.showWidgets()
+ return
+ }
}
- }
*/
/* FIXME: redo this
if ! n.hasTabs {
}
*/
- case widget.Tab:
- if w.IsCurrent() {
- return // do nothing if you reclick on the already selected tab
- }
- // find the window and disable the active tab
- p := w.parent
- if p != nil {
- p.hideWidgets()
- p.redoTabs(me.TabW, me.TabH)
- p.unsetCurrent()
- for _, child := range w.children {
- if child.WidgetType == widget.Tab {
- child.setColor(&colorTab)
- child.currentTab = false
+ /*
+ case widget.Tab:
+ if w.IsCurrent() {
+ return // do nothing if you reclick on the already selected tab
+ }
+ // find the window and disable the active tab
+ p := w.parent
+ if p != nil {
+ p.hideWidgets()
+ p.redoTabs(me.TabW, me.TabH)
+ p.unsetCurrent()
+ for _, child := range w.children {
+ if child.WidgetType == widget.Tab {
+ child.setColor(&colorTab)
+ child.currentTab = false
+ }
}
}
- }
- w.currentTab = true
- w.setColor(&colorActiveT)
- w.setCurrentTab()
- w.placeWidgets(me.RawW, me.RawH)
- w.showWidgets()
+ w.currentTab = true
+ w.setColor(&colorActiveT)
+ w.setCurrentTab()
+ w.placeWidgets(me.RawW, me.RawH)
+ w.showWidgets()
+ */
case widget.Group:
// n.placeWidgets(p.tk.startH, newH)
w.dumpTree("click start")
@@ -175,11 +177,11 @@ func (w *guiWidget) doWidgetClick() {
w.placeWidgets(startW, startH)
w.showWidgets()
/*
- for _, child := range w.children {
- log.Log(INFO, "START W,H", startW, startH)
- child.placeWidgets(startW, startH)
- child.showWidgets()
- }
+ for _, child := range w.children {
+ log.Log(INFO, "START W,H", startW, startH)
+ child.placeWidgets(startW, startH)
+ child.showWidgets()
+ }
*/
} else {
w.active = true