PDA

View Full Version : UI-Menubuilder-Idea



ReneMiner
09-09-2013, 16:19
The idea is to create menus in a simple way - it's just a raw sketch - maybe somewhat like that could be added to visual designer. I have currently no intention to continue this since I'm not sure about how naming of controls will work. Also is a problem to mix the here generated code with visual-designer generated code.

Perhaps find some inspiring idea here - menus are pretty simple testing-area - i could imagine that dialogs and other controls could be displayed in visual designer in some hierachic view for fast access and control-specific properties more present also.

In screenshot see on the left side some treeview that represents later menubars (top-level), popups (second level) and their menuitems and subitems ( all levels below).
The buttons below the treeview let the user reorder selected items either a level up so it can maximal become a menubar - or level down until its a subitem of some other item. The other two buttons move the item on the current level previous or after the neighbouring item.

On the right is some property-list to setup each items properties, the buttons above allow to create a new item next to the currrent... or just delete the current one.
In one of the pictures you see 3 items named the same way "menu_FileDummy" which are just placeholders for maybe a list of recent loaded files. Also you see an Index-Property there...which is probably not necessary - all controls/menuitems with the same name could call the same function and can still get differed through CBCTL.
Perhaps Grayed = True equals Enabled = False - or there's no such thing as "Visible"... I've not found out yet :D

Petr Schreiber
09-09-2013, 20:16
I like the idea Rene,

I think it would be nice to generate XML instead of code, and then load such a XML from code - the loader would define constants and so on.

Once we have this working, we could move to dialog definition this way.

Design in designer and code the behaviour, that's what I consider good ballance... I am willing to invest some of my free time to experiment with this route.


Petr

ReneMiner
09-09-2013, 20:24
For my TBGL-GUI I have already decided to use just ini-files and generate the little windows and menus from the ini-data but not to write'm down as code directly- so it will create always a complete ini-file with the controls-data/settings etc. and another run just checks an existing script for the events to insert or creates a new one. So if I change something in layout later I can still use the same script and just fill missing functions in...