⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wguimenu.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 2 页
字号:
For top-level menu items, the Menu Bar break option performs the same
function as the Menu break option. In a popup menu, the Menu Bar break
option creates a new column, beginning with the selected menu item and
places a vertical line between the columns.
.endpoint
.endpoint
.*
.section Menu Editor: Menu Item List
.*
.np
.ix 'Menu Item List'
The menu item list displays the menu items in the current menu. Use
this list to view the attributes of the menu items listed. Select a
menu item from the table by clicking on it. Details of the selected
menu item appear in the attributes area of the window.
.*
.section Menu Editor: Action Buttons
.*
.np
.ix 'Action Buttons'
.ix 'Menu 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 menu. The Change
button will use the contents of the attributes area to modify the
current entry in the menu. The << (shift left) button will cause the
current menu item to become a subitem of its parent. This button is
enabled only when the current item is the last item in its parent
menu. The current item will visually appear to shift left. The >>
(shift right) button will cause the current menu item to become the
last subitem of the popup menu preceding it. This button is enabled
only when the item preceding the current item is a popup menu. The
current item will visually appear to shift right. The Reset button
will discard the contents of the attributes area and reset them to
those of the current entry in the menu. The Insert button is the
default button when the ENTER key is pressed and no other button has
the focus.
.*
.endlevel
.*
.section Menu Functions
.*
.np
.ix 'Menu Editor' 'menu functions'
You can perform several functions with the Menu Editor. This section
describes the following tasks:
.begbull $compact
.bull
Adding a New Menu Item
.bull
Changing an Existing Menu Item
.bull
Deleting Menu Items
.bull
Renaming a Menu
.bull
Saving Menu Items
.bull
Using Shortcuts to Create Menus
.bull
Changing Memory Options
.endbull
.*
.beglevel
.*
.section Adding a New Menu Item
.*
.np
.ix 'Popup' 'adding'
.ix 'Menu Editor' 'adding a popup or menu item'
.ix 'Separator' 'adding'
.ix 'Menu Editor' 'adding a separator'
The steps for adding a new menu item to a menu are the same,
regardless of whether the menu item list is empty or already contains
menu items. Follow these steps to add a new menu item.
.begstep
.step Enter the text for the menu item
in the Item Text field.
.result
To set one of the letters as a hot key, insert an ampersand (&)
directly in front of that letter. The letter marked as the hot key key
appears underlined in the menu item text. For example, to add the menu
item
.id Cut
with the letter
.id t
as its hot key, enter
.id Cu&t
in the Item Text field.
.np
To have text in the menu item appear right justified, enter the code
\t in the Item Text field. For example, to add the entry
.id Open
with the accelerator
.id Ctrl+O
right justified, enter
.id Open\tCtrl+O
in the Item Text field.
.step Enter a symbol or numeric identifier
for the menu item.
.result
The identifier in this field is the unique identifier associated with the
menu item. You define the relationship between the menu item function
and this identifier in the source code for your application.
.np
You must enter a value between 0 and 65535 in this field. Hexadecimal
values can be entered by prefixing them with 0x. Octal values can be
entered by prefixing the with zero.
.step Select the type of menu item
you wish to create
.np
Use separators in your menus to logically group menu items with
similar functions. When adding a separator to your menu you do not
need to complete the fields in the Attributes Area of the Menu Editor
window.
.step Select the desired attributes
for the menu item in the Attributes section of the workspace.
.result
Refer to the section entitled :HDREF refid='medwin'. for a description
of each attribute.
.step Select the desired break styles
for the menu item in the Break Styles section of the workspace
.result
Refer to the section entitled :HDREF refid='medwin'. for a description
of each break style.
.step Select Insert Before or Insert After
.ix 'Insert Before'
.ix 'Insert After'
.ix 'Menu Editor' 'Insert Before or After'
from the Menu menu or the toolbar.
.result
The toggle button on the toolbar indicates if the new menu item is to
be inserted into the menu item list before or after the currently
selected menu item. In the Menu menu, the Insert After item is checked
if new menu items will be added after the current item. The Insert
Before item is checked if new items will be added before the current
item.
.step Press the Insert action button
.orstep Choose Insert New Item
from the Accelerator menu.
.orstep Select the Insert New Item button on the toolbar.
.result
The new menu item appears in the menu item list and the Preview Menu
window.
.endstep
.*
.section Changing an Existing Menu Item
.*
.np
.ix 'Menu Editor' 'change existing menu item'
You may want to change the attributes of a menu item in a menu.
.begstep To change an existing menu item:
.step  Choose the menu you want to work with
from the Resource window on the &company Resource Editor window.
.result
The Menu Editor window appears displaying all of the menu items for
the selected menu.
.step Click the menu item you want to modify.
.result
The selected menu appears highlighted in the menu item list and the
menu item details appear in the attributes area of the window.
.step Select the field you want to change
using the Tab key or the mouse.
.step Make the desired menu item changes.
.step Press the Change action button
.result
This updates the selected menu item with the modified menu item details.
.endstep
.*
.section Deleting Menu Items
.*
.np
.ix 'Menu Editor' 'delete menu items'
There are two functions you can use to delete menu items from the menu
item list:
.begbull $compact
.bull
Delete
.bull
Clear
.endbull
.np
The Delete function in the Edit menu deletes the selected menu item.
You can delete only one menu item at a time with this function.
Deleting a popup menu item also deletes all of the submenus for that
item.
.np
The Clear function in the File menu deletes all menu items in the
current menu. This is a powerful function and must be used carefully
to avoid accidentally deleting an entire menu item list.
.*
.beglevel
.*
.section Deleting a Menu Item
.*
.np
To delete menu items from the current menu one at a time:
.begstep
.step Select the menu item you want to delete
from the menu item list by clicking on it.
.result
The selected menu item is highlighted.
.step Choose Delete
from the Edit menu
.orstep Select the Delete button from the toolbar.
.result
The Menu Editor removes the selected menu item from the menu item list.
.step Choose Update
from the File menu
to save the menu changes.
.endstep
.*
.section Deleting All Menu Items
.*
.np
To delete all menu items in the current menu:
.begstep
.step Choose Clear
from the File menu
.orstep Select the Clear button from the toolbar.
.result
A message box appears prompting you to verify that you want to clear
all of the menu items from the current menu.
.step Choose Yes or No
to continue.
.result
Choosing Yes removes all menu items from the current menu. The menu
item left list is empty.
.endstep
:CMT. .figure *depth='2.22' *scale=200 *file='MNU4' As a safety feature, a message box appears when you choose the Clear function.
.figure *depth='1.46' *scale=68 *file='MNU6' As a safety feature, a message box appears when you choose the Clear function.
.*
.endlevel
.*
.section Renaming a Menu
.*
.np
.ix 'Menu Editor' 'renaming a menu'
When you create a menu, the Resource Editor assigns a default name to
it. Assign a new name to the menu using the Rename menu item.
.begstep
.step Choose Rename
from the Resource menu on the &company Menu Editor window.
.orstep Double click or right click on the Resource Name field.
.result
A Rename Resource dialog box appears containing two fields:
.begbull $compact
.bull
Old Name
.bull
New Name
.endbull
:CMT. .figure *depth='2.40' *scale=200 *file='MNU5' In the Rename Resource dialog, you enter the new name of the menu.
.figure *depth='1.31' *scale=69 *file='MNU7' In the Rename Resource dialog, you enter the new name of the menu.
.step Enter the desired menu name in the New Name field.
.step Click on OK
to close the Rename Resource dialog.
.result
The dialog closes and the new menu name appears in the
Resource Name field.
.endstep
.*
.section Saving Menu Items
.*
.np
.ix 'Menu Editor' 'save menu items'
There are three functions you can use to save menus with the Menu
Editor:
.begbull $compact
.bull
Update
.bull
Save As
.bull
Copy To
.endbull
.np
Each of these options performs a different type of save function. This
section describes how to use each function.
.*
.beglevel
.*
.section Menu Editor: Update
.*
.np
After modifying a menu item in a menu, choose Update from the
File menu on the Menu Editor window to save the updated menu to the
current resource file. This prevents the changes from being lost when you
exit the Menu Editor.
.np
The Update function updates the resource file only at the resource
level. The resource file is not saved until you perform a save at the
Resource Editor level as well. Exiting the Resource Editor without
saving causes you to lose any the menu changes made.
.*
.section Menu Editor: Save As
.*
.np
Choose Save As from the File menu on the Menu Editor window to save
the current menu to another resource file. A Save Menu dialog appears where
you specify the resource file to which you want to save the current menu.
:CMT. .figure *depth='2.78' *scale=150 *file='MNU6' On the Save Menu dialog, specify the resource file to which you want to save the menu.
.figure *depth='2.24' *scale=65 *file='MNU8' On the Save Menu dialog, specify the resource file to which you want to save the menu.
.begnote
.mnote Important:
If the resource file to which you are saving the menu already contains
resources, the existing resources will be discarded and replaced with
the menu you are saving.
.endnote
.*
.section Menu Editor: Copy To
.*
.np
Choose Copy To from the Resource menu on the Menu Editor window to
copy the current menu item list into an existing resource file. A Copy
To dialog appears where you specify the resource file to which you want to
copy the current menu item list. Unlike the Save As function, copying
a menu item list to a resource file adds an entry to the list of resources
rather than replacing the existing resources with the new entry.
:CMT. .figure *depth='2.78' *scale=150 *file='MNU7' On the Copy To dialog, specify the resource file to which you want to copy the menu item list.
.figure *depth='2.24' *scale=65 *file='MNU9' On the Copy To dialog, specify the resource file to which you want to copy the menu item list.
.*
.endlevel
.*
.section Using Shortcuts to Create menus
.*
.np
.ix 'Menu Editor' 'shortcuts to creating menus'
The Edit menu on the &company Menu Editor window contains some standard
Windows options that you can use to quickly create menu resources. The
options are:
.begbull $compact
.bull
Cut
.bull
Copy
.bull
Paste
.endbull
.np
These options allow you to perform functions on menus but not on
individual menu items.
.begpoint
.point Cut
Choose Cut from the Edit menu of the Menu Editor window to cut the
menu item list from the current menu and paste it to the clipboard.
.point Copy
Choose Copy from the Edit menu of the Menu Editor window to copy the
menu item list from the current menu to the clipboard.
.point Paste
Choose Paste from the Edit menu of the Menu Editor window to copy the
menu on the clipboard into the current menu item list.
.endpoint
.*
.section Menu Editor: Changing Memory Options
.*
.np
.ix 'Menu Editor' 'change memory options'
.ix 'Memory Options' 'change in Menu Editor'
.ix 'Memory Flags' 'in Menu Editor'
The Memory Flags option allows you to change the selected memory
options for the current menu. These options indicate the memory type
and loading instructions.
.begstep To set the flags for a menu resource:
.step Choose Memory Flags
from the Resource menu
of the &company Menu Editor window.
.result
The Memory Options dialog opens displaying either the current or
default memory options.
.step Select the required flags
in the Memory Options and Load Options sections of the dialog by
clicking on the check box beside the field. Following is a description
of each option.
.begpoint $break
.point Moveable
Selecting this option marks this menu to be stored in moveable memory
when it is loaded by an application.
.point Discardable
Selecting this option marks this menu to be stored in discardable
memory when it is loaded by an application.
.point Pure
When marked as Pure, Windows will not allow the memory that the menu
is loaded into to be modified.
.point Preload
All menus marked as Preload will be loaded when the application for
which you are creating the menu is loaded.
.point LoadOnCall
Menus marked as LoadOnCall will be loaded when an application issues a
call to load them.
.endpoint
.step Click on OK
when all memory option selections are made.
.result
The Memory Options dialog closes returning you to the Menu Editor
window.
.endstep
.endlevel
.*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -