Kirix Support Forums

Frame architecture

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Frame architecture

Postby Huge on Sat Jan 06, 2007 7:35 am

Hi,
I have been having a good look over the code, and I like what I see. The way of doing everything in the "Update" seems to work well.

I have a suggestion about how frames are handled. I have submitted a mod to allow different kinds of frames, but I think a slightly larger/more ambitious mod may unify things a bit more and allow, for example, complex layouts in floating windows. The problem I have is really the multiple wxAuiManagers that popup when using frames - you can only have one pane in them, otherwise the ability to load/save frames, and the question of which manager actually owns the panes, gets confusing.

The idea is that instead of frame pointers, panes have frame "Id"s (dock_frame). And one manager controlls all frames. The code would progress pretty much as-is, but you would loop over all frames first. In the update function you first create/delete frames as required - keeping an additional list of "FrameInfo" describing floating position/size. This is similar to how the "auto notebook" code worked out.

What does anyone think about this?
Huge
Registered User
 
Posts: 25
Joined: Thu Dec 28, 2006 1:12 am

Postby Ben on Sun Jan 07, 2007 8:40 am

Hi,

It sounds promising. The only reason that we use an embedded wxAuiManager inside frame window is surprisingly for laying out the floating toolbar's gripper.

In earlier versions which were unreleased we didn't have an embedded manager.

I guess one of the main goals for me is to maintain the status quo of having no grandfather window relationships. Every window should be the direct descendant of it's parent window. This precludes using embedded wxAuiNotebook controls for doing the tabs. That's why we decided to implement a window-less tab control in auinotebook.

Much of this is still in progress.

Thanks much for your comments and contributions.

Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby Huge on Sun Jan 07, 2007 9:05 pm

bwilliams wrote:...
I guess one of the main goals for me is to maintain the status quo of having no grandfather window relationships. Every window should be the direct descendant of it's parent window. This precludes using embedded wxAuiNotebook controls for doing the tabs....


Ahh, Ok I see this as a good point. I entertained the idea of using wxTabArt directly in the AuiManager, but this seemed like a fairly big diplication. But the child layout-control could be a wxAuiTabContainer, not a wxAuiNotebook? I can see this simplifies reparent and refresh issues. However, does it complicate the tab-control of tab-controls (if that is actually required)?

Things seem to be working as-good-as, or better than, alternatives now (possible exception of more "sexy" dock hints - but I think they might be in the works?), so I think I can switch to wxAUI and wait for the official develpoments. Let me know if you would like me to explain what I mean about the frame ids.
Huge
Registered User
 
Posts: 25
Joined: Thu Dec 28, 2006 1:12 am

Postby Ben on Mon Jan 08, 2007 3:04 am

I think I understand more now what you mean by the frame id's. I thought about it more after writing my last reply. I think it provides a great deal of flexibility.

If I were to implement the tab dock functionality today, I'd use wxAuiTabContainer and render directly onto the same DC that all the other decorations render to (caption, etc). This would prevent any need for extra child windows in the dock manager, and certainly prevent having grandchildren managed windows.

I look forward to taking a crack at this, but right now I have quite a bit of work queued up. So I'm very glad you have an acceptable implementation that works for you. It's a good proof-of-concept and could sprout some good ideas for other possible implementations.

Thanks,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback