diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-09 10:33:38 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-09 10:33:38 -0400 |
| commit | 6c1bf7aabd859c27f26898ead8572dd00f419d57 (patch) | |
| tree | 25e012396edc1c09c4252ac12c1e4d5a5a47d51a /redo/area.go | |
| parent | b4a97e871a5c6c390927f5bac9b84b0fe6b40c20 (diff) | |
Big change: with the current event model, it's safe to call Area.RepaintAll() (and the future Area.Repaint()) from within AreaHandler.Key() and AreaHandler.Mouse(); get rid of the bool returns from each. The future Area.Repaint() is important; the bool returns repainted the whole Area, which may not be optimal.
Diffstat (limited to 'redo/area.go')
| -rw-r--r-- | redo/area.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/redo/area.go b/redo/area.go index 01b7208..2ce7d5c 100644 --- a/redo/area.go +++ b/redo/area.go @@ -68,16 +68,14 @@ type AreaHandler interface { // Mouse is called when the Area receives a mouse event. // You are allowed to do nothing in this handler (to ignore mouse events). // See MouseEvent for details. - // If repaint is true, the Area is marked as needing to be redrawn. // After handling the mouse event, package ui will decide whether to perform platform-dependent event chain continuation based on that platform's designated action (so it is not possible to override global mouse events this way). - Mouse(e MouseEvent) (repaint bool) + Mouse(e MouseEvent) // Key is called when the Area receives a keyboard event. // You are allowed to do nothing in this handler (to ignore keyboard events). // See KeyEvent for details. - // If repaint is true, the Area is marked as needing to be redrawn. // After handling the key event, package ui will decide whether to perform platform-dependent event chain continuation based on that platform's designated action (so it is not possible to override global key events, such as Alt-Tab, this way). - Key(e KeyEvent) (repaint bool) + Key(e KeyEvent) } // MouseEvent contains all the information for a mous event sent by Area.Mouse. |
