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 #21034 is a reply to message #21032] Mon, 27 April 2009 21:56 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Fantastic !

I'm going to try it right now.

I needed this functionnality in order to open several identical dialogs to make comparison views: no need for the special menu features and of course even less for serialisation.

Thanks Smile

Didier
Re: Docking package (plus examples) [message #21051 is a reply to message #21034] Tue, 28 April 2009 21:32 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
OK works fine Cool

I added the following additional creator methods to enable constructors with parameters:

in 'class DockWindow'
	template<class T>
	DockableCtrl&   CreateDockable(WString title)						{ return Register(ctrls.Create<T>().Title(title)); }
	template<class T, class PARAM1>
	DockableCtrl&   CreateDockable(WString title, PARAM1 p1)			{ return Register(ctrls.Create<T>(p1).Title(title)); }

	template<class T>
	DockableCtrl&   CreateDockable(const char *title = 0)         		{ return CreateDockable<T>((WString)title); }
	template<class T, class PARAM1>
	DockableCtrl&   CreateDockable(const char *title, PARAM1 p1)        { return CreateDockable<T>((WString)title, p1); }




in 'class Array' : Core/Vcont.h
	template<class TT> TT& Create()     { TT *q = new TT; Add(q); return *q; }
	template<class TT, class PARAM1> TT& Create(PARAM1 p1)     { TT *q = new TT(p1); Add(q); return *q; }



Maybe it's a good idea to add such methods with 1,2,3,4 ... parameters since Array does not use Pick behaviour (copy is a move)

What do you think ?

Re: Docking package (plus examples) [message #21055 is a reply to message #21051] Wed, 29 April 2009 09:53 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Didier wrote on Tue, 28 April 2009 20:32


Maybe it's a good idea to add such methods with 1,2,3,4 ... parameters since Array does not use Pick behaviour (copy is a move)

What do you think ?

This should be avoided. The Upp way is to almost always use default constructors, as this solves many common problems. You should use some sort of initialisation function instead. The special cases are usually classes that are scoped as local variables, and never Ctrl derived classes since these are usually member variables.

I had made a mistake that made this more difficult though. I've just updated the SVN with the fix (CreateDockable now returns type T&). You can now do:
MyClassType &c = DockWindow::CreateDockable<MyClassType>("Title");
c.Init(param1);

or event better:
DockWindow::CreateDockable<MyClassType>("Title").Init(param1);
Re: Docking package (plus examples) [message #21839 is a reply to message #21055] Mon, 08 June 2009 03:57 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Could you please fix Docking package? It is broken (rev. 1289) because of changes to TabBar.


TIA



Regards,
Novo
Re: Docking package (plus examples) [message #22059 is a reply to message #21839] Tue, 16 June 2009 10:35 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Yes. I was on holiday all of last week but I'll have it done either today or tomorrow.

[Updated on: Tue, 16 June 2009 10:40]

Report message to a moderator

Re: Docking package (plus examples) [message #22070 is a reply to message #22059] Tue, 16 June 2009 17:09 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Done. Revision 1315.
Re: Docking package (plus examples) [message #22114 is a reply to message #22070] Thu, 18 June 2009 13:29 Go to previous messageGo to next message
ptDev is currently offline  ptDev
Messages: 25
Registered: June 2009
Promising Member
Hi,

Thanks for the Docking library and the update to make it work with the new version of TabBar.

I've been trying the Docking library, and noticed that a small bug. If you only have one docked window, and it is minimized, closing it causes the program to crash. Is this behaviour expected in any way?
Re: Docking package (plus examples) [message #22116 is a reply to message #22114] Thu, 18 June 2009 14:13 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Quote:

Hi,

Thanks for the Docking library and the update to make it work with the new version of TabBar.

I've been trying the Docking library, and noticed that a small bug. If you only have one docked window, and it is minimized, closing it causes the program to crash. Is this behaviour expected in any way?

It's a bug, though quite and interestingly subtle one. I've just committed the fix, plus I've stopped the AutoHide bar from always having an active tab (changes to both TabBar and Docking).
Re: Docking package (plus examples) [message #22126 is a reply to message #22070] Fri, 19 June 2009 03:54 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mrjt wrote on Tue, 16 June 2009 11:09

Done. Revision 1315.


Thanks for the fix.

It looks like rev. 1320 doesn't work on Linux. I checked that with 32 and 64-bit versions of Ubuntu 9.04 with Compiz enabled.

Floating window cannot be docked back.


Regards,
Novo
Re: Docking package (plus examples) [message #22131 is a reply to message #22126] Fri, 19 June 2009 09:38 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Bugger. I've never tested it with Compiz and none of the floating/docking code has changed, so perhaps it's that.

This might be much more difficult to fix, what I need is a log of X events during window draging and dropping.
Re: Docking package (plus examples) [message #22139 is a reply to message #22131] Fri, 19 June 2009 14:31 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hi mrjt,

I can confirm that bug on Ubuntu + compiz too. OTOH, docking package (build 1320) works flawlessly on Kubuntu 9.04 + KDE 4.2.4 with/without window compositing enabled. Nice job! The only thing that is annoying me is the docking animation gets choppy on docks with 2 or more widgets.

Regards.


Re: Docking package (plus examples) [message #22170 is a reply to message #22131] Mon, 22 June 2009 00:52 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mrjt wrote on Fri, 19 June 2009 03:38

Bugger. I've never tested it with Compiz and none of the floating/docking code has changed, so perhaps it's that.

This might be much more difficult to fix, what I need is a log of X events during window draging and dropping.


Sorry for making you a problem again.

I attached a log of X11 events for DockingExample1. It is created using xtrace. I hope that it is what you need.

TIA

[Attachment is deleted ...]


Regards,
Novo

[Updated on: Sun, 19 July 2009 18:41]

Report message to a moderator

Re: Docking package (plus examples) [message #22180 is a reply to message #22170] Tue, 23 June 2009 12:07 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I don't have much time to look at it now, but that might be too much information to get what I need. The best way is to add logging to the X11 window proc, i'll give you a patch to do this when I can.
Re: Docking package (plus examples) [message #22228 is a reply to message #13581] Thu, 25 June 2009 22:51 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
is it possible to remove this line in the begining of Docking.h

using namespace Upp;

Because it is very diffcult to resolve names when some "using" are set in header files.

Thanks
cocob
Re: Docking package (plus examples) [message #22231 is a reply to message #22228] Fri, 26 June 2009 11:04 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Would you prefer
namespace Upp;
?
Re: Docking package (plus examples) [message #22239 is a reply to message #22228] Fri, 26 June 2009 15:29 Go to previous messageGo to next message
ptDev is currently offline  ptDev
Messages: 25
Registered: June 2009
Promising Member
I'm sorry for my confusion.

Is it that you wish to always type the additional "Upp::" scope prefix whenever you're referring to an U++ class?

Note that when you're making a new package, you can always omit the "using namespace Upp" statement and be explicit about the namespaces. In fact, you can even still refer to the namespaces for clarity, "using" or no "using".

Personally, I never saw any obvious advantage in this, but you do have the option to do so if you wish.

[Updated on: Fri, 26 June 2009 15:30]

Report message to a moderator

Re: Docking package (plus examples) [message #22242 is a reply to message #13581] Fri, 26 June 2009 18:55 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
I use "using namespace Upp" too ! but not in header files !
It is the right way to proceed.

Yes i prefer namespace Upp { }

Thanks
cocob
Re: Docking package (plus examples) [message #22272 is a reply to message #22242] Mon, 29 June 2009 10:49 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Ok, committed. I can see your point. It's just never an issue for me as I will always be using the Upp namespace.
Re: Docking package (plus examples) [message #22499 is a reply to message #22180] Sun, 19 July 2009 18:43 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mrjt wrote on Tue, 23 June 2009 06:07

I don't have much time to look at it now, but that might be too much information to get what I need. The best way is to add logging to the X11 window proc, i'll give you a patch to do this when I can.


I can try to enable LLOG ...
Is that what you mean?


Regards,
Novo
Re: Docking package (plus examples) [message #22510 is a reply to message #22499] Mon, 20 July 2009 12:36 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I think that should do it, but it's better if you can exclude expose events and some other stuff.

The problem is that there is no X11 event for 'this window is no longer being dragged'. In Windows this is quite easy, but for X11 I have to rely on unrelated events, and presumably Compiz is sending a slightly different sequence.

Sorry I don't have much time for this at the moment, but I will get to it eventually. If I new what events were needed it should be simple fix.
Previous Topic: SysInfo, Functions4U and Controls4U packages
Next Topic: TabBar Major Revision
Goto Forum:
  


Current Time: Fri Mar 29 15:52:58 CET 2024

Total time taken to generate the page: 0.02031 seconds