wxCrafter & wxAui

Post here wxCrafter related issues / features / bugs
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

wxCrafter & wxAui

Post by coder99 »

Being very comfortable with wxCrafter by now, but wanting to use more of the wxAUI functionality, I was wondering if there might be any sort of demo, guidelines or tutorial for using wxCrafter to build up a base which uses wxAUI.
My current impression is that wxCrafter can add the auiManager and the rest of the GUI elements inside the managed space need to be added by hand.
Is that (still) the case or am I behind the times?

In fact, for one project, all I really need would be to be able to add the wxAUI style set of tool bars. For a start, the rest of my existing layout would still be usable, it not actually adequate.
Could wxCrafter handle this?

Another question along those lines - as I am most comfortable using MSVC, I have stuck with the standalone version - is, or will the stand-alone version always be in sync with Codelite's built in version?
TIA

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxCrafter & wxAui

Post by eranif »

wxCrafter supports wxAUI.
You just need to set a wxAuiManager to your dialog/frame and then start placing panels (or any other controls on to the wxAUI manager)
When you add a control directly to the wxAuiManager, wxCrafter will replace the "Sizer" tab with "wxAuiPaneInfo" tab. See attached screenshots:
wxCrafter-wxAUI.png
Some notes:
1. wxAuiManager can accept children from the "Containers" tab (marked with red in the above screenshot)
2. The "Sizer Flags" tab (bottom-right) is replaced with "wxAuiPaneInfo" (marked in red in the screenshot)

I am also attaching a sample wxcp file which you can open in wxCrafter standalone and tried it
Another question along those lines - as I am most comfortable using MSVC, I have stuck with the standalone version - is, or will the stand-alone version always be in sync with Codelite's built in version?
The standalone version is 1 version behind. But atm the differences are not noticeable (no new controls). I am already working on releasing a new wxCrafter standalone version in the coming days (though the changes are not very noticeable, mainly bug fixes)
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: wxCrafter & wxAui

Post by coder99 »

Thank you, Eran for the prompt reply.
The sample looks very interesting and I'll give it a whirl today.
If I run into any problems, I'll be sure to post them ;-)
BTW & FWIW, the stand-alone version has behaved pretty well and I am very happy and pleased to be able to use it for wxAUI, once I get to understand the hows :D
Arnold

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxCrafter & wxAui

Post by eranif »

Hi Arnold,

I have released (2 hours ago) wxCrafter 2.7

It contains various bug fixes + new wxTimePickerCtrl control
It is now up-to-date with CodeLite's wxCrafter plugin (both are at 2.7)
Make sure you have read the HOW TO POST thread
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: wxCrafter & wxAui

Post by coder99 »

Again, thank you for an excellent application.
I have downloaded it and posted a donation via the Codelite page as I already had wxCrafter registered.
Converting my existing project to use wxAUI was relatively painless and quick.

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: wxCrafter & wxAui

Post by coder99 »

As a follow up to this issue, I had been going along fine until I tried to save & restore perspectives. And, since an earlier project, where I had added the wxAUI code manually, was giving me no issue wrt perspectives, I put off working with them in the wxCrafter generated code until now.
As my own project failed to restore a saved perspective, and since is rather large and some other issue might be hiding or causing the problem I see with perspectives, I expanded your sample wxCrafter project to see if I could resolve the issue on my own.
But, even here I had no luck.
the problem I get with the sample is slightly different than that with my own project.
With my own project, after calling LoadPerspective with the perspective string, I get a completely black main frame - whether calling Update() or using the default 'update' call for LoadPerspective()
With the test project - zipped up file attached - the right hand panes are lost in the restore and the notebook occupies the full frame.
Clearly I am missing or misunderstanding something :(
Any hints or explanations for this will be most appreciated.
TIA
Arnold

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: wxCrafter & wxAui

Post by coder99 »

To solve my own problem, I was poking around the various forums dealing with wxAUI and after some reading I applied a hunch and named all items added to the auiManager and the save and restore works as expected
Perhaps wxrafter needs to enforce naming each pane - even if it is some random, but persistent name.

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

Post Reply