shithub: widget

ref: 5549503afffbd360061e5a36d3488e3fb101f504
dir: /CONVENTIONS/

View raw version
• widgets that encapsulate other widgets:
	- take ownership (responsible for freeing, etc)
	- are responsible for ensuring their subwidgets don't stomp all over the screen
• widgets should make sure global state is consistent with how it was when their functions were invoked (i.e. if you touch screen->clipr, restore it before returning, etc)
• Widget->draw returns size of widget
• event handling functions return 1 for when they (or one of their children) handled the event and 0 when they didn't