Commit Graph

3 Commits (07cefb64991d32a4eb8b7eaf70279405e168581d)

Author SHA1 Message Date
Noah 07cefb6499 Menus and Menu Bars
* New and completed widgets: Menu, MenuButton and MenuBar.
* MenuButton is a kind of Button that opens a popup Menu when clicked.
* MenuBar is a container of buttons designed to be attached to the top
  of an application window ("File, Edit, View, Help")
* Supervisor manages the popup menus with its new concept of a Modal
  Widget. Modal widgets take exclusive event priority for all mouse and
  key events. The pop-up menu is a modal window, which means you must
  click an option inside the menu OR clicking outside the menu will
  close it and eat your click event (widgets outside the modal don't
  receive events, but the modal itself gets an event that you've done
  this).
2020-06-04 00:50:23 -07:00
Noah 4ba563d48d Supervisor, Frame Pack and Misc Fixes
* Button: do not call MoveTo inside of Compute().
* Label: do not call MoveTo inside of Compute().
* MainWindow: add OnLoop callback function support so you can run custom code
  each loop and react to the event.State before the UI updates.
* Supervisor: locate widgets using AbsolutePosition() instead of w.Point()
  to play nice with Frame and Window packed widgets.
* Widget interface: rename Adopt() to SetParent() which makes more sense for
  what the function actually does.
* Window: set itself as the parent of the body Frame so that the Supervisor
  can locate widgets anywhere inside a window's frames.

Frame packing fixes:

* Widgets with Expand:true grow their space with ResizeAuto to preserve the
  FixedSize() boolean, instead of being hard-resized to fill the Frame.
* Widgets that Fill their space are resized with ResizeAuto too.

Outstanding bugs:

* Labels don't expand (window title bars, etc.)
2019-12-29 00:00:03 -08:00
Noah 7661f9873c Code Layout Refactor
* All private Doodle source code into the pkg/ folder.
* Potentially public code into the lib/ folder.
* Centralize the logger into a subpackage.
2019-04-09 17:35:44 -07:00