Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » TabBar: ordering of tabs by their Value (title)
Re: Docking: removed special sorter [message #27532 is a reply to message #27531] Thu, 22 July 2010 10:37 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
the only way I can think of is to override Ctrl::State on a DockableCtrl derived class and check for Ctrl::SHOW.
Re: Docking: removed special sorter [message #27535 is a reply to message #27532] Thu, 22 July 2010 11:17 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
but the DockableCtrl::WhenState is *not* invoked on DockCont::Tabselected() (see DockCont.cpp:340, there is no dc->WhenState()), if so i could check it...

i've looked for STATE_SHOW, it's in the *deprecated* DockCtrl.. but the Ctrl::SHOW would do it as well..

[Updated on: Thu, 22 July 2010 11:21]

Report message to a moderator

Re: Docking: removed special sorter [message #27569 is a reply to message #27535] Fri, 23 July 2010 14:02 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
This is what I meant:
class MyDockableCtrl : public DockableCtrl
{	
	virtual void State(int reason) {
		if (reason == Ctrl::SHOW && DockableCtrl::IsTabbed()
			&& &GetContainer()->GetCurrent() == this)
			WhenTabSelect();	
	}	
public:
	DockCont *GetContainer() const { return DockableCtrl::GetContainer(); }
	Callback WhenTabSelect;
};

No changes to Docking necessary.

I've attached a version of DockingExample2 that demonstrates it's use. I'm relectant to add this to the DockableCtrl class because a) I don't want to override State there, since it may be inherited from b) It doesn't really fit conceptually IMO.
Re: Docking: removed special sorter [message #27570 is a reply to message #27569] Fri, 23 July 2010 14:08 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i'll try your way.. thanks
Re: Docking: removed special sorter [message #27572 is a reply to message #27570] Fri, 23 July 2010 14:37 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
it solved both of my problems Smile and i am upstream again...thanks a lot
Re: Docking: removed special sorter [message #27927 is a reply to message #27572] Wed, 11 August 2010 00:12 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

I guess latest TabBar version has a number of visual artifacts which are especially visible under POSIX:

index.php?t=getfile&id=2712&private=0
Re: Docking: removed special sorter [message #27936 is a reply to message #27927] Wed, 11 August 2010 09:51 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Sorry for continuing with offtopic, but the problem from screenshot above is serious for production apps.

OK. Quick & dirty solution for those who need to avoid visual artifacts.
TabBar.cpp @ 870:
w.DrawRect(GetSize(), SColorFace());

[Updated on: Wed, 11 August 2010 09:52]

Report message to a moderator

Re: Docking: removed special sorter [message #27940 is a reply to message #27936] Wed, 11 August 2010 14:04 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Sorry, I'll have a look as soon at it as soon as I get a chance.
Re: Docking: removed special sorter [message #28544 is a reply to message #27936] Mon, 06 September 2010 12:49 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Fixed. Change will be in the SVN shortly.
Re: Docking: removed special sorter [message #28545 is a reply to message #28544] Mon, 06 September 2010 12:58 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
thankyou
Previous Topic: Doking:Does the Dock Manager work correctly?
Next Topic: HelpViewer Class
Goto Forum:
  


Current Time: Fri Mar 29 11:35:43 CET 2024

Total time taken to generate the page: 0.01796 seconds