Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDViewPortControlBaseMBS class.
CDViewPortControlBaseMBS.Constructor
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDViewPortControlBaseMBS.getProperty(attr as integer) as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDViewPortControlBaseMBS.handleMouseDown(x as double, y as double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
x | (Mandatory) | The x pixel coordinate of the mouse. |
y | (Mandatory) | The y pixel coordinate of the mouse. |
Some examples using this method:
CDViewPortControlBaseMBS.handleMouseMove(x as double, y as double, isDragging as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
x | (Mandatory) | The x pixel coordinate of the mouse. |
y | (Mandatory) | The y pixel coordinate of the mouse. |
Some examples using this method:
CDViewPortControlBaseMBS.handleMouseUp(x as double, y as double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
x | (Mandatory) | The x pixel coordinate of the mouse. |
y | (Mandatory) | The y pixel coordinate of the mouse. |
Some examples using this method:
CDViewPortControlBaseMBS.isOnPlotArea(x as double, y as double) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
x | (Mandatory) | The x pixel coordinate of the point. |
y | (Mandatory) | The y pixel coordinate of the point. |
Some examples using this method:
CDViewPortControlBaseMBS.paintViewPort
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
CDViewPortControlBaseMBS.setMouseMargin(mouseMargin as Integer, cornerMargin as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The viewport border can be as thin as 1 pixel, and it is hard to position the mouse over the border to drag it. To make it easier to drag the border, dragging can start if the mouse is within a certain margin from the border.
If both vertical and horizontal zooming is allowed, the viewport corners can be dragged diagonally to resize the viewport in both directions at the same time. To distinguish between dragging the corners and the borders, if the mouse is within a certain margin from the corner when the dragging starts, it is considered to be dragging the corner.
In either case, the mouse cursor will change to let the user know if the border or corner can be dragged.
Argument | Default | Description |
mouseMargin | (Mandatory) | The margin around the viewport border within which dragging of the border can start. The margin is in pixel unit. The default is 4 pixels. |
cornerMargin | (Mandatory) | The margin around the viewport corner within which dragging of the corner can start. The margin is in pixel unit. The default is 8 pixels. |
CDViewPortControlBaseMBS.setProperty(attr as integer, value as integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDViewPortControlBaseMBS.setZoomScrollDirection(zoomDirection as integer, scrollDirection as integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The viewport control uses this information to determine which type of dragging is allowed.
Arguments
Argument | Default | Description |
zoomDirection | (Mandatory) | The allowable zoom direction. Must be one of the predefined constants kDirectionHorizontal, kDirectionVertical and kDirectionHorizontalVertical for horizontal, vertical and bi-directional zooming. |
scrollDirection | (Mandatory) | The allowable scroll direction. Must be one of the predefined constants kDirectionHorizontal, kDirectionVertical and kDirectionHorizontalVertical for horizontal, vertical and bi-directional scrolling. |
Some examples using this method:
The items on this page are in the following plugins: MBS ChartDirector Plugin.