Missing dock manager notifications
Original Reporter info from Mantis: dodi
-
Reporter name: Hans-Peter Diettrich
Original Reporter info from Mantis: dodi
- Reporter name: Hans-Peter Diettrich
Description:
When a docking site is resized, the FDockManager.ResetBounds() method should be invoked, i.e. in TWinControl.WMSize().
Another notification is required when the visibility of a docked control changes, e.g. in TWinControl.CMVisibleChanged(). An according method could be added to the TDockManager base class. Delphi requires that a dock manager subclasses the WndProc of the dock site, because this notification was forgotten in the IDockManager interface - IMO we should cure this design flaw properly.
More notifications seem to be required, e.g. when a docked control is resized by a splitter control. Again Delphi requires subclassing of the WndProc, to emulate an splitter/sizer there, instead of using dedicated splitter controls, as is the current approach in the LCL. IMO the resizing of docked controls could be handled in a cheaper way, e.g. by drawing an sizing/docking frame, as already implemented for resizing forms or in the drag performer.
Additional information:
These are essential notifications for all layout managers. It might be a good idea to create a TLayoutManager base class, with all the required notification methods; then TDockManager can inherit from that base class, extending it with docking specific methods. OTOH a dock manager should be able to inherit the implementation of an specific layout manager, what suggests to me to turn the TDockManager class into an IDockManager interface, just like in Delphi. Please note that such a change also would eliminate the current risk of memory leaks, when a user defined dock manager replaces an pre-created dock manager.
The same considerations may apply to an layout manager interface instead of a class. This should be kept in mind, when this issue is fixed.
Mantis conversion info:
- Mantis ID: 13034
- Version: 0.9.27 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 18573 (#702dc11c)
- Target version: 1.4