[fpc-devel] Lazarus

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jan 23 22:55:12 CET 2006


On Mon, 23 Jan 2006 12:20:29 -0200
Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com> wrote:

> On 1/21/06, VisionForce <webmaster at visionforceweb.com> wrote:
> > So where would I need to start if I wanted to add this to Lazarus?
> 
> On Lazarus website, click on "Project Roadmap". There you will find
> the status of "Docking (= the combination of forms)". It is marked as
> "In Progress", so probably someone is already started working on this.
> Now you need to find who is working on Docking and ask him how you can
> help.
> 
> Vincent probably knows who is working with docking (if someone is at all).

Well, I'm working on it. At least from time to time I am.

 
> To implement this feature, I would:
> 
> * Search (google) how docking can be done using the Windows API on a
> standard Windows API program
> 
> *  Search (google) how docking can be done using Gtk on a standard Gtk
> program (if you want to add Linux support too)
> 
> * Research how to use the Delphi docking interface and try to make
> methods compatible with it.
> 
> I know at least that a few methods needs to be implemented on TControl:
> 
> function ManualDock(NewDockSite: TWinControl; DropControl: TControl =
> nil; ControlSide: TAlign = alNone): Boolean;
> 
> procedure Dock (NewDockSite: TWinControl; ARect: TRect); dynamic;
> 
> function ManualFloat(ScreenPos: TRect): Boolean;
> 
> Use ManualFloat to undock the control programmatically.
> 
> ScreenPos is the rectangle in which the control is displayed when it
> starts floating

These already work. But some messages are not properly delegated in the
win32 interface. Although this is more a CustomForm.Parent issue, than
docking.

 
> function GetDockEdge(MousePos: TPoint): TAlign; dynamic;
> 
> Use GetDockEdge to get the edge on which another control should be
> docked when it is dragged over the control.
> 
> MousePos is the position of the mouse.
> 
> GetDockEdge is called automatically during drag-and-dock operations
> involving the control.

IMHO docking with TAlign alone is not intuitive for the user. It requires an
internal tree of rows and columns, which the user can't see and limits the
users choices for dock layouts. That's why I started another approach:
Anchor docking. Here the internal representation fits to what the user sees
- WYSISWYG. It already works, even docking in pages. see below for the
ToDos.


> There are probably many other things that need to be implemented =)

Yes. 
- A good dock manager with smart save and restore abilities. Especially for
hidden/reshown forms.
- Fix the win32 message delegation.
- Frames for gtk forms
- Form.BoundsRect changes. I'm not sure yet, how.
- Drag&Drop docking


Mattias



More information about the fpc-devel mailing list