add func Hidden() bool
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
102dfca320
commit
6291ddc13d
|
@ -20,6 +20,10 @@ func (n *Node) String() string {
|
||||||
return widget.GetString(n.State.Value)
|
return widget.GetString(n.State.Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *Node) Hidden() bool {
|
||||||
|
return n.State.Hidden
|
||||||
|
}
|
||||||
|
|
||||||
/* avoid this function name as confusing
|
/* avoid this function name as confusing
|
||||||
func (n *Node) GetText() string {
|
func (n *Node) GetText() string {
|
||||||
return widget.GetString(n.State.Value)
|
return widget.GetString(n.State.Value)
|
||||||
|
|
14
init.go
14
init.go
|
@ -10,6 +10,19 @@ import (
|
||||||
|
|
||||||
var muAction sync.Mutex
|
var muAction sync.Mutex
|
||||||
|
|
||||||
|
/*
|
||||||
|
func (me *TreeInfo) newAction(a widget.Action) *tree.Node {
|
||||||
|
switch a.ActionType {
|
||||||
|
case widget.Add:
|
||||||
|
n := me.treeRoot.FindWidgetId(a.WidgetId)
|
||||||
|
if n == nil {
|
||||||
|
n := me.AddNode(&a)
|
||||||
|
me.ActionFromChannel(n, a.ActionType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func (me *TreeInfo) catchActionChannel() {
|
func (me *TreeInfo) catchActionChannel() {
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
|
@ -30,6 +43,7 @@ func (me *TreeInfo) catchActionChannel() {
|
||||||
} else {
|
} else {
|
||||||
// send this to the toolkit
|
// send this to the toolkit
|
||||||
me.ActionFromChannel(a)
|
me.ActionFromChannel(a)
|
||||||
|
// me.newAction(a)
|
||||||
}
|
}
|
||||||
muAction.Unlock()
|
muAction.Unlock()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue