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 package (plus examples)
Re: Docking package (plus examples) [message #19816 is a reply to message #19814] Sat, 24 January 2009 06:35 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Thanks.

mrjt wrote on Fri, 23 January 2009 07:20

You have several options here:
- Use the DockWindow::WindowButtons function to remove the close button from all it's child windows



Even if I remove all buttons using DockWindow::WindowButtons, a “close” button on floating window won't disappear. Actually, instead of developing of a “finding lost control” functionality I'd prefer to completely prevent closing/hiding of controls.

Another scenario, which I'd like to see in the docking package is the ability to automatically close/hide all floating child controls when a parent control gets deactivated (by switching tabs, for example), and making them float back when parent control gets activated again. That should look like closing and reopening of a bunch of windows.

Thanks again.


Regards,
Novo
Re: Docking package (plus examples) [message #19823 is a reply to message #19816] Sun, 25 January 2009 04:59 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
It would be nice to fix size of the "close" button on a floating window. It seems to be very small.

index.php?t=getfile&id=1552&private=0

Windows Vista.

TIA

  • Attachment: buttons.png
    (Size: 3.03KB, Downloaded 873 times)


Regards,
Novo
Re: Docking package (plus examples) [message #19838 is a reply to message #19823] Mon, 26 January 2009 10:31 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Novo wrote on Sun, 25 January 2009 03:59

It would be nice to fix size of the "close" button on a floating window. It seems to be very small.

I don't have a Vista machine at the moment, but I guess this is because I'm calling ToolWindow on the child container windows. On XP I think this looks much better, on X11 and perhaps Vista not so much.

I've added a function DockWindow::ChildToolWindows so that you can specify this yourself. Defaults to true on Win32, false on X11. Revision 812.

[Updated on: Mon, 26 January 2009 11:57]

Report message to a moderator

Re: Docking package (plus examples) [message #19850 is a reply to message #19838] Tue, 27 January 2009 06:15 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Thanks!

Minor problem:

"autohide" is not initialized within DockWindow::DockWindow()


Regards,
Novo
Re: Docking package (plus examples) [message #19855 is a reply to message #19850] Tue, 27 January 2009 12:15 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Novo wrote on Tue, 27 January 2009 05:15

Minor problem:

"autohide" is not initialized within DockWindow::DockWindow()


It is, but I call DockWindow::AutoHide() rather than directly initialising the member variable. The initialisation could be cleaned up though.
Re: Docking package (plus examples) [message #19867 is a reply to message #19855] Wed, 28 January 2009 05:53 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mrjt wrote on Tue, 27 January 2009 06:15

Novo wrote on Tue, 27 January 2009 05:15

Minor problem:

"autohide" is not initialized within DockWindow::DockWindow()


It is, but I call DockWindow::AutoHide() rather than directly initialising the member variable. The initialisation could be cleaned up though.


DockWindow&  DockWindow::AutoHide(bool v)
{
	if (v != autohide) {
		autohide = v;
		SyncAll();
	}
	return *this;
}



You call AutoHide(true) in the constructor with uninitialized "autohide".

It is hard to fool valgring Wink


Regards,
Novo

[Updated on: Sun, 26 April 2009 17:20]

Report message to a moderator

Re: Docking package (plus examples) [message #19868 is a reply to message #19867] Wed, 28 January 2009 09:32 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Technically true, but it will always work Razz .

It is sloppy and I will fix it. I just didn't want to do a whole revision for something so minor.
Re: Docking package (plus examples) [message #19884 is a reply to message #13581] Thu, 29 January 2009 21:16 Go to previous messageGo to next message
White_Owl is currently offline  White_Owl
Messages: 27
Registered: January 2009
Location: New York
Promising Member
I am using MinGW with -Wall and packages Bazzaar/Docking and Bazaar/TabBar (which is called from Docking) give me a lot of warnings...
Here is a zip with all modified files, old files and diffs for both packages.
Mostly it is a unused variables, functions without returns and warnings about nested constructors (I guess GNU C++ just does not like them).
Re: Docking package (plus examples) [message #19891 is a reply to message #19884] Fri, 30 January 2009 10:57 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Thanks. I've incorporated most of those changes.

There was one case where your fix was incorrect though:
25c25
< 	AlignedFrame() : border(0), framesize(0), layout(TOP) {}
---
> 	AlignedFrame() {border=0; framesize=0; layout=TOP;}
129,130c129,130
< 		Tab() : visible(true), id(-1)
< 		{}
---
> 		Tab() {visible=true; id =-1; }

What MingW is actually complaining about here is not the use of the initialiser list, but that the list is in a different order than the member variables are declared. Frankly I cannot see the purpose of such a warning, so I'm not going to spend the time fixing it. The same goes for all of the unnecessary parenthesis warnings, because I was aware of operator precedence when I wrote the code thank you very much MingW Smile

All of those missing returns and unused variables (usually from debugging) were very good to fix though.

Revision 826.
Re: Docking package (plus examples) [message #19892 is a reply to message #19891] Fri, 30 January 2009 11:06 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
mrjt wrote on Fri, 30 January 2009 11:57


What MingW is actually complaining about here is not the use of the initialiser list, but that the list is in a different order than the member variables are declared. Frankly I cannot see the purpose of such a warning, so I'm not going to spend the time fixing it.

MinGW is probably complaining because when using initializer lists the members are initialized in the order they were declared in the class, not the order from the initialized list. This can lead to ugly bugs if one member depends on the value of another. But it is not the case right here, so I guess MinGW thinks it's better to always nag, as is the case with those parenthesis.
Re: Docking package (plus examples) [message #19895 is a reply to message #19892] Fri, 30 January 2009 12:11 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
cbpporter wrote on Fri, 30 January 2009 10:06

MinGW is probably complaining because when using initializer lists the members are initialized in the order they were declared in the class, not the order from the initialized list. This can lead to ugly bugs if one member depends on the value of another. But it is not the case right here, so I guess MinGW thinks it's better to always nag, as is the case with those parenthesis.


Interesting. I didn't realise the initialise order was different, not that I've every depended on it. There's always something new to learn with C++.

And always nag is certainly the safer option. I did have -Wall, so I was pretty much asking for a nagging Smile
Re: Docking package (plus examples) [message #19899 is a reply to message #19895] Fri, 30 January 2009 16:46 Go to previous messageGo to next message
White_Owl is currently offline  White_Owl
Messages: 27
Registered: January 2009
Location: New York
Promising Member
mrjt wrote on Fri, 30 January 2009 12:11

Interesting. I didn't realise the initialise order was different, not that I've every depended on it. There's always something new to learn with C++.

So can you fix it for a next revision? Pleeese... So many warnings...
Re: Docking package (plus examples) [message #20394 is a reply to message #13581] Mon, 16 March 2009 14:06 Go to previous messageGo to next message
vasil is currently offline  vasil
Messages: 1
Registered: March 2009
Location: Bulgaria
Junior Member
Hi mrjt,

First of all good work with the docking stuff.

Can I propose a feature or two!?

1. Is it possible to add maximize ability to a docked window? I think that this is useful because I worked with both MSVS and Eclipse and one feature that I like from the eclipse docking system is the ability to maximize the docked windows. Of course this is possible in MSVS too but you have to make several mouse click to make all the windows in auto hide mode except the one you want maximized.

2. I do understood (or may be I am wrong) that making a window transparent is not amongst the current features of UPP, so it is not possible making the window that is being dragged transparent so it is more clearly visible where you want to drop it. As long as understand with the UPP you can make drag&drop operations and you can have an transparent image that moves along with the mouse cursor. So is it possible once somebody starts dragging a window to make a scaled image of it then hide the window and use that image for the drag&drop operation and once it is dropped onto new docking location window is then shown again?

--Vasil

P.S. Excuse my English it is not my native language
Re: Docking package (plus examples) [message #20395 is a reply to message #20394] Mon, 16 March 2009 15:23 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
vasil wrote on Mon, 16 March 2009 13:06

Hi mrjt,

First of all good work with the docking stuff.

Can I propose a feature or two!?

1. Is it possible to add maximize ability to a docked window? I think that this is useful because I worked with both MSVS and Eclipse and one feature that I like from the eclipse docking system is the ability to maximize the docked windows. Of course this is possible in MSVS too but you have to make several mouse click to make all the windows in auto hide mode except the one you want maximized.


The only major problem with this feature is with managing the toggling between maximised and non-maximised states. This is further complicated because DockableCtrls can have a maximum size, so won't necessarily fill up the whole parent window.

I think I know how this could work, but it may require lots of complicated additions and modifications, in which case I'm reluctant to add it. I will need to think about it further.

Quote:


2. I do understood (or may be I am wrong) that making a window transparent is not amongst the current features of UPP, so it is not possible making the window that is being dragged transparent so it is more clearly visible where you want to drop it. As long as understand with the UPP you can make drag&drop operations and you can have an transparent image that moves along with the mouse cursor. So is it possible once somebody starts dragging a window to make a scaled image of it then hide the window and use that image for the drag&drop operation and once it is dropped onto new docking location window is then shown again?

I don't think the cursor idea would work, but I will look at adding this on Win32 with platform specific code and the possibility of adding X11 support in the future (but in any case it would require a correctly configured Window Manager). I'll test it and get back to you, but I don't have time today.

Quote:

P.S. Excuse my English it is not my native language
Your English is excellent Smile
Re: Docking package (plus examples) [message #20799 is a reply to message #13581] Wed, 08 April 2009 12:53 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
Is there any plans for improvements of PopUpDockWindow ?

Thanks
Re: Docking package (plus examples) [message #20802 is a reply to message #20799] Wed, 08 April 2009 16:07 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I had kind-of forgotten about it to be honest, it hasn't been updated to match changes in the base DockWindow for while so it might not work.

But strangely this is the second request I've had for this today, so I'll be having a look at it soon. Expect an update next week.
Re: Docking package (plus examples) [message #20803 is a reply to message #13581] Wed, 08 April 2009 16:54 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
I can confirm that it does'nt works very well. Smile
thanks for your work

[Updated on: Wed, 08 April 2009 16:54]

Report message to a moderator

Re: Docking package (plus examples) [message #21017 is a reply to message #20803] Sun, 26 April 2009 00:47 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Great job on docking Cool

I have looked at the code in order to find solutions to my current problem and I have the following question:
  • 1 Can we remove a docked ctrl (I do not mean hide)?
  • 2 The 'ctrls' member in DockWindow is only accessed to 'add' never to remove ?!?.
  • 3 I am searching for a hook-point in order to launch the delete on dock close and I haven't found any yet

In fact I want to enhance the package in order to be able to write code like in the following example:
// MyControlType  is a derived from TopWindow
DockCtrl& dc = CreateDockable<MyControlType>(param1, param2, ...);
dc.setTitle("xxxxxx");
Float(dc);


The point is to be able dynamically create dialogs that can be docked/floated while delegating the 'new()' statement and associated management to dockWindow.

The instanciated control would get deleted when the dialog gets closed.

Maybe I'm searching the wrong way so if it's the case and some solution exists please tell me.
Re: Docking package (plus examples) [message #21031 is a reply to message #21017] Mon, 27 April 2009 14:54 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I was going to say that I wasn't going to add this, but I guess someone else will probably want it in future anyway.

Some drawbacks:
You will not be able to Serialize the layout.
When the user closes and reopens a window it will not remember where it last was.
You will not be able to use the in-built menus to open windows.

You do this:
// MyControlType must be deriveed from DockableCtrl
void AddCtrl() {
	DockableCtrl &dc = DockWindow::CreateDockable<MyControlType>("Title");
	dc.WhenState = THISBACK1(OnDockerState, &dc);
	Float(dc);
}

void OnDockerState(DockableCtrl *dc) {
	if (dc->IsHidden())
		DockWindow::Deregister(*dc);	
}

You will need the most recent SVN update. I'll upload it shortly (just fixing a last unrelated problem).
Re: Docking package (plus examples) [message #21032 is a reply to message #20803] Mon, 27 April 2009 15:33 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Revision committed (1104)

cocob wrote on Wed, 08 April 2009 15:54

I can confirm that it does'nt works very well. Smile
thanks for your work

I've checked this now, and it seems as it works how it's suppossed to. I've also added icons for autohiding (use ShowAutoHidePopUps to disable).

If you have any suggestions for improvements let me know.
Previous Topic: SysInfo, Functions4U and Controls4U packages
Next Topic: TabBar Major Revision
Goto Forum:
  


Current Time: Fri Mar 29 11:34:36 CET 2024

Total time taken to generate the page: 0.02539 seconds