Hi.
ACtually there's a way to use some class instead of wxPanel and wxSmith will still see this widget as standard wxPanel item.
If you select panel and look into set of properties you will find one called "Class name". This property may be used to inform wxSmith that it should create class of different name instead of standard wxPanel. The only requirement is that such class would have to provide exactly the same constructor as original class (wxSmith will use same argument list as it would in case of wxPanel).
Here's an example of such item:
class SomeClass: public wxPanel
{
public:
SomeClass(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name):
wxPanel(parent,id,pos,size,style,name)
{
// Some extra initialization here
}
// Some extra stuff here
};
After you enter "SomeClass" in "Class name" property, wxSmith will create SomeClass instead of wxPanel.
If you don't use XRC files, the only extra requirement here is that you will have to add
#include "SomeClass.h" manually into .h file of the resource (missing include will come out when you try to compile so it's easy to find).
When using XRC files, wxSmith will use something called subclassing (it's built into XRC loading system and allows to use one class instead of another) but it would require much more work.
Other solution is that you create separate wxPanel resource and insert this one into wxNotebook instead of wxPanel class. By using such solution you will have the main resource with wxNotebook in one editor and the content of each notebook's page in separate resources/editors (usually should be one resource per one page but that's not a rule). This can be done in few ways, I'll describe the easiest one:
- For each notebook's page which should be in separate resource, you have to create new wxPanel resource.
In "New wxPanel resource" dialog, expand advanced options, in "Constructor arguments" select all checkbockses in first column and unselect all in the second one, next copy this: "long style,const wxString& name" into "Custom arguments" - after that new resource will have same list of arguments as wxPanel class, other options may be as you wish. - When panel is ready, open resouce with wxNotebook
- Now we have to add panels from other resources into the notebook, we will do this simillarily to the solution used before:
add normal wxPanel pages and then change the "Class name" property to name of resource with required page
finally add missing #include entries
Now you have one window divided into few resources.
Of course that's not as easy as "integrated" version, but hopefully this will be implemented one day
I rather won't be able to implement it before the day of Reyes (hmm, I don't know yet when I'll start implementing this). But it definitely shouldn't wait forever.
Regards
BYO