Adobe 29180248 User Guide - Page 39

menuitem, Using, Dreamweaver

Page 39 highlights

menuitem Description Describes the menu item to be inserted into the application's menu structure during installation of this extension. Attributes name, id, {key}, {platform}, {file}, {command}, {enabled}, {checked}, {dynamic}, {arguments}, {resid:name} name The menu item name that you want to appear in the menu. To set the menu item's access key on Windows, use an underscore (_) in front of the access letter. The underscore is automatically removed on Mac OS. If two menu items have the same access key, the access key works only for the first of the two. Note: To make an underscore character appear in a menu item, precede it with a percent sign-that is, use %_ instead of just an underscore. id The menu ID of the new item. Your menu IDs should start with a company name or some other namespace prefix to ensure uniqueness. In particular, don't start your menu IDs with DW, which is the prefix used by the Dreamweaver menu IDs. One useful approach is to prefix every ID with your domain name (with the elements reversed); for example, if your domain name is joe.com, you could start every ID with com.joe. to ensure uniqueness. key The shortcut key for the menu item. For syntax details that apply to Dreamweaver, see "About customizing Dreamweaver menus" in the "Customizing Dreamweaver" chapter of Using Dreamweaver. platform Indicates that the menu should appear only on the given platform. Valid values are "win" and "mac". file The name of an HTML or JavaScript file that contains JavaScript code determining the behavior of the menu item. The path specified in the file attribute is relative to the Configuration folder. The file attribute overrides the command, enabled, and checked attributes. Either file or command must be specified for each menu item. Note that in some operating systems, filenames are case-sensitive; make sure to use the same capitalization in the file attribute as you use for the corresponding file and folder names on your hard disk. command JavaScript code specifying the action to be taken when the user chooses the menu item. enabled JavaScript code that the application executes before displaying the menu, to determine whether the menu item is enabled. The code should return a value of true or false, indicating that the menu item should be enabled or dimmed, respectively. checked JavaScript code that the application executes before displaying the menu, to determine whether the menu item should have a check mark next to it. The code should return a value of true or false, indicating that the menu item should be checked or unchecked, respectively. dynamic Indicates whether the menu item's text and state are to be determined dynamically, by an HTML file that contains JavaScript code (specified in the file attribute). Valid values are "true" and "false". If you don't specify the dynamic attribute, its default value is "false". arguments Provides arguments to pass to the specified command file. This attribute is used only in conjunction with the file attribute. MXI tag descriptions 39

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66

MXI tag descriptions
39
menuitem
Description
Describes the menu item to be inserted into the application’s menu structure during installation
of this extension.
Attributes
name
,
id
,
{key}
,
{platform}
,
{file}
,
{command}
,
{enabled}
,
{checked}
,
{dynamic}
,
{arguments}
, {
resid:name}
name
The menu item name that you want to appear in the menu. To set the menu item’s access
key on Windows, use an underscore (_) in front of the access letter. The underscore is
automatically removed on Mac OS. If two menu items have the same access key, the access key
works only for the first of the two.
Note:
To make an underscore character appear in a menu item, precede it with a percent sign—that is, use
%_
instead
of just an underscore.
id
The menu ID of the new item. Your menu IDs should start with a company name or some
other namespace prefix to ensure uniqueness. In particular, don’t start your menu IDs with
DW
,
which is the prefix used by the Dreamweaver menu IDs. One useful approach is to prefix every
ID with your domain name (with the elements reversed); for example, if your domain name is
joe.com, you could start every ID with
com.joe.
to ensure uniqueness.
key
The shortcut key for the menu item. For syntax details that apply to Dreamweaver, see
“About customizing Dreamweaver menus” in the “Customizing Dreamweaver” chapter of
Using
Dreamweaver
.
platform
Indicates that the menu should appear only on the given platform. Valid values are
"win"
and
"mac"
.
file
The name of an HTML or JavaScript file that contains JavaScript code determining the
behavior of the menu item. The path specified in the
file
attribute is relative to the
Configuration folder. The
file
attribute overrides the
command
,
enabled
, and
checked
attributes. Either
file
or
command
must be specified for each menu item. Note that in some
operating systems, filenames are case-sensitive; make sure to use the same capitalization in the
file
attribute as you use for the corresponding file and folder names on your hard disk.
command
JavaScript code specifying the action to be taken when the user chooses the
menu
item.
enabled
JavaScript code that the application executes before displaying the menu, to determine
whether the menu item is enabled. The code should return a value of
true
or
false
, indicating
that the menu item should be enabled or dimmed, respectively.
checked
JavaScript code that the application executes before displaying the menu, to determine
whether the menu item should have a check mark next to it. The code should return a value of
true
or
false
, indicating that the menu item should be checked or unchecked, respectively.
dynamic
Indicates whether the menu item’s text and state are to be determined dynamically, by
an HTML file that contains JavaScript code (specified in the
file
attribute). Valid values are
"true"
and
"false"
. If you don’t specify the
dynamic
attribute, its default value is
"false"
.
arguments
Provides arguments to pass to the specified command file. This attribute is used
only in conjunction with the
file
attribute.