You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_ViewPort object:

Class

Cvo_ViewPort

Base

Cvo_Frame

Syntax

#include <Cvo/ViewPort.h++>

new Cvo_ViewPort ( char *resource_name,
{ Cvo_Object *parent | Display *display } )

Overview

A Cvo_ViewPort object is a basic object which allows viewing of data with scroll bars in the vertical and/or horizontal directions. A Cvo_ViewPort, though it creates the scroll bars, does not actually register the scroll bars to do anything. In the same manner, the Cvo_ViewPort object does not actually create the "viewport" in which to view things.

The Cvo_ViewPort object permits a Cvo_Window to be registered as the "main" window using the AddMain() member function. The "main" window should contain what will be viewed by the Cvo_ViewPort object, and it will be reparented such that it is a child of the Cvo_Frame object within the Cvo_ViewPort object. The Cvo_ScrollBar objects will match the size of the "main" window.

There are several objects derived from the Cvo_ViewPort, such as Cvo_TextViewPort, Cvo_PaintViewPort, Cvo_TreeViewPort and Cvo_WindowViewPort which are generally the interfaces used instead of this lower level interface.

Member Functions

This object defines the following member functions in addition to those defined by its parent and ancestor objects.

The various Set*Size() routines on a Cvo_ViewPort will actually operate on the Cvo_Window object set with AddMain(), rather than the Cvo_ViewPort itself.

Your application should supply registration functions for the CvoScrollBarEvent on the vertical and horizontal scroll bars and move the data in the "main" window in response to those events.

Children Objects

This object is composed of the following Cvo objects. Each object has the shown resource name. This link displays the composition of the parent object.


See the example source code for an example of how to use this object.


See the legend for information about the conventions used in this documentation.