OSF/Motif contains a number of geometry managers that govern the layout and resize behavior of their children. They range from the straightforward and easy-to-use XmBulletinBoard, to the complex and difficult-to-use XmForm. Builder Xcessory helps you use these managers effectively, from experimenting with different managers, to selecting the appropriate manager, to fine-tuning your final choice of resource settings.
In general, to use the simple managers described in the following section, you create the manager, create the children, and, depending on the particular manager, move and resize the children directly with the mouse, or set resources on the manager using the Resource Editor.
The Motif BulletinBoard is the simplest of the Motif managers, and does not control the size or the position of its children. When you use a BulletinBoard with Builder Xcessory, you can take maximum advantage of direct manipulation. Using the mouse, the Layout Grid, and Alignment facilities with the BulletinBoard, what you see is exactly what you get. The flip side of this ease-of-use is that you'll need to manage the x, y, width, and height of all the children in your application code to deal with resize actions from the user. The BulletinBoard is most commonly used when such actions are disallowed, for example, in dialogs.
The MainWindow is frequently used as a top-level window and is designed to manage a MenuBar, a work area with scrollbars, a command area, and a message area. All of these children are optional. The MainWindow manages the size and position of these children, placing the menu bar at the top of the window, stretched to its full width, and placing the message area child at the base of the window, again stretching to its full width. The MainWindow places the command area child above, or below the work area child, and creates and manages the scrollbars on the work area for you.
The MainWindow automatically recognizes and manages the MenuBar. When you create a MenuBar, size does not matter, as a child of a MainWindow, Builder Xcessory automatically manages and sizes it correctly. Add PulldownMenus to the MenuBar and the MenuBar size is again set correctly.
The various MainWindow children are easy to handle with Builder Xcessory. Create the desired objects and place them as children of the MainWindow. Then use the Resource Editor to set resource values on the MainWindow to specify which child belongs in which area. For example, set the value of the workWindow resource to the desired widget instance name by typing the name directly into the field, or using an extended editor to choose the name from a list of the MainWindow children.
The ViewKit Application Framework supports the notion of a primary, or main window for an application. Specifically, it provides two classes, VkWindow and VkSimpleWindow. The basic element in both of these classes is the XmMainWindow widget, with the VkWindow also including a menu bar with several pre-built menus.
Typically, you never instantiate a VkWindow or VkSimpleWindow directly, rather, you build and use subclasses. If you use a Motif MainWindow directly from the Palette, rather than a ViewKit component, Builder Xcessory automatically detects this when generating ViewKit code and outputs a VkWindow or VkSimpleWindow as appropriate.
In addition to the straightforward row-column layout, there are a number of special cases of the RowColumn, (some of which involve additional widgets) including the RadioBox, MenuBar, PulldownMenu, and PopupMenu. Builder Xcessory facilitates using these variations by providing individual Palette icons. Selecting the PulldownMenu Palette icon, for instance, automatically creates a CascadeButton, a RowColumn configured as a PushButton menu item.
Builder Xcessory helps you work effectively with menus. It automatically creates all of the necessary constituent parts for you, along with an initial PushButton. Then, whenever you have a menu selected, Builder Xcessory posts all of the menu items upon which you are able to perform normal Builder Xcessory functions, including drag and drop. This includes the PopupMenu, which is normally invisible.
Generally speaking, to use the managers described in the following sections (complex managers), you create the manager, create the children, and use the Resource Editor to set resources on both the manager, and the children . To simplify use of the most complex of these managers, the Form, Builder Xcessory graphically shows the constraints, or attachments, of all Form children and allows you to directly manipulate the attachments with the mouse.
The Frame widget manages a WorkArea child and a Label child. The WorkArea child is surrounded by the Frame; the Label child is placed above the WorkArea child. The Frame automatically resizes itself to contain its WorkArea child. You specify which child is the label and which the WorkArea child by means of constraint resources on the children.
The Form widget is probably the most powerful, but most complex Motif manager. It allows you to manage the layout and resize behavior of its children by setting constraint resources on its children. The large number of possible values for these constraints, and the interactions between them, are what make this widget difficult to use.
Builder Xcessory simplifies this for you by graphically depicting these constraints and allowing you to manipulate them directly with the mouse. You can also set them with the Resource Editor and its extended editors.
Each child of a Form widget has four constraint resources (attachment, offset, position, widget) for each of its four sides (left, right, top, bottom). These sixteen resources (for example, leftAttachment or bottomPosition) determine how the object behaves when the Form parent is resized.
Builder Xcessory provides attachment handles and the Attachment Editor (see Attachment Editor ) to assist you in setting Form constraint resources, as described in the following sections.
When working with a Form widget, the order of the creation of its children can affect the resizing properties. For example, when attaching widgets side-to-side, the last widget created resizes when the Form resizes. Use Raise and Lower (from the Browser Edit menu or MB3) to alter the creation order of objects.
3. Move the cursor to the left or right for a left or right edge, or up or down for a top or bottom edge. The value of the position or offset increments or decrements, depending on the edge being set and the direction the cursor is moved.
The EnhancementPak widget set, part of the BX PRO product, provides a number of manager widgets that simplify many geometry management tasks. Virtually all of the EnhancementPak widgets are used in the Builder Xcessory interface.
See See Palette Objects for more detailed information about EPak widgets.
Combines some of the features of RowColumn and Form, evenly distributing its children into a single row or column. ButtonBox knows how to center a child. ButtonBoxes are used throughout Builder Xcessory and are found in most of its dialogs and extended editors.
Similar to Motif ScrolledWindow, but used in conjunction with the Panner to provide two-dimensional scrolling, a more efficient way to navigate around a viewing region. Porthole is used in the Browser, allowing you to navigate through your instance and class trees.
Similar to Frame, Stretch provides the added functionality of allowing the end-user to resize the Stretch widget and its child with the mouse. Stretch is used in the Builder Xcessory Browser, allowing you to resize the Panner.
This container is a simple manager with the visual appearance of a stack of manila folders, and allows you to fit multiple interfaces into a limited space. Tabstack is used extensively in Builder Xcessory's preference dialogs and is seen frequently in Microsoft Windows interfaces.
Similar to Motif RowColumn, Toolbar adds the notion of toolbar groups, the ability for you to group sets of children together, and the Popup Labels feature, similar to Microsoft's WinTips. Toolbars are used in the Browser and the Resource Editor.