UI development
Resizing a window is now also possible by dragging its edges. I further worked
on the states of each element -- which can be quite cumbersome at times.
For example, when pressing a button it should also turn into hover state
(cursor hovering the button) if the cursor leaves the button with the mouse
still holding down/pressed. Moving the cursor back again over the button
(while still holding the mouse down) should change the button's state back to
pressed. Now since I allow to press a button without bringing the framed
window atop, which is cool, the button should also change from pressed into
hover state (mouse button still down) if the cursor runs into another window
on top of the button, yet without turning the window atop into hover state
while keeping the hover state for the window below even if the cursor is above
another window.
See the animation above.
A similar issue occurs for a frame window with a client area and another such
window partially covering it, in determining the correct hover state. Anyhow, I
got it all working without compromising the ui-elements.
All the oddities explained above happen without any ui-element knowing about
it. Every ui-element can have a specialized mouse handler (next to a standard
one) which does the specific action. Additionally, the handler can be changed
at runtime allowing to reconfigure the element's mouse behavior on-demand. I
want to do something similar with the callback system of each element. I want
to make it possible to be able to reconfigure an element's callback system at
runtime. This makes it possible to have multi-function buttons which can
change their behavior on-demand. For example, you may press a nearby (slider-)
button who will switch to another callback system for the button in
question, or of an entire group of buttons. I have some ideas using this for
the spectral analyzer tool. An obvious need is also for debugging. The entire
callbacks may be routed through a debugging hub displaying additional
information. All on a per ui-element basis. Sound too good... xD