Keywords: LessTif

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:

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