next up previous contents index
Next: 3. The KidGeometryRec Up: 3. The Data Structures Previous: 1. The GeoMatrix   Contents   Index

2. The MajorLayoutRec

The next level of structures (actually, a union) control how the individual rows or columns are layed out.

XmGeoMajorLayoutRec


typedef union _XmGeoMajorLayoutRec {
    XmGeoRowLayoutRec row;
    XmGeoColumnLayoutRec col;
} XmGeoMajorLayoutRec;

typedef union _XmGeoMajorLayoutRec *XmGeoMajorLayout;

XmGeoRowLayoutRecXmGeoColumnLayoutRecXmGET_ACTUAL_SIZEXmGET_PREFERRED_SIZEXmGEO_PRE_SETXmGEO_POST_SETXmGEO_EXPANDXmGEO_CENTERXmGEO_PACKXmGEO_PROPORTIONALXmGEO_AVERAGINGXmGEO_WRAPThe only member of interest is the XmGeoRowLayoutRec. Here's the layout for both; below, I'll describe what the fields mean for the RowLayoutRec - the fields of a ColumnLayoutRec (should it ever get implemented) are similar.


typedef struct {
    Boolean end;
    XmGeoSegmentFixUpProc fix_up;
    Dimension even_width;
    Dimension even_height;
    Dimension min_height;
    Boolean stretch_height;
    Boolean uniform_border;
    Dimension border;
    unsigned char fill_mode;
    unsigned char fit_mode;
    Boolean sticky_end;
    Dimension space_above;
    Dimension space_end;
    Dimension space_between;
    Dimension max_box_height;
    Dimension boxes_width;
    Dimension fill_width;
    Dimension box_count;
} XmGeoRowLayoutRec, *XmGeoRowLayout;

typedef struct {
    Boolean end;
    XmGeoSegmentFixUpProc fix_up;
    Dimension even_height;
    Dimension even_width;
    Dimension min_width;
    Boolean stretch_width;
    Boolean uniform_border;
    Dimension border;
    unsigned char fill_mode;
    unsigned char fit_mode;
    Boolean sticky_end;
    Dimension space_left;
    Dimension space_end;
    Dimension space_between;
    Dimension max_box_width;
    Dimension boxed_height;
    Dimension fill_height;
    Dimension box_count;
} XmGeoColumnLayoutRec, *XmGeoColumnLayout;

enum {
    XmGET_ACTUAL_SIZE = 1,
    XmGET_PREFERRED_SIZE,
    XmGEO_PRE_SET,
    XmGEO_POST_SET
};

/* fill modes for the GeoLayoutRec's below */
enum {
    XmGEO_EXPAND,
    XmGEO_CENTER,
    XmGEO_PACK
};

/* fit modes for the GeoLayoutRec's below */
enum {
    XmGEO_PROPORTIONAL,
    XmGEO_AVERAGING,
    XmGEO_WRAP
};

Now for a description of the XmGeoRowLayoutRec:


\begin{itemdescription}
\ITEM[Boolean end;]
If we have processed all the rows, t...
...TEM[Dimension box\_count;]
The number of boxes in the row.
\end{itemdescription}

In general, the user is only interested in fields up to (and including) space_between. The remaining fields are used during the calculations.



Danny Backx
2000-12-13