Keywords: LessTif

Next: 4. The geometry_manager() Method Up: 2. The BulletinBoard Class Previous: 2. The resize() Method Contents Index

## 3. The query_geometry() Method

For BulletinBoard, the query_geometry() method is probably the simplest - it does nothing on it's own behalf, but uses either the GeoMatrix (if a geo_matrix_create() method exists), or the generic method. This simplicity is deceiving; the complexity isn't visible in BulletinBoard - it's been shifted elsewhere.

_XmHandleQueryGeometry

    static XtGeometryResult
    query_geometry(Widget w, XtWidgetGeometry *proposed,
                   XtWidgetGeometry *answer)
    {
        XmBulletinBoardWidgetClass bbc = (XmBulletinBoardWidgetClass)XtClass(w);
        XtGeometryResult res;

        if (bbc->bulletin_board_class.geo_matrix_create) {
            return _XmHandleQueryGeometry(w, proposed, answer,
                                          BB_ResizePolicy(w),
                                          bbc->bulletin_board_class.
                                            geo_matrix_create);
        }
        res = _XmGMHandleQueryGeometry(w, proposed, answer,
                                       BB_MarginWidth(w), BB_MarginHeight(w),
                                       BB_ResizePolicy(w));
        return res;
    }