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: Docking: BUG + FEATURE: Disable Close completely [message #25628 is a reply to message #25615] Thu, 04 March 2010 15:37 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Ah, good find.

To fix the title not updating you need to change DockableCtrl.h:
	DockableCtrl& 	Title(const char *_title)		{ title = _title; if (GetParent()) GetParent()->RefreshFrame(); return *this; }
	DockableCtrl& 	Title(const WString& _title)	{ title = _title; if (GetParent()) GetParent()->RefreshFrame(); return *this; }

And this change in DockCont.h makes it keep the new title when it's detached/floated:
	void 			StateFloating(DockWindow& dock)				{ State(dock, STATE_FLOATING); Title(GetTitle()); 
When floating you still won't able to dynamically change the window title though. There just isn't any obvious way for the DockCont window to be notified. I'll think about it though.

The issue with just blocking the Close action as you have is that surely the option is still visible in all the menus? It's just that when the user slects it nothing happens?

It should be possible to remove the close box in Upp now, the option seems to have appearred in the code as NoCloseBox. This change in DockCont.cpp makes it disappear:
void DockCont::WindowButtons(bool menu, bool hide, bool _close)
{
	AddRemoveButton(windowpos, menu);
	AddRemoveButton(autohide, hide);
	AddRemoveButton(close, _close);
	NoCloseBox(!_close);
	SyncButtons();
}

No idea whether this works on Linux yet. I'll put these changes into the SVN when I've had time to integrate everything.

[Updated on: Thu, 04 March 2010 15:38]

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: Thu Jul 03 03:21:58 CEST 2025

Total time taken to generate the page: 0.03457 seconds