
On Mon, Jun 22, 2009 at 9:12 AM, Tomas<pecholt@centrum.cz> wrote:
I also agree that using MVC pattern for more complex controls like tables and trees is a good thing because of its flexibility. On the other hand there are situations where you only need to fill the control with data and present it to the user. In such case using MVC would mean redundant typying. So I would take inspiration from Qt here. For example for a tree widget, there are two options: QTreeView which has MVC interface and then QTreeWidget which inherits from QTreeView, plugs default model and adds some easy interface for adding items etc.
Yes, I think that is a good idea. The win32 has something like this with ListBox and ListView too.
+1 for the named parameter interface which you introduced
Thanks :).
Another very important aspect is layouting the controls. I think this is so important feature it should be thought over in the beginning (now). I have seen your examples and I saw you simply set position and size for each widget. This is nice but it simply doesn't work for real applications from 2 reasons: - it's much simpler to set size constraints for widgets like maximum size, stretching factor, borders and then let the layout system to position and size widgets automatically than do the calculations and repositioning yourself when something changes (like when user resizes the dialog) - if I understand it correctly your gui can be used to write multiplatform code. Like one code for windows and linux version of the app. But on every platform the sizes of individual widgets are different, the default fonts are different and you certainly don't want to be bothered with this. For the start something like vertical/horizontal layout would be sufficient
Seems appropriate. I'll investigate it. Do you have a syntax you find appealing to work with named parameters in this?
It would be interesting to have an option to be be able to load GUI definition from xml file. It would enable using GUI designers which save time and also make code compile faster. But I understand it's too early for such functionality.
In win32 you can use resource files. I'll soon start support for QtDesigner too. I want every tool the platform supports to be usable by the user. This way the user can design its Gui with the look&feel most appropriate for the platform. I might later add some form of DSEL to create GUIs. But that won't be for some time. Regards, -- Felipe Magno de Almeida