U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » UppHub » Docking package (plus examples)
Re: Docking package (plus examples) [message #19289 is a reply to message #19116] Mon, 24 November 2008 13:27 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Sorry for the delay.

I think I've fixed the X11 issues. it was an uninitialised variable, as usual. I missed this only testing with example 2 because it serializes and initialises the variable.

I haven't looked at the Vista 'no contents' problem, this will probably take some time to fix and I'm pretty busy at the mo. It should be noted that this problem will occur anytime the WM behaviour is not what I'm expecting (some Linux WMs do this too) and each instance just has to be fixed on it's own. I don't think there is a universal solution.

I cannot reproduce any problems with closing tabs (after the X11 fix), could you provide more information?

Novo


I wonder if it is possible to make at least one stable docking control/package?

Yes. The problems you've encountered are the result of:
1- Not enough prople having used it to report all of the bugs yet
2- System specific support being required for certain OSs
Both of these will be fixed with time and your feedback will help, response time is just a little slow at the moment because I'm very busy.

Quote:

Sorry for being annoying.

Nonsense Smile Thank you for the feedback!

James
Re: Docking package (plus examples) [message #19291 is a reply to message #19289] Mon, 24 November 2008 18:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
mrjt wrote on Mon, 24 November 2008 07:27


1- Not enough prople having used it to report all of the bugs yet



That can be improved by moving it to uppsrc... Smile

Mirek
Re: Docking package (plus examples) [message #19293 is a reply to message #19289] Mon, 24 November 2008 18:48 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Thanks.

mrjt wrote on Mon, 24 November 2008 07:27


I cannot reproduce any problems with closing tabs (after the X11 fix), could you provide more information?

James


I checked in Windows XP Professional, no administrative privileges, svn rev. 671, MSVC 71. Closing tabs crashes in Debug configuration in DockCont.cpp line 383 with memory access violation. This is a call to Layout(). TheIDE debugger is not very helpful in this situation. And the Visual Studio itself cannot open executable.

There is no crash in Optimal configuration. In this case controls just get hidden.

Behavior is different when DockingExample1 runs under TheIDE debugger or standalone. Under debugger ArrayCtrl1 and TreeCtrl1 disappear when I start dragging TreeCtrl2. Looks like uninitialized variable to me.

I ran DockingExample1 under Purify and got only a report about two memory leaks and nothing about reading uninitialized memory. That is strange.


Regards,
Novo
Re: Docking package (plus examples) [message #19295 is a reply to message #19291] Mon, 24 November 2008 19:13 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

luzr wrote on Mon, 24 November 2008 12:14

mrjt wrote on Mon, 24 November 2008 07:27


1- Not enough prople having used it to report all of the bugs yet



That can be improved by moving it to uppsrc... Smile

Mirek


I already moved it in my local repo. Maybe I'll commit it. I waited for complete integration of it with ide (50%) but recently I was simply lack of time. So I'll move it there now if noone raises an objection Smile
Re: Docking package (plus examples) [message #19297 is a reply to message #19295] Mon, 24 November 2008 20:20 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
unodgs wrote on Mon, 24 November 2008 13:13

So I'll move it there now if noone raises an objection Smile


IMHO Docking package is not usable at the moment.


Regards,
Novo
Re: Docking package (plus examples) [message #19304 is a reply to message #19275] Tue, 25 November 2008 06:00 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Oblivion wrote on Sun, 23 November 2008 16:38

If possible, could you give some details about the assert?




Hi Oblivion,

DockCtrlExample + Vista + disabled "Show window contents while dragging" + MSVC71/MSVC9 + SVN rev. 671 + Debug configuration, of course.

Just launch DockCtrlExample and try to close "Dock 4".

DockTabs.cpp line 436. This is a call to WhenActive() in method TabInterface::LeftDown(). Assert happens in Vector::Get(int i). Variable "active" is zero.

I'm also getting memory access violation when trying to dock "Dock 5" control into "Dock 2" control. It happens in Ctrl.cpp line 258, method Ctrl::IsVisible(). It is called from CtrlDraw.cpp line 43 (Ctrl::Refresh()), which is called from DockableCtrl.cpp line 192, DockableCtrl::WindowProc().

I hope that helps.


Regards,
Novo
Re: Docking package (plus examples) [message #19308 is a reply to message #19293] Tue, 25 November 2008 13:39 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Novo

I checked in Windows XP Professional, no administrative privileges, svn rev. 671, MSVC 71. Closing tabs crashes in Debug configuration in DockCont.cpp line 383 with memory access violation. This is a call to Layout(). TheIDE debugger is not very helpful in this situation. And the Visual Studio itself cannot open executable.

There is no crash in Optimal configuration. In this case controls just get hidden.


Thanks, I've found and fixed the problem. It was introduced with a recent change, and a ctrl was deleting itself by accident. It was the change I made after saying:
Novo

there is also one major addition I need to make which may introduce some new bugs.
So I'm not that suprised Smile

Novo

Looks like uninitialized variable to me.

I didn't get around to updating the svn yesterday, so I would guess that this is the problem I fixed.

Novo

IMHO Docking package is not usable at the moment.
I've actually been using an older stable version of it for a few months without issues. I do have the advantage of a fixed target platform however.

I've now updated the SVN (rev. 672) with both fixes and changed the code style to better match uppsrc. I don't plan on making any major additions to the code now (unless someone comes up with some amazing new features), so I have no objections to moving it to uppsrc. I'll update and improve the documentation when I get the chance, perhaps later this week.

[Updated on: Tue, 25 November 2008 14:06]

Report message to a moderator

Re: Docking package (plus examples) [message #19314 is a reply to message #19308] Tue, 25 November 2008 18:09 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Hi mrjt,

Thanks for taking care of the problems!

Docking package got much more stable, although there is a couple of minor issues.

1) Undocking-docking of a single control still shrinks its size. To reproduce that try to undock-dock “ArrayCtrl 2” in DockingExample1. It will shrink to the size of splitter.

2) Layout of “Dockable Window Manager” is broken.


index.php?t=getfile&id=1499&private=0
  • Attachment: dwm.JPG
    (Size: 32.27KB, Downloaded 1383 times)


Regards,
Novo
Re: Docking package (plus examples) [message #19315 is a reply to message #19314] Tue, 25 November 2008 18:52 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Thanks.

I've fixed the layout issue.

The size issue is more complicated, it a combinatiojn of two factors:
- This is actually deliberate. The docking code is attempting to keep all of the other ctrls that are docked in the same pane above their minimum sizes. The newly docked ctrl is guaranteed to get it's minimum size but anything more than that is dependent on how much spare space there is.
If you make the window larger (I've updated DockingExample1 so that you can now do this) you should see the ctrl getting more space.
There is still rom for improvement in the sizing algorithms, if you have any ideas please let me know
- There was a minor bug that may have prevented the ctrl using as much size as it was supposed to, but in this case I don't think it was the limiting factor

New update is revision 674

James
Re: Docking package (plus examples) [message #19326 is a reply to message #19315] Wed, 26 November 2008 18:04 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Hi James,

mrjt wrote on Tue, 25 November 2008 12:52


I've fixed the layout issue.

James


Thanks a lot!

I checked Docking package with disabled "Show window contents while dragging" in both Windows XP and Vista. Docking is still not working in both these configurations. In opposite, DockCtrlExample (by Ismail Yilmaz) is working correctly in these configurations. I suspect Ismail won’t object stealing some of his code … Wink

Thanks.


Regards,
Novo
Re: Docking package (plus examples) [message #19332 is a reply to message #19326] Thu, 27 November 2008 10:28 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Novo wrote on Wed, 26 November 2008 17:04

Hi James,

mrjt wrote on Tue, 25 November 2008 12:52


I've fixed the layout issue.

James


Thanks a lot!

I checked Docking package with disabled "Show window contents while dragging" in both Windows XP and Vista. Docking is still not working in both these configurations. In opposite, DockCtrlExample (by Ismail Yilmaz) is working correctly in these configurations. I suspect Ismail won’t object stealing some of his code … Wink

Thanks.


I didn't realise you could do it in XP as well, I would have fixed it sooner Smile

Turned out I just needed to change the event I was listening for to WM_MOVING. The fix is in revision 678.

Thanks for all your testing!

[Updated on: Thu, 27 November 2008 11:34]

Report message to a moderator

Re: Docking package (plus examples) [message #19343 is a reply to message #19326] Thu, 27 November 2008 20:46 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Novo wrote on Wed, 26 November 2008 19:04

Hi James,

mrjt wrote on Tue, 25 November 2008 12:52


I've fixed the layout issue.

James


Thanks a lot!

I checked Docking package with disabled "Show window contents while dragging" in both Windows XP and Vista. Docking is still not working in both these configurations. In opposite, DockCtrlExample (by Ismail Yilmaz) is working correctly in these configurations. I suspect Ismail won�t object stealing some of his code � Wink

Thanks.



Hi Novo,

Of course I won't mind. DockCtrl and it's example codes belong to U++ community. Please feel free to use/modify/change and "steal" it Smile

Hi Mrjt,

Don't worry about "beta" testers. Currently, I am testing your Docking package on several OS configurations (ranging from latest (k)ubuntu distros (8.10/KDE 4+ and Gnome 2.24) to XP(SP3)/Vista(SP1)/Win98(SE). I have encountered some "small" bugs, but didn't have the time to make a list of them (by the way, it seems that most of them are already exposed). I will come up with an up-to-date bug list asap.

Regards.


[Updated on: Thu, 27 November 2008 20:47]

Report message to a moderator

Re: Docking package (plus examples) [message #19347 is a reply to message #19343] Fri, 28 November 2008 07:28 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Hi James,

Thank you very much! I didn't mean to push you. I just wanted to use Docking package and met all these problems. They all used to be major problems for me.

Thanks again!


Regards,
Novo
Re: Docking package (plus examples) [message #19784 is a reply to message #19347] Sun, 18 January 2009 20:18 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Is it possible to create hierarchical docking structure?

For example, I'm developing a database application. In database world you have master tables and detail tables (one-to-many relationship). Detail tables can have their detail tables, e.t.c.

It would be nice to be able to represent such hierarchical system as a set of docking controls.

The only limitation I see right now is that the Docking system seems to be a flat system. You have one main DockWindow, and you can dock DockingCtrl everywhere you want. The only hierarchy allowed is nested tabs via NestedTabs() call.

You can doc your controls everywhere in DockWindow.

In my database world I'd like to have a set of DockWindow (or docking containers), which is organized hierarchically, and DockingCtrl linked (and limited) to a particular docking container, so, I may dock detail controls to a particular main control only.

TIA


Regards,
Novo
Re: Docking package (plus examples) [message #19790 is a reply to message #19784] Wed, 21 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 Sun, 18 January 2009 19:18

Is it possible to create hierarchical docking structure?

For example, I'm developing a database application. In database world you have master tables and detail tables (one-to-many relationship). Detail tables can have their detail tables, e.t.c.

It would be nice to be able to represent such hierarchical system as a set of docking controls.

The only limitation I see right now is that the Docking system seems to be a flat system. You have one main DockWindow, and you can dock DockingCtrl everywhere you want. The only hierarchy allowed is nested tabs via NestedTabs() call.

You can doc your controls everywhere in DockWindow.

In my database world I'd like to have a set of DockWindow (or docking containers), which is organized hierarchically, and DockingCtrl linked (and limited) to a particular docking container, so, I may dock detail controls to a particular main control only.

TIA


Holy crap, it works! I never tried that because it just seemed too insane to work Smile. You can have a DockWindow as a child of another DockWindow, and you can even have a Dockable DockWindow.

I've attached a modified version of DockingExample1 that shows this (see the DockInit function in main), but it's very simple:
	// Add our child docking window!
	DockTop(Dockable(subdock, "Child DockWindow").SizeHint(Size(300, 400)));
	subdock.DockTop(Dockable(arrayctrl2, "ArrayCtrl 2").SizeHint(Size(300, 200)));
	subdock.DockRight(Dockable(treectrl2, "TreeCtrl 2").SizeHint(Size(300, 200)));

[Updated on: Wed, 21 January 2009 12:20]

Report message to a moderator

Re: Docking package (plus examples) [message #19801 is a reply to message #19790] Thu, 22 January 2009 06:47 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
mrjt wrote on Wed, 21 January 2009 06:15


Holy crap, it works! I never tried that because it just seemed too insane to work Smile. You can have a DockWindow as a child of another DockWindow, and you can even have a Dockable DockWindow.

I've attached a modified version of DockingExample1 that shows this (see the DockInit function in main), but it's very simple:
	// Add our child docking window!
	DockTop(Dockable(subdock, "Child DockWindow").SizeHint(Size(300, 400)));
	subdock.DockTop(Dockable(arrayctrl2, "ArrayCtrl 2").SizeHint(Size(300, 200)));
	subdock.DockRight(Dockable(treectrl2, "TreeCtrl 2").SizeHint(Size(300, 200)));




It is just cool !!! Thanks a lot !!! I thought I may have only one TopWindow or DocWindow in my application.

One small problem. When I hide a control, which belongs to subdock (treectrl2, for example), and then make it float using DocManager, treectrl2 takes main DocWindow as a container. So, I cannot dock it back into "Child DockWindow".


Regards,
Novo
Re: Docking package (plus examples) [message #19802 is a reply to message #19801] Thu, 22 January 2009 11:12 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Ah, I made a mistake. The code should be:
	// Add our child docking window!
	DockTop(Dockable(subdock, "Child DockWindow").SizeHint(Size(300, 400)));
	subdock.DockTop(subdock.Dockable(arrayctrl2, "ArrayCtrl 2").SizeHint(Size(300, 200)));
	subdock.DockRight(subdock.Dockable(treectrl2, "TreeCtrl 2").SizeHint(Size(300, 200)));

Because the Dockable function registers the ctrl with the window it must be called using on the DockWindow you wish to own it, otherwise at some point there will be problems Smile

The Docking configration window only applies to a single DockWindow instance.
Re: Docking package (plus examples) [message #19805 is a reply to message #19802] Fri, 23 January 2009 05:14 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Thanks.

mrjt wrote on Thu, 22 January 2009 05:12


The Docking configration window only applies to a single DockWindow instance.


In such case how can I prevent closing of DockableCtrl? Once closed it cannot be accessed any more ...


Regards,
Novo
Re: Docking package (plus examples) [message #19814 is a reply to message #19805] Fri, 23 January 2009 13:20 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
You have several options here:
- Use the DockWindow::WindowButtons function to remove the close button from all it's child windows
- You can use the Docking config window to manage all of the DockWindows, but only one at a time. Just call DockWindow::DockManager on the window you want to manage.
- Provide some custom method for controlling the windows. The DockMenu class is provided to support custom menus. Or perhaps you could have a toolbar with window icons, and when the user clicking on them would call DockWindow::ActiveDockable to restore it to it's last position. There are many options here.

[Updated on: Fri, 23 January 2009 13:50]

Report message to a moderator

Re: Docking package (plus examples) [message #19815 is a reply to message #19814] Fri, 23 January 2009 14:39 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
After fiddling with it for a bit I found a few relatively minor bugs with Activate that I've fixed.

Also calling ActivateDockable on an already visible window now highlights it's position for the user. Useful on a crowded display.

Revision 797.

Also heres the code to fill a toolbar with DockableCtrl icons:
void DockingExample::WindowBar(Bar &bar)
{
	const Vector<DockableCtrl *> &ctrl = GetDockableCtrls();
	for (int i = 0; i < ctrl.GetCount(); i++)
		bar.Add(AsString(ctrl[i]->GetTitle()), ctrl[i]->GetIcon(), THISBACK1(ActivateWindow, ctrl[i]));
}

void DockingExample::ActivateWindow(DockableCtrl *ctrl)
{
	ActivateDockable(*ctrl);
}

It would be nice to limit the icons only to invisble windows, but I can't find a reliable way of triggering a Callback notification when ctrls close. There are just too many code paths that control it, but I might have a another go in the future.
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: 1431
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: 1431
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 1194 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: 1431
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: 1431
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: 1428
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: 740
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: Wed Apr 29 10:25:24 GMT+2 2026

Total time taken to generate the page: 0.01598 seconds