Here is a short proposal for the new GUI library to replace the  
current one in Warzone. As usual, comments are not only welcome, but  
mandatory.

The main problems with the current widget/form system are:
  * It is convoluted and hard to maintain.
  * It provides a limited set of widgets.
  * It is hard to develop for, requiring a lot of boiler plate code.
  * It is not really script friendly.

While the public interface is nothing short of awful, the actual  
implementation of some of the widgets it not that bad.

Therefore, the general consensus is that it needs to be redesigned.  
While many have proposed using an OpenGL widget toolkit instead of  
our own, I do not see this as being practical:
  * It would add an extra dependency.
  * It would probably use its own font rendering system.
  * It would need to be skinned.

Consequently I believe it is best if we redesign the widget system  
from scratch. Any replacement system will need to fulfil the  
following criteria:
  * It needs to be able to emulate the current widgets in Warzone.
  * It needs to be simple to use, sacrificing functionality if need-be.
  * Resolution/size independent, so scaleable.

The design which I am proposing (hopefully) solves these problems.  
Broadly:
  * It uses an object oriented system based off of GObject, albeit  
heavily stripped down.
  * Drawing it done using cairo, thus providing vector drawing  
capabilities.
  * General design borrowed from Swing.
  * All widgets are containers and so can contain children.
  * Events are passed bottom-up, so if we clicked on a button the  
click event would pass: Form =>    ... => Button

I have some rough code outlines here, however would like to know what  
you all think first. Then I might be able do a basic implementation  
to develop further.

Regards, Freddie.

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to