From a8b7283a875cd6d0de905a5f69d05bd134eb02c9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 30 Jul 2014 12:36:00 -0400 Subject: Moved the definition of Control itself to control.go and updated some comments. --- redo/basicctrls.go | 11 ----------- redo/control.go | 13 ++++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/redo/basicctrls.go b/redo/basicctrls.go index cda67db..c0cb0d5 100644 --- a/redo/basicctrls.go +++ b/redo/basicctrls.go @@ -2,17 +2,6 @@ package ui -// Control represents a control. -// All Controls have event handlers that take a single argument (the Doer active during the event) and return nothing. -type Control interface { - setParent(p *controlParent) // controlParent defined per-platform - // TODO enable/disable (public) - // TODO show/hide (public) - containerShow() // for Windows, where all controls need ot belong to an overlapped window, not to a container control; these respect programmer settings - containerHide() - controlSizing -} - // Button is a clickable button that performs some task. type Button interface { Control diff --git a/redo/control.go b/redo/control.go index bd4ef00..8174ad7 100644 --- a/redo/control.go +++ b/redo/control.go @@ -2,7 +2,18 @@ package ui -// All Controls embed this structure, which provides the Control interface methods. +// Control represents a control. +// All Controls have event handlers that take a single argument (the Doer active during the event) and return nothing. +type Control interface { + setParent(p *controlParent) // controlParent defined per-platform + // TODO enable/disable (public) + // TODO show/hide (public) + containerShow() // for Windows, where all controls need ot belong to an overlapped window, not to a container control; these respect programmer settings + containerHide() + controlSizing +} + +// All Controls on the backend (that is, everything except Stack and Grid) embed this structure, which provides the Control interface methods. // If a Control needs to override one of these functions, it assigns to the function variables. type controldefs struct { fsetParent func(p *controlParent) -- cgit v1.2.3