[Lazarus] Delphi editor clone
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Nov 9 10:17:07 CET 2009
Reimar Grabowski schrieb:
>> Please have a look at examples/dockmanager/elasticsite/SiteTest
>> project. It demonstrates how docking could work in the Lazarus IDE,
>>
>
> Gave it a try and it looks like it needs some more work.
I did some more work, and fixed almost all the flaws :-)
Please check again and report (everybody!)
> 1. Docking anything left or right of the editor is much harder than
> docking below. I have no idea why.
I've increased the InfluenceRect, should now be easier to hit.
I also made the window auto-elastic, i.e. the user has the option to
dock a window into or onto the editor window - watch the docking frames
appear inside or outside the window, depending on the mouse position.
> 1.a) Sometimes it does not work at all. I don't know what I have to
> do to make it work. Sometimes it works and sometimes it doesn't.
> Docking should be intuitive and "just work(tm)".
Should work now.
What still does not work is floating a docked View window - due to the
bad docking model implemented in the LCL. But I'm still searching for an
workaround...
> 1.b) Undocking the editor causes an AV.
Should not happen any more. It should no more possible to undock the
editor notebook from the main window. I dunno what happens to the
secondary editor windows, perhaps a racing condition while undocking?
> 2. I don't like that I have to drag&drop/dock the contents of a
> window instead of the window itself but this seems to be the standard
> nowadays.
This behaviour is caused by the (Linux...) window managers. We could add
a docking handle to the windows' caption bars, but this will give the
Lazarus windows an non-standard look and feel.
> 3. I don't like the inconsistent positioning of the 'undock X'.
> Sometimes it is in the upper left corner, sometimes the upper right
> and sometimes it is not there at all.
I changed the dockheader for the View forms, in two ways:
- The headers no shows the client names.
- The header now disappears when a floating site only has one client.
Both are options of the EasyDockSite docking manager, individually
settable for each dock site.
> 4. I like that tabs are inserted when docking more than one component
> in the same place. I don't like that the last tab is not removed if
> only one component is left in that place.
This will be changed later. The Editor notebook should retain the tab
with the filename, even for an single open file. Other notebooks should
behave as mentioned above, that the header (tab bar) is shown only for
multiple pages. But then we may get problems with undocking such an
headerless client :-(
> 5. Visual feedback for docking is important but the red frames are
> just ugly.
Please create an bug/feature report. I dunno how docking looks and feels
with other gtk applications, the docking rectangles are implemented in
the LCL widgetsets.
> I don't think that it is ready for Lazarus as it is. But with some
> more work it may be in the future. Hopefully any kind of docking will
> be available soon, as the multi window approach feels more and more
> cumbersome.
If you're pleased now by the offered docking features, despite some
minor implementation details, I'll start to integrate the features into
the Lazarus IDE.
This will require some more adaptation to the existing types of the IDE
windows. Some of these windows eventually must become frames, that dock
together nicely. And finally the persistence of the docking layout must
be implemented. Perhaps I can copy some code from the current dockable
IDE approach, but that code obviously was never tested, and doesn't work
as it should.
DoDi
More information about the Lazarus
mailing list