You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_Matrix object:
Cvo_Matrix
Cvo_Window
#include
<Cvo/Matrix.h++>
new
Cvo_Matrix ( char *resource_name,
{ Cvo_Object *parent | Display *display } )
The Cvo_Matrix object is used as a container for objects which need
to be displayed in a grid. This can often be better than a tree of
Cvo_Frames, but not always. A Cvo_Matrix has a series of
rows and columns, each numbered by an integer. There is no
requirement that the range be zero to N-1 and the Cvo_Matrix may also
be sparse. The general technique used is to first create the
Cvo_Matrix, then create its children. For each child the
AddCell()
function must be called.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
Cvo_MatrixSlice *AddRow (
int row )
Cvo_MatrixSlice *AddCol (
int col )
Create a new row or column in the matrix. The row or column will be
indexed at row or col. Note that this function need not be called
unless a Cvo_MatrixSlice object is desired. The AddCell()
member
function will automatically create new rows and columns as necessary.
Cvo_MatrixCell *AddCell (
Cvo_Object *child,
{ int | Cvo_MatrixSlice * } row,
{ int | Cvo_MatrixSlice * } col )
Add an object, child, to the matrix where the specified row and column meet. This must be called for each child created in order for this object to display correctly.
Cvo_MatrixSlice *Row (
[ int row ] )
Cvo_MatrixSlice *Col (
[ int col ] )
Return the requested row or column. If a row or column are not specified then the first row or column is returned.
Cvo_MatrixCell *GetCell (
Cvo_MatrixSlice *row,
Cvo_MatrixSlice *col )
Return the cell of the matrix where the specified row and column meet.
Set_horz_sep (
int s )
Set_vert_sep (
int s )
Set the horizontal or vertical spacing between cells in the object.
int Horz_sep (
)
int Vert_sep (
)
Return the current horizontal or vertical spacing between cells in the object.
This object uses the following X resources in addition to those used by its parent and ancestor objects.
*CvoMatrix.horizontalSpace
(class:
Space
)
*CvoMatrix.verticalSpace
(class:
Space
)This object modifies the following X resources which are used by its parent or other ancestors.
*CvoMatrix.BorderWidth
(new value:
0
)
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.