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 / DockTest packages [message #13775 is a reply to message #13746] Sat, 26 January 2008 13:56 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Oblivion wrote on Fri, 25 January 2008 10:46

James, I'm uploading the TabInterface Class source code with a basic example. It is now able to draw all four positions (left/right/top/bottom) and has scrollbar on all sides...Smile

Also, as in the original Quicktabs, it supports icons, closebuttons, event handling, etc... I ripped out the unneeded part (file load/save and grouping) from the code, but it is quite easy if you want to put them back in (actually, If Daniel permits, I can add these changes to the current Quicktabs in the SVN too). It draws using chameleon so it is easy to skinnize...

I Hope You'll find it useful if you are going to use it in your Docking.



I started to implement similar functionality in QuickTabs. You can see it in SVN bazaar from some time. However I think we could stay with your version as it seems to be completed. I only wonder if you could avoid somehow using IsVert() everywhere. I tried to "fix" Size an Point by swaping cx with cy and x with y where necessary. But it's up to you. IsVert() is not bad, but you must write a little bit more of code here and there. I also
wonder if TabInterface is a correct name. Couldn't we stay with QuickTabs?
My vision is to have one tabs system. So you'd have to integrate your code with current quicktabs code and restore grouping (frankly it can be a derived class if you want base tabs code to be clean).
Remember also that tabs in theide is a frame for editor. I mean editor is inside a frame (FieldFrame exactely) which belogns to QuickTabs. That's why you could see r.xxx += 2. I saw you commented this. That's ok. But don't forget to solve this problem. Of course proper solution may be modifing theide code.
To finish this post: Please update quicktabs code. I'll be glad to see all this changes you've done in the main tree. Of course I'll keep my eye on this and help you if necessary.
PS: Default theming for tabs should be system theming like in TabCtrl.
Re: Docking / DockTest packages [message #13782 is a reply to message #13775] Sat, 26 January 2008 15:25 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Quote:


I only wonder if you could avoid somehow using IsVert() everywhere.



Well, actually, as I stated before somewhere else, I first code then plan. It is hastily coded. I know It's not the best way of coding, but it gives some idea as to what not to do Smile The "TabInterface" is a nested sub-class which is a part of DockCtrl (which uses only bottom tabbing -- so it has no IsVert() and neither it has std. tabctrl theming), so it is not intended to be a generic tab class or a Quicktabs replacement in the first place (it was just a sort of experiment); that's why I commented out those lines. And of course it is possible to remove all the silly IsVert(). I will find a better solution. Hopefully, this week.

Quote:


I also
wonder if TabInterface is a correct name. Couldn't we stay with QuickTabs?



Well, the coder of Quicktabs is you, so It's up to you to decide. Imo, Quicktabs is better too (since TabInterface is a DockCtrl sub-class Wink )

And Thank you for your permission.


Regards.


[Updated on: Sat, 26 January 2008 15:47]

Report message to a moderator

Re: Docking / DockTest packages [message #13799 is a reply to message #13782] Mon, 28 January 2008 10:44 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Quote:


I started to implement similar functionality in QuickTabs. You can see it in SVN bazaar from some time. However I think we could stay with your version as it seems to be completed. I only wonder if you could avoid somehow using IsVert() everywhere. I tried to "fix" Size an Point by swaping cx with cy and x with y where necessary. But it's up to you. IsVert() is not bad, but you must write a little bit more of code here and there. I also
wonder if TabInterface is a correct name. Couldn't we stay with QuickTabs?
My vision is to have one tabs system. So you'd have to integrate your code with current quicktabs code and restore grouping (frankly it can be a derived class if you want base tabs code to be clean).

I have actually already solved all of these problems, but my code was horrible. I think the best control will actually be a merge between all three code bases, and I'm going to have a quick go at it this morning.

Quote:

Remember also that tabs in theide is a frame for editor. I mean editor is inside a frame (FieldFrame exactely) which belogns to QuickTabs. That's why you could see r.xxx += 2.

Wouldn't the correct solution to this be to add the inner frame seperately? As you can see from the SVN example, when you have multiple TabFrames it looks horrible to have the frame drawn by the TabBar control.
Re: Docking / DockTest packages [message #13806 is a reply to message #13799] Mon, 28 January 2008 17:22 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

[quote title=mrjt wrote on Mon, 28 January 2008 04:44]
Quote:


I have actually already solved all of these problems, but my code was horrible. I think the best control will actually be a merge between all three code bases, and I'm going to have a quick go at it this morning.


That's great, but how to merge it? Oblivion is probably trying to modify quicktabs now as I gave him permission. I think we should wait for oblivion first then you could "fix" things you think you have better implemented/designed (after some discuss of course). Having this done we could finally have one codebase in svn repo.
Quote:


Wouldn't the correct solution to this be to add the inner frame seperately? As you can see from the SVN example, when you have multiple TabFrames it looks horrible to have the frame drawn by the TabBar control.

I know that. Separate frame seems to be the best solution.
Re: Docking / DockTest packages [message #13808 is a reply to message #13806] Mon, 28 January 2008 18:52 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Fair enough. I've attached my latest version, please use any of the code if it helps (the rotated style stuff may be useful). File icons don't work properly, and there is a bug in the jump scrolling (in SetCursor), but otherwise it works quite well.

Edir: Fixed both of the above now. I hate leaving buggy code Smile

[Updated on: Tue, 29 January 2008 11:22]

Report message to a moderator

Re: Docking / DockTest packages [message #14137 is a reply to message #13808] Thu, 14 February 2008 17:30 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
New version of Docking package now in the SVN. Automatic resizing is much improved, and it now uses themed tabs (these are a general version of QuickTabs).

Next on my list: Refactoring, documentation.
Re: Docking / DockTest packages [message #14468 is a reply to message #14137] Wed, 27 February 2008 01:03 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
hi James,

Last night I've compiled your Docking package on Linux (Kubuntu and Pardus). It seems that your current code does not posit the window correctly when it is dragged (so was mine). But I've managed to fix that issue very easily, so I would like to share my findings with you (for we are "unofficially" supporting each other Wink ). the trick lies in two places:

1. Add DockWindow::NoCenter() to the constructor of your dockable window's base class.

2. Open() the dockable window (or was it a container?) with no-owner.

This second one may not be valid for your code or brake something, I'm not sure about that. But I saw that you open the window by passing the "this" pointer to the methods(e.g, Open(this)). In case the second step fails, try to find a way to use it as such, I can confirm that It works perfectly Wink

And another bug in you code (the latest one with transparent tab) I've encountered is regarding to your autohide code. Autohide a dock and try the autohide button or menu item when it is shown (in autohide mode). The framework will crash.

Hope these will help you.


[Updated on: Wed, 27 February 2008 03:18]

Report message to a moderator

Re: Docking / DockTest packages [message #14480 is a reply to message #14468] Wed, 27 February 2008 10:25 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Hmm. It used to work, but then I foolishly didn't test the current SVN version on Linux before uploading it. Embarassed

Oblivion wrote on Wed, 27 February 2008 00:03

1. Add DockWindow::NoCenter() to the constructor of your dockable window's base class.

2. Open() the dockable window (or was it a container?) with no-owner.


Thanks! I've been trying to avoid the Window auto-centering for ages, I can't believed I missed NoCenter!

Quote:

And another bug in you code (the latest one with transparent tab) I've encountered is regarding to your autohide code. Autohide a dock and try the autohide button or menu item when it is shown (in autohide mode). The framework will crash.

Fixed.

Cheers!

[Updated on: Wed, 27 February 2008 10:27]

Report message to a moderator

Re: Docking / DockTest packages [message #14539 is a reply to message #13581] Fri, 29 February 2008 17:14 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I've just uploaded a massively improved version of the Docking package to the SVN (and attached to the first post)

What I've added:
Full Serialization support
The ability for the user (or API) to create/save/load layouts (my favourite Smile )
Grouping support (being able to organise windows by group)
A window manager that allows the user to manage (including create/delete) groups and layouts (see screenshot)
Nested tabs windows
Transparent highlights (when dragging over tabs)
A slight delay before animation starts
Predefined menus that can be added directly to an application
Various TabBar improvements
Many, many configuration options and API improvements
2 new examples

The new Window Manager:
index.php?t=getfile&id=1055&private=0

There are some known issues, mainly minor:
1 crash bug on Linux (seen once, never reproduced)
The 'intelligent' splitter layout needs improvement. It gets it wrong when it doesn't have enough space.
Some of the context menus need improvement
Rename group/layout needs to be added.
Group floating should layer the windows
General improvement of the Group tree neede (some of the problems are limitations with TreeCtrl)

It should be stable (jinx!), including on Linux (I double checked Smile ). The serialization stuff is new and complex but seems reliable.

The API/class interfaces are all stable now too, there will be no further changes, only additions. I've dropped the complex docking mode (too much effort and it was preventing Serialization development).

The generalised TabBar ctrl I use is also now in the SVN, and I'm hoping to add source documentation to both packages soon.

James
  • Attachment: manager.png
    (Size: 30.38KB, Downloaded 1539 times)
Re: Docking / DockTest packages [message #14541 is a reply to message #14539] Fri, 29 February 2008 21:31 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
James, I got an error:

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

You can see, after I have organized a few windows in nested configuration and then want to go back to default layout, I get this error.

Matthias
  • Attachment: docking.png
    (Size: 32.96KB, Downloaded 1522 times)


931b81e7ea53320dccc37375b34b38c3
Re: Docking / DockTest packages [message #14543 is a reply to message #14541] Sat, 01 March 2008 02:15 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Thanks. I found the same one myself after uploading it.

I know exactly what the problem is, it's caused by trying to remove the nested windows in the wrong order (before re-layout). Might take me a little while to fix, it's a bit of a tricky one.

I knew I'd jinxed it Smile

[Updated on: Sat, 01 March 2008 02:16]

Report message to a moderator

Re: Docking / DockTest packages [message #14545 is a reply to message #14543] Sat, 01 March 2008 12:01 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Fixed. New code is in the SVN and attached. I've also updated the executable in the first post.

The moral of the story: Don't do clever things in ChildRemoved. It always causes more problems than it solves Smile

James

[Updated on: Wed, 09 April 2008 16:30]

Report message to a moderator

Re: Docking / DockTest packages [message #14803 is a reply to message #14545] Sat, 15 March 2008 14:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I feel pity that I have not tested this sooner Smile

Well, mrjt, I like this. This is pretty good stuff, and I like the style of code too Wink

Do you think it is ready enough to be included in 2008.1? (As a new addition, it does not have to be perfect yet, just useful Smile

Mirek
Re: Docking / DockTest packages [message #14835 is a reply to message #14803] Mon, 17 March 2008 10:47 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Quote:

Well, mrjt, I like this. This is pretty good stuff, and I like the style of code too

Such a compliment! Smile

Quote:

Do you think it is ready enough to be included in 2008.1?
Almost. One thing I need to do first is to finalize the text so I can include a .t file, but I'll get this done today or tomorrow.

The long list of other improvements can be done later.

James
Re: Docking / DockTest packages [message #14836 is a reply to message #14835] Mon, 17 March 2008 12:25 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mrjt wrote on Mon, 17 March 2008 05:47

Quote:

Well, mrjt, I like this. This is pretty good stuff, and I like the style of code too

Such a compliment! Smile

Quote:

Do you think it is ready enough to be included in 2008.1?
Almost. One thing I need to do first is to finalize the text so I can include a .t file, but I'll get this done today or tomorrow.

The long list of other improvements can be done later.

James


BTW, have you checked with Gnome? I was not able to get it run there...

Mirek
Re: Docking / DockTest packages [message #14837 is a reply to message #14836] Mon, 17 March 2008 12:32 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
No, but I'm installing it this afternoon so I'll check. I have a nasty feeling that the code I use to detect window moves is Window Manager specific, but we shall see.

[Updated on: Mon, 17 March 2008 12:33]

Report message to a moderator

Re: Docking / DockTest packages [message #14865 is a reply to message #14836] Tue, 18 March 2008 16:32 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I've updated the SVN with a verison that includes a .t file. Additional changes:
Improved context menus
Various general bugfixes
Fixed major Gnome problems:
- Gnome seems to treat ToolWindows similarly to pop-ups, and this was breaking the dragging code.
- Upp::Animate was crashing the app when applied in reverse. This may be because the popup was getting set to 0 size. Temporarily disabled for Linux, but this doesn't work very well on Windows either.

The Theming is not very good on the TabBar and in general it doesn't work quite as well on Linux as Win32, but at least it *should* work now. Please let me know if you have any problems.

Next priorities:
Improving the 'smart resize' algorithm for better animation/docking results
TabBar theming

Also, I notice that in the translation file common words like 'OK ' and 'Cancel' are listed, when these are obviously defined in CtrlLib. Is it not possible to exclude already translated words?

James
Re: Docking / DockTest packages [message #14881 is a reply to message #14865] Tue, 18 March 2008 22:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mrjt wrote on Tue, 18 March 2008 11:32


Also, I notice that in the translation file common words like 'OK ' and 'Cancel' are listed, when these are obviously defined in CtrlLib. Is it not possible to exclude already translated words?
James


Frankly, not sure about this Smile

I see this as little problematic: Some words can be in CtrlLib now, but then be removed.

So I think each package should carry on its translations...

Mirek
Re: Docking / DockTest packages [message #14883 is a reply to message #14881] Tue, 18 March 2008 22:24 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
I would like to integrate docking into an app both to test the packages in the long run and to see if docking really gives an improvement in the usability of it. I'll try to integrate it tomorrow.

I'll start with your version, and then try Oblivion's. They both seem to offer a common general feature set? Does your version still include somewhere support for visual aids? I find it very hard to position windows without them in general, not just in your ctrls). Also, where can I get the sources? I don't know the secret svn IP address.
Re: Docking / DockTest packages [message #14888 is a reply to message #14883] Tue, 18 March 2008 23:10 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
There is no secret SVN address Wink Just go to the SourceForge page and choose SVN from the menu. It gives the necessary command there, although you will have to install Subversion. DockingExample1 & 2 under bazaar are what you are looking for once you've checked it out.

The two versions are similar (we share the same vision, but differ in style Smile), though this version is further along in development. The visual aids are currently unsupported as I keep on changing things and not propagating the changes, but they will be shortly since you like them.

It is certainly not finished yet, so please share you're thoughts.

[Updated on: Tue, 18 March 2008 23:13]

Report message to a moderator

Previous Topic: SysInfo, Functions4U and Controls4U packages
Next Topic: TabBar Major Revision
Goto Forum:
  


Current Time: Fri Apr 26 16:38:36 CEST 2024

Total time taken to generate the page: 0.03394 seconds