OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [PopMenu.html] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
 
2
 
3
 
4
<TITLE>tixPopupMenu - Create and manipulate tixPopupMenu widgets</TITLE>
5
<Center><H2>tixPopupMenu - Create and manipulate tixPopupMenu widgets</H2></Center><hr>
6
 
7
</pre><H3>SYNOPSIS</H3>
8
<B>tixPopupMenu<I> <I>pathName ?<I>options</I></B>?
9
<P>
10
</pre><H3>SUPER-CLASS</H3>
11
The <B>tixPopupMenu</B></I> class is derived from the <B>TixShell</B></I>
12
class and inherits all the commands, options and subwidgets of its
13
super-class.
14
</pre><H3>STANDARD OPTIONS</H3>
15
The PopupMenu widget supports all the standard options of a frame widget.
16
See the <B>options(n)</B></I> manual entry for details on the standard options.
17
</pre><H3>WIDGET-SPECIFIC OPTIONS</H3>
18
<P>
19
<pre><code><code><code>
20
Name:           <B>buttons</B></I>
21
Class:          <B>Buttons</B></I>
22
Switch:         <B>-buttons</B></I>
23
</code></code></code></pre>
24
<UL>
25
A TCL list that specifies the mouse button(s) and key modifier(s) that
26
bring up the popup menu. Each element of this list is in turn a list
27
that contains two elements: the first element is an integer that
28
indicates the
29
mouse button that brings up the popup menu; the second element
30
specifies the key modifiers that should be used in conjunction with
31
the mouse button. For example, the value <B>{{1 {Control Meta}} {3
32
{Any}}}</B></I> specifies that the popup menu can be popped up by (a)
33
pressing mouse button 1 with either the Control or the Meta key or (b)
34
pressing mouse button 3 with any key modifier. The default value is
35
<B>{{3 {Any}}}</B></I>: only mouse button 3 brings up the popup menu.
36
</UL>
37
<P>
38
<pre><code><code><code>
39
Name:           <B>postCmd</B></I>
40
Class:          <B>PostCmd</B></I>
41
Switch:         <B>-postcmd</B></I>
42
</code></code></code></pre>
43
<UL>
44
Specifies a command to be evaluated just before the menu is about to
45
pop-up. This command is called with two default arguments: the root
46
x-y coordinates where the user has pressed the mouse button. This
47
command must return a boolean value: a false indicates that the menu
48
should be popped up. This option can be used to find out where the
49
user has pressed the mouse-button and optionally disable the popup
50
menu over certain screen areas.
51
</UL>
52
<P>
53
<pre><code><code><code>
54
Name:           <B>spring</B></I>
55
Class:          <B>Spring</B></I>
56
Switch:         <B>-spring</B></I>
57
</code></code></code></pre>
58
<UL>
59
When set to <B>true</B></I>, the menu will be automatically popped down if
60
the user releases the mouse button outside of the menu and no menu
61
commands will be invoked. This makes it easy for the user to cancel
62
the popup menu without pressing the Escape key. The default value is
63
<B>true</B></I>.
64
</UL>
65
<P>
66
<pre><code><code><code>
67
Name:           <B>state</B></I>
68
Class:          <B>State</B></I>
69
Switch:         <B>-state</B></I>
70
</code></code></code></pre>
71
<UL>
72
Must be either <B>disabled</B></I> or <B>normal</B></I>. The PopupMenu widget will not
73
pop up unless its <B>-state</B></I> is set to <B>normal</B></I>.
74
</UL>
75
<P>
76
<pre><code><code><code>
77
Name:           <B>title</B></I>
78
Class:          <B>Title</B></I>
79
Switch:         <B>-title</B></I>
80
</code></code></code></pre>
81
<UL>
82
Specifies a text string to display inside the <B>menubutton</B></I>
83
subwidget, as the title of this PopupMenu.
84
</UL>
85
</pre><H3>SUBWIDGETS</H3>
86
<P>
87
<pre><code><code><code>
88
Name:           <B>menu</B></I>
89
Class:          <B>Menu</B></I>
90
</code></code></code></pre>
91
<UL>
92
The menu subwidget.
93
</UL>
94
<P>
95
<pre><code><code><code>
96
Name:           <B>menubutton</B></I>
97
Class:          <B>Menubutton</B></I>
98
</code></code></code></pre>
99
<UL>
100
The menubutton subwidget.
101
</UL>
102
</pre><HR>
103
</pre><H3>DESCRIPTION</H3>
104
<P>
105
The <B>tixPopupMenu</B></I> command creates a new window (given by the
106
<I>pathName</I></B> argument) and makes it into a PopupMenu widget.
107
Additional options, described above, may be specified on the command
108
line or in the option database to configure aspects of the
109
PopupMenu widget such as its cursor and relief.
110
 
111
The Tix PopupMenu widget can be used as a replacement of the
112
<B>tk_popup</B></I> command. The advantage of the Tix PopupMenu widget is
113
it requires less application code to manipulate. Also, it provides a
114
title for the popup menu, which is not available from <B>tk_popup</B></I>.
115
</pre><H3>WIDGET COMMANDS</H3>
116
<P>
117
The <B>tixPopupMenu</B></I> command creates a new Tcl command whose name is
118
command may be used to invoke various operations on the widget. It has
119
the following general form:
120
<pre>
121
<I>pathName option </I></B>?<I>arg arg ...</I></B>?
122
<P>
123
</pre>
124
<I>PathName</I></B> is the name of the command, which is the same as the
125
determine the exact behavior of the command. The following commands
126
are possible for PopupMenu widgets:
127
<DL>
128
<DT> <I>pathName <B>bind <I>widget </I></B>?<I>widget ...</I></B>?
129
</I></B>
130
<DD> Binds this PopupMenu to one or more <I>widgets</I></B>. The PopupMenu
131
will be activated when the user presses the right mouse button over
132
these <I>widgets</I></B>.
133
</DL>
134
<DL>
135
<DT> <I>pathName <B>cget</B></I> <I>option</I></B>
136
</I></B>
137
<DD> Returns the current value of the configuration option given by
138
<I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
139
<B>tixPopupMenu</B></I> command.
140
</DL>
141
<DL>
142
<DT> <I>pathName <B>configure</B></I> ?<I>option</I></B>? <I>?value option value ...</I></B>?
143
</I></B>
144
<DD> Query or modify the configuration options of the widget.  If no
145
<I>option</I></B> is specified, returns a list describing all of the
146
available options for <I>pathName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
147
information on the format of this list).  If <I>option</I></B> is specified
148
with no <I>value</I></B>, then the command returns a list describing the
149
one named option (this list will be identical to the corresponding
150
sublist of the value returned if no <I>option</I></B> is specified).  If
151
one or more <I>option-value</I></B> pairs are specified, then the command
152
modifies the given widget option(s) to have the given value(s); in
153
this case the command returns an empty string.  <I>Option</I></B> may have
154
any of the values accepted by the <B>tixPopupMenu</B></I> command.
155
</DL>
156
<DL>
157
<DT> <I>pathName <B>post <I>widget x y</I></B>
158
</I></B>
159
<DD> Posts the PopupMenu inside the <I>widget</I></B> at the coordinate
160
<I>x</I></B>,<I>y</I></B>.
161
</DL>
162
<DL>
163
<DT> <I>pathName <B>unbind <I>widget </I></B>?<I>widget ...</I></B>?
164
</DL>
165
<DL>
166
<DT> <I>pathName <B>subwidget <I> name ?args?</I></B>
167
</I></B>
168
<DD> When no options are given, this command returns the pathname of the
169
subwidget of the specified name.
170
 
171
When options are given, the widget command of the specified subwidget
172
will be called with these options.
173
</DL>
174
</pre><H3>KEYWORDS</H3>
175
Tix(n)
176
<hr><i>Last modified Sun Jan 19 22:34:35 EST 1997 </i> ---
177
<i>Serial 853731303</i>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.