FMX.Objects.TSelection.MouseMove
Delphi
procedure MouseMove(Shift: TShiftState; X, Y: Single); override;
C++
virtual void __fastcall MouseMove(System::Classes::TShiftState Shift, float X, float Y);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Objects.pas FMX.Objects.hpp |
FMX.Objects | TSelection |
Description
Handles moving of the mouse pointer over a TSelection object.
As the mouse pointer moves over a TSelection object, this method is called repeatedly. It is called each time with the new mouse pointer coordinates that reflect the continuous path of the mouse pointer.
Parameters
MouseMove has the following parameters:
Shift
--belongs to the TShiftState type and passes additional information, such as: which mouse button was pressed (ssLeft
--left,ssRight
--right) or whether shift keys (ssShift
--SHIFT,ssCtrl
--CTRL, orssAlt
--ALT) were pressed when the mouse button was clicked.X
andY
--are the local pixel coordinates of the mouse pointer within the TSelection object.
Functionality
MouseMove executes the following operations:
- MouseMove calls the inherited FMX.Controls.TControl.MouseMove method. Then:
- If the mouse button is not pressed down:
- Check whether the mouse pointer hovers over a grip control:
- When the mouse pointer moves over a grip control--shows the resizing arrow on the grip control over which the mouse pointer is moving.
- When the mouse pointer moves outside a grip control--clears the resizing arrows, if any.
- Force repaint of the selection shape.
- Check whether the mouse pointer hovers over a grip control:
- If the left mouse button is pressed inside the TSelection object:
- Moves the shape of the TSelection object on the vector with the start point having the coordinates where the mouse button was pressed and the end point having the current coordinates of the mouse.
- If ParentBounds is
True
, the TSelection object shape is moved inside the boundaries of the parent control. - If ParentBounds is
False
, the TSelection object shape is moved inside the boundaries of the current TCanvas object.
- If ParentBounds is
- Calls the customer event handler of the OnTrack event.
- Moves the shape of the TSelection object on the vector with the start point having the coordinates where the mouse button was pressed and the end point having the current coordinates of the mouse.
- If the left mouse button is pressed down on one of the grip controls of the TSelection object:
- The shape of the TSelection object is resized to reflect the moving of the selected grip control.
- If ParentBounds is
True
, the TSelection object shape is resized to fit the boundaries of the parent control. - If ParentBounds is
False
, the TSelection object shape is resized to fit the boundaries of the current TCanvas object. - If Proportional is
True
, the object shape is resized keeping theWidth/Height
proportion.
- If ParentBounds is
- Call the customer event handler of the OnTrack event.
- Force the repaint of the selection shape.
- The shape of the TSelection object is resized to reflect the moving of the selected grip control.
Override the public MouseMove method to provide a customized response when the mouse pointer is moved over the TSelection object.