Aug 2023

  • Rewrote drawing code for the tabular menu widget. It’s now easier to see the contents of dragged columns.
  • Started a ListBox widget.
  • Scroll bar improvements:
    • Scroll bar breadth and button length can now be overridden at the skinning / theming level.
    • Horizontal bars can now be placed on the bottom or top side of the widget, and vertical bars can be positioned on the right or left side. (Before, horizontal bars were always on the bottom, and vertical bars were always on the right.) These are also specified via the theming system.
  • Implemented border and margin measurements for the ListBox. The border shrinks everything, including integrated components like scroll bars. The margin shrinks the scrolling content viewport. I have been working on porting these to other widgets as a sort of standard, at least among the WIMP UI controls.
  • Unified scrolling offset behavior. There are two kinds of scrolling registers in ProdUI, and a widget may be configured to use either/or. The first kind (scr) affects the children of a widget, while the second kind (scr2) is intended for arbitrary sub-components, like selectable items in a menu. Long story short: the code for scr was older and expected margins to be implemented through the layout system (ie to add a 32 pixel margin, offset all widgets by 32 pixels and add 32 to the document dimensions), while scr2 implemented margins by manipulating scroll offsets and ranges. scr now behaves like scr2.
  • Widgets and skin definitions need a way to update references that are sourced from the theming data table. The solution I have settled on is to store an additional key prefixed with an asterisk that indicates where the data can be located. For example, skin["*some_texture"] contains the string "tex_quads/marble", and this tells some theme-refreshing mechanism in the codebase to assign context.resources.tex_quads.marble to skin.some_texture. The mechanism can perform this in a pairs() loop by checking if the key is a string and if it begins with an asterisk.


Testing some extreme border and margin settings. The inset scroll bars are caused by the border value.