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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [html/] [labeledwidget.n.html] - Blame information for rev 1770

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

Line No. Rev Author Line
1 578 markom
<HTML>
2
<HEAD>
3
<TITLE>iwidgets2.2.0 User Commands - labeledwidget</TITLE>
4
</HEAD>
5
<BODY BGCOLOR="#FFFFFF">
6
<H1>iwidgets2.2.0 User Commands - labeledwidget</H1>
7
<HR>
8
<PRE>
9
 
10
</PRE>
11
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
12
 
13
 
14
</PRE>
15
<H2>NAME</H2><PRE>
16
     labeledwidget - Create and manipulate a labeled widget
17
 
18
 
19
</PRE>
20
<H2>SYNOPSIS</H2><PRE>
21
     <STRONG>labeledwidget</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
22
 
23
 
24
</PRE>
25
<H2>INHERITANCE</H2><PRE>
26
     itk::Widget &lt;- labeledwidget
27
 
28
 
29
</PRE>
30
<H2>STANDARD OPTIONS</H2><PRE>
31
     <STRONG>background</STRONG>      <STRONG>cursor</STRONG>         <STRONG>foreground</STRONG>
32
 
33
     See the "options" manual entry for details on  the  standard
34
     options.
35
 
36
 
37
</PRE>
38
<H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
39
     Name:           <STRONG>labelBitmap</STRONG>
40
     Class:          <STRONG>Bitmap</STRONG>
41
     Command-Line Switch:           <STRONG>-labelbitmap</STRONG>
42
 
43
          Specifies a bitmap to display in the widget, in any  of
44
          the  forms  acceptable  to  <STRONG>Tk_GetBitmap</STRONG>.   This option
45
          overrides the <EM>labeltext</EM> option.
46
 
47
     Name:           <STRONG>labelFont</STRONG>
48
     Class:          <STRONG>Font</STRONG>
49
     Command-Line Switch:           <STRONG>-labelfont</STRONG>
50
 
51
          Specifies the font to be used for the label.
52
 
53
     Name:           <STRONG>labelImage</STRONG>
54
     Class:          <STRONG>Image</STRONG>
55
     Command-Line Switch:           <STRONG>-labelimage</STRONG>
56
 
57
          Specifies a image to be used as the  label.  The  image
58
          may  be  any  of the values created by the <STRONG>image</STRONG> <STRONG>create</STRONG>
59
          command.  This option overrides  both  the  <EM>labelbitmap</EM>
60
          and <EM>labeletext</EM> options.
61
 
62
     Name:           <STRONG>labelMargin</STRONG>
63
     Class:          <STRONG>Margin</STRONG>
64
     Command-Line Switch:           <STRONG>-labelmargin</STRONG>
65
 
66
          Specifies the distance between the childsite and  label
67
          in  any  of  the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.  The
68
          default is 1 pixel.
69
 
70
     Name:           <STRONG>labelPos</STRONG>
71
     Class:          <STRONG>Position</STRONG>
72
     Command-Line Switch:           <STRONG>-labelpos</STRONG>
73
          Specifies the position of the label along the  side  of
74
          the  childsite:  <STRONG>n</STRONG>,  <STRONG>ne</STRONG>,  <STRONG>e</STRONG>,  <STRONG>se</STRONG>, <STRONG>s</STRONG>, <STRONG>sw</STRONG>, <STRONG>w</STRONG>, or <STRONG>nw</STRONG>.  The
75
          default is w.
76
 
77
     Name:           <STRONG>labelText</STRONG>
78
     Class:          <STRONG>Text</STRONG>
79
     Command-Line Switch:           <STRONG>-labeltext</STRONG>
80
 
81
          Specifies the text of the label around the childsite.
82
 
83
     Name:           <STRONG>labelVariable</STRONG>
84
     Class:          <STRONG>Variable</STRONG>
85
     Command-Line Switch:           <STRONG>-labelvariable</STRONG>
86
 
87
          Specifies the text variable of  the  label  around  the
88
          childsite.
89
 
90
 
91
</PRE>
92
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
93
 
94
 
95
 
96
</PRE>
97
<H2>DESCRIPTION</H2><PRE>
98
     The <STRONG>labeledwidget</STRONG> command creates  a  labeled  widget  which
99
     contains  a label and child site.  The child site is a frame
100
     which can filled with any widget  via  a  derived  class  or
101
     though  the  use  of  the  childsite method.  This class was
102
     designed to be a general purpose base class  for  supporting
103
     the  combination  of  label  widget  and  a  childsite.  The
104
     options include the ability to position the label around the
105
     childsite  widget,  modify  the font and margin, and control
106
     the display of the labels.
107
 
108
 
109
 
110
</PRE>
111
<H2>METHODS</H2><PRE>
112
     The <STRONG>labeledwidget</STRONG> command creates a new  Tcl  command  whose
113
     name  is <EM>pathName</EM>.  This command may be used to invoke vari-
114
     ous operations on the widget.  It has the following  general
115
     form:
116
 
117
          <EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
118
 
119
     <EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
120
     mand.  The following commands are possible for labeledwidget
121
     widgets:
122
 
123
 
124
</PRE>
125
<H2>WIDGET-SPECIFIC METHODS</H2><PRE>
126
     <EM>pathName</EM> <STRONG>childsite</STRONG>
127
          Return the path name of the child site.
128
 
129
     <EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
130
          Returns the current value of the  configuration  option
131
          given  by  <EM>option</EM>.   <EM>Option</EM>  may have any of the values
132
          accepted by the <STRONG>labeledwidget</STRONG> command.
133
 
134
     <EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
135
          Query  or  modify  the  configuration  options  of  the
136
          widget.   If  no  <EM>option</EM>  is  specified, returns a list
137
          describing all of the available  options  for  <EM>pathName</EM>
138
          (see  <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
139
          this list).  If <EM>option</EM> is specified with no <EM>value</EM>, then
140
          the  command  returns  a  list describing the one named
141
          option (this list will be identical to the  correspond-
142
          ing  sublist  of  the  value  returned  if no <EM>option</EM> is
143
          specified).  If one or more  <EM>option</EM> - <EM>value</EM>  pairs  are
144
          specified,  then  the command modifies the given widget
145
          option(s) to have the given value(s);  in this case the
146
          command  returns  an empty string.  <EM>Option</EM> may have any
147
          of the values accepted by the <STRONG>labeledwidget</STRONG> command.
148
 
149
 
150
 
151
</PRE>
152
<H2>STATIC METHODS</H2><PRE>
153
     <STRONG>Labeledwidget::alignlabels</STRONG> <EM>widget</EM> ?<EM>widget</EM> ...?
154
          The alignlabels  procedure  takes  a  list  of  widgets
155
          derived from the Labeledwidget class and uses the label
156
          margin to make each widget have the  same  total  space
157
          for  the  combination  of  label  and  margin.  The net
158
          effect is to left align the  labels.   Generally,  this
159
          method is only useful with a label position of w, which
160
          is the default.
161
 
162
 
163
 
164
</PRE>
165
<H2>COMPONENTS</H2><PRE>
166
     Name:           <STRONG>label</STRONG>
167
     Class:          <STRONG>label</STRONG>
168
 
169
          The label component provides the label for the  labeled
170
          widget.   See  the  "label"  widget  manual  entry  for
171
          details on the label component item.
172
 
173
     Name:           <STRONG>lwchildsite</STRONG>
174
     Class:          <STRONG>frame</STRONG>
175
 
176
          The lwchildsite component is the user  child  site  for
177
          the  labeled  widget.   See  the  "frame" widget manual
178
          entry for details on the lwchildsite component item.
179
 
180
 
181
 
182
</PRE>
183
<H2>EXAMPLE</H2><PRE>
184
          The labeledwidget was primarily  meant  to  be  a  base
185
          class.   The  ScrolledListBox  and  EntryField are good
186
          examples of derived classes of the labeledwidget class.
187
          In   order  to  provide  equal  support  for  composite
188
          classes, the 'childsite' methods also exists.  The fol-
189
          lowing is an example of 'childsite' method usage.
190
 
191
 
192
           labeledwidget .lw -labeltext "Canvas Widget" -labelpos s
193
           pack .lw -fill both -expand yes -padx 10 -pady 10
194
 
195
           set cw [canvas [.lw childsite].c -relief raised -width 200 -height 200]
196
           pack $cw -padx 10 -pady 10
197
 
198
 
199
 
200
</PRE>
201
<H2>AUTHOR</H2><PRE>
202
     Mark L. Ulferts
203
 
204
 
205
</PRE>
206
<H2>KEYWORDS</H2><PRE>
207
     labeledwidget, widget
208
 
209
 
210
 
211
 
212
 
213
 
214
 
215
 
216
 
217
 
218
 
219
 
220
 
221
 
222
 
223
 
224
 
225
 
226
 
227
 
228
 
229
 
230
 
231
 
232
 
233
 
234
 
235
 
236
 
237
 
238
 
239
 
240
 
241
 
242
 
243
 
244
 
245
 
246
 
247
 
248
</PRE>
249
</BODY>
250
</HTML>

powered by: WebSVN 2.1.0

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