events.go 1.5 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2016 The G3N Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package gui
  5. import (
  6. "github.com/g3n/engine/window"
  7. )
  8. // Consolidate window events plus GUI events
  9. const (
  10. OnClick = "gui.OnClick" // Widget clicked by mouse or key
  11. OnCursor = window.OnCursor // cursor (mouse) position events
  12. OnCursorEnter = "gui.OnCursorEnter" // cursor enters the panel area
  13. OnCursorLeave = "gui.OnCursorLeave" // cursor leaves the panel area
  14. OnMouseDown = window.OnMouseDown // any mouse button is pressed
  15. OnMouseUp = window.OnMouseUp // any mouse button is released
  16. OnMouseOut = "gui.OnMouseOut" // mouse button pressed outside of the panel
  17. OnKeyDown = window.OnKeyDown // key is pressed
  18. OnKeyUp = window.OnKeyUp // key is released
  19. OnKeyRepeat = window.OnKeyRepeat // key is pressed again by automatic repeat
  20. OnChar = window.OnChar // key is pressed and has unicode
  21. OnResize = "gui.OnResize" // panel size changed (no parameters)
  22. OnEnable = "gui.OnEnable" // panel enabled state changed (no parameters)
  23. OnChange = "gui.OnChange" // onChange is emitted by List, DropDownList, CheckBox and Edit
  24. OnScroll = window.OnScroll // scroll event
  25. OnChild = "gui.OnChild" // child added to or removed from panel
  26. OnRadioGroup = "gui.OnRadioGroup" // radio button from a group changed state
  27. )