📄 wguiaccl.gml
字号:
.chap The &company Accelerator Editor
.*
.ix 'Accelerator Editor'
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.np
The Accelerator Editor enables you to create and edit accelerator
items so you can invoke menu items without using a mouse. Accelerators
define hot keys for menu items in your application. These enhance the
user interface for more advanced users of the application.
.np
Accelerators are keyboard equivalents for menu items, such as Ctrl+S
or F2. For example, many applications associate the accelerator Ctrl+C
with the Copy item in the Edit menu.
.book The Windows Interface: An Application Design Guide
suggests some standard accelerators.
.np
An accelerator item is made up of a key value, menu item identifier,
and flags. These components define the key combination the user
presses to access the specified menu item. The Accelerator Editor
stores the accelerator items in an accelerator table. You can have
multiple accelerator tables for a resource file.
.np
The accelerator editor allows you to create new accelerators and edit
existing accelerators without having to create a resource script or
use a resource compiler. Without the accelerator editor, you would
have to use the resource compiler to add accelerators to your
applications.
.*
.section Using the Accelerator Editor
.*
.np
This section discusses the following topics:
.begbull $compact
.bull
Starting the Accelerator Editor
.bull
Quitting the Accelerator Editor
.bull
The Accelerator Editor Menu Bar
.bull
The Accelerator Toolbar
.endbull
.*
.beglevel
.*
.section Starting the Accelerator Editor
.*
.np
.ix 'Accelerator Editor' 'start'
.ix 'start' 'Accelerator Editor'
The Accelerator Editor may be invoked in one of two ways. The first
involves first starting the Resource Editor then starting the Accelerator
Editor. The second way the editor may be started is from the &company IDE.
.np
To start the Accelerator Editor from the Resource Editor,
you must first open the Resource Editor.
How you proceed depends on whether you are
opening a new (empty) accelerator table or an existing accelerator
table.
:CMT. This is a new screen snap shot
.figure *depth='3.20' *scale=56 *file='ACC1' The Accelerator Editor window
.*
.beglevel
.*
.section Creating a New Accelerator Table
.*
.ix 'Accelerator Editor' 'create new table'
.begstep To create a new accelerator table:
.step
.bd Double click on the Resource Editor icon
in your Windows Program Manager.
.result
The &company Resource Editor window opens.
.step Open a new or existing resource file.
.if &e'&dohelp eq 0 .do begin
Refer to the chapter entitled :HDREF refid='resedit'. for more
information.
.do end
.step Choose Accelerator
from the cascading menu that appears when you choose New from the
Resouce menu.
.result
The &company Accelerator Editor window opens and displays an empty
accelerator item list.
.endstep
.*
.section Opening an Existing Accelerator Table
.*
.ix 'Accelerator Editor' 'open existing table'
.begstep To open an existing accelerator table:
.step Double click on the Resource Editor icon
in your Windows Program Manager.
.result
The &company Resource Editor window opens.
.step Open an existing resource file.
.if &e'&dohelp eq 0 .do begin
Refer to the chapter entitled :HDREF refid='resedit'. for more
information on the steps involved in opening a resource file.
.do end
.result
The Resource window for the existing resource file displays buttons
representing each existing resource type.
.step Select the accelerator table button
to view the existing accelerator tables.
.orstep Choose Accelerator
from the cascading menu that appears when you choose View from the
Resource menu.
.result
The Accelerator Resources list appears revealing all accelerator
tables in this resource file.
.step Double click on the existing accelerator table
you want to open.
.orstep Click on the desired accelerator table
to select it, then
.bd press ENTER
.orstep Click on the desired accelerator table to select it and choose Edit from the Resource menu
on the &company Resource Editor window.
.result
The &company Accelerator Editor window opens and displays the existing
accelerator items for the selected accelerator table.
.endstep
.*
.endlevel
.*
.section Quitting the Accelerator Editor
.*
.np
.ix 'Accelerator Editor' 'leave'
.ix 'leave' 'Accelerator Editor'
To exit the Accelerator Editor, choose Exit from the File menu of the
&company Accelerator Editor window.
.np
If you made changes to accelerator items but did not save the
information, a message box prompts you to save before exiting. Choose
Yes to save the changes and exit, No to exit without saving the changes,
or Cancel to return to the &company Resource Editor window.
.np
When you exit the Accelerator Editor, the application remembers the
directory in which you last opened or saved an accelerator table (not
the resource file). The next time you open an accelerator
table, the last directory accessed appears in the File Selection dialog
so you do not have to reenter its path. This feature makes the
Accelerator Editor more convenient and efficient to use.
.*
.section The Accelerator Editor Menu Bar
.*
:CMT. This is a new screen snap shot
.figure *depth='3.20' *scale=56 *file='ACC2' The Accelerator Editor menu bar
.np
.ix 'Accelerator Editor' 'menu bar'
.ix 'menu bar' 'Accelerator Editor'
The menu bar consists of the following five menus:
.begpoint
.point File
Clear and save the accelerator table, and exit the Accelerator Editor
.point Edit
Access the clipboard functions, hide or show the toolbar, and delete
an accelerator item
.point Resource
Rename the accelerator table and change its memory flags
.point Accelerator
Insert and edit accelerator items
.point Help
Access on-line help information
.endpoint
.np
To see the function of an item on the menu bar or submenus, hold the
mouse button and drag the cursor over the desired menu item. A
description of the item appears in the status line at the bottom of
the screen. If you do not want to select the menu item, drag the
cursor off of the menu item before releasing the mouse button.
.*
.section The Accelerator Editor Toolbar
.*
.np
.ix 'Accelerator Editor' 'toolbar'
In the &company Accelerator Editor window, the toolbar appears below the
menu bar. When the toolbar is shown choose Hide Toolbar from the
Edit menu to hide it. When the toolbar is hidden you can display
it by choosing Show Toolbar from the Edit menu.
.figure *depth='0.45' *scale=100 *file='ACC3' The Accelerator Editor toolbar
.np
The following explains the function each toolbar button performs, as
well as the equivalent menu item.
.begnote
.note CLEAR
Clear the accelerator table. This is equivalent to the Clear item in the File
menu.
.note UPDATE
Update the resource file with this accelerator table. This is equivalent to
the Update item in the File menu.
.note CUT
Cut the current accelerator table to the clipboard. This is equivalent
to the Cut item in the Edit menu.
.note COPY
Copy the current accelerator table to the clipboard. This is
equivalent to the Copy item in the Edit menu.
.note PASTE
Paste the accelerator table from the clipboard to the current
accelerator table. This is equivalent to the Paste item in the Edit menu.
.note INSERT
Insert the new accelerator item into the accelerator table. This is
equivalent to the Insert New Item item in the Accelerator menu.
.note DELETE
Delete the selected accelerator item from the accelerator table. This
is equivalent to the Delete item in the Edit menu.
.note KEY VALUE
Set the accelerator item's key value using the keyboard. This is
equivalent to the Key Value item in the Accelerator menu.
.endnote
.np
To see the function of a button on the toolbar, position your cursor
over the desired icon. A description of the button's function appears
in the status line at the bottom of the window.
.endlevel
.*
.section Using the Accelerator Editor Window
.*
.np
.ix 'Accelerator Editor' 'using the window'
The &company Accelerator Editor window contains a menu bar, toolbar,
and status line to help you create and edit accelerators. The rest of
the window, the workspace, is divided into four sections:
.begbull $compact
.bull
Resource Name Field
.bull
Attributes Area
.bull
Accelerator Item List
.bull
Action Buttons
.endbull
:CMT. .figure *depth='4.86' *scale=180 *file='ACC3' The Accelerator Editor window contains a menu bar, toolbar, status line, and workspace.
.figure *depth='3.20' *scale=56 *file='ACC4' The Accelerator Editor window contains a menu bar, toolbar, status line, and workspace.
.*
.beglevel
.*
.section Accelerator Editor: Resource Name Field
.*
.np
.ix 'Resource Name field' 'in Accelerator Editor'
The Resource Name field in the &company Accelerator Editor window
contains the name of the accelerator table currently being edited. A
resource file can contain more than one accelerator table, so it is
important that the resource names for the accelerator tables be
unique. The Resource Name field is not case sensitive and can hold up
to 255 characters. You can enter a textual name, a number or
a symbol in this field.
.np
When you create a new accelerator table, the Resource Editor assigns
the default name ACCELERATOR_# to it, where # is a decimal number
starting at one and increasing for each new resource of that type
opened. You can rename the accelerator table using the Rename item
in the Resource menu.
.*
.section Accelerator Editor: Attributes Area
.*
.np
.ix 'Accelerator Editor' 'Attributes Area'
.ix 'Attributes Area'
The attributes area provides information about the currently selected
accelerator item. You can edit accelerator items using only the fields
in this area.
:CMT. This is a new screen snap shot
.figure *depth='2.13' *scale=70 *file='ACC5' The Accelerator Editor attributes area
.np
Accelerator item attributes are displayed in four sections. Following
is an explanation of each section.
.begnote
.note Key
The Key field contains the key value used to activate the menu item.
.note Menu Item ID
The two Menu Item ID fields contain:
.begbull $compact
.bull
the number of the menu item that is activated by the entry in the
Key field.
.bull
the symbol information for the selected menu item.
.endbull
.note Key Type
This section indicates if the key value is in ASCII or virtual key.
.note Modifiers
An X appears in the check box for the modifiers that are part of the
accelerator key value.
The available modifier keys are:
.begbull $compact
.bull
Alt
.bull
Control
.bull
Shift
.endbull
.endnote
.np
The option Flash Top-level Menu Item indicates that when the specified
key value is used, the Accelerator Editor briefly highlights the
corresponding menu bar item.
.*
.section Accelerator Editor: Accelerator Item List
.*
.np
.ix 'Accelerator Item List'
.ix 'Accelerator Editor' 'Item list'
The accelerator item list displays all of the accelerator items in the
current accelerator table. Use this list to view the attributes of the
accelerator items. Select an accelerator item from the list by
clicking on it. Details of the selected accelerator item appear in the
attributes area of the window.
:CMT. This is a new screen snap shot
.figure *depth='1.76' *scale=57 *file='ACC6' The Accelerator Editor item list
.*
.section Accelerator Editor: Action Buttons
.*
.np
.ix 'Action Buttons'
.ix 'Accelerator Editor' 'Action Buttons'
The action buttons control how the information in the attributes area is
handled by the editor.
The Insert button will use the contents of the
attributes area to create a new entry in the table.
The Change button will use the contents of the
attributes area to modify the current entry in the table.
The Reset button will discard the contents of the
attributes area and reset them to those of the current entry in the table.
The Insert button is the default button when the ENTER key is pressed
and no other button has the focus.
:CMT. This is a new screen snap shot
.figure *depth='0.43' *scale=67 *file='ACC7' The Accelerator Editor action buttons
.*
.endlevel
.*
.section Accelerator Functions
.*
.np
You can perform several functions with the Accelerator Editor. This
section describes the following tasks:
.begbull $compact
.bull
Adding a New Accelerator Item
.bull
Changing an Existing Accelerator Item
.bull
Deleting Accelerator Items
.bull
Renaming an Accelerator Table
.bull
Saving Accelerator Items
.bull
Using Shortcuts to Create Accelerator Tables
.bull
Changing Memory Options
.endbull
.*
.beglevel
.*
.section Adding a New Accelerator Item
.*
.np
.ix 'Accelerator Editor' 'adding a new item'
.ix 'add' 'new Accelerator Item'
The steps for adding a new accelerator item to the accelerator table
are the same, regardless of whether the accelerator table is empty or
already contains accelerator items.
.begstep To add a new accelerator item:
.step Position the cursor in the Key field.
.step Enter the desired key value
that will activate the menu item.
.result
You can enter a single key, such as a letter or number, or a key
sequence. A key sequence may be made up of a modifier and a key, such
as ^k for Ctrl+k.
.step Enter a symbol or numeric identifier
for the menu item
that is activated by the entry in the Key field.
.result
The symbol or numeric identifier you enter here is the identifier
associated with the menu item.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -