events.go 1.4 KB

1234567891011121314151617181920212223242526272829
  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. // 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. OnChar = window.OnChar // key is pressed and has unicode
  20. OnResize = "gui.OnResize" // panel size changed (no parameters)
  21. OnEnable = "gui.OnEnable" // panel enabled state changed (no parameters)
  22. OnChange = "gui.OnChange" // onChange is emitted by List, DropDownList, CheckBox and Edit
  23. OnScroll = window.OnScroll // scroll event
  24. OnChild = "gui.OnChild" // child added to or removed from panel
  25. OnRadioGroup = "gui.OnRadioGroup" // radio button from a group changed state
  26. )