|
|
Home » Developing U++ » UppHub » TabBar: ordering of tabs by their Value (title)
Re: TabBar: ordering of tabs by their Value (title) [message #27198 is a reply to message #27188] |
Thu, 01 July 2010 14:43   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Thanks again, I wrote TabBarCtrl pretty quickly so I knew it would need some improvement.
kohait00 wrote on Tue, 29 June 2010 22:32 | i am still asking myself why the new TabBarCtrl is keeping only the current shown control as child in its pane...
|
Changed so that all ctrls live in the pane. You're right, it's much more sensible 
Quote: | and having the ctrls themselves decide how they should be added (no SizePos by default)?
|
I dsagree with this for 2 reasons:
- Always apply SizePos is how it works in TabCtrl
- Not doing it means that you have to remember to do it yourself, which is more prone to errors
If you want to use a layout you just need to use an additional ParentCtrl. Realistically it's not very common that you'd want to add ctrl without SizePos and not be using a Layout template anyway. I'll keep it like it is.
Mindtraveller:
I have added your icons. The cross icons are now part of TabBar::Style, with some helpful shortcut functions to swap them:
struct Style : public TabCtrl::Style
{
Image crosses[3];
Value group_separators[2];
Style & Write() const { return *static_cast<Style *>(&TabCtrl::Style::Write()); }
Style& DefaultCrosses();
Style& Variant1Crosses();
Style& DefaultGroupSeparators();
Style& GroupSeparators(Value horz, Value vert);
Style& NoGroupSeparators() { return GroupSeparators(Value(), Value()); }
};
It's a bit unorthodox but given TabBar's requirment for different styles for LEFT, RIGHT etc. I couldn't think of a better way. The only problem is that your icons are off-center, so they won't work properly with TabBars aligned to the side or bottom, but I haven't decided how to fix that yet.
This means you can this to change the global style for a TabBar to use your crosses with no separator line between groups:
TabBar::StyleDefault().Write().Variant1Crosses().NoGroupSeparators();

I've attached my latest version. TabBarCtrlTest has been modified to include style testing. I still haven't had time to properly test Docking but I'll get everything committed either tomorrow or early next week.
|
|
|
 |
|
TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Fri, 25 June 2010 11:50
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Fri, 25 June 2010 12:54
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Fri, 25 June 2010 14:44
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Fri, 25 June 2010 17:57
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Sun, 27 June 2010 13:37
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Mon, 28 June 2010 16:49
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Tue, 29 June 2010 18:39
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Thu, 01 July 2010 14:43
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Behaviour
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Wed, 07 July 2010 11:31
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
By: mrjt on Thu, 15 July 2010 10:33
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Re: TabBar: ordering of tabs by their Value (title)
|
 |
|
Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
By: mrjt on Wed, 21 July 2010 18:41
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
By: mrjt on Thu, 22 July 2010 10:08
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
By: mrjt on Thu, 22 July 2010 10:37
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
By: mrjt on Fri, 23 July 2010 14:02
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
|
 |
|
Re: Docking: removed special sorter
By: mrjt on Wed, 11 August 2010 14:04
|
 |
|
Re: Docking: removed special sorter
By: mrjt on Mon, 06 September 2010 12:49
|
 |
|
Re: Docking: removed special sorter
By: kohait00 on Mon, 06 September 2010 12:58
|
Goto Forum:
Current Time: Fri Jul 18 06:41:12 CEST 2025
Total time taken to generate the page: 0.04923 seconds
|
|
|