Debian Codegraph @

src/main/resources/org/freehep/xml/menus/1.1/menus.dtd

raw
1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2 <!-- // Copyright 2000, SLAC, Stanford, California, U.S.A.
3
4 The DTD of a menu system.
5
6 name = a unique identifier of the component of the menu system
7 icon = a String which holds the path of the icon image, e.g. "images/newJob.gif"
8 description = a String which provides the tooltip text to show for the menu item, e.g. "Make a new job."
9 command = a String which specifies the command that the menuItem invokes when chosen, e.g. "NewJob"
10 mnemonic = the key that responds to the Alt (on Win32) key via the menu hierarchy to invoke the menu item
11
12 The accelerator is the key that, in combination with modifiers in {CTRL, ALT, SHIFT, META}, allow
13 a meny item to be directly invoked. Since the accelerator key is specified as one of the infamous
14 VK_ constants (used in Java and, I am told, Win32), all keys, even numbers and function keys
15 satisfy the production:
16 Name ::= (Letter | '_' | ':') (NameChar)*
17 As such, I initially made the accelerator's key an ID in order to globally ensure uniqueness among
18 the accelerators that are specified. However, this would prevent the same key from being used with
19 more than one modifier, which is ridiculous. So it is up to the client programmer to enforce
20 the within-menu uniqueness constraint on mnemonics AND the global key + modifier uniqueness
21 constraint on accelerators. This is unfortunate, but I know of no way to specify a composite ID
22 (an ID formed of multiple attributes) in XML.
23
24 By default (if only the key attribute is specified), an accelerator defaults to using the CTRL
25 modifier only.
26
27 It is possible to have a toolBarPanel at level 1 and build this directly, but this design was
28 scrapped since it was subsequently a bit messy to get handles to the toolbars if all that was
29 returned was a handle to the panel they were in and for the more fundamental reason that toolbars
30 are much less static than menus and as such should be "top level" style objects.
31
32 author Tony Johnson ([email protected])
33 author Peter Armstrong
34 version $Id: menus.dtd 8610 2006-08-16 06:45:19Z duns $
35
36 -->
37
38 <!-- level 0 = a container of containers of containers of components and Separators -->
39 <!ELEMENT MenuSystem (MenuBar | ToolBar | PopupMenu)* >
40
41 <!-- level 1 = containers of containers of components and Separators -->
42 <!ELEMENT MenuBar (Menu)* >
43
44 <!-- level 2 = containers of components and Separators -->
45 <!ELEMENT Menu (Component | Menu | Separator)* >
46 <!ELEMENT PopupMenu (Component | Menu | Separator)* >
47 <!ELEMENT ToolBar (Component | Separator)* >
48 <!-- right now toolBar is primitive and cannot contain a menu -->
49
50 <!-- level 3 = components and Separators -->
51 <!ELEMENT Component (Accelerator?)>
52 <!ELEMENT Separator EMPTY>
53 <!ATTLIST Separator
54 location NMTOKEN #IMPLIED
55 >
56
57 <!-- level 4 = sub-elements of components -->
58 <!ELEMENT Accelerator EMPTY>
59
60 <!ATTLIST MenuBar
61 id ID #REQUIRED
62 class NMTOKEN #IMPLIED
63 >
64
65 <!ATTLIST Menu
66 name CDATA #REQUIRED
67 class NMTOKEN #IMPLIED
68 mnemonic CDATA #IMPLIED
69 location NMTOKEN #IMPLIED
70 >
71
72 <!ATTLIST PopupMenu
73 id ID #REQUIRED
74 name CDATA #REQUIRED
75 class NMTOKEN #IMPLIED
76 >
77
78 <!ATTLIST ToolBar
79 id ID #REQUIRED
80 name CDATA #REQUIRED
81 class NMTOKEN #IMPLIED
82 rollover NMTOKEN "true"
83 >
84
85 <!ATTLIST Component
86 name CDATA #REQUIRED
87 class NMTOKEN #IMPLIED
88 type NMTOKEN "default"
89 icon CDATA #IMPLIED
90 description CDATA #IMPLIED
91 command NMTOKEN #REQUIRED
92 mnemonic CDATA #IMPLIED
93 location NMTOKEN #IMPLIED
94 >
95
96 <!ATTLIST Accelerator
97 key NMTOKEN #REQUIRED
98 command NMTOKEN "true"
99 ctrl NMTOKEN "false"
100 alt NMTOKEN "false"
101 shift NMTOKEN "false"
102 meta NMTOKEN "false"
103 >