[Lazarus] IDE docking flaw?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Jun 7 15:30:33 CEST 2011


Mattias Gaertner schrieb:

>>> The IDE package that installs the dock master can provide
>>> default layouts.
>> Which are selectable how?
> 
> You gave the answer yourself:
> 
>> [...]as in Delphi or my MiniIDE example :-)

Sorry, I still cannot find a Layout list in the MainBar :-(


>> [...]
>> As you already mentioned, Show can have many meanings WRT siblings and 
>> parents. I wonder if there is a legitimate expectation, that Show (or 
>> ShowControl, BringToFront...) would *not* make visible components with 
>> more than one Parent.
> 
> I don't know. But we don't break compatibility without need. And in
> this case we can simply add a function with another name, maybe a
> better one.

My IDE model contains:

procedure TIDEForm.MakeVisible(inFront: boolean = True);
begin
   ShowControl(nil, inFront);
end;


> There are LCL applications. ShowControl existed since revision 5536 in
> the LCL. You can find out such facts with svn blame.

How are these affected by an added default parameter?


>> BTW the SimpleLayout should *not* remember the bounds of *docked* forms, 
>> instead it should retain their *undocked* bounds, for use when such a 
>> form is undocked later.
> 
> That's just my preference: When a form is undocked it should not move. 
> You can send me a patch to make this optional.

The user specifies the position when undocking a form, whereupon the 
form is resized to its UndockedWidth/Height. That's Delphi docking 
convention - see also DockRect.


>> And the Options Windows page should *always* show the window placement 
>> frame, so that the user can adjust at least the extent of (actually or 
>> later) undocked forms, and can move misplaced forms into view, after the 
>> monitor count or screen resolution has changed. 
> 
> I added an option to TIDEDockMaster.

Thanks :-)


>> I've improved TScreen 
>> and ShowForm already, so that my ShowForm will force all forms into the 
>> monitor bounds. [Patch available on demand]
> 
> Have you tested this under Linux/gtk2?

No, but it should work when Screen.Monitors returns the true monitor 
bounds. More complicated is exclusion of the TaskBar...


>> [...]
>> I can help myself, as mentioned above. But I cannot help when my bug 
>> reports and patches are not even *recognized* by the Lazarus team :-(
> 
> I'm sorry for that. But these patches require some time to check, which
> I don't have at the moment.

Let me know when you can spend some time for IDE docking.


> See the unit RegisterAnchorDocking as example:
> 
>   LazarusIDE.AddHandlerOnIDERestoreWindows(@IDEAnchorDockMaster.OnIDERestoreWindows);
>   LazarusIDE.AddHandlerOnProjectClose(@IDEAnchorDockMaster.OnProjectClose);
> 
> See here for other events:
> http://wiki.lazarus.freepascal.org/Extending_the_IDE#Project_events

Thanks for the links :-)

DoDi





More information about the Lazarus mailing list