TWindowMagnetManager class
Implements a manager for form and screen snapping behavior in an application.
Declaration
TWindowMagnetManager = classDescription
TWindowMagnetManager is a class used to manage magnetic window
snapping behavior for windows in an application. TWindowMagnetManager is the
type used to implement the MagnetManager property in TScreen. It provides
properties, methods, and members needed to:
- Track the position for a window on the screen.
- Adjust the window position when it reaches the snapping threshold for an edge on another form or the screen.
- Snap a specific form to an adjusted window position.
The Enabled property determines whether the magnetic window manager is enabled or disabled in the global Screen instance.
Use of TWindowMagnetManager depends on the LM_WINDOWPOSCHANGING message
dispatched when the position for a form (window) is changed. In the current
LCL release, the LM_WINDOWPOSCHANGING message is dispatched for the Windows
platform only. None of the other widgetsets check for or apply the message.
Added in LCL version 3.0.
Properties
Enabled | public | Enables or disables form and/or screen snapping behavior using the manager class. |
Methods
SnapToSides | protected | Performs actions needed to resize or reposition a form to another form or an edge on the screen. |
SnapToMonitor | protected | Snaps a window to an edge on the monitor. |
SnapToForms | protected | Snaps a form to an edge on another form in the application which is a valid snap target. |
Create | public | Constructor for the class instance. |
SnapForm | public | Snaps the specified form to the nearest snap target. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
