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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [Grid.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
<!-- Copyright (c) 1996, Expert Interface Technologies
2
 
3
See the file "license.terms" for information on usage and
4
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5
 
6
The file man.macros and some of the macros used by this file are
7
copyrighted: (c) 1990 The Regents of the University of California.
8
(c) 1994-1995 Sun Microsystems, Inc.
9
The license terms of the Tcl/Tk distrobution are in the file
10
license.tcl.>
11
<Title> tixGrid</Title>
12
<h1>tixGrid </h1> <blockquote>Create and manipulate Tix Grid widgets.</blockquote><p>
13
<p><hr>
14
<h1> Standard Options </h1><p>
15
<blockquote>
16
<TABLE ALIGN=ABSCENTER BORDER=1 CELLSPACING=0 CELLPADDING=4>
17
<TR>
18
<TD><code><b>background</b></code></TD>
19
<TD><code><b>borderWidth</b></code></TD>
20
<TD><code><b>cursor</b></code></TD>
21
<TD><code><b>font</b></code><br></TD>
22
</TR>
23
<TR>
24
<TD><code><b>foreground</b></code></TD>
25
<TD><code><b>height</b></code></TD>
26
<TD><code><b>highlightColor</b></code></TD>
27
<TD><code><b>highlightThickness</b></code><br></TD>
28
</TR>
29
<TR>
30
<TD><code><b>relief</b></code></TD>
31
<TD><code><b>selectBackground</b></code></TD>
32
<TD><code><b>selectForeground</b></code></TD>
33
<TD><code><b>width</b></code><br></TD>
34
</TR>
35
<TR>
36
<TD><code><b>xScrollCommand</b></code></TD>
37
<TD><code><b>yScrollCommand</b></code></TD>
38
<TD><code><b></b></code></TD>
39
<TD><code><b></b></code><br></TD>
40
</TR>
41
</TABLE>
42
<p>See the <b>options(n)</b> manual entry for details on the standard options.<p>
43
</blockquote>
44
<p> <h1>Widget Specific Options</h1> <p>
45
<DL>
46
<DT>
47
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
48
<TR>
49
<TD>Name:</TD>
50
<TD><code><b>editDoneCmd</b></code><br></TD>
51
</TR>
52
<TR>
53
<TD>Class:</TD>
54
<TD><code><b>EditDoneCmd</b></code><br></TD>
55
</TR>
56
<TR>
57
<TD>Command-line switch:</TD>
58
<TD><code><b>-editdonecmd</b></code><br></TD>
59
</TR>
60
</TABLE>
61
<DD><p>If non-empty, gives a Tcl command to be executed when the user has edited grid cell. When this command is called, it is passed with two additional parameters: <i>x</i> <i>y</i>, where (<i>x</i>,<i>y</i>) is the location of the cell that has just been edited.<p>
62
<DT>
63
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
64
<TR>
65
<TD>Name:</TD>
66
<TD><code><b>editNotifyCmd</b></code><br></TD>
67
</TR>
68
<TR>
69
<TD>Class:</TD>
70
<TD><code><b>EditNotifyCmd</b></code><br></TD>
71
</TR>
72
<TR>
73
<TD>Command-line switch:</TD>
74
<TD><code><b>-editnotifycmd</b></code><br></TD>
75
</TR>
76
</TABLE>
77
<DD><p>If non-empty, gives a Tcl command to be executed when the user tries to edit a grid cell. When this command is called, it is passed with two additional parameters: <i>x</i> <i>y</i>, where (<i>x</i>,<i>y</i>,) is the location of the cell. This command should return a boolean value: <b>true</b> indicates that the cells is editable and <b>false</b> otherwise.<p>
78
<DT>
79
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
80
<TR>
81
<TD>Name:</TD>
82
<TD><code><b>formatCmd</b></code><br></TD>
83
</TR>
84
<TR>
85
<TD>Class:</TD>
86
<TD><code><b>FormatCmd</b></code><br></TD>
87
</TR>
88
<TR>
89
<TD>Command-line switch:</TD>
90
<TD><code><b>-formatcmd</b></code><br></TD>
91
</TR>
92
</TABLE>
93
<DD><p>If non-empty, gives a Tcl command to be executed when the grid cells need to be formatted on the screen. Normally, this command calls the <b>format</b> widget command (see below). When this command is called, it is passed with five additional parameters: <i>type</i> <i>x1</i> <i>y1</i> <i>x2</i> <i>y2</i>. <i>type</i> gives the logical type of the region in the grid. It may be one of the following. <b>x-region</b>: the horizontal margin; <b>y-region</b>: the vertical margin; <b>s-region</b>, the area where the the horizontal and vertical margins are joined; <b>main</b>: all the cells that do not fall into the above three types.  <i>x1</i> <i>y1</i> <i>x2</i> <i>y2</i> gives the extent of the region that needs formatting.<p>
94
<DT>
95
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
96
<TR>
97
<TD>Name:</TD>
98
<TD><code><b>leftMargin</b></code><br></TD>
99
</TR>
100
<TR>
101
<TD>Class:</TD>
102
<TD><code><b>LeftMargin</b></code><br></TD>
103
</TR>
104
<TR>
105
<TD>Command-line switch:</TD>
106
<TD><code><b>-leftmargin</b></code><br></TD>
107
</TR>
108
</TABLE>
109
<DD><p>In the number of cells, gives the width of vertical margin. A zero indicates that no vertical should be drawn.<p>
110
<DT>
111
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
112
<TR>
113
<TD>Name:</TD>
114
<TD><code><b>selectMode</b></code><br></TD>
115
</TR>
116
<TR>
117
<TD>Class:</TD>
118
<TD><code><b>SelectMode</b></code><br></TD>
119
</TR>
120
<TR>
121
<TD>Command-line switch:</TD>
122
<TD><code><b>-selectmode</b></code><br></TD>
123
</TR>
124
</TABLE>
125
<DD><p>Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either <b>single</b>, <b>browse</b>, <b>multiple</b>, or <b>extended</b>; the default value is <b>single</b>.<p>
126
<DT>
127
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
128
<TR>
129
<TD>Name:</TD>
130
<TD><code><b>selectUnit</b></code><br></TD>
131
</TR>
132
<TR>
133
<TD>Class:</TD>
134
<TD><code><b>SelectUnit</b></code><br></TD>
135
</TR>
136
<TR>
137
<TD>Command-line switch:</TD>
138
<TD><code><b>-selectunit</b></code><br></TD>
139
</TR>
140
</TABLE>
141
<DD><p>Specifies the selection unit. Valid values are <b>cell</b>, <b>column</b> or <b>row</b>.<p>
142
<DT>
143
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
144
<TR>
145
<TD>Name:</TD>
146
<TD><code><b>topMargin</b></code><br></TD>
147
</TR>
148
<TR>
149
<TD>Class:</TD>
150
<TD><code><b>TopMargin</b></code><br></TD>
151
</TR>
152
<TR>
153
<TD>Command-line switch:</TD>
154
<TD><code><b>-topmargin</b></code><br></TD>
155
</TR>
156
</TABLE>
157
<DD><p>In the number of cells, gives the height of horizontal margin. A zero indicates that no horizontal should be drawn.<p>
158
</DL>
159
<p>
160
<p><hr>
161
<h1>Description</h1><p>
162
The <b>tixGrid</b> command creates a new window (given by the <i>pathName</i> argument) and makes it into a <b>tixGrid</b> widget.  Additional options, described above, may be specified on the command line or in the option database to configure aspects of the <b>tixGrid</b> widget such as its cursor and relief. <p> A Grid widget displays its contents in a two dimensional grid of cells. Each cell may contain one Tix <b>display</b> <b>item</b>, which may be in text, graphics or other formats. See the <b>tixItemType(n)</b> manual page for more information about Tix display items. Individual cells, or groups of cells, can be formatted with a wide range of attributes, such as its color, relief and border.</p>
163
<h2> Widget Command</h2><p>
164
The <b>tixGrid</b> command creates a new Tcl command whose name is the same as the path name of the <b>tixGrid</b> widget's window. This command may be used to invoke various operations on the widget. It has the following general form:
165
<blockquote>
166
<code><i>pathName option</i> </code>?<code><i>arg arg ...</i></code>?
167
</blockquote>
168
<i>PathName</i> is the name of the command, which is the same as the <b>tixGrid</b> widget's path name. <i>Option</i> and the <i>arg</i>s determine the exact behavior of the command. The following commands are possible for <b>tixGrid</b> widgets: <p>
169
<DL>
170
<DT>
171
<i>pathName</i> <b>anchor</b> <i>option</i> ?<i>args</i> <i>...</i>?
172
<DD>Manipulates the <b>anchor cell</b> of the <b>tixGrid</b> widget. The anchor cell is the end of the selection that is fixed while the user is dragging out a selection with the mouse. <p>
173
<DT>
174
<i>pathName</i> <b>bdtype</b>
175
<DD> <p>
176
<DT>
177
<i>pathName</i> <b>cget</b> <i>option</i>
178
<DD>Returns the current value of the configuration option given by <i>option</i>. <i>Option</i> may have any of the values accepted by the <b>tixGrid</b> command. <p>
179
<DT>
180
<i>pathName</i> <b>configure</b> ?<i>option</i>? ?<i>value</i> <i>option</i> <i>value</i> <i>...</i>?
181
<DD>Query or modify the configuration options of the widget.  If no <i>option</i> is specified, returns a list describing all of the available options for <i>pathName</i> (see <b>Tk_ConfigureInfo(n)</b> for information on the format of this list.) If <i>option</i> is specified with no <i>value</i>, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no <i>option</i> is specified). If one or more <i>option-value</i> pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. <i>Option</i> may have any of the values accepted by the <b>tixGrid</b> command. <p>
182
<DT>
183
<i>pathName</i> <b>delete</b> <i>dim</i> <i>from</i> ?<i>to</i>?
184
<DD><i>Dim</i> may be <b>row</b> or <b>column</b>. If <i>to</i> is not given, deletes a single row (or column) at the position <i>from</i>. If <i>to</i> is given, deletes the range of rows (or columns) from position <i>from</i> through <i>to</i>. <p>
185
<DT>
186
<i>pathName</i> <b>edit apply</b>
187
<DD>If any cell is being edited, de-highlight the cell and applies the changes. <p>
188
<DT>
189
<i>pathName</i> <b>edit set</b> <i>x</i> <i>y</i>
190
<DD>Highlights the cell at (<i>x</i>,<i>y</i>) for editing, if the <b>-editnotify</b> command returns true for this cell. <p>
191
<DT>
192
<i>pathName</i> <b>entrycget</b> <i>x</i> <i>y</i> <i>option</i>
193
<DD>Returns the current value of the configuration option given by <i>option</i> of the cell at (<i>x</i>,<i>y</i>). <i>Option</i> may have any of the values accepted by the <b>set</b> widget command. <p>
194
<DT>
195
<i>pathName</i> <b>entryconfigure</b> <i>x</i> <i>y</i> ?<i>option</i>? ?<i>value</i> <i>option</i> <i>value</i> <i>...</i>?
196
<DD>Query or modify the configuration options of the cell at (<i>x</i>,<i>y</i>).  If no <i>option</i> is specified, returns a list describing all of the available options for the cell (see <b>Tk_ConfigureInfo(n)</b> for information on the format of this list.)  If <i>option</i> is specified with no <i>value</i>, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no <i>option</i> is specified.) If one or more <i>option-value</i> pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string.  <i>Option</i> may have any of the values accepted by the <b>set</b> widget command. <p>
197
<DT>
198
<i>pathName</i> <b>format</b>
199
<DD> <p>
200
<DT>
201
<i>pathName</i> <b>index</b>
202
<DD> <p>
203
<DT>
204
<i>pathName</i> <b>move</b> <i>dim</i> <i>from</i> <i>to</i> <i>offset</i>
205
<DD><i>Dim</i> may be <b>row</b> or <b>column</b>. Moves the the range of rows (or columns) from position <i>from</i> through <i>to</i> by the distance indicated by <i>offset</i>. For example, <b>move</b> <b>row</b> <b>2</b> <b>4</b> <b>1</b> moves the rows 2,3,4 to rows 3,4,5. <p>
206
<DT>
207
<i>pathName</i> <b>set</b> <i>x</i> <i>y</i> ?<i><b>-itemtype</b></i> <i>type</i>? ?<i>option</i> <i>value...</i>?
208
<DD>Creates a new display item at the cell at (<i>x</i>,<i>y</i>). The optional <b>-itemtype</b> parameter gives the type of the display item. An additional list of <i>option-value</i> pairs specify options of the display item. If a display item already exists at this cell, the old item will be deleted automatically. <p>
209
<DT>
210
<i>pathName</i> <b>size</b> <i>dim</i> <i>index</i> ?<i>option</i> <i>value</i> <i>...</i>?
211
<DD>Queries or sets the size of the row or column given by <i>dim</i> and <i>index</i>. <i>Dim</i> may be <b>row</b> or <b>column</b>.  <i>Index</i> may be any non-negative integer that gives the position of a given row (or column). <i>Index</i> can also be the string <b>default</b>; in this case, this command queries or sets the default size of all rows (or columns). <p> When no <i>option</i>-<i>value</i> pair is given, this command returns a list containing the current size setting of the given row (or column). When <i>option</i>-<i>value</i> pairs are given, the corresponding options of the size setting of the given row are changed. <i>Option</i> may be one of the follwing: <p><DL><DT><b>-pad0</b> <i>pixels</i><DD>Specifies the paddings to the left or a column or the top of a row.<p><DT><b>-pad1</b> <i>pixels</i><DD>Specifies the paddings to the right or a column or the bottom of a row.<p><DT><b>-size</b> <i>val</i><DD>Specifies the width of a column or the height of a row. <i>Val</i> may be: <b>auto</b> -- the width of the column is set the the widest cell in the column; a valid Tk screen distance unit (see <b>Tk_GetPixels(n)</b>); or a real number following by the word <b>chars</b> (e.g. <b>3.4chars</b>) that sets the width of the column to the given number of characters.<p></DL> <p>
212
<DT>
213
<i>pathName</i> <b>unset</b> <i>x</i> <i>y</i>
214
<DD>Clears the cell at (<i>x</i>,<i>y</i>) by removing its display item. <p>
215
<DT>
216
<i>pathName</i> <b>xview</b>
217
<DD> <p>
218
<DT>
219
<i>pathName</i> <b>yview</b>
220
<DD> <p>
221
</DL>
222
 
223
<!Serial 851729152>
224
<hr><i>Last modified Fri Jan 17 23:01:07 EST 1997 </i> ---
225
<i>Serial 853731300</i>

powered by: WebSVN 2.1.0

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