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 » Docking: BUG + FEATURE: Disable Close completely
Re: Title() Bug [message #26643 is a reply to message #26642] Mon, 17 May 2010 22:40 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
before i update and test your version i wanted to save my current state and to have you take a look on it maybe it's helpful for you..

i extanded the DockableCtrl.h:87 just a bit
to let the API inspect some varieties of docking permissions
	bool			IsDockAllowed(int a) const		{ ASSERT(a >= 0 && a < 4); return dockable[a]; }
	bool            IsDockAllowedLeft() const		{ return dockable[0]; }
	bool            IsDockAllowedTop() const		{ return dockable[1]; }
	bool            IsDockAllowedRight() const		{ return dockable[2]; }
	bool            IsDockAllowedBottom() const		{ return dockable[3]; }
	bool            IsDockAllowedAny() const		{ for(int i = 0; i<4; i++) { if(dockable[i]) return true; } return false; }
	bool            IsDockAllowedNone() const		{ for(int i = 0; i<4; i++) { if(dockable[i]) return false; } return true; }


DockConfig.cpp:221
to have animation settings extend on the other available params as well, but this is only a quickfix, maybe later it should be possible to disable each animation extra? (in current state only the first highlight animation is changeable via UI, the others remain unchanged (and maybe enabled), while the user expects all animation to be disabled, isnt it?
	dock.Animate(~animate, dock.IsAnimatedFrames(), ~animate);


DockWindow.cpp:329
the API should have precedence over UI setups.
means if I (in application code) decide to group a component to some kind, it should do it in the desired way, even if DockableCtrl's respective capabilities have been disabled in GUI.
i ended up having DockableCtrl's thrown out floating, when restoring a default view (if desired setup was disabled by user in GUI), so TabDockGroup shouldnt throw out things floating, it should group Smile
void DockWindow::TabDockGroup(int align, String group, int pos)
{
	if (DockCont *c = TabifyGroup(group)) {
//		if (c->IsDockAllowed(align))
			DockContainer(align, *c, pos);
//		else
//			FloatContainer(*c);
	}
}


DockCont.cpp:362
another floating issue, in void DockCont::TabDragged(int ix)
if a dockable is docked somewhere and is not able to regain its position later when dragged again (because docking capability is completely disabled, it should be able to float the dockable when dragging it out of a tab (it wont be able to go back there). while manual floating command is still possible. (but in tabbed cases its a weired behaviour)

			if(c->IsDockAllowedNone()) return;


so far the little things. code lines are respect to prior to your change. maybe something of it is depricated now, maybe something is still usable..

cheers
kostah

PS attached is Docking sources including .svn to diff easy
  • Attachment: Docking.rar
    (Size: 140.19KB, Downloaded 246 times)

[Updated on: Mon, 17 May 2010 23:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use GetCtrl(r,c) in GridCtrl ???
Next Topic: WebUpdater
Goto Forum:
  


Current Time: Mon Aug 25 14:12:11 CEST 2025

Total time taken to generate the page: 0.06418 seconds