-
Notifications
You must be signed in to change notification settings - Fork 13
May22
- Application
- Blank Application
- Control
- Font
- GroupBox
- Json
- MarginContainer
- Mouse
- Paint
- Radio Button
- ScrollableViewControl
- Text
- TextInput
- Tools
- Tree
- Unit Test

Here are a list of updates made during the month of May.
Application responsiveness has been improved. Prior versions would sleep the application after every processed event. This has been changed to only sleep if no events were processed within an update.
A blank application has been introduced to quickly get a new application going. This has the bare-bones files needed to get an empty window to appear using the dark theme. The 'Blank.json' file can be used to add GUI elements while the Main.cpp file can be used to handle the logic.
A new Json property 'Size' has been introduced. This will allow setting the size of any control that will not have its size determined by a parent container such as a BoxContainer.
Tab characters will now be rendered as four space characters. This value is currently hard-coded but will be moved to a theme property in the future.
API functions have been improved to use string_view objects instead of a string reference.
The Group Box is a new control that is introduced this month to group controls within a container that paints a box and a text label around the controls. This is similar to group boxes seen in other GUI libraries.

Bug fixes have been made as they are found. When a new bug is fixed, a relevant unit test is added to the Json test suite.
The 'Left', 'Top', 'Right', and 'Bottom' properties have been deprecated in favor of a new property 'Margins' that is an array of four values that reflect the left, top, right, and bottom values of the container.
The mouse wheel event is now handled through all supported windowing systems (SFML, SDL). The default behavior for a hovered control handling this event is to notify it's parent. This is to allow containers to handle mouse wheel events such as the ScrollableContainer to update the scroll bars.

The Overview application is receiving a new look to better showcase the capabilities of the library.
Painting of text glyphs have been improved to only paint the glyphs that are within the current clip region. Any glyphs outside of the clipped region are skipped for painting, though characters like newlines are still handled to update the cursor positioning.
Another improvement made is that the API now takes in string_view objects instead of a string reference.
Radio buttons are controls which can present a list of options where only one can be selected. The list of options are determined by placing all associated radio buttons within the same container.

This control has seen improvements to how input is handled within the child controls and any mouse interaction with the scroll bars. A ScrollableViewInteraction control has been introduced to manages this and should be sub-classed if custom ScrollableViewControl classes want to handle input. The TextInput class is a good example of how this is acheived.
The Text control can now wrap text within the parent's bounds through the 'Wrap' property.

The Text Input control now allows for tab characters to be input with proper rendering and cursor navigation. This was not possible in prior versions.

A major improvement made to this control is that it only paints the visible lines. Previously, all lines that are associated with the text object were painted. While the painting algorithm has been updated to only paint the visible glyphs within a clip region, all characters are still processed and determined if they need to be painted. Only painting the visible lines reduces the number of characters that needs to be processed.
Various tools have seen improvements over the past month. Information about improvements to each tool is listed here.
The command palette can now be opened from any window. Previously, it was only available for open through the main window. This allows other tools such as the 'Inspector' tool to inspect the window which invoked the command. Below is an example of the command palette opening in the Profiler window.

The Inspector tool has been updated to now allow controls to be highlighted either through the inspector tree or the inspecting window. Clicking on the control in either view will sync with the opposite view and the properties view is updated to reflect the new selected control. This can help with debugging containers and controls.

The profiler has been improved to now separate out the event counts into inclusive and exclusive counts. Inclusive counts shows the number of events the parent and all its children has, while the exclusive count is the number of events the parent has without including any children. The timeline will only show inclusive counts while the tree view below will show both inclusive and exclusive counts.
OnPaint events have been added for all controls that utilize this function. This will help in capturing any performance issues that may occur during the painting process.

The 'SetExpandAll' API function has been introduced to allow collapsing or expanding all children of a parent tree control.
New unit tests have been added:
- MarginContainer
- Scrollable
A Utility namespace has been introduced to allow common operations to be invoked from any test suite.