The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



MouseAction


Unit: SDL_rchart
Class: TContourPlot
Declaration: property MouseAction: TMouseActMode;

The property MouseAction facilitates interactive zooming and panning of the data. This property may take one of the following values. The kind of mouse action is indicated by different cursors (if MouseCursorFixed is set to FALSE).

maDragCrossH Drag the crosshair using the mouse. The OnCrossHairMove event is triggered whenever the crosshair is moved by the mouse.
maDragLabel Drag any visible user-defined text label. The text label closest to the mouse cursor when pressing the left mouse button can be moved interactively when holding down the left mouse button.
maDrawMTrace The mouse movement is recorded if the left mouse button is pressed. The recorded mouse trace is displayed. See MouseTrace for details.
maNone No built-in interaction is possible. The only way to apply a mouse controlled action is by utilizing the mouse events.
maPan The contour plot can be panned by pressing and holding the left mouse button. The plot will then follow the mouse movement.
maPanGrid The data diagram can be panned by pressing and holding the left mouse button. In contrast to maPan (which allows continuous movement) the data image will be panned only at integral steps defined by the properties PanGridDx, PanGridOffsX, PanGridDy and PanGridOffsY. Please note that maPanGrid is only effective if both axes are linear.
maPanHoriz The contour plot can be panned only horizontally by pressing and holding the left mouse button. The plot image will then follow the mouse movement parallel to the x-axis.
maPanVert The contour plot can be panned only vertically by pressing and holding the left mouse button. The plot image will then follow the mouse movement parallel to the y-axis.
maRubberband This mode displays a rubber band from the last click position to the current mouse position as long as the left mouse button is down. Releasing the mouse button triggers the OnRubberBand event.
maSelectRect Select a rectangular region by pressing and holding the left mouse button. A rectangle follows the mouse cursor indicating the region to be selected. Releasing the left button selects this region and triggers the OnSelectRect event.
maZoomWind The user can zoom into a rectangular region of the contour plot. Therefore he has to press and hold down the left mouse button at one of the corners of the intended region. Thereafter a rectangle follows the mouse cursor indicating the region to be zoomed. Releasing the left button selects this region and zooms into the data by displaying exactly this region. Note, that the direction of an axis is reversed if the first point is higher than the second point. In order to avoid this effect, use the mode maZoomWindPos.
maZoomWindPos This is a special version of maZoomWind which prevents the zoom mechanism from turning the direction of an axis in case of a selection window which has been defined from right to left and/or from top to bottom (i.e. the first point corner of the rectangle is located to the right of and/or above the second point).
maZoomDrag This mode enables the user both to increase and to decrease the magnification factor of the graph. The left mouse button has to be pressed and held down. The magnification of the contour plot will then follow the mouse movement. Moving to the left and/or bottom zooms out of the data; moving to the right and/or top zooms into the data.

Hint 1: The mouse cursors associated with the different mouse actions are allocated once during the creation of a plot. Additional plots will use the cursor resources of the first plot. However these resources are released only when the application exits. Thus the heap is loaded by 48 extra bytes even if all of the TContourPlot components are destroyed.

Hint 2: In the case of type ambiguities concerning maNone please visit the SDL TechnNotes.

Example: This method is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): contplot



Last Update: 2023-Dec-13