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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [PopMenu.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1996, Expert Interface Technologies
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" The file man.macros and some of the macros used by this file are
8
'\" copyrighted: (c) 1990 The Regents of the University of California.
9
'\"              (c) 1994-1995 Sun Microsystems, Inc.
10
'\" The license terms of the Tcl/Tk distrobution are in the file
11
'\" license.tcl.
12
.so man.macros
13
'----------------------------------------------------------------------
14
.HS tixPopupMenu tix 4.0
15
.BS
16
'
17
'
18
'----------------------------------------------------------------------
19
.SH NAME
20
tixPopupMenu \- Create and manipulate tixPopupMenu widgets
21
'
22
'
23
'
24
'----------------------------------------------------------------------
25
.SH SYNOPSIS
26
\fBtixPopupMenu\fI \fIpathName ?\fIoptions\fR?
27
'
28
'
29
'----------------------------------------------------------------------
30
.PP
31
.SH SUPER-CLASS
32
The \fBtixPopupMenu\fR class is derived from the \fBTixShell\fR
33
class and inherits all the commands, options and subwidgets of its
34
super-class.
35
'
36
'----------------------------------------------------------------------
37
.SH "STANDARD OPTIONS"
38
'
39
The PopupMenu widget supports all the standard options of a frame widget.
40
See the \fBoptions(n)\fR manual entry for details on the standard options.
41
'
42
'
43
'----------------------------------------------------------------------
44
.SH "WIDGET-SPECIFIC OPTIONS"
45
'
46
'
47
'----------BEGIN
48
.LP
49
.nf
50
Name:           \fBbuttons\fR
51
Class:          \fBButtons\fR
52
Switch:         \fB\-buttons\fR
53
.fi
54
.IP
55
A TCL list that specifies the mouse button(s) and key modifier(s) that
56
bring up the popup menu. Each element of this list is in turn a list
57
that contains two elements: the first element is an integer that
58
indicates the
59
mouse button that brings up the popup menu; the second element
60
specifies the key modifiers that should be used in conjunction with
61
the mouse button. For example, the value \fB{{1 {Control Meta}} {3
62
{Any}}}\fR specifies that the popup menu can be popped up by (a)
63
pressing mouse button 1 with either the Control or the Meta key or (b)
64
pressing mouse button 3 with any key modifier. The default value is
65
\fB{{3 {Any}}}\fR: only mouse button 3 brings up the popup menu.
66
'----------END
67
'
68
'----------BEGIN
69
.LP
70
.nf
71
Name:           \fBpostCmd\fR
72
Class:          \fBPostCmd\fR
73
Switch:         \fB\-postcmd\fR
74
.fi
75
.IP
76
Specifies a command to be evaluated just before the menu is about to
77
pop-up. This command is called with two default arguments: the root
78
x-y coordinates where the user has pressed the mouse button. This
79
command must return a boolean value: a false indicates that the menu
80
shouldn't be popped up at this point; a true indicates that the menu
81
should be popped up. This option can be used to find out where the
82
user has pressed the mouse-button and optionally disable the popup
83
menu over certain screen areas.
84
'----------END
85
'
86
'----------BEGIN
87
.LP
88
.nf
89
Name:           \fBspring\fR
90
Class:          \fBSpring\fR
91
Switch:         \fB\-spring\fR
92
.fi
93
.IP
94
When set to \fBtrue\fR, the menu will be automatically popped down if
95
the user releases the mouse button outside of the menu and no menu
96
commands will be invoked. This makes it easy for the user to cancel
97
the popup menu without pressing the Escape key. The default value is
98
\fBtrue\fR.
99
'----------END
100
'
101
'----------BEGIN
102
.LP
103
.nf
104
Name:           \fBstate\fR
105
Class:          \fBState\fR
106
Switch:         \fB\-state\fR
107
.fi
108
.IP
109
Must be either \fBdisabled\fR or \fBnormal\fR. The PopupMenu widget will not
110
pop up unless its \fB\-state\fR is set to \fBnormal\fR.
111
'----------END
112
'
113
'
114
'----------BEGIN
115
.LP
116
.nf
117
Name:           \fBtitle\fR
118
Class:          \fBTitle\fR
119
Switch:         \fB\-title\fR
120
.fi
121
.IP
122
Specifies a text string to display inside the \fBmenubutton\fR
123
subwidget, as the title of this PopupMenu.
124
'----------END
125
'
126
'----------------------------------------------------------------------
127
.SH SUBWIDGETS
128
'----------BEGIN
129
.LP
130
.nf
131
Name:           \fBmenu\fR
132
Class:          \fBMenu\fR
133
.fi
134
.IP
135
The menu subwidget.
136
'----------END
137
'
138
'----------BEGIN
139
.LP
140
.nf
141
Name:           \fBmenubutton\fR
142
Class:          \fBMenubutton\fR
143
.fi
144
.IP
145
The menubutton subwidget.
146
'----------END
147
'
148
.BE
149
'
150
'----------------------------------------------------------------------
151
.SH DESCRIPTION
152
'
153
.PP
154
'
155
The \fBtixPopupMenu\fR command creates a new window (given by the
156
\fIpathName\fR argument) and makes it into a PopupMenu widget.
157
Additional options, described above, may be specified on the command
158
line or in the option database to configure aspects of the
159
PopupMenu widget such as its cursor and relief.
160
 
161
The Tix PopupMenu widget can be used as a replacement of the
162
\fBtk_popup\fR command. The advantage of the Tix PopupMenu widget is
163
it requires less application code to manipulate. Also, it provides a
164
title for the popup menu, which is not available from \fBtk_popup\fR.
165
'
166
'----------------------------------------------------------------------
167
.SH WIDGET COMMANDS
168
.PP
169
'
170
The \fBtixPopupMenu\fR command creates a new Tcl command whose name is
171
the same as the path name of the PopupMenu widget's window.  This
172
command may be used to invoke various operations on the widget. It has
173
the following general form:
174
'
175
.DS C
176
'
177
\fIpathName option \fR?\fIarg arg ...\fR?
178
.PP
179
.DE
180
'
181
\fIPathName\fR is the name of the command, which is the same as the
182
PopupMenu widget's path name. \fIOption\fR and the \fIarg\fRs
183
determine the exact behavior of the command. The following commands
184
are possible for PopupMenu widgets:
185
.TP
186
\fIpathName \fBbind \fIwidget \fR?\fIwidget ...\fR?
187
'
188
Binds this PopupMenu to one or more \fIwidgets\fR. The PopupMenu
189
will be activated when the user presses the right mouse button over
190
these \fIwidgets\fR.
191
'
192
.TP
193
\fIpathName \fBcget\fR \fIoption\fR
194
'
195
Returns the current value of the configuration option given by
196
\fIoption\fR. \fIOption\fR may have any of the values accepted by the
197
\fBtixPopupMenu\fR command.
198
'
199
.TP
200
'
201
\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
202
'
203
Query or modify the configuration options of the widget.  If no
204
\fIoption\fR is specified, returns a list describing all of the
205
available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
206
information on the format of this list).  If \fIoption\fR is specified
207
with no \fIvalue\fR, then the command returns a list describing the
208
one named option (this list will be identical to the corresponding
209
sublist of the value returned if no \fIoption\fR is specified).  If
210
one or more \fIoption\-value\fR pairs are specified, then the command
211
modifies the given widget option(s) to have the given value(s); in
212
this case the command returns an empty string.  \fIOption\fR may have
213
any of the values accepted by the \fBtixPopupMenu\fR command.
214
'
215
'
216
.TP
217
\fIpathName \fBpost \fIwidget x y\fR
218
'
219
Posts the PopupMenu inside the \fIwidget\fR at the coordinate
220
\fIx\fR,\fIy\fR.
221
'
222
'
223
.TP
224
\fIpathName \fBunbind \fIwidget \fR?\fIwidget ...\fR?
225
'
226
Cancels the PopupMenu's binding with the \fIwidget(s)\fR.
227
'
228
'
229
.TP
230
\fIpathName \fBsubwidget \fI name ?args?\fR
231
'
232
When no options are given, this command returns the pathname of the
233
subwidget of the specified name.
234
 
235
When options are given, the widget command of the specified subwidget
236
will be called with these options.
237
'
238
'
239
'----------------------------------------------------------------------
240
'.SH BINDINGS
241
'.PP
242
'
243
'
244
'----------------------------------------------------------------------
245
.SH KEYWORDS
246
Tix(n)

powered by: WebSVN 2.1.0

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