|class||ChartDirector||MBS ChartDirector Plugin||21.2||✅ Yes||✅ Yes||✅ Yes||✅ Yes||All|
In typical usage, the viewport control displays an "overall chart" that shows the full data range, and connects to the CDViewPortManagerMBS using ViewPortControlBase.setViewPortManager. It can then include a rectangle on the overall chart to represent the viewport in the CDViewPortManagerMBS. The region outside the rectangle can be dimmed out to highlight the viewport region. If the viewport is updated (such as if the user uses the mouse wheel to zoom in the chart), the rectangle will also update automatically.
To manipulate the viewport, the user can drag the rectangle to move the viewport (equivalent to scrolling). The user can also resize the viewport by dragging the border of the rectangle (equivalent to zooming), or drag a new rectangular region on the overall chart to be used as the new viewport, or click on a point on the chart to center the viewport at that point.
In ChartDirector, the ViewPortControlBase implements the main logic of the viewport control without the GUI framework specific functions. The actual GUI framework specific control can derive from ViewPortControlBase and implement the GUI specific part. This greatly simplifies development of the actual control.
- 18 properties
- property Chart as CDBaseChartMBS
- property ClickToCenter as Boolean
- property CornerMargin as Integer
- property Cursor as Integer
- property DragBorderToResize as Boolean
- property DragInsideToMove as Boolean
- property DragOutsideToSelect as Boolean
- property MouseMargin as Integer
- property needUpdateChart as Boolean
- property needUpdateDisplay as Boolean
- property needUpdateImageMap as Boolean
- property SelectionBorderColor as Color
- property SelectionBorderWidth as Integer
- property ViewPortBorderColor as Color
- property ViewPortBorderWidth as Integer
- property ViewPortExternalColor as Color
- property ViewPortFillColor as Color
- property ViewPortManager as CDViewPortManagerMBS
- 10 methods
- method Constructor
- method getProperty(attr as integer) as integer
- method handleMouseDown(x as double, y as double)
- method handleMouseMove(x as double, y as double, isDragging as boolean)
- method handleMouseUp(x as double, y as double)
- method isOnPlotArea(x as double, y as double) as boolean
- method paintViewPort
- method setMouseMargin(mouseMargin as Integer, cornerMargin as Integer)
- method setProperty(attr as integer, value as integer)
- method setZoomScrollDirection(zoomDirection as integer, scrollDirection as integer)
This class has no sub classes.
The items on this page are in the following plugins: MBS ChartDirector Plugin.
MBS Xojo blog