2022-10-21 11:40:08 -05:00
|
|
|
package gui
|
|
|
|
|
2024-01-05 13:18:44 -06:00
|
|
|
import "go.wit.com/gui/widget"
|
2023-03-01 11:35:36 -06:00
|
|
|
|
2022-10-21 11:40:08 -05:00
|
|
|
func (n *Node) Checked() bool {
|
2024-01-11 19:32:40 -06:00
|
|
|
return widget.GetBool(n.value)
|
2022-10-21 11:40:08 -05:00
|
|
|
}
|
|
|
|
|
2022-11-13 08:53:03 -06:00
|
|
|
func (n *Node) NewCheckbox(name string) *Node {
|
2024-01-05 13:18:44 -06:00
|
|
|
newNode := n.newNode(name, widget.Checkbox)
|
2024-01-11 19:32:40 -06:00
|
|
|
newNode.value = name
|
|
|
|
newNode.progname = name
|
2023-03-23 12:35:12 -05:00
|
|
|
|
2024-01-13 22:02:12 -06:00
|
|
|
// inform the toolkits
|
|
|
|
sendAction(newNode, widget.Add)
|
2023-03-01 11:35:36 -06:00
|
|
|
return newNode
|
|
|
|
}
|