Platforms to show: All Mac Windows Linux Cross-Platform

CDViewPortControlBaseMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
A viewport control is a user interface element to let the user visualize and manipulate the viewport managed by the CDViewPortManagerMBS.

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.

This class has no sub classes.

Some examples using this class:

Blog Entries


Release notes

The items on this page are in the following plugins: MBS ChartDirector Plugin.

CDVectorLayerMBS   -   CDViewPortManagerMBS

💬 Ask a question or report a problem
The biggest plugin in space...