Managing UI Geometry: 3.1 Positioning and Sizing Windows: Window Positioning

Up: GEOS SDK TechDocs | Up | Prev: 3 Positioning and Sizing Windows | Next: 3.2 Determining Initial Size
HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT, HINT_POSITION_WINDOW_AT_MOUSE, HINT_STAGGER_WINDOW, HINT_CENTER_WINDOW, HINT_TILE_WINDOW, HINT_WINDOW_NO_CONSTRAINTS

GenClass has a number of hints used by the window classes to determine where the window appears initially and how the window is allowed to move about the screen. Specific UIs can override these hints when necessary or when they conflict with the UI's specifications. These hints are listed below.

HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT
This hint suggests an initial position for the window based on its parent window's size and relative to the upper-left corner of the parent window. The suggested position is specified as a fraction of the parent window's size in a SpecWinSizePair structure. This structure consists of two fields, the X position and the Y position of the new window's origin. Predetermined fraction values are names PCT_ xx , where xx is a multiple of five between zero and 100 inclusive. For example, to have the window object's origin start out in the center of its parent, specify the hint as follows:
HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT = {
    SWSS_RATIO | PCT_25, SWSS_RATIO | PCT_60 
};
HINT_POSITION_WINDOW_AT_MOUSE
This hint will position the origin of the new window at the mouse pointer.
HINT_STAGGER_WINDOW
This hint indicates that the window's origin should be placed just below and to the right of the origin of the last staggered window.
HINT_CENTER_WINDOW
This hint centers the window in its parent window.
HINT_TILE_WINDOW
This hint tiles the window with other windows that are also marked HINT_TILE_WINDOW within the parent window. This hint is not currently supported.
HINT_WINDOW_NO_CONSTRAINTS
This hint removes all constraints upon the positioning of a window. It should only be used as the final attempt to position the window if other methods do not work to your satisfaction.

Up: GEOS SDK TechDocs | Up | Prev: 3 Positioning and Sizing Windows | Next: 3.2 Determining Initial Size