christolliday / limn

Experimental cross platform GUI library
Other
404 stars 19 forks source link

How should widgets draw over other window areas? #51

Open tones111 opened 6 years ago

tones111 commented 6 years ago

None of the currently available widgets demonstrate an ability to draw over other portions of the window. It would be nice to see how this might be accomplished in limn. Some example widgets that need this functionality include drop-down box, context menu, menu bar, tooltip, tab bar, etc.

christolliday commented 6 years ago

You're right this isn't really documented or demoed, It should be more obvious once the built in widget library grows, and I'll make a note in the docs somewhere. Draw ordering is controlled by the order of attachment to the parent. If you have a parent widget "root" and two children widgets "widget1" and "widget2", widget2 will be drawn after widget1, so if they overlap widget2 will be drawn on top of widget1.