|
|
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   |
|
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...
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   |
Oblivion
Messages: 1206 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 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 )
And Thank you for your permission.
Regards.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 26 January 2008 15:47] Report message to a moderator
|
|
|
|
Re: Docking / DockTest packages [message #13806 is a reply to message #13799] |
Mon, 28 January 2008 17:22   |
|
[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   |
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
[Updated on: Tue, 29 January 2008 11:22] Report message to a moderator
|
|
|
|
Re: Docking / DockTest packages [message #14468 is a reply to message #14137] |
Wed, 27 February 2008 01:03   |
Oblivion
Messages: 1206 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 ). 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
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.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[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   |
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.
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 #14543 is a reply to message #14541] |
Sat, 01 March 2008 02:15   |
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
[Updated on: Sat, 01 March 2008 02:16] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun May 11 17:15:55 CEST 2025
Total time taken to generate the page: 0.02020 seconds
|
|
|