From ce5cd80dba0cccf20e8a5c7de50b2202bce3a346 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 30 Mar 2014 19:57:24 -0400 Subject: [PATCH] Updated the documentation: Area now works on all platforms, Modifiers behavior on both left and right keys simultaneously is undefined for now, and the way to create custom Controls no longer involves embedding Area. --- area.go | 1 + control.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/area.go b/area.go index 7ee9070..aee8b78 100644 --- a/area.go +++ b/area.go @@ -246,6 +246,7 @@ func (e KeyEvent) EffectiveKey() byte { // Modifiers indicates modifier keys being held during an event. // There is no way to differentiate between left and right modifier keys. +// As such, what KeyEvents get sent if the user does something unusual with both of a certain modifier key at once is (presently; TODO) undefined. type Modifiers uintptr const ( Ctrl Modifiers = 1 << iota // the canonical Ctrl keys ([TODO] on Mac OS X, Control on others) diff --git a/control.go b/control.go index f035ebb..d565adc 100644 --- a/control.go +++ b/control.go @@ -6,7 +6,7 @@ import ( // ... ) -// A Control represents an UI control. Note that Control contains unexported members; this has the consequence that you can't build custom controls that interface directly with the system-specific code (fo rinstance, to import an unsupported control), or at least not without some hackery. If you want to make your own controls, embed Area and provide its necessities. +// A Control represents an UI control. Note that Control contains unexported members; this has the consequence that you can't build custom controls that interface directly with the system-specific code (fo rinstance, to import an unsupported control), or at least not without some hackery. If you want to make your own controls, create an Area and provide an AreaHandler that does what you need. type Control interface { make(window *sysData) error setRect(x int, y int, width int, height int, rr *[]resizerequest)