Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / lib / python2.4 / site-packages / Pmw / Pmw_1_2 / doc / AboutDialog.html
CommitLineData
920dae64
AT
1
2 <html>
3 <head>
4 <meta name="description" content="Pmw - a toolkit for building high-level compound widgets in Python">
5 <meta name="content" content="python, megawidget, mega widget, compound widget, gui, tkinter">
6 <title>Pmw.AboutDialog reference manual</title>
7 </head>
8
9 <body bgcolor="#ffffff" text="#000000" link="#0000ee"
10 vlink="551a8b" alink="ff0000">
11
12 <h1 ALIGN="CENTER">Pmw.AboutDialog</h1>
13
14<center><IMG SRC=AboutDialog.gif ALT="" WIDTH=378 HEIGHT=284></center>
15<dl>
16<dt> <h3>Name</h3></dt><dd>
17<p>Pmw.AboutDialog() -
18 window to display version and contact information
19</p>
20
21
22</dd>
23<dt> <h3>Inherits</h3></dt><dd>
24<a href="MessageDialog.html">Pmw.MessageDialog</a><br>
25</dd>
26<dt> <h3>Description</h3></dt><dd>
27<p>
28 An about dialog is a dialog window which displays information
29 about the application, such as name, version, copyright and
30 contact details.</p>
31
32<p> The text of the message is constructed from the application name
33 (given by the <strong>applicationname</strong> option) followed by the values
34 supplied in the most recent calls to <code>Pmw.aboutversion()</code>,
35 <code>Pmw.aboutcopyright()</code> and <code>Pmw.aboutcontact()</code> functions.</p>
36
37<p> The icon of the message defaults to <strong>'info'</strong>, but may be changed
38 using the <strong>icon_bitmap</strong> component option.</p>
39
40<p></p>
41
42
43</dd>
44<dt> <h3>Options</h3></dt><dd>
45Options for this megawidget and its base
46classes are described below.<p></p>
47<a name=option.activatecommand></a>
48<dl><dt> <strong>activatecommand
49</strong></dt><dd>
50If this is callable, it will be called whenever the megawidget is
51 activated by a call to <code>activate()</code>. The default is <strong>None</strong>.</p>
52
53
54</dd></dl>
55<a name=option.applicationname></a>
56<dl><dt> <strong>applicationname
57</strong></dt><dd>
58Initialisation option. The name of application, to be dispayed in the dialog body and in
59 the window title if the <strong>title</strong> option is not given. The default is <strong>''</strong>.</p>
60
61
62</dd></dl>
63<a name=option.borderx></a>
64<dl><dt> <strong>borderx
65</strong></dt><dd>
66Initialisation option. The padding to the left and right of the text message and icon. The default is <strong>20</strong>.</p>
67
68
69</dd></dl>
70<a name=option.bordery></a>
71<dl><dt> <strong>bordery
72</strong></dt><dd>
73Initialisation option. The padding above and below the text message and icon. The default is <strong>20</strong>.</p>
74
75
76</dd></dl>
77<a name=option.buttonboxpos></a>
78<dl><dt> <strong>buttonboxpos
79</strong></dt><dd>
80Initialisation option. Specifies on which side of the dialog window to place the button
81 box. Must be one of <strong>'n'</strong>, <strong>'s'</strong>, <strong>'e'</strong> or <strong>'w'</strong>. The default is <strong>'s'</strong>.</p>
82
83
84</dd></dl>
85<a name=option.buttons></a>
86<dl><dt> <strong>buttons
87</strong></dt><dd>
88This must be a tuple or a list and specifies the names on the
89 buttons in the button box. The default is <strong>('Close',)</strong>.</p>
90
91
92</dd></dl>
93<a name=option.command></a>
94<dl><dt> <strong>command
95</strong></dt><dd>
96Specifies a function to call whenever a button in the button box
97 is invoked or the window is deleted by the window manager. The
98 function is called with a single argument, which is the name of
99 the button which was invoked, or <strong>None</strong> if the window was deleted
100 by the window manager.</p>
101<p> If the value of <strong>command</strong> is not callable, the default behaviour
102 is to deactivate the window if it is active, or withdraw the
103 window if it is not active. If it is deactivated, <code>deactivate()</code>
104 is called with the button name or <strong>None</strong> as described above. The default is <strong>None</strong>.</p>
105
106
107
108</dd></dl>
109<a name=option.deactivatecommand></a>
110<dl><dt> <strong>deactivatecommand
111</strong></dt><dd>
112If this is callable, it will be called whenever the megawidget is
113 deactivated by a call to <code>deactivate()</code>. The default is <strong>None</strong>.</p>
114
115
116</dd></dl>
117<a name=option.defaultbutton></a>
118<dl><dt> <strong>defaultbutton
119</strong></dt><dd>
120Specifies the default button in the button box. If the <strong>&lt;Return&gt;</strong>
121 key is hit when the dialog has focus, the default button will be
122 invoked. If <strong>defaultbutton</strong> is <strong>None</strong>, there will be no default
123 button and hitting the <strong>&lt;Return&gt;</strong> key will have no effect. The default is <strong>0</strong>.</p>
124
125
126</dd></dl>
127<a name=option.iconmargin></a>
128<dl><dt> <strong>iconmargin
129</strong></dt><dd>
130Initialisation option. The padding between the text message and icon. The default is <strong>20</strong>.</p>
131
132
133</dd></dl>
134<a name=option.iconpos></a>
135<dl><dt> <strong>iconpos
136</strong></dt><dd>
137Initialisation option. Specifies on which side of the text message to place the icon.
138 Must be one of <strong>'n'</strong>, <strong>'s'</strong>, <strong>'e'</strong> or <strong>'w'</strong>. The default is <strong>'w'</strong>.</p>
139
140
141</dd></dl>
142<a name=option.master></a>
143<dl><dt> <strong>master
144</strong></dt><dd>
145This is used by the <code>activate()</code> method to control whether the
146 window is made <em>transient</em> during modal dialogs. See the
147 <code>activate()</code> method. The default is <strong>'parent'</strong>.</p>
148
149
150</dd></dl>
151<a name=option.separatorwidth></a>
152<dl><dt> <strong>separatorwidth
153</strong></dt><dd>
154Initialisation option. If this is greater than <strong>0</strong>, a separator line with the specified
155 width will be created between the button box and the child site,
156 as a component named <strong>separator</strong>. Since the default border of the
157 button box and child site is <strong>raised</strong>, this option does not
158 usually need to be set for there to be a visual separation between
159 the button box and child site. The default is <strong>0</strong>.</p>
160
161
162</dd></dl>
163<a name=option.title></a>
164<dl><dt> <strong>title
165</strong></dt><dd>
166This is the title that the window manager displays in the title
167 bar of the window. The default is <strong>None</strong>.</p>
168
169
170</dd></dl>
171</dd>
172<dt> <h3>Components</h3></dt><dd>
173Components created by this megawidget and its base
174classes are described below.<p></p>
175<a name=component.buttonbox></a>
176<dl><dt> <strong>buttonbox
177</strong></dt><dd>
178This is the button box containing the buttons for the dialog. By
179 default it is created with the options
180 <code>(hull_borderwidth = 1, hull_relief = 'raised')</code>. By default, this component is a <a href="ButtonBox.html">Pmw.ButtonBox</a>.</p>
181
182
183</dd></dl>
184<a name=component.dialogchildsite></a>
185<dl><dt> <strong>dialogchildsite
186</strong></dt><dd>
187This is the child site for the dialog, which may be used to
188 specialise the megawidget by creating other widgets within it. By
189 default it is created with the options
190 <code>(borderwidth = 1, relief = 'raised')</code>. By default, this component is a Tkinter.Frame.</p>
191
192
193</dd></dl>
194<a name=component.hull></a>
195<dl><dt> <strong>hull
196</strong></dt><dd>
197This acts as the body for the entire megawidget. Other components
198 are created as children of the hull to further specialise this
199 class. By default, this component is a Tkinter.Toplevel.</p>
200
201
202</dd></dl>
203<a name=component.icon></a>
204<dl><dt> <strong>icon
205</strong></dt><dd>
206If the <strong>iconpos</strong> option is not <strong>None</strong>, this component is created
207 to contain the icon label for the dialog. To display a bitmap as
208 an icon, set the <strong>icon_bitmap</strong> component option to any of the
209 forms acceptable to Tk, such as <strong>'warning'</strong> or <strong>'error'</strong>. By default, this component is a Tkinter.Label.</p>
210
211
212</dd></dl>
213<a name=component.message></a>
214<dl><dt> <strong>message
215</strong></dt><dd>
216The label to contain the text message for the dialog. To set
217 the text, use the <strong>message_text</strong> component option. By default, this component is a Tkinter.Label.</p>
218
219
220</dd></dl>
221<a name=component.separator></a>
222<dl><dt> <strong>separator
223</strong></dt><dd>
224If the <strong>separatorwidth</strong> initialisation option is non-zero, the
225 <strong>separator</strong> component is the line dividing the area between the
226 button box and the child site. By default, this component is a Tkinter.Frame.</p>
227
228
229</dd></dl>
230</dd>
231<a name=methods></a>
232<dt> <h3>Methods</h3></dt><dd>
233This megawidget has no methods of its own.
234For a description of its inherited methods, see the
235manual for its base class
236<strong><a href="MessageDialog.html#methods">Pmw.MessageDialog</a></strong>.
237<p></p>
238</dd>
239<dt> <h3>Example</h3></dt><dd>
240The image at the top of this manual is a snapshot
241of the window (or part of the window) produced
242by the following code.<p></p>
243<pre>
244class Demo:
245 def __init__(self, parent):
246 # Create dialog.
247 Pmw.aboutversion('9.9')
248 Pmw.aboutcopyright('Copyright My Company 1999\nAll rights reserved')
249 Pmw.aboutcontact(
250 'For information about this application contact:\n' +
251 ' My Help Desk\n' +
252 ' Phone: +61 2 9876 5432\n' +
253 ' email: help@my.company.com.au'
254 )
255 self.about = Pmw.AboutDialog(parent, applicationname = 'My Application')
256 self.about.withdraw()
257
258 # Create button to launch the dialog.
259 w = Tkinter.Button(parent, text = 'Show about dialog',
260 command = self.execute)
261 w.pack(padx = 8, pady = 8)
262
263 def execute(self):
264 self.about.show()
265
266</pre>
267</dd>
268</dl>
269
270 <center><P ALIGN="CENTER">
271 <IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
272 </p></center>
273
274
275 <font size=-1>
276 <center><P ALIGN="CENTER">
277 Pmw 1.2 -
278 5 Aug 2003
279 - <a href="index.html">Home</a>
280 <br>Manual page last reviewed: 18 May 2002
281 </p></center>
282 </font>
283
284 </body>
285 </html>
286