GEOS SDK TechDocs
|
|
2.8 Allowing Children to Wrap
|
3 Positioning and Sizing Windows
As we have seen, generic objects can be arranged and distributed in several ways. You may also place generic objects within certain areas of your user interface that are not explicitly defined. For example, in many dialog boxes, a "reply bar" is typically present where reply triggers such as "OK," "Cancel," or "Apply" are located. You may specify objects to generically place themselves within such a reply bar, even though you may not know the exact location of that reply bar as the specific UI creates it.
HINT_MAKE_REPLY_BAR, HINT_SEEK_REPLY_BAR
One special feature that many dialog boxes have is a reply bar . Typically, any dialog box that allows the user to set a number of options before applying them will have a reply bar. A reply bar usually has triggers in it for "Apply," "Cancel," and perhaps other functions (such as "Reset").
Note that many special dialog box types can have their reply bars built automatically according to the specific UI. See the Menus and Dialog Boxes chapter for full information on reply bars. If you want to create your own, however, you can with the hints in this section.
Although you have to declare each of the triggers that will appear in the reply bar, you can use
HINT_MAKE_REPLY_BAR
to set up the geometry appropriate for the specific UI. For example, Creating a Reply Bar
gives the code that will create a reply bar.
Code Display 12-4 Creating a Reply Bar
/* This reply bar has three triggers, Apply, Reset, and Cancel. * The appropriate geometry is not determined until run-time. */
@object GenInteractionClass MyReplyBar = {
GI_comp = @ApplyTrigger, @ResetTrigger, @CancelTrigger;
HINT_MAKE_REPLY_BAR;
}
@object GenTriggerClass ApplyTrigger = {
GI_visMoniker = "Apply"; }
@object GenTriggerClass ResetTrigger = {
GI_visMoniker = "Reset"; }
@object GenTriggerClass CancelTrigger = {
GI_visMoniker = "Cancel"; }
HINT_SEEK_REPLY_BAR instructs the generic object (usually a GenTrigger) to seek placement in the dialog box's reply bar. The specific UI will try to place the trigger in the reply bar of the first dialog box GenInteraction it finds that is not GIT_ORGANIZATIONAL.
HINT_SEEK_MENU_BAR, HINT_AVOID_MENU_BAR
Usually, it is left up to the specific UI whether it places any given object within a menu bar. You can suggest that objects be placed within the window's menu bar by placing HINT_SEEK_MENU_BAR on that object. Similarly, you can place HINT_AVOID_MENU_BAR on an object to suggest that it not be placed within the window's menu bar.
HINT_SEEK_X_SCROLLER_AREA, HINT_SEEK_Y_SCROLLER_AREA, HINT_SEEK_LEFT_OF_VIEW, HINT_SEEK_TOP_OF_VIEW, HINT_SEEK_RIGHT_OF_VIEW, HINT_SEEK_BOTTOM_OF_VIEW
These hints affect the placement of generic objects within GenViews. The objects must be children of a GenView for the hints to take effect.
HINT_SEEK_X_SCROLLER_AREA and HINT_SEEK_Y_SCROLLER_AREA suggest that a generic object be placed alongside the scrollbar area--either the horizontal scrollbar or the vertical scrollbar, respectively--of the GenView object.
HINT_SEEK_LEFT_OF_VIEW , HINT_SEEK_TOP_OF_VIEW, HINT_SEEK_RIGHT_OF_VIEW and HINT_SEEK_BOTTOM_OF_VIEW suggest that the generic object be placed alongside the respective side of the GenView.
HINT_SEEK_TITLE_BAR_LEFT, HINT_SEEK_TITLE_BAR_RIGHT
These hints suggest the placement of a generic object within a window's title bar. These hints are usually used on GenTriggers or GenInteractions; the objects involved should fit within the title bar area (i.e., be equivalent to tool bar icons). For each window with a title bar, only one object may have each of these hints, and the object must be a direct child of the windowed object.
HINT_POPS_UP_TO_RIGHT, HINT_POPS_UP_BELOW
GEOS SDK TechDocs
|
|
2.8 Allowing Children to Wrap
|
3 Positioning and Sizing Windows