Kirix Support Forums

wxAuiNoteBook hint size and books' minsize

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

wxAuiNoteBook hint size and books' minsize

Postby Abso on Fri Jul 09, 2010 4:09 am

Hi,

I'm looking for a better calculation about hint size of an AuiNoteBook. It should take place in wxAuiNotebook::CalculateNewSplitSize() fonction in place of:

Code: Select all
wxSize wxAuiNotebook::CalculateNewSplitSize()
{
  ...

  // this is in place of a more complicated calculation
  // that needs to be implemented
  new_split_size = wxSize(180,180);

  ...
}


In most case this fixed size works fine. But sometimes the size of 180 px is too big.
There is also an important issue : When you drop a tab in a new layer or in a new row, it creates a new space where the tab is docked. However, this new space pushes the lower layers, leading to steal space of the center pane. So, it could even steal more space than available and it causes weird things.

1-
So, does anyone have a solution ?
I thought about a fixed size ( 180px or maybe a size proportionnal to the AuiNoteBookSize) and this size could not be greater than a proportion of the center pane size.
(1/3 or 1/2 seem good).
It could be nice if this hint size and the effective drop steal space of center pane and space of other panes too.

2-
There is an other issue with AuiNoteBook : there is no minimum size for the books (wxTabFrame) according to their tabs minimum sizes.
Any suggestion would be helpfull .

Regards,
Abso
Abso
Registered User
 
Posts: 1
Joined: Wed Apr 28, 2010 6:09 am

Re: wxAuiNoteBook hint size and books' minsize

Postby Ben on Fri Jul 09, 2010 12:55 pm

I can address your first issue:

Optimally, the calculation would take into account both the number of existing "rows" in the tab control, as well as their size. For example, if you wanted to create a new row over an existing row that is very small, the new row height should also be smaller (either that or decrease existing row heights).

You can do this by examining the existing internal AUI layout inside the frame control. I'd be interested in applying any patch you might come up with.

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

Return to wxAUI Questions, Thoughts & Feedback