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.

This commit is contained in:
Pietro Gagliardi 2014-03-30 19:57:24 -04:00
parent 6a7cb73dda
commit ce5cd80dba
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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)