arcadia 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +126 -123
- data/arcadia.rb +770 -756
- data/base/a-contracts.rb +130 -93
- data/base/a-ext.rb +280 -280
- data/base/a-libs.rb +5 -11
- data/base/a-utils.rb +235 -44
- data/conf/arcadia.conf +20 -16
- data/conf/arcadia.init.rb +0 -0
- data/conf/arcadia.res.rb +74 -0
- data/ext/ae-complete-code/ae-complete-code.conf +0 -0
- data/ext/ae-complete-code/ae-complete-code.rb +80 -79
- data/ext/ae-debug/ae-debug.conf +0 -0
- data/ext/ae-debug/ae-debug.rb +2 -6
- data/ext/ae-debug/debug1.57.rb +0 -0
- data/ext/ae-doc-code/ae-doc-code.conf +15 -0
- data/ext/ae-doc-code/ae-doc-code.rb +289 -0
- data/ext/ae-editor/ae-editor.conf +17 -8
- data/ext/ae-editor/ae-editor.rb +738 -396
- data/ext/ae-event-log/ae-event-log.conf +0 -0
- data/ext/ae-event-log/ae-event-log.rb +0 -0
- data/ext/ae-file-history/ae-file-history.conf +2 -2
- data/ext/ae-file-history/ae-file-history.rb +286 -290
- data/ext/ae-inspector/ae-inspector.conf +0 -0
- data/ext/ae-inspector/ae-inspector.rb +0 -0
- data/ext/ae-output-event/ae-output-event.conf +2 -2
- data/ext/ae-output/ae-output.conf +2 -2
- data/ext/ae-output/ae-output.rb +173 -178
- data/ext/ae-palette/ae-palette.conf +0 -0
- data/ext/ae-palette/ae-palette.rb +0 -0
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +54 -54
- data/lib/tk/al-tk.rb +3076 -3082
- data/lib/tk/al-tk.res.rb +0 -0
- data/lib/tk/al-tkarcadia.rb +0 -0
- data/lib/tk/al-tkcustom.rb +0 -0
- data/lib/tkext/al-bwidget.rb +0 -0
- data/lib/tkext/al-iwidgets.rb +0 -0
- data/lib/tkext/al-tile.rb +0 -0
- data/lib/tkext/al-tktable.rb +0 -0
- data/tcl/BWidget-1.8.0/BWman/ArrowButton.html +276 -0
- data/tcl/BWidget-1.8.0/BWman/BWidget.html +228 -0
- data/tcl/BWidget-1.8.0/BWman/Button.html +273 -0
- data/tcl/BWidget-1.8.0/BWman/ButtonBox.html +264 -0
- data/tcl/BWidget-1.8.0/BWman/ComboBox.html +402 -0
- data/tcl/BWidget-1.8.0/BWman/Dialog.html +314 -0
- data/tcl/BWidget-1.8.0/BWman/DragSite.html +139 -0
- data/tcl/BWidget-1.8.0/BWman/DropSite.html +254 -0
- data/tcl/BWidget-1.8.0/BWman/DynamicHelp.html +248 -0
- data/tcl/BWidget-1.8.0/BWman/Entry.html +341 -0
- data/tcl/BWidget-1.8.0/BWman/Label.html +331 -0
- data/tcl/BWidget-1.8.0/BWman/LabelEntry.html +194 -0
- data/tcl/BWidget-1.8.0/BWman/LabelFrame.html +144 -0
- data/tcl/BWidget-1.8.0/BWman/ListBox.html +678 -0
- data/tcl/BWidget-1.8.0/BWman/MainFrame.html +283 -0
- data/tcl/BWidget-1.8.0/BWman/MessageDlg.html +218 -0
- data/tcl/BWidget-1.8.0/BWman/NoteBook.html +374 -0
- data/tcl/BWidget-1.8.0/BWman/PagesManager.html +180 -0
- data/tcl/BWidget-1.8.0/BWman/PanedWindow.html +142 -0
- data/tcl/BWidget-1.8.0/BWman/PanelFrame.html +153 -0
- data/tcl/BWidget-1.8.0/BWman/PasswdDlg.html +214 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressBar.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressDlg.html +145 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollView.html +130 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollableFrame.html +191 -0
- data/tcl/BWidget-1.8.0/BWman/ScrolledWindow.html +116 -0
- data/tcl/BWidget-1.8.0/BWman/SelectColor.html +164 -0
- data/tcl/BWidget-1.8.0/BWman/SelectFont.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/Separator.html +77 -0
- data/tcl/BWidget-1.8.0/BWman/SpinBox.html +250 -0
- data/tcl/BWidget-1.8.0/BWman/StatusBar.html +147 -0
- data/tcl/BWidget-1.8.0/BWman/TitleFrame.html +107 -0
- data/tcl/BWidget-1.8.0/BWman/Tree.html +947 -0
- data/tcl/BWidget-1.8.0/BWman/Widget.html +502 -0
- data/tcl/BWidget-1.8.0/BWman/contents.html +84 -0
- data/tcl/BWidget-1.8.0/BWman/index.html +7 -0
- data/tcl/BWidget-1.8.0/BWman/navtree.html +41 -0
- data/tcl/BWidget-1.8.0/BWman/options.htm +458 -0
- data/tcl/BWidget-1.8.0/CHANGES.txt +266 -0
- data/tcl/BWidget-1.8.0/ChangeLog +1641 -0
- data/tcl/BWidget-1.8.0/LICENSE.txt +41 -0
- data/tcl/BWidget-1.8.0/README.txt +127 -0
- data/tcl/BWidget-1.8.0/arrow.tcl +551 -0
- data/tcl/BWidget-1.8.0/bitmap.tcl +94 -0
- data/tcl/BWidget-1.8.0/button.tcl +324 -0
- data/tcl/BWidget-1.8.0/buttonbox.tcl +403 -0
- data/tcl/BWidget-1.8.0/color.tcl +493 -0
- data/tcl/BWidget-1.8.0/combobox.tcl +809 -0
- data/tcl/BWidget-1.8.0/demo/basic.tcl +199 -0
- data/tcl/BWidget-1.8.0/demo/bwidget.xbm +46 -0
- data/tcl/BWidget-1.8.0/demo/demo.tcl +212 -0
- data/tcl/BWidget-1.8.0/demo/dnd.tcl +42 -0
- data/tcl/BWidget-1.8.0/demo/manager.tcl +141 -0
- data/tcl/BWidget-1.8.0/demo/select.tcl +59 -0
- data/tcl/BWidget-1.8.0/demo/tmpldlg.tcl +214 -0
- data/tcl/BWidget-1.8.0/demo/tree.tcl +260 -0
- data/tcl/BWidget-1.8.0/demo/x1.xbm +2258 -0
- data/tcl/BWidget-1.8.0/dialog.tcl +345 -0
- data/tcl/BWidget-1.8.0/dragsite.tcl +197 -0
- data/tcl/BWidget-1.8.0/dropsite.tcl +455 -0
- data/tcl/BWidget-1.8.0/dynhelp.tcl +625 -0
- data/tcl/BWidget-1.8.0/entry.tcl +469 -0
- data/tcl/BWidget-1.8.0/font.tcl +566 -0
- data/tcl/BWidget-1.8.0/images/bold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/copy.gif +0 -0
- data/tcl/BWidget-1.8.0/images/cut.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragfile.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragicon.gif +0 -0
- data/tcl/BWidget-1.8.0/images/error.gif +0 -0
- data/tcl/BWidget-1.8.0/images/file.gif +0 -0
- data/tcl/BWidget-1.8.0/images/folder.gif +0 -0
- data/tcl/BWidget-1.8.0/images/hourglass.gif +0 -0
- data/tcl/BWidget-1.8.0/images/info.gif +0 -0
- data/tcl/BWidget-1.8.0/images/italic.gif +0 -0
- data/tcl/BWidget-1.8.0/images/minus.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/new.gif +0 -0
- data/tcl/BWidget-1.8.0/images/opcopy.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/open.gif +0 -0
- data/tcl/BWidget-1.8.0/images/openfold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/oplink.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/opmove.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/overstrike.gif +0 -0
- data/tcl/BWidget-1.8.0/images/palette.gif +0 -0
- data/tcl/BWidget-1.8.0/images/passwd.gif +0 -0
- data/tcl/BWidget-1.8.0/images/paste.gif +0 -0
- data/tcl/BWidget-1.8.0/images/plus.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/print.gif +0 -0
- data/tcl/BWidget-1.8.0/images/question.gif +0 -0
- data/tcl/BWidget-1.8.0/images/redo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/save.gif +0 -0
- data/tcl/BWidget-1.8.0/images/target.xbm +9 -0
- data/tcl/BWidget-1.8.0/images/underline.gif +0 -0
- data/tcl/BWidget-1.8.0/images/undo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/warning.gif +0 -0
- data/tcl/BWidget-1.8.0/init.tcl +40 -0
- data/tcl/BWidget-1.8.0/label.tcl +271 -0
- data/tcl/BWidget-1.8.0/labelentry.tcl +100 -0
- data/tcl/BWidget-1.8.0/labelframe.tcl +160 -0
- data/tcl/BWidget-1.8.0/lang/da.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/de.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/en.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/es.rc +53 -0
- data/tcl/BWidget-1.8.0/lang/fr.rc +52 -0
- data/tcl/BWidget-1.8.0/listbox.tcl +1638 -0
- data/tcl/BWidget-1.8.0/mainframe.tcl +711 -0
- data/tcl/BWidget-1.8.0/messagedlg.tcl +128 -0
- data/tcl/BWidget-1.8.0/notebook.tcl +1164 -0
- data/tcl/BWidget-1.8.0/pagesmgr.tcl +294 -0
- data/tcl/BWidget-1.8.0/panedw.tcl +381 -0
- data/tcl/BWidget-1.8.0/panelframe.tcl +246 -0
- data/tcl/BWidget-1.8.0/passwddlg.tcl +178 -0
- data/tcl/BWidget-1.8.0/pkgIndex.tcl +47 -0
- data/tcl/BWidget-1.8.0/progressbar.tcl +208 -0
- data/tcl/BWidget-1.8.0/progressdlg.tcl +87 -0
- data/tcl/BWidget-1.8.0/scrollframe.tcl +226 -0
- data/tcl/BWidget-1.8.0/scrollview.tcl +254 -0
- data/tcl/BWidget-1.8.0/scrollw.tcl +280 -0
- data/tcl/BWidget-1.8.0/separator.tcl +75 -0
- data/tcl/BWidget-1.8.0/spinbox.tcl +331 -0
- data/tcl/BWidget-1.8.0/statusbar.tcl +422 -0
- data/tcl/BWidget-1.8.0/tests/entry.test +173 -0
- data/tcl/BWidget-1.8.0/titleframe.tcl +170 -0
- data/tcl/BWidget-1.8.0/tree.tcl +2228 -0
- data/tcl/BWidget-1.8.0/utils.tcl +645 -0
- data/tcl/BWidget-1.8.0/widget.tcl +1576 -0
- data/tcl/BWidget-1.8.0/wizard.tcl +1028 -0
- data/tcl/BWidget-1.8.0/xpm2image.tcl +115 -0
- metadata +141 -5
@@ -0,0 +1,139 @@
|
|
1
|
+
<HTML>
|
2
|
+
<HEAD><TITLE>DragSite</TITLE></HEAD>
|
3
|
+
<BODY BGCOLOR=white>
|
4
|
+
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
5
|
+
<DD><B>DragSite</B>
|
6
|
+
- Commands set for Drag facilities
|
7
|
+
</DD></DL>
|
8
|
+
<DL>
|
9
|
+
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
10
|
+
<DD>DragSite::<A HREF="#include"><B>include</B></A>
|
11
|
+
<I>class</I>
|
12
|
+
<I>type</I>
|
13
|
+
<I>event</I>
|
14
|
+
</DD>
|
15
|
+
<DD>DragSite::<A HREF="#register"><B>register</B></A>
|
16
|
+
<I>path</I>
|
17
|
+
?<I>option value...</I>?
|
18
|
+
</DD>
|
19
|
+
<DD>DragSite::<A HREF="#setdrag"><B>setdrag</B></A>
|
20
|
+
<I>path</I>
|
21
|
+
<I>subpath</I>
|
22
|
+
<I>initcmd</I>
|
23
|
+
<I>endcmd</I>
|
24
|
+
?<I>force</I>?
|
25
|
+
</DD>
|
26
|
+
</DL>
|
27
|
+
<BR><HR WIDTH="100%"><BR>
|
28
|
+
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
29
|
+
<P>
|
30
|
+
|
31
|
+
Commands of this namespace enable user to define a BWidget or a Tk widget as a drag site.
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
</P>
|
36
|
+
<HR WIDTH="50%"><BR>
|
37
|
+
<B><A NAME="wc">COMMAND</A></B><BR>
|
38
|
+
<DL><DT><A NAME="include">DragSite::<B>include</B></A>
|
39
|
+
<I>class</I>
|
40
|
+
<I>type</I>
|
41
|
+
<I>event</I>
|
42
|
+
</DT><DD>
|
43
|
+
|
44
|
+
This command provides a simple way to include options relatives to a drag site into
|
45
|
+
BWidget resources definition.
|
46
|
+
It includes the options needed for <B>register</B>: <I>-dragevent</I>, initialized to
|
47
|
+
<I>event</I>, <I>-draginitcmd</I> and <I>-dragendcmd</I>, initialized to empty string,
|
48
|
+
and two new options:
|
49
|
+
<TABLE BORDER=0 CELLSPACING=1>
|
50
|
+
<TR><TD><I>-dragenabled</I><TD>Specifies wether or not drag is active (initialized to 0)
|
51
|
+
<TR><TD><I>-dragtype</I><TD>Default or alternate dragged data type (initialized to <I>type</I>)
|
52
|
+
</TABLE>
|
53
|
+
|
54
|
+
</DD></DL>
|
55
|
+
<DL><DT><A NAME="register">DragSite::<B>register</B></A>
|
56
|
+
<I>path</I>
|
57
|
+
?<I>option value...</I>?
|
58
|
+
</DT><DD>
|
59
|
+
|
60
|
+
This command is used to declare <I>path</I> as a drag site. Options are:
|
61
|
+
|
62
|
+
<P>
|
63
|
+
<DL><DT><A NAME="DragSite-dragendcmd"><B>-dragendcmd</B></A></DT>
|
64
|
+
<DD>
|
65
|
+
|
66
|
+
Command called when drag terminates (ie when user release drag icon).
|
67
|
+
This command is called with the following arguments:
|
68
|
+
<UL>
|
69
|
+
<LI>the pathname of the drag source (the widget itself),
|
70
|
+
<LI>the pathname of the drop target,
|
71
|
+
<LI>the operation,
|
72
|
+
<LI>the type of the dragged data,
|
73
|
+
<LI>the dragged data,
|
74
|
+
<LI>result of the drop (result of the call to <B>-dropcmd</B> of the target),
|
75
|
+
</UL>
|
76
|
+
If the drop does not occurs, the target and the operation are empty string and the result
|
77
|
+
is 0.
|
78
|
+
|
79
|
+
</DD>
|
80
|
+
</DL>
|
81
|
+
<DL><DT><A NAME="DragSite-dragevent"><B>-dragevent</B></A></DT>
|
82
|
+
<DD>
|
83
|
+
|
84
|
+
Specifies the number of the mouse button associated to the drag.
|
85
|
+
Must be <B>1</B>, <B>2</B> or <B>3</B>.
|
86
|
+
|
87
|
+
</DD>
|
88
|
+
</DL>
|
89
|
+
<DL><DT><A NAME="DragSite-draginitcmd"><B>-draginitcmd</B></A></DT>
|
90
|
+
<DD>
|
91
|
+
|
92
|
+
Command called when drag initiates. When the event of option <B>dragevent</B> occurs on
|
93
|
+
<I>path</I>, this command is called with the following arguments:
|
94
|
+
<UL>
|
95
|
+
<LI>pathname of the drag source (<I>path</I>),
|
96
|
+
<LI>root x-coordinate of pointer,
|
97
|
+
<LI>root y-coordinate of pointer,
|
98
|
+
<LI>a toplevel created to represent dragged data. When returning, if it
|
99
|
+
has no children, a bitmap is automatically displayed.
|
100
|
+
</UL>
|
101
|
+
The command must return a list containing three elements:
|
102
|
+
<UL>
|
103
|
+
<LI>the type of the data,
|
104
|
+
<LI>the list of acceptable basic operations (<B>copy</B>, <B>move</B> and <B>link</B>)
|
105
|
+
<LI>and the data.
|
106
|
+
</UL>
|
107
|
+
Note that even if <B>copy</B> does not appear in the list of basic operation,
|
108
|
+
it is considered as an acceptable operation, since <B>copy</B> semantic does not modify
|
109
|
+
the drag source.
|
110
|
+
|
111
|
+
</DD>
|
112
|
+
</DL>
|
113
|
+
</DD></DL>
|
114
|
+
<DL><DT><A NAME="setdrag">DragSite::<B>setdrag</B></A>
|
115
|
+
<I>path</I>
|
116
|
+
<I>subpath</I>
|
117
|
+
<I>initcmd</I>
|
118
|
+
<I>endcmd</I>
|
119
|
+
?<I>force</I>?
|
120
|
+
</DT><DD>
|
121
|
+
|
122
|
+
This command provides a simple way to call <B>register</B> during a BWidget creation or
|
123
|
+
configuration.
|
124
|
+
<UL>
|
125
|
+
<LI><I>path</I> is the pathname of the BWidget,
|
126
|
+
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
|
127
|
+
<LI><I>initcmd</I> BWidget command for <I>drag-init</I> event,
|
128
|
+
<LI><I>endcmd</I> BWidget command for <I>drag-end</I> event,
|
129
|
+
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value has
|
130
|
+
changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
|
131
|
+
</UL>
|
132
|
+
<B>setdrag</B> verifies the modification flag of options <B>dragenabled</B> and
|
133
|
+
<B>dragevent</B> and calls <B>register</B> if needed according to the options values and
|
134
|
+
<I>initcmd</I> and <I>endcmd</I> arguments. <B>draginitcmd</B> and <B>dragendcmd</B> are not
|
135
|
+
taken from options of widget because they are considered as user command, called by
|
136
|
+
BWidget implementation of <I>drag-init</I> and <I>drag-end</I> events.
|
137
|
+
|
138
|
+
</DD></DL>
|
139
|
+
</BODY></HTML>
|
@@ -0,0 +1,254 @@
|
|
1
|
+
<HTML>
|
2
|
+
<HEAD><TITLE>DropSite</TITLE></HEAD>
|
3
|
+
<BODY BGCOLOR=white>
|
4
|
+
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
5
|
+
<DD><B>DropSite</B>
|
6
|
+
- Commands set for Drop facilities
|
7
|
+
</DD></DL>
|
8
|
+
<DL>
|
9
|
+
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
10
|
+
<DD>DropSite::<A HREF="#include"><B>include</B></A>
|
11
|
+
<I>class</I>
|
12
|
+
<I>types</I>
|
13
|
+
</DD>
|
14
|
+
<DD>DropSite::<A HREF="#register"><B>register</B></A>
|
15
|
+
<I>path</I>
|
16
|
+
?<I>option value...</I>?
|
17
|
+
</DD>
|
18
|
+
<DD>DropSite::<A HREF="#setcursor"><B>setcursor</B></A>
|
19
|
+
<I>cursor</I>
|
20
|
+
</DD>
|
21
|
+
<DD>DropSite::<A HREF="#setdrop"><B>setdrop</B></A>
|
22
|
+
<I>path</I>
|
23
|
+
<I>subpath</I>
|
24
|
+
<I>dropover</I>
|
25
|
+
<I>drop</I>
|
26
|
+
?<I>force</I>?
|
27
|
+
</DD>
|
28
|
+
<DD>DropSite::<A HREF="#setoperation"><B>setoperation</B></A>
|
29
|
+
<I>op</I>
|
30
|
+
</DD>
|
31
|
+
</DL>
|
32
|
+
<BR><HR WIDTH="100%"><BR>
|
33
|
+
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
34
|
+
<P>
|
35
|
+
|
36
|
+
Commands of this namespace enable user to define a BWidget or a Tk widget as a drop site.
|
37
|
+
A drop site is composed of the type of object that can be dropped and associated operation,
|
38
|
+
a command called when drop occurs, and a command when an object is dragged over the widget.
|
39
|
+
A drop site must have at least one type of acceptable object and a drop command.
|
40
|
+
|
41
|
+
</P>
|
42
|
+
<HR WIDTH="50%"><BR>
|
43
|
+
<B><A NAME="wc">COMMAND</A></B><BR>
|
44
|
+
<DL><DT><A NAME="include">DropSite::<B>include</B></A>
|
45
|
+
<I>class</I>
|
46
|
+
<I>types</I>
|
47
|
+
</DT><DD>
|
48
|
+
|
49
|
+
This command provides a simple way to include options relatives to a drop site into
|
50
|
+
BWidget resources definition.
|
51
|
+
It includes the options needed for <B>register</B>, <I>-dropovercmd</I> and <I>-dropcmd</I>,
|
52
|
+
initialized to empty string, and <I>-droptypes</I>, initialized to <I>types</I>,
|
53
|
+
and one new option:
|
54
|
+
<TABLE BORDER=0 CELLSPACING=1>
|
55
|
+
<TR><TD><I>-dropenabled</I><TD>Specifies wether or not drop is active (initialized to 0)
|
56
|
+
</TABLE>
|
57
|
+
|
58
|
+
</DD></DL>
|
59
|
+
<DL><DT><A NAME="register">DropSite::<B>register</B></A>
|
60
|
+
<I>path</I>
|
61
|
+
?<I>option value...</I>?
|
62
|
+
</DT><DD>
|
63
|
+
|
64
|
+
This command is used to declare <I>path</I> as a drop site. Options are:
|
65
|
+
|
66
|
+
<P>
|
67
|
+
<DL><DT><A NAME="DropSite-dropcmd"><B>-dropcmd</B></A></DT>
|
68
|
+
<DD>
|
69
|
+
|
70
|
+
This command is called when user release the drag icon over a valid drop target widget.
|
71
|
+
It takes the same arguments as <B>-dragovercmd</B> command. Its return values is passed
|
72
|
+
as a result to the <B>-dragendcmd</B> command of the drag source widget.
|
73
|
+
|
74
|
+
</DD>
|
75
|
+
</DL>
|
76
|
+
<DL><DT><A NAME="DropSite-dropovercmd"><B>-dropovercmd</B></A></DT>
|
77
|
+
<DD>
|
78
|
+
|
79
|
+
This command can be used to provide a dynamic drag while <I>drag-over</I> events.
|
80
|
+
While a drag occurs, events <Enter>, <Motion> and <Leave> are catched.
|
81
|
+
Arguments passed to the command are:
|
82
|
+
<UL>
|
83
|
+
<LI>pathname of the drop target (the widget itself),
|
84
|
+
<LI>pathname of the drag source,
|
85
|
+
<LI>event over the drop target: <I>enter</I>, <I>motion</I> or <I>leave</I>,
|
86
|
+
<LI>root x-coordinate of the pointer,
|
87
|
+
<LI>root y-coordinate of the pointer,
|
88
|
+
<LI>operation,
|
89
|
+
<LI>type of the dragged data,
|
90
|
+
<LI>dragged data.
|
91
|
+
</UL>
|
92
|
+
Command must the new status of the drag:
|
93
|
+
<UL>
|
94
|
+
<LI>0 if widget refuse this drag. Command will not be recalled on motion/leave event.
|
95
|
+
<LI>1 if widget accept this drag. Command will not be recalled on motion/leave event.
|
96
|
+
<LI>2 if widget refuse this drag. Command will be recalled on each motion event to reevaluate.
|
97
|
+
<LI>3 if widget accept this drag. Command will be recalled on each motion event to reevaluate.
|
98
|
+
|
99
|
+
</UL>
|
100
|
+
Here is a list of events and associated actions on a DropSite widget. This example
|
101
|
+
assumes that dragged data type is valid for the drop target.
|
102
|
+
<B>status</B> is the status of the drag on a DropSite. Its value is:
|
103
|
+
<BR><BR>
|
104
|
+
|
105
|
+
<TABLE BORDER CELLSPACING=1 CELLPADDING=4>
|
106
|
+
<TR>
|
107
|
+
<TD WIDTH="18%" VALIGN="TOP" ALIGN="CENTER">Event</TD>
|
108
|
+
<TD WIDTH="10%" VALIGN="TOP" ALIGN="CENTER">Old status</TD>
|
109
|
+
<TD WIDTH="48%" VALIGN="TOP" ALIGN="CENTER">Action</TD>
|
110
|
+
<TD WIDTH="24%" VALIGN="TOP" ALIGN="CENTER">New status</TD>
|
111
|
+
</TR>
|
112
|
+
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
|
113
|
+
<FONT SIZE=2><Enter></FONT></TD>
|
114
|
+
<TD WIDTH="10%" VALIGN="TOP" ROWSPAN=2>
|
115
|
+
<FONT SIZE=2>-</FONT></TD>
|
116
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
117
|
+
<FONT SIZE=2>if DropSite has <B>dropovercmd</B>, call it with <I>enter</I></FONT></TD>
|
118
|
+
<TD WIDTH="24%" VALIGN="TOP">
|
119
|
+
<FONT SIZE=2>result of <B>dropovercmd</B></FONT></TD>
|
120
|
+
</TR>
|
121
|
+
<TR><TD WIDTH="48%" VALIGN="TOP">
|
122
|
+
<FONT SIZE=2>else</FONT></TD>
|
123
|
+
<TD WIDTH="24%" VALIGN="TOP">
|
124
|
+
<FONT SIZE=2>1</FONT></TD>
|
125
|
+
</TR>
|
126
|
+
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
|
127
|
+
<FONT SIZE=2><Motion></FONT></TD>
|
128
|
+
<TD WIDTH="10%" VALIGN="TOP">
|
129
|
+
<FONT SIZE=2>0 or 1</FONT></TD>
|
130
|
+
<TD WIDTH="48%" VALIGN="TOP"> </TD>
|
131
|
+
<TD WIDTH="24%" VALIGN="TOP">
|
132
|
+
<FONT SIZE=2>unchanged</FONT></TD>
|
133
|
+
</TR>
|
134
|
+
<TR><TD WIDTH="10%" VALIGN="TOP">
|
135
|
+
<FONT SIZE=2>2 or 3</FONT></TD>
|
136
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
137
|
+
<FONT SIZE=2>call <B>dropovercmd</B> with <I>motion</I></FONT></TD>
|
138
|
+
<TD WIDTH="24%" VALIGN="TOP">
|
139
|
+
<FONT SIZE=2>result of <B>dropovercmd</B></FONT></TD>
|
140
|
+
</TR>
|
141
|
+
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
|
142
|
+
<FONT SIZE=2><Leave></FONT> </TD>
|
143
|
+
<TD WIDTH="10%" VALIGN="TOP">
|
144
|
+
<FONT SIZE=2>0 or 1</FONT></TD>
|
145
|
+
<TD WIDTH="48%" VALIGN="TOP"> </TD>
|
146
|
+
<TD WIDTH="24%" VALIGN="TOP">
|
147
|
+
<FONT SIZE=2>-</FONT></TD>
|
148
|
+
</TR>
|
149
|
+
<TR><TD WIDTH="10%" VALIGN="TOP">
|
150
|
+
<FONT SIZE=2>2 or 3</FONT></TD>
|
151
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
152
|
+
<FONT SIZE=2>call <B>dropovercmd</B> with <I>leave</I></FONT></TD>
|
153
|
+
<TD WIDTH="24%" VALIGN="TOP">
|
154
|
+
<FONT SIZE=2>-</FONT></TD>
|
155
|
+
</TR>
|
156
|
+
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=4>
|
157
|
+
<FONT SIZE=2><Drop></FONT></TD>
|
158
|
+
<TD WIDTH="10%" VALIGN="TOP">
|
159
|
+
<FONT SIZE=2>0</FONT></TD>
|
160
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
161
|
+
<FONT SIZE=2>call <B>dragendcmd</B> of drag source</FONT></TD>
|
162
|
+
<TD WIDTH="24%" VALIGN="TOP" ROWSPAN=4>
|
163
|
+
<FONT SIZE=2>-</FONT></TD>
|
164
|
+
</TR>
|
165
|
+
<TR><TD WIDTH="10%" VALIGN="TOP">
|
166
|
+
<FONT SIZE=2>1</FONT></TD>
|
167
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
168
|
+
<FONT SIZE=2>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
|
169
|
+
</TR>
|
170
|
+
<TR><TD WIDTH="10%" VALIGN="TOP">
|
171
|
+
<FONT SIZE=2>2</FONT></TD>
|
172
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
173
|
+
<FONT SIZE=2>call <B>dropovercmd</B> with <I>leave</I> and call <B>dragendcmd</B> of drag source</FONT></TD>
|
174
|
+
</TR>
|
175
|
+
<TR><TD WIDTH="10%" VALIGN="TOP">
|
176
|
+
<FONT SIZE=2>3</FONT></TD>
|
177
|
+
<TD WIDTH="48%" VALIGN="TOP">
|
178
|
+
<FONT SIZE=2>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
|
179
|
+
</TR>
|
180
|
+
</TABLE>
|
181
|
+
<BR>
|
182
|
+
|
183
|
+
</DD>
|
184
|
+
</DL>
|
185
|
+
<DL><DT><A NAME="DropSite-droptypes"><B>-droptypes</B></A></DT>
|
186
|
+
<DD>
|
187
|
+
|
188
|
+
Specifies a list {<I>type</I> <I>oplist</I> ?<I>type</I> <I>oplist</I>? ...} of acceptable
|
189
|
+
types and associated operations for the drop target.
|
190
|
+
For each type, <I>oplist</I> is a list
|
191
|
+
{<I>descops</I> <I>mod</I> ?<I>descops</I> <I>mod</I>? ...} describing operations and
|
192
|
+
modifier keys for these operations.
|
193
|
+
<I>descops</I> describe an operation. It can be a predefined operations (<B>copy</B>,
|
194
|
+
<B>move</B> or <B>link</B>) or a new user defined operation, of the form {<I>subop</I>
|
195
|
+
<B>baseop</B> ?<I>bitmap</I>?}.
|
196
|
+
<I>subop</I> is the name given to the sub operation, <I>baseop</I> is the name of the
|
197
|
+
base operation (<B>copy</B>, <B>move</B> or <B>link</B>) and <I>bitmap</I> is a bitmap
|
198
|
+
to display for the operation.
|
199
|
+
<BR>If <I>bitmap</I> is empty, the default bitmap of the base operation is used for the
|
200
|
+
sub operation.
|
201
|
+
<BR><I>subop</I> can be a base operation, in order to change the bitmap of a base operation.
|
202
|
+
In this case, <I>baseop</I> must be empty or equal to <I>subop</I>.
|
203
|
+
<BR><I>mod</I> is the modifer key for the operation. It can be:
|
204
|
+
<UL>
|
205
|
+
<LI><B>none</B> to specify that no modifier key is pressed. This modifier can only be used
|
206
|
+
with a sub operation named <B>default</B> (and vice versa), which has the behaviour of not
|
207
|
+
display any bitmap operation. For all type, if the modifier <B>none</B> is not given, it is
|
208
|
+
automatically associated to the <B>default</B> sub operation of a <B>copy</B> base operation.
|
209
|
+
<LI><B>program</B> to specifies a sub operation accessible only by <B>DropSite::setoperation</B>.
|
210
|
+
<LI>A list combining <B>shift</B>, <B>control</B> and <B>alt</B>, which means their
|
211
|
+
corresponding key.
|
212
|
+
</UL>
|
213
|
+
|
214
|
+
</DD>
|
215
|
+
</DL>
|
216
|
+
</DD></DL>
|
217
|
+
<DL><DT><A NAME="setcursor">DropSite::<B>setcursor</B></A>
|
218
|
+
<I>cursor</I>
|
219
|
+
</DT><DD>
|
220
|
+
|
221
|
+
This command can be used within the script <B>dragovercmd</B>. It is usefull to provide
|
222
|
+
visual effect about the state of the drag.
|
223
|
+
</DD></DL>
|
224
|
+
<DL><DT><A NAME="setdrop">DropSite::<B>setdrop</B></A>
|
225
|
+
<I>path</I>
|
226
|
+
<I>subpath</I>
|
227
|
+
<I>dropover</I>
|
228
|
+
<I>drop</I>
|
229
|
+
?<I>force</I>?
|
230
|
+
</DT><DD>
|
231
|
+
|
232
|
+
This command provides a simple way to call <B>register</B> during a BWidget creation or
|
233
|
+
configuration.
|
234
|
+
<UL>
|
235
|
+
<LI><I>path</I> is the pathname of the BWidget,
|
236
|
+
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
|
237
|
+
<LI><I>dropover</I> is a command for <I>drag-over</I> event,
|
238
|
+
<LI><I>drop</I> is a command for <I>drop</I> event,
|
239
|
+
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value
|
240
|
+
has changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
|
241
|
+
</UL>
|
242
|
+
<B>setdrop</B> verifies the modification flag of options <B>dropenabled</B> and
|
243
|
+
<B>droptypes</B> and calls <B>register</B> if needed according to the options values and
|
244
|
+
<I>dropover</I> and <I>drop</I> arguments. <B>dropovercmd</B> and <B>dropcmd</B> are not
|
245
|
+
taken from options of widget because they are considered as user command, called by
|
246
|
+
BWidget implementation of <I>drag-over</I> and <I>drop</I> events.
|
247
|
+
|
248
|
+
</DD></DL>
|
249
|
+
<DL><DT><A NAME="setoperation">DropSite::<B>setoperation</B></A>
|
250
|
+
<I>op</I>
|
251
|
+
</DT><DD>
|
252
|
+
Description text
|
253
|
+
</DD></DL>
|
254
|
+
</BODY></HTML>
|
@@ -0,0 +1,248 @@
|
|
1
|
+
<HTML>
|
2
|
+
<HEAD><TITLE>DynamicHelp</TITLE></HEAD>
|
3
|
+
<BODY BGCOLOR=white>
|
4
|
+
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
5
|
+
<DD><B>DynamicHelp</B>
|
6
|
+
- Provide help to Tk widget or BWidget
|
7
|
+
</DD></DL>
|
8
|
+
<DL>
|
9
|
+
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
10
|
+
<DD>DynamicHelp::<A HREF="#add"><B>add</B></A>
|
11
|
+
<i>widget</i> ?<I>option value ...</I>?
|
12
|
+
</DD>
|
13
|
+
<DD>DynamicHelp::<A HREF="#configure"><B>configure</B></A>
|
14
|
+
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
15
|
+
</DD>
|
16
|
+
<DD>DynamicHelp::<A HREF="#delete"><B>delete</B></A>
|
17
|
+
<i>widget</i>
|
18
|
+
</DD>
|
19
|
+
<DD>DynamicHelp::<A HREF="#include"><B>include</B></A>
|
20
|
+
<I>class</I>
|
21
|
+
<I>type</I>
|
22
|
+
</DD>
|
23
|
+
<DD>DynamicHelp::<A HREF="#register"><B>register</B></A>
|
24
|
+
<I>path</I>
|
25
|
+
<I>type</I>
|
26
|
+
?<I>arg...</I>?
|
27
|
+
</DD>
|
28
|
+
<DD>DynamicHelp::<A HREF="#sethelp"><B>sethelp</B></A>
|
29
|
+
<I>path</I>
|
30
|
+
<I>subpath</I>
|
31
|
+
?<I>force</I>?
|
32
|
+
</DD>
|
33
|
+
</DL>
|
34
|
+
<BR><HR WIDTH="100%"><BR>
|
35
|
+
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
36
|
+
<P>
|
37
|
+
Description text
|
38
|
+
</P>
|
39
|
+
<HR WIDTH="50%"><BR>
|
40
|
+
<B><A NAME="wc">COMMAND</A></B><BR>
|
41
|
+
|
42
|
+
<DL><DT><A NAME="add">DynamicHelp::<B>add</B></A>
|
43
|
+
?<I>option value ...</I>?
|
44
|
+
</DT><DD>
|
45
|
+
<p>
|
46
|
+
This command adds dynamic help to the given <i>widget</i>.
|
47
|
+
</p>
|
48
|
+
<DL><DT><A NAME="add-command"><B>-command</B></A></DT>
|
49
|
+
<DD>
|
50
|
+
If specified, refers to a command to execute to get the help
|
51
|
+
text to display. The command must return a string to display.
|
52
|
+
If the command returns an empty string, no help is displayed.
|
53
|
+
</DD>
|
54
|
+
</DL>
|
55
|
+
|
56
|
+
<DL><DT><A NAME="add-index"><B>-index</B></A></DT>
|
57
|
+
<DD>
|
58
|
+
If specified, refers to a menu index to bind the help to instead of
|
59
|
+
a widget. If <b>-type</b> is not menu, this option is ignored.
|
60
|
+
</DD>
|
61
|
+
</DL>
|
62
|
+
|
63
|
+
<DL><DT><A NAME="add-item"><B>-item</B></A></DT>
|
64
|
+
<DD>
|
65
|
+
If specified, refers to an item or tag on a canvas to bind the
|
66
|
+
help to instead of a widget.
|
67
|
+
</DD>
|
68
|
+
</DL>
|
69
|
+
|
70
|
+
<DL><DT><A NAME="add-type"><B>-type</B></A></DT>
|
71
|
+
<DD>
|
72
|
+
Specifies the type of help. Can be:
|
73
|
+
<b>balloon</b>, <b>variable</b> or <b>menu</b>.
|
74
|
+
Default is <b>balloon</b>.
|
75
|
+
</DD>
|
76
|
+
</DL>
|
77
|
+
|
78
|
+
<DL><DT><A NAME="add-text"><B>-text</B></A></DT>
|
79
|
+
<DD>
|
80
|
+
The text to be displayed as help.
|
81
|
+
</DD>
|
82
|
+
</DL>
|
83
|
+
|
84
|
+
<DL><DT><A NAME="add-variable"><B>-variable</B></A></DT>
|
85
|
+
<DD>
|
86
|
+
Specifies a variable name to which the help string will be
|
87
|
+
written. Some other widget (e.g., a status bar) is
|
88
|
+
responsible for displaying this variable.
|
89
|
+
</DD>
|
90
|
+
</DL>
|
91
|
+
|
92
|
+
<p>
|
93
|
+
Creating dynamic help for a menu is a two-step process. The menu
|
94
|
+
itself must first be added and then each menu entry must be added
|
95
|
+
separately. Here is a brief example.
|
96
|
+
</p>
|
97
|
+
|
98
|
+
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
|
99
|
+
<TR><TD><PRE>
|
100
|
+
<FONT COLOR=red><I># create menu</I></FONT>
|
101
|
+
menu .m -type menubar
|
102
|
+
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
|
103
|
+
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
|
104
|
+
. configure -menu .m
|
105
|
+
.m add cascade -label "File" -menu .m.file
|
106
|
+
menu .m.file
|
107
|
+
.m.file add command -label "Open..."
|
108
|
+
.m.file add command -label "Quit"
|
109
|
+
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
|
110
|
+
label .l -textvariable varinfo
|
111
|
+
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
|
112
|
+
DynamicHelp::add .m.file -type menu -variable varinfo
|
113
|
+
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
|
114
|
+
DynamicHelp::add .m.file -type menu -index 0 -text "Detach menu"
|
115
|
+
DynamicHelp::add .m.file -type menu -index 1 -text "Open a file"
|
116
|
+
DynamicHelp::add .m.file -type menu -index 2 -text "Exit demo"
|
117
|
+
</PRE></TD></TR></TABLE></CENTER>
|
118
|
+
|
119
|
+
</DL>
|
120
|
+
|
121
|
+
<DL><DT><A NAME="configure">DynamicHelp::<B>configure</B></A>
|
122
|
+
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
123
|
+
</DT><DD>
|
124
|
+
This command configure the ballon help.
|
125
|
+
<P>
|
126
|
+
<DL><DT><A NAME="DynamicHelp-borderwidth"><B>-borderwidth</B></A></DT>
|
127
|
+
<DD>
|
128
|
+
Width of the black border around the balloon.
|
129
|
+
</DD>
|
130
|
+
</DL>
|
131
|
+
<DL><DT><A NAME="DynamicHelp-delay"><B>-delay</B></A></DT>
|
132
|
+
<DD>
|
133
|
+
Define the delay in millisecond of mouse inactivity before displaying
|
134
|
+
the balloon.
|
135
|
+
</DD>
|
136
|
+
</DL>
|
137
|
+
<dl>
|
138
|
+
<dt><a name="DynamicHelp-state"><b>-state</b></a></dt>
|
139
|
+
<dd>
|
140
|
+
Specifies one of two states for help balloons: <b>normal</b> and
|
141
|
+
<b>disabled</b>.
|
142
|
+
</dd>
|
143
|
+
<dd>
|
144
|
+
If <b>state</b> is <b>disabled</b>, help balloons will not be displayed
|
145
|
+
for any registered widget.
|
146
|
+
</dd>
|
147
|
+
</dl>
|
148
|
+
<DL><DT><A NAME="DynamicHelp-topbackground"><B>-topbackground</B></A></DT>
|
149
|
+
<DD>
|
150
|
+
The background color of the toplevel window created for a balloon.
|
151
|
+
</DD>
|
152
|
+
</DL>
|
153
|
+
<BR>Other standard options are:
|
154
|
+
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
155
|
+
<TR>
|
156
|
+
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
157
|
+
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
158
|
+
</TR>
|
159
|
+
<TR>
|
160
|
+
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
161
|
+
<TD> <A HREF="options.htm#M-justify">-justify</A></TR>
|
162
|
+
</TR>
|
163
|
+
<TR>
|
164
|
+
<TD> <A HREF="options.htm#M-padx">-padx</A></TD>
|
165
|
+
<TD> <A HREF="options.htm#M-pady">-pady</A></TR>
|
166
|
+
</TR>
|
167
|
+
</TABLE></DD>
|
168
|
+
</DD></DL>
|
169
|
+
|
170
|
+
<DL><DT><A NAME="delete">DynamicHelp::<B>delete</B></A>
|
171
|
+
<I>widget</I>
|
172
|
+
</DT><DD>
|
173
|
+
Delete all dynamic help for the given <i>widget</i>.
|
174
|
+
</DD></DL>
|
175
|
+
|
176
|
+
<DL><DT><A NAME="include">DynamicHelp::<B>include</B></A>
|
177
|
+
<I>class</I>
|
178
|
+
<I>type</I>
|
179
|
+
</DT><DD>
|
180
|
+
Description text
|
181
|
+
</DD></DL>
|
182
|
+
<DL><DT><A NAME="register">DynamicHelp::<B>register</B></A>
|
183
|
+
<I>path</I>
|
184
|
+
<I>type</I>
|
185
|
+
?<I>arg...</I>?
|
186
|
+
</DT><DD>
|
187
|
+
<p>
|
188
|
+
<b>Its use is deprecated. Use <i>DynamicHelp::add</i> instead.</b>
|
189
|
+
</p>
|
190
|
+
|
191
|
+
Register a help text to the widget <I>path</I>.
|
192
|
+
<I>type</I> determines the type of the help or the type of the widget.
|
193
|
+
Depending on <I>type</I>, other options must be provided.
|
194
|
+
<BR>
|
195
|
+
<TABLE CELLSPACING=5 CELLPADDING=0 BORDER=0>
|
196
|
+
<TR><TD><B> type </B></TD><TD><B> options </B></TD></TR>
|
197
|
+
<TR><TD><B><I> balloon </I></B></TD><TD><I> ?tagOrItem? text </I></TD></TR>
|
198
|
+
<TR><TD><B><I> variable </I></B></TD><TD><I> ?tagOrItem? varName text </I></TD></TR>
|
199
|
+
<TR><TD><B><I> menu </I></B></TD><TD><I> varName </I></TD></TR>
|
200
|
+
<TR><TD><B><I> menuentry </I></B></TD><TD><I> index text </I></TD></TR>
|
201
|
+
</TABLE>
|
202
|
+
<BR>If one of the option is missing or is empty, help is removed for this widget.
|
203
|
+
<p>
|
204
|
+
If <i>tagOrItem</i> is specified, then <i>path</i> is a canvas, and
|
205
|
+
<i>tagOrItem</i> is the name of a tag or item on the canvas to which
|
206
|
+
the help will be bound.
|
207
|
+
</p>
|
208
|
+
For type other than <I>balloon</I>, <I>varName</I> is typically a variable
|
209
|
+
linked to a label.
|
210
|
+
<BR>For menu, balloon type help is not available. To declare a help for menu,
|
211
|
+
you first declare the menu, and then entries of this menu.
|
212
|
+
<BR>For example:
|
213
|
+
<BR><BR>
|
214
|
+
<CENTER>
|
215
|
+
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
|
216
|
+
<TR><TD><PRE>
|
217
|
+
<FONT COLOR=red><I># create menu</I></FONT>
|
218
|
+
menu .m -type menubar
|
219
|
+
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
|
220
|
+
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
|
221
|
+
. configure -menu .m
|
222
|
+
.m add cascade -label "File" -menu .m.file
|
223
|
+
menu .m.file
|
224
|
+
.m.file add command -label "Open..."
|
225
|
+
.m.file add command -label "Quit"
|
226
|
+
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
|
227
|
+
label .l -textvariable varinfo
|
228
|
+
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
|
229
|
+
DynamicHelp::register .m.file menu varinfo
|
230
|
+
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
|
231
|
+
DynamicHelp::register .m.file menuentry 0 "Detach menu"
|
232
|
+
DynamicHelp::register .m.file menuentry 1 "Open a file"
|
233
|
+
DynamicHelp::register .m.file menuentry 2 "Exit demo"
|
234
|
+
</PRE></TD></TR></TABLE></CENTER>
|
235
|
+
<BR>
|
236
|
+
<BR>Notice that if popup menu is owned by a menubar, you must associate first the menubar
|
237
|
+
to its toplevel. In this case, when you create a menu popup, its clone window is also
|
238
|
+
created, and DynamicHelp::register detects the exitence of the clone window and maps
|
239
|
+
events to it.
|
240
|
+
</DD></DL>
|
241
|
+
<DL><DT><A NAME="sethelp">DynamicHelp::<B>sethelp</B></A>
|
242
|
+
<I>path</I>
|
243
|
+
<I>subpath</I>
|
244
|
+
?<I>force</I>?
|
245
|
+
</DT><DD>
|
246
|
+
Description text
|
247
|
+
</DD></DL>
|
248
|
+
</BODY></HTML>
|