[Lazarus] Information about Docking
Paul Ishenin
ip at kmiac.ru
Wed Nov 26 04:52:47 CET 2008
Hans-Peter Diettrich wrote:
> I've been looking at the docking feature(s) of Lazarus, and would like
> to know more about the current implementation. Where should I look for?
At the ldocktree.pas unit and ofcource controls.pp.
> One of the most important question is about the general overview of the
> docking concept, from the technical point of view. I assume that there
> must exist one application-wide manager (singleton?), that manages all
> the related windows?
>
> Does there exist another docking manager, apart from anchor docking?
Yes, TLazDockTree.
> With sample code?
Use any delphi example.
> IMO anchor docking is a nice idea, but not very useful in practice. What
> will happen to such a (spiral...) layout, when the container form is
> resized? Not to mention other possible and existing problems...
We have plans to use it in the IDE mostly.
> What I want to achieve and contribute:
>
> - Docking by drag&drop, at least for Windows and Linux. A proof of
> concept in the first place, I've been warned ;-)
You can start with simple docking. You need to add ldocktree.pas into
any of your uses sections to change DockManager class from dummy to
working. Then create a delphi like example and start to play with it.
Most of things will work on windows. Drag/Dock will not work on linux
because we cannot know when user start drag a window. Window title is
owned by a window manager and gtk/qt does not report us about this
event. Thus the first thing to implement is a special dock header which
will be used on systems which cannot report us about titlebar drag.
Nobody looked at docking on OSX.
> - Old fashion (orthogonal/notebook) docking - if not yet implemented?
Implemented but it was so long ago when I checked it.
> - Multiple editor windows and related explorers. This was my first idea,
> that lead me straight to the docking problems.
This can be done when all docking will 100% work on simple applications.
And Mattias had an idea to use anchor docking.
You can even try how it works in IDE. Open your
lazarus\ide\include\ide.inc file and add there:
{$define EnableIDEDocking}
Then recompile your IDE.
> Which Lazarus revision (trunk/tag) should I use for my first steps?
> I also think that I must create my own (local) repository, so that I can
> share my modifications across various platforms (VM's). Any better idea?
Always use svn version if you want to send us patches. Get it here:
http://svn.freepascal.org/svn/lazarus/trunk
Best regards,
Paul Ishenin.
More information about the Lazarus
mailing list