diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-25 20:10:09 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-25 20:10:09 -0400 |
| commit | 3d5e8feba4d2980f0be647231ae0f75385afa45b (patch) | |
| tree | 5040c7129eeaae8dd18597db50b0f4669d4d25f8 /redo/controls_darwin.go | |
| parent | d1702d33e055fb254cfacb1ad7d3d3f60314bba6 (diff) | |
Implemented the various parenting and sizing changes on the Mac OS X backend; also moved a line in window_windows.go around for consistency.
Diffstat (limited to 'redo/controls_darwin.go')
| -rw-r--r-- | redo/controls_darwin.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/redo/controls_darwin.go b/redo/controls_darwin.go index 8d13aaa..0c3442c 100644 --- a/redo/controls_darwin.go +++ b/redo/controls_darwin.go @@ -11,8 +11,6 @@ import "C" type widgetbase struct { id C.id - notnew bool // to prevent unparenting a new control - floating bool } func newWidget(id C.id) *widgetbase { @@ -23,19 +21,17 @@ func newWidget(id C.id) *widgetbase { // these few methods are embedded by all the various Controls since they all will do the same thing -func (w *widgetbase) unparent() { - if w.notnew { - // redrawing the old window handled by C.unparent() - C.unparent(w.id) - w.floating = true - } +func (w *widgetbase) setParent(parent C.id) { + // redrawing the new window handled by C.parent() + C.parent(w.id, parent) } -func (w *widgetbase) parent(win *window) { - // redrawing the new window handled by C.parent() - C.parent(w.id, win.id, toBOOL(w.floating)) - w.floating = false - w.notnew = true +func (w *widgetbase) containerShow() { + C.controlSetHidden(w.id, C.NO) +} + +func (w *widgetbase) containerHide() { + C.controlSetHidden(w.id, C.YES) } type button struct { @@ -100,3 +96,7 @@ func (c *checkbox) Checked() bool { func (c *checkbox) SetChecked(checked bool) { C.checkboxSetChecked(c.id, toBOOL(checked)) } + +//TODO +func newTab() Tab{return newButton("tab")} +func(*button)Append(string,Control){} |
