Kirix Support Forums

wxAUI_BUTTON_MAXIMIZE/wxAUI_BUTTON_MINIMIZE support?

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

wxAUI_BUTTON_MAXIMIZE/wxAUI_BUTTON_MINIMIZE support?

Postby aleksey on Mon Oct 30, 2006 1:35 pm

Hello!

First of all, thank you very much for the great library! We are using wxWidgets for our IDE (http://www.coral8.com/products/development.html) and the next version of our product will be using wxAUI. This makes a huge different in the product appearance. Thank you VERY much!

Now, back to the subject :) We've done an internal usability testing and we have found one important for our users feature missing in wxAUI right now: maximize/minimize buttons for the tabbed panels. There are wxAUI_BUTTON_MAXIMIZE/wxAUI_BUTTON_MINIMIZE flags in the header files but it does not look like there is code that actually implements support for these flags. Do you plan to support these flags anytime soon?


Thanks,

Aleksey Sanin
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Postby Ben on Tue Oct 31, 2006 2:53 am

Hi Aleksey,

At present, I don't really know what to do with those buttons. I put them there as placeholders, because I know some other docking toolkits have similar buttons. But how they are supposed to function isn't really decided yet. I'm very busy working on finishing up wxAUI for wxWidgets 2.8 these days, but I'm mostly working on bug fixes, so I don't project I will be able to implement this in the next few weeks.

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

Postby aleksey on Tue Oct 31, 2006 3:03 am

Thanks for your reply! What we are looking for is something similar to Eclipse: if maximize button is pressed then panel expands itself to the whole frame (of course, there is a restore button in the maximized panel :) ). If the minimize button is pressed, the panel shrinks to a title bar.

Can you give any hints on where these changes should be done? May be we can implement these buttons ourselves and then send you the patch.

Thanks,
Aleksey
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Postby Ben on Tue Oct 31, 2006 4:32 am

Hello,

I'd love a patch.

To get started, do a search on HasCloseButton in wxaui. You should add HasMaximizeButton to wxPaneInfo() for starters. Next, in wxFrameManager::AddPane(), you need to add your maximize button in the appropriate place. In the dock art class, you will need to provide a bitmap so that the maximize button is drawn properly.

Finally, you'll have to actually implement the maximize functionality. Basically, it should shrink all other panes in the dock (use the dock_proportion member of wxPaneInfo for this). You can put your initial implementation in wxFrameManager::OnPaneButton() for starters. It can be factored out into a utility function later.

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

Postby aleksey on Tue Oct 31, 2006 3:04 pm

Thanks! Let me see what we can do!

BTW, if you are working on bugs... We've observed pretty bad layout problems when dockable panels are made very small. I filed a bug (http://sourceforge.net/tracker/index.ph ... tid=109863) with a screenshot from wxAUI sample but we've seen even more weird stuff when user moves sashes to the extreme small panel sizes.
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Postby aleksey on Tue Oct 31, 2006 7:06 pm

I've created a patch that seems to work... but I would really appreciate a code review :)

http://sourceforge.net/tracker/index.ph ... tid=309863
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Postby Ben on Wed Nov 01, 2006 8:36 am

Hi Aleksey,

I looked at the patch. It looks great.

I haven't yet tried it out, but will very soon. If everything runs smoothly, I see no reason why we shouldn't apply it.

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

Postby aleksey on Wed Nov 01, 2006 1:56 pm

Thanks! I've submitted another patch

http://sourceforge.net/tracker/index.ph ... tid=309863

that has better artwork ( :) ) and couple more minor changes. BTW, this patch also fixes a crasher in DrawPaneButton() when hit_test->pane is NULL
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Postby Ben on Wed Nov 01, 2006 2:40 pm

Hi Alexsey,

I already committed your first patch to wxWidgets cvs (with better artwork :) ). Because we did a large rename in cvs, your patch probably won't apply cleanly. Can you get the latest wxWidgets and base your patch off of that? Hope this doesn't inconvenience you.

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

Postby aleksey on Wed Nov 01, 2006 3:00 pm

Actually, I used the anonymous cvs for the patch :) But your change was not propagated yet. So the new patch is attached:

http://sourceforge.net/tracker/index.ph ... tid=309863

And I like your artwork :)

Aleksey
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Postby Ben on Thu Nov 02, 2006 3:51 pm

Hi Aleksey,

I've applied your latest patch.

I have a question: When there are floating panes and I maximize a docked pane, right now the floating panes are hidden. Should it really be this way? In my opinion, it'd be better to leave the floated panes visible.

What do you think?

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

Postby aleksey on Thu Nov 02, 2006 3:53 pm

Hm... Actually, this is a good question. I can see it both ways but probably your proposal is better. It is one line change in the MaximizePanel() method. There is already a check to do not hid toolbars so in the same if() we should check for IsFloating().

Aleksey
aleksey
Registered User
 
Posts: 9
Joined: Mon Oct 30, 2006 1:20 pm

Return to wxAUI Questions, Thoughts & Feedback