summaryrefslogtreecommitdiff
path: root/area.go
diff options
context:
space:
mode:
Diffstat (limited to 'area.go')
-rw-r--r--area.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/area.go b/area.go
index 7c42c6c..d25bd74 100644
--- a/area.go
+++ b/area.go
@@ -7,19 +7,19 @@ import _ "github.com/andlabs/ui/winmanifest"
import "github.com/davecgh/go-spew/spew"
-func makeGenericArea(gb *GuiBox, newText *ui.AttributedString, custom func(*GuiButton)) {
+func makeGenericArea(n *Node, newText *ui.AttributedString, custom func(*GuiButton)) {
// make this button just to get the default font (but don't display the button)
// There should be another way to do this (?)
var newB *GuiButton
- newB = CreateFontButton(gb, "AREA")
- newB.Box = gb
+ newB = CreateFontButton(n, "AREA")
+ // newB.Box = gb
newB.Custom = custom
- gw := gb.Window
+ gw := n.window
// initialize the GuiArea{}
gw.Area = new(GuiArea)
gw.Area.Button = newB
- gw.Area.Box = gb
+ // gw.Area.Box = gb
gw.Area.UiAttrstr = newText
gw.Area.UiArea = ui.NewArea(gw.Area)
@@ -107,10 +107,10 @@ func (ah GuiArea) KeyEvent(a *ui.Area, ke *ui.AreaKeyEvent) (handled bool) {
return false
}
-func (b *GuiBox) ShowTextBox(newText *ui.AttributedString, custom func(*GuiButton), name string) {
+func (n *Node) ShowTextBox(newText *ui.AttributedString, custom func(*GuiButton), name string) {
log.Println("ShowTextBox() START")
- gw := b.Window
+ gw := n.Window
if (gw == nil) {
log.Println("ShowTextBox() ERROR gw = nil")
return
@@ -127,10 +127,10 @@ func (b *GuiBox) ShowTextBox(newText *ui.AttributedString, custom func(*GuiButto
*/
// TODO: allow padded & axis here
- b.UiBox.SetPadded(true)
+ n.uiBox.SetPadded(true)
// add(gw.BoxMap["MAINBOX"], newbox)
- makeGenericArea(b, newText, custom)
- b.UiBox.Append(b.Window.Area.UiArea, true)
+ makeGenericArea(n, newText, custom)
+ n.uiBox.Append(n.area.UiArea, true)
}