Commit Graph

9 Commits (master)

Author SHA1 Message Date
Noah e912e2bd03 Go module update 2023-12-08 19:54:43 -08:00
Noah 8716c479e9 ListBox, ScrollBar, Magic Form and forms demo 2023-04-08 21:18:24 -07:00
Noah fee6e1e105 New widget: ColorPicker, plus other changes
New properties are added to EventData for Supervisor events:

* Widget: a reference to the widget which is receiving the event.
* Clicked (bool): for MouseMove events records if the primary button is pressed.
* func RelativePoint(): returns a version of EventData.Point adjusted to be
  relative to the Widget (0,0 at the Widget's absolute position on screen).

Other changes:

* Destroy() method for the Widget interface: widgets that need to free up resources
  on teardown should define this, the BaseWidget provides a no-op implementation.
* Window.Resize() will properly resize a Window.
* Window.Center(w, h int) to easily center a window on screen.
2022-01-01 18:43:36 -08:00
Noah 5d16f5d50c New Widget: TabFrame
* Added the TabFrame widget with an example program and screenshot
* Button: FixedColor=true to set a consistent background color and not
  worry about it with mouseover/down events.
2021-07-25 20:53:09 -07:00
Noah Petherbridge ff76b831ad Update example apps and documentation 2021-06-03 12:27:48 -07:00
Noah 0e027a9fee CheckButton Styles, Supervisor fixes 2020-07-09 19:29:44 -07:00
Noah 7d9ba79cd2 Window Manager Basics, Work in Progress
* Adds Window Manager support to the Supervisor, so that Window widgets
  can be dragged by their title bar, clicked to focus, etc.
* Create a ui.Window as normal, but instead of Packing or Placing it
  into a parent container as before, you call .Supervise() and give it
  your Supervisor. The window registers itself to be managed and drawn
  by the Supervisor itself.
* Supervisor manages the focused window order using a doubly linked
  list. When a window takes focus it moves to the top of the list.
  Widgets in the active window take event priority.
* Extended DragDrop API to support holding a widget pointer in the drag
  operation.
* Changed widget event Handle functions to return an error: so that they
  could return ErrStopPropagation to prevent events going to more
  widgets once handled (for important events).

Some bugs remain around overlapping windows and event propagation.
2020-04-06 22:57:28 -07:00
Noah fb9127f0d5 Add version number and documentation 2020-03-09 17:29:17 -07:00
Noah 0846fe22fc Place Strategy for Frame Widget 2020-03-08 22:07:46 -07:00