Page 2 of 3
Posted: Wed Aug 03, 2005 7:14 am
Now this is very interesting that you bring it up.
I was thinking to merge wxFoldPanelBar and wxTreeMultiCtrl. Both do similar things, they have a collapse / expand mechanism. The wxTreeMultiCtrl is more mature, and I could swap the caption for a wxCaptionBar so that the caption is custom drawn like shown on the picture.
This will get rid of the problem the wxFoldPanelBar has with the captions falling off the screen, however I think I cannot emulate the captions being stuck to the bottom of the screen.
Funny how things hang around in your head and others kind of think of the same thing.
Posted: Mon Aug 15, 2005 6:15 am
I am working on a XML -> wxTreeMultiCtrl translation. This is the first step in making e.g. wxWidgets project creation wizards. You can create an XML file, it will be translated to questions and options. After checking for valid combinations, etc. The back end will generate the code. This will be a seperate project next to wxTreeMultiCtrl. However this XML generation back end will be useful for a lot of other purposes as well (not only generation).
For example this is an XML fragment:
Code: Select all
<category caption="Please enter your personal experience" >
<check id="LIKEITORNOT" caption="Do you like this?" />
<category caption="And now for some other fun">
<category caption="Project settings">
<check id="INCLUDE_SETTINGS" caption="Include a wxConfig code fragment" />
<check id="INCLUDE_ABOUT" caption="Include an about dialog" default="1"/>
<check id="USE_XRC" caption="Setup an XRC fragment for XRC dialogs" />
<check id="CB_ONLY" caption="Only checkboxes right now ;-)" />
and the pic will look like this:
As you can see this can become very handy for project generation, code generation, etc. I am still thinking about code readback and addition of code fragments AFTER code is generated..
Ok, small addition to this post. This is the discussion I was referring to:
The idea is that the XML syntax will provide a generic configuration front end which will be semi automatic, for example it will auto check if checked conditions do not conflict, or auto select other options.
Then I will start the generation tool that will utilize the given values, and generate code or project files from templates.
Posted: Mon Aug 15, 2005 5:45 pm
Neat work Jorg!
Posted: Tue Aug 16, 2005 10:36 am
Any chance of getting this integrated into wxDesigner?
Posted: Tue Aug 16, 2005 11:01 am
I am going to do some more coding on it later. It is now set up to work with TinyXML (I have problems with LibXML2 and franchesco has not responded to my problem).
When this is finished I believe it can be a very good start for IDE's that want to generate a start project for the user.
To Sami Hamlaoui,
I think wxDesigner supports this by using a foreign control. Simply add a foreign control to your form, and fill in the creation code in the properties. That is how I managed to add a HTML window and the likes.
Posted: Tue Aug 16, 2005 12:11 pm
but how about retrieving XML back with user answers and choises?
ps: or its offtopic? sorry
Posted: Tue Aug 16, 2005 12:30 pm
You mean filling it in with a predefined answer file? That will be in the next version as well. This is my goal:
- Translate the XML contents to the wxTreeMultiCtrl, where I will show all common controls such as edit ctrl, list, radio, etc.
- The user will fill in the needed questions for e.g. project generation
- The XML code also contains dynamic constraints and features for example when the user selects it wants a predefined wxConfig fragment, two more options arise which ask him the vendor name of the app, and the base class for the config (for example). The constraints will also take care of setting other options dynamically or deny empty fields.
- When done, a hash map is generated with all ID's in it and the value associated with it.
- The hashmap can be written back to disk, in XML or INI format so that old answers or predefined answers can be loaded or used.
Is that what you mean? This all will be in the next version of wxTreeMultiCtrl it is now hosted at wxCode by the way, where I upload my changes in CVS.
My personal goal then will be creating such a code / project generator but the XML back end for the control is generic, to be used by others for in their applications.
Posted: Thu Sep 01, 2005 8:14 am
when i use the control i get the following assertion error
assert "GetChildren().GetCount() == 0" failed: children not destroyed
i get the error in the constructor of my frame
here is the code i use
Code: Select all
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, HWND hWnd, const wxString& start)
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size, wxDEFAULT_FRAME_STYLE)
_tmc = new wxTreeMultiCtrl(this, -1);
wxTreeMultiWindowInfo wndinfo(wxTMC_BG_ADJUST_CNT, 8, 0);
wxTreeMultiWindowInfo wndinfo(wxTMC_BG_ADJUST_ALL, 8, 0);
wxTreeMultiItem item = _tmc->AddRoot(_T("Some fun collapse stuff"), _T("COLLAPSE"));
the frame is called out of a dll. and the lib was complied with bakefile. the sample works without any problems.
can anyone help me?
Posted: Thu Sep 01, 2005 8:32 am
Then I guess the destructor of your frame is not properly called. Have you tried calling destroy yourself ? I unfortunately have no experience with DLL exporting and it is interesting to see what happens when I put it in a DLL.
By the way the latest code is at wxCode now. You can checkout the latest code from CVS there.
Let me know how this problem develops, I doubt it is related to my code as it is a simple wxScrolledWindow with some child controls, I only layout them a bit.
Posted: Thu Sep 01, 2005 8:51 am
the error occurs in the creation process of the frame in line 291 of src/common/wincmn.cpp
the constructor of my frame try to create the multictrl and the comes the error message.
Posted: Thu Sep 01, 2005 9:00 am
A simple test to see what might wrong, is creating a wxScrolledWindow instead of wxTreeMultiCtrl and add a few controls to it, eg the parent parameter is the wxScrolledWindow. Then see if the destruction still fails. If it does it is a cleanup problem (most likely).
As temp solution I can only offer you to statically link the wxTreeMultiCtrl. I have a lot of work next to this so I cannot look into the DLL solution in short time it see if it is something I can fix or otherwise related to a destroy problem.
Posted: Sun Jan 29, 2006 12:03 pm
i just downloaded the source code, but the changelog says it is version 1.07, not 1.08. did i download the wrong zip?
btw what i don't like so far is that you can only have one control per line.. it'd be better if i could set the position of the controls myself.. :/
Posted: Mon Jan 30, 2006 10:40 am
You are totally right. This version is the older one. I will soon release v1.09 which also has a SPAN feature that will allow you to add controls that are dynamically resized horizontally.
Thansk for noticing it!
Posted: Mon Jan 30, 2006 11:25 am
can't wait to get it
Posted: Mon Jan 30, 2006 11:29 am
I will send you an unofficial version this evening if you are really waiting for it. Please email me at [email protected]
as I am sure I do not have the time (or energy) to release it officially tonight, as I am feeling a bit ill.