You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_WindowViewPort object:
Cvo_WindowViewPort
Cvo_ViewPort
#include
<Cvo/WindowViewPort.h++>
new
Cvo_WindowViewPort ( char *resource_name,
{ Cvo_Object *parent | Display *display } )
The Cvo_WindowViewPort object provides the capability to scroll a Cvo_Window object within a viewing window. The Cvo_Window object can be scrolled either by Cvo_ScrollBar objects, or by panning with the mouse pointer. When panning, the user may simply depress the mouse while the pointer is over the Cvo_Window object being viewed, and drag it in any direction to pan it. The Cvo_ScrollBar objects will be updated while the user pans the Cvo_Window object.
In order to use this object to view other Cvo visual objects, the
Cvo_Window which is being viewed, and was created by the
Cvo_WindowViewPort object, must be retrieved. The Frame()
member
function provides access to that Cvo_Window object. Other Cvo
objects may be created as children of the Cvo_Window object being
viewed, and they will also be viewed in the Cvo_WindowViewPort
object.
Also see the Cvo_WindowViewPortPanner object, which can be used in conjunction with this object.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
Cvo_Window *Frame (
)
This function returns the Cvo_Window object being viewed in the Cvo_WindowViewPort object. This Cvo_Window object should be used as the parent of other Cvo visual objects which you wish to have viewed in this Cvo_WindowViewPort object. Note that the children objects should not be mapped before the Cvo_WindowViewPort object which is being used to view them.
AddHorizontal (
)
AddVertical (
)
These functions add either a horizontal or vertical Cvo_ScrollBar to the window. These may be used to scroll the Cvo_Window object being viewed in the viewport. Adding a Cvo_ScrollBar activates the mouse panning feature of the Cvo_WindowViewPort object as well.
Synchronize (
[ BOOL flag ] )
This function, when flag has a True
value, will cause the X
server to synchronize events, via the XSync()
Xlib call. This is
intended to keep the panning effect smoothly synchronized with the
Cvo_ScrollBar objects.
When flag has a False
value, XSync()
will not be called.
The default is to synchronize events. However, this may impact X
server performance, so you may wish to disable this mode when using
slow X servers.
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.
Cvo_WindowViewPortWindow
:
*CvoWindowViewPort.Frame.viewPortWindow
This object uses the following X resources in addition to those used by its parent and ancestor objects.
pannable
(class:
Pannable
) (default value:
True
)
This resource determines whether or not the Cvo_WindowViewPort object should permit panning of the Cvo_Window object being viewed.
This object modifies the following X resources which are used by its parent or other ancestors.
*CvoWindowViewPort.BorderWidth
(new value:
0
)
See the legend for information about the conventions used in this documentation.