Menus and Dialog Boxes: 2.2 GenInteraction Instance Data: Standard Interactions (Menus)

Up: GEOS SDK TechDocs | Up | Prev: 2.1 GenInteraction Visibility | Next: 2.3 GenInteraction Types
ATTR_GEN_INTERACTION_GROUP_TYPE, GenInteractionGroupType

Often you will set up standard menus such as the File menu, the Window menu, the Edit menu, and the View menu. You can set these menus up very simply, with the attribute ATTR_GEN_INTERACTION_GROUP_TYPE .

This attribute specifies the type of menu the GenInteraction is via a value of type GenInteractionGroupType . This can be any of the following:

GIGT_FILE_MENU
Creates a standard File menu. Typically has a document control and print control as its children.
GIGT_EDIT_MENU
Creates a standard Edit menu with Cut, Copy, Paste, and Undo as appropriate. Typically has a GenEditControl as its child.
GIGT_VIEW_MENU
Creates a standard View menu; typically has a GenView controller as its child.
GIGT_OPTIONS_MENU
Creates a standard Options menu; typically, this menu has application-specific option entries as well as a GenToolControl as its children.
GIGT_WINDOW_MENU
Creates a standard Window menu; typically has a display controller as its child.
GIGT_HELP_MENU
Creates a standard Help menu; typically has the help objects as its children.
GIGT_PRINT_GROUP
Indicates that the GenInteraction is the print group. Typically contains a print controller and other print commands.

Each of the above types will set up the proper GenInteraction attributes and other generic objects to complete the interactions. Thus, by setting up a GenInteraction like this:

@object GenInteractionClass MyEditMenu = {
	GI_comp = MyEditControl;
	GII_visibility = GIV_POPUP;
	ATTR_GEN_INTERACTION_GROUP_TYPE =
			(GIGT_EDIT_MENU);
}

you can have a complete Edit menu in your program. (Of course, you must also supply the GenEditControl object that would be MyEditControl in the example.)


Up: GEOS SDK TechDocs | Up | Prev: 2.1 GenInteraction Visibility | Next: 2.3 GenInteraction Types