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 » U++ Library support » U++ Widgets - General questions or Mixed problems » DockCtrl (A dockable window widget for U++)
Re: DockCtrl (A dockable window widget for U++) [message #14506 is a reply to message #11482] Wed, 27 February 2008 22:37 Go to previous messageGo to next message
Sc0rch is currently offline  Sc0rch
Messages: 99
Registered: February 2008
Location: Russia, Rubtsovsk
Member

Is it possible to call the context-menu with panel-settings by right-clicking on the panel's title (not by button)?
Re: DockCtrl (A dockable window widget for U++) [message #14509 is a reply to message #14506] Wed, 27 February 2008 23:20 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Quote:


Is it possible to call the context-menu with panel-settings by right-clicking on the panel's title (not by button)?



Firstly, which "panel"? There is only one panel and it is the control panel which you can control the behaviour and change settings of the framework. In control panel, if you want to invoke context menu of a specific dock, just left click on the name of the dock in the item list. But if you mean "docks" in the main work area, I can say that it is very easy to add such behaviour. I can add that if it is really needed but what will be the use (no rhetoric, this is a question I'm asking you) ? Smile

In normal dockwindows you always see the "title bar" so the context menu button will be always there for you to push. In tabwindows, you can right click on the tab to get the context menu of specific tabbed window. AND in floating mode, the behaviour you've just described is already implemented. Just right click the window NC area (bar) to get context menu (if in "floating" mode).

If you (or anyone) think it will be really useful, I will add it to the current code.

Regards.


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

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #14518 is a reply to message #14509] Thu, 28 February 2008 14:48 Go to previous messageGo to next message
Sc0rch is currently offline  Sc0rch
Messages: 99
Registered: February 2008
Location: Russia, Rubtsovsk
Member

Oblivion

But if you mean "docks" in the main work area, I can say that it is very easy to add such behaviour.

Sorry, please, of course I mean "docks".

Oblivion

I can add that if it is really needed but what will be the use (no rhetoric, this is a question I'm asking you) ? Smile

For example, I want to hide menu and close buttons, but have an opportunity to access advanced options and commands by using the context-menu of the dockwindow's title. And also it will be great if you'll add something like a WhenMenuBar-callback in upp-widgets for user's context-menu.

Oblivion

If you (or anyone) think it will be really useful, I will add it to the current code.

It will be good for me, but it was just a wish/question and if you think that such little things can take a time to wait, I'll understand you and, of course, I can wait for such a little opportunities to change something for a long time.

I hope that you'll can understand me, =). Sometimes it's hard to explain all, but I'm trying.

[Updated on: Thu, 28 February 2008 14:52]

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #14519 is a reply to message #14518] Thu, 28 February 2008 15:00 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Quote:



For example, I want to hide menu and close buttons, but have an opportunity to access advanced options and commands by using the context-menu of the dockwindow's title.




Well, that sounds nice. Since we want the DockCtrl to be as configurable as possible while keeping it as simple as it can be for the user, ok, I've added it to my todo list. Let's make it an option both for the user (via settings/control panel) and for the developer (via API).
Smile

Quote:


And also it will be great if you'll add something like a WhenMenuBar-callback in upp-widgets for user's context-menu.



I'm not sure if I understand this. Correct me if I'm wrong. You're asking me to add a callback to the docks which gets called (a callback with or without any variable to pass?) when context menu is invoked. Right? If so, ok I'll add it. If not, could you explain the behaviour of the callback you requested a bit?

And please don't get me wrong, I'm not a member of Spanish Inquisition, I'm just asking these questions because I need rationale to add these extensions/changes.

Wink

Also, thank you for your feedback. As always is, any suggestion, feedback, bug report and constructive criticism is always welcome.

Regards.


[Updated on: Thu, 28 February 2008 15:11]

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #14526 is a reply to message #14519] Fri, 29 February 2008 02:22 Go to previous messageGo to next message
Sc0rch is currently offline  Sc0rch
Messages: 99
Registered: February 2008
Location: Russia, Rubtsovsk
Member

Oblivion


Well, that sounds nice. Since we want the DockCtrl to be as configurable as possible while keeping it as simple as it can be for the user, ok, I've added it to my todo list.

Great to hear, thank you.

Oblivion

You're asking me to add a callback to the docks which gets called (a callback with or without any variable to pass?) when context menu is invoked. Right?

Yes, like in a GridCtrl, for example.

Oblivion


And please don't get me wrong, I'm not a member of Spanish Inquisition, I'm just asking these questions because I need rationale to add these extensions/changes.

Do not worry, all is good =). And other questions:

1) Do you can add an opportunity to switch-off the automatic-docking of the dock-window while dragging? Can you add such switch to each dockwindow? That will be a great feature for us and our projects, I think. And floating windows will be more easy to use in my case.

2) What about a special dockwindow for toolbar? There are images below illustrating the idea.

Oblivion

Also, thank you for your feedback. As always is, any suggestion, feedback, bug report and constructive criticism is always welcome.

I'm just a newbie for now, but I keep an eye on your project, and can translate it if needed.

P.S. I noticed that "Autohide" command is enabled in floating dock-window's menu, but in floating mode it is not useful. Probably, you can disable this command in floating mode.

Thank you,
Anton
  • Attachment: float1.png
    (Size: 4.38KB, Downloaded 302 times)
  • Attachment: float2.png
    (Size: 3.78KB, Downloaded 518 times)
  • Attachment: docked1.png
    (Size: 2.87KB, Downloaded 518 times)
  • Attachment: docked2.png
    (Size: 5.67KB, Downloaded 522 times)

[Updated on: Fri, 29 February 2008 03:23]

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #14528 is a reply to message #14526] Fri, 29 February 2008 07:21 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Quote:


1) Do you can add an opportunity to switch-off the automatic-docking of the dock-window while dragging? Can you add such switch to each dockwindow? That will be a great feature for us and our projects, I think. And floating windows will be more easy to use in my case.



Yes this could be an option (but let's add it only to the developer API, the control panel is mainly for the users, so it should stay simple)

Quote:


2) What about a special dockwindow for toolbar? There are images below illustrating the idea.



Well, in the DockCtrl.h (DockableCtrl class), there is:

enum { TYPE_WINDOCK, TYPE_TABDOCK, TYPE_BARDOCK };


Smile

So, a dockable bar is already planned and in my todo list. That's why the base class of all DockCtrl widgets is DockableCtrl. I'll implement a DockBar class (since, it's relatively easy to add it) after I fix all the major issues of the main framework.

Quote:


P.S. I noticed that "Autohide" command is enabled in floating dock-window's menu, but in floating mode it is not useful. Probably, you can disable this command in floating mode.



Thanks, I'll fix it asap.

Quote:


I'm just a newbie for now, but I keep an eye on your project, and can translate it if needed.



Smile Yes, please. I need translators and feedbacks all the time.


Regards.


Re: DockCtrl (A dockable window widget for U++) [message #14540 is a reply to message #14528] Fri, 29 February 2008 17:18 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I've just updated my Docking package. I've changed my Dock to a normal Splitter, so the animation code might be useful.

The TabBar is now uploaded too.
Re: DockCtrl (A dockable window widget for U++) [message #14949 is a reply to message #11482] Fri, 21 March 2008 23:24 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Hi, I was away for a while. But now I'm back with the new version of DockCtrl. Smile

This version has several improvements (mostly, stability issues fixed). Full serialization and custom/default layout support is added -- See ChangeLog.txt for details. Some API changes have been made. AS always, you can find the example exe in the first post of this topic. And from now on, I also upload the Source code of DockCtrl (You don't have to go the U++ SVN anymore) here too. However, you can find the nighly builds only on SVN.

You should use NOGTK keyword to compile DockCtrl correctly on KDE . Since, there was (or is?) a heap leak problem with the U++ core).

for more details about the problem, see topic:

http://www.ultimatepp.org/forum/index.php?t=msg&th=3220& amp; amp; amp;start=0&

The problem seem to be fixed in the nightly builds of U++ but I Didn't have time to download it. Embarassed So if you have the latest build, just remove the NOGTK keyword.

Adn one more thing: You should remove DockCtrl and DockCtrlExample folders from "DockCtrl Package" folder in order to compile them without errors.

Any bug reports, constructive criticism and feedbacks are welcome.

Regards.


[Updated on: Sat, 22 March 2008 00:29]

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #14952 is a reply to message #14949] Sat, 22 March 2008 04:41 Go to previous messageGo to next message
Sc0rch is currently offline  Sc0rch
Messages: 99
Registered: February 2008
Location: Russia, Rubtsovsk
Member

Oblivion wrote on Fri, 21 March 2008 23:24

Full serialization and custom/default layout support is added -- See ChangeLog.txt for details... And from now on, I also upload the Source code of DockCtrl (You don't have to go the U++ SVN anymore) here too.

Great to hear! Big steps to Perspectives, very usefull feature for a large project.

A little behaviour-idea: left click on tab's header (one or double) switchs the dockwindow from autohide-mode to normal-docked state.

Updated translation here:
  • Attachment: DockCtrl.t
    (Size: 10.86KB, Downloaded 247 times)
Re: DockCtrl (A dockable window widget for U++) [message #14954 is a reply to message #14952] Sat, 22 March 2008 12:59 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Sc0rch wrote on Sat, 22 March 2008 05:41



A little behaviour-idea: left click on tab's header (one or double) switchs the dockwindow from autohide-mode to normal-docked state.




Yes nice idea. Added. Smile Also, package + exe updated.

Thank you for the translation.


Re: DockCtrl (A dockable window widget for U++) [message #15008 is a reply to message #14954] Tue, 25 March 2008 14:07 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Very nice, your transparent highlights work well (I think I might use that code Smile ).

A few things:
- Besides the fact that panelicons would be better as an Array<ImageCtrl> (to avoid using new/delete), would it not be easier to just add the Image to the ArrayCtrl and set the display for that column to ImageDisplay()?
- It's a bit wierd that all the windows open as peer-windows, it would seem more natural to me for them to be child windows.
- Instead of newlayoutdialog, you could just use Upp::EditText.

James
Re: DockCtrl (A dockable window widget for U++) [message #15009 is a reply to message #15008] Tue, 25 March 2008 14:54 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Quote:


Very nice, your transparent highlights work well (I think I might use that code.



Be my guest Smile

Quote:


Besides the fact that panelicons would be better as an Array<ImageCtrl> (to avoid using new/delete), would it not be easier to just add the Image to the ArrayCtrl and set the display for that column to ImageDisplay()?



Well, that was a remnant of an attempt to add some "eyecandy" which I found useless and abandoned later. But you are right, I removed all the heap allocation stuff, and in the new versions (wihch I'll upload tonight) only tab windows will use heap (maybe I can revert them too...).

Quote:


- It's a bit wierd that all the windows open as peer-windows, it would seem more natural to me for them to be child windows.



Ooops, shame on me! Embarassed
I forgot to change that in the public version. Actually, I opened them that way beacuse in KDE it seems that tool windows cannot be resized (I'm not sure, I didn't have the time to examine the behaviour further). Then I found that opening them as child windows will solve the problems (at least no peer) but forgot to update source code from diff. file. It'll be changed tonight.

Quote:


instead of newlayoutdialog, you could just use Upp::EditText.



Thanks, changed. By the way, why don't write some documentation about U++'s undocumented features. From the forums, I can say that you really seem to know about them very well. Smile

And belive me, if I had some comprehensive documents about U++ under my hand, this project would have been finished months ago. And as you may have noticed, I'm too used to MFC (that good old C++ API, which you have to find a "workaround" for Very Happy ). So this project is also a "tutorial" for me. When I finish this, I'll write some documents about undocumented API functions of U++...



Re: DockCtrl (A dockable window widget for U++) [message #15067 is a reply to message #11482] Fri, 28 March 2008 03:15 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
Hi, DockCtrl is updated to DEV803b.2

Predefined/user widget grouping support and a group manager addded. (Though, I'm well aware that it needs fine tuning).

Adding a predefine group is just a piece of cake:

(the snippet below is taken from the DockCtrlExample source)
void DockCtrlExample::InitCustomLayouts()
{
	// This method is called by DockCtrl for predefined custom layouts/groups.
	
	// Predefined Group Example
	// ------------------------
	// You need to take two simple steps to add a predefined widget group to DockCtrl based application:
	// Step 1: Add the group using WidgetGroup() method.
	// Step 2: Use "%" operator to add ctrls to group. 
	
	WidgetGroup("Predefined Group 1") % dock1 % dock2 % dock3 % dock4;
	WidgetGroup("Predefined Group 2") % dock5 % dock6 % dock7;
	
	// Predefined Layout Example
	// -------------------------
	// NOT IMPLEMENTED YET. TO BE WRITTEN (SOON)...
}


Some known minor bugs are fixed. DockCtrl is quite stable now (Or I hope so...)

Also I have added to the source package (which you can find in the first post of this topic) a UWord Example with DockCtrl support. Just a simple app. But it is more concrete than the DockCtrlExample. Please keep in mind that this app is for mainly for beta testing/bug reporting purpose... It does NOT show the full potential of DockCtrl.

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


DockCtrl Dev804x.x will be mostly a general code cleanup.

And, I have finally started to write a DockBar (dockable barctrl) Smile It will probably be released with (Dev805b.1)...

Any bug reports, constructive criticism and feedbacks are welcome.

Regards.


[Updated on: Fri, 28 March 2008 03:29]

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #15071 is a reply to message #15067] Fri, 28 March 2008 14:52 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Good work!

However, what I have noticed is that undocked windows always stay in the foreground even when I activate another application's window. I would expect it to also be hidden.

Regards,
Matthias
Re: DockCtrl (A dockable window widget for U++) [message #15072 is a reply to message #15071] Fri, 28 March 2008 15:39 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
masu wrote on Fri, 28 March 2008 15:52

Good work!

However, what I have noticed is that undocked windows always stay in the foreground even when I activate another application's window. I would expect it to also be hidden.

Regards,
Matthias


It is because, DockWindow derived classes are by default top most windows. Since a DockWindow is a TopWindow derived class, to change that behaviour all you have to do is to explicitly state that. e.g. TopWindow::TopMost(false).

For example, in DockCtrlExample constructor (or anywhere, at your will) you can;
dock1.TopMost(false);
dock2.TopMost(false);
etc...


However, You are right it is more traditional. So I'll change the default behaviour to TopMost(false).

Smile


[Updated on: Fri, 28 March 2008 15:51]

Report message to a moderator

Re: DockCtrl (A dockable window widget for U++) [message #15073 is a reply to message #15072] Fri, 28 March 2008 15:55 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
I set all docked windows to TopMost(false) in main, but the tabbed undocked windows still stay in the foreground.

Matthias
Re: DockCtrl (A dockable window widget for U++) [message #15075 is a reply to message #15073] Fri, 28 March 2008 16:14 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
masu wrote on Fri, 28 March 2008 16:55

I set all docked windows to TopMost(false) in main, but the tabbed undocked windows still stay in the foreground.

Matthias


Sad I'm sorry, I'm a little bit tired today...

Here is the quick fix:
In DockCtrl/DockWindow.cpp, line 35:
	Sizeable().Zoomable().ToolWindow().TopMost().MinimizeBox().MaximizeBox().BackPaint();


Please change it to "TopMost(false)"

I've made the change and uploaded the modified ver. to the SVN.
Also, I will add some optional settings switchs for dock windows behaviour.

Regards.


Previous Topic: TheIDE bug in layout designer?
Next Topic: Linux RectTracker problem
Goto Forum:
  


Current Time: Thu Apr 25 00:50:13 CEST 2024

Total time taken to generate the page: 0.04502 seconds