Assigning Macros to GUI Events
The functionality to assign macros to control events in the dialog editor was discussed earlier. There is also a general functionality to assign macros or other actions to events. This functionality can be accessed through the Customize dialog that is opened using Tools – Customize or by clicking the Assign button in the Macro dialog. In this section, only the assignment of macros is discussed. For more information about this dialog, refer to the Apache OpenOffice documentation.
The next illustration shows the Menu tab of the Customize dialog
The illustration above shows how a macro is assigned to a new menu item. The Menu and Menu Content list boxes can be used to navigate the Apache OpenOffice menu hierarchy. Clicking the Add... button opens the Add Commands dialog. The Category list box in the Add Commands dialog contains entries for built-in Apache OpenOffice functions, and a OpenOffice Macros entry that represents the hierarchy of Apache OpenOffice macros. When an entry is selected in the Category list box, any commands or macros it contains are displayed in the Commands list box on the right.
Clicking the Add button in the Add Commands dialog adds the selected command or macro to a menu.
The other buttons in the Menus tab of the Customize dialog are as follows:
- The New button creates a new top level menu
- The Menu button has commands for moving, renaming and deleting top level menus
- The Modify button has commands for adding submenus and separators, and renaming and deleting menu items.
- The arrow buttons change the position of a menu item.
- The Reset button restores the default menu configuration.
The next illustration shows the Events tab of the Customize dialog:
On this tab, macros can be assigned to general events in Apache OpenOffice. The events are listed in the list box titled Event. The Assign button opens the Macro Selector from which the user can select macros to assign to events. The Remove button removes the assigned macro from the selected event.
In the Keyboard tab macros are accessed in Category and Function list boxes, then assigned to a shortcut key that can be specified in the Shortcut keys list box. There are also Load, Save, and Reset buttons for loading, storing and resetting keyboard configurations.
The Keyboard tab contains OpenOffice and Document radio buttons which control the scope for which keyboard assignments are made.
|Content on this page is licensed under the Public Documentation License (PDL).|