1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<!DOCTYPE HTML PUBLIC "-//Netscape_Microsoft//DTD HTML 3.0//EN">
<HTML>
<!-- This file generated using the Python HTMLgen module. -->
<HEAD>
<META NAME="GENERATOR" CONTENT="HTMLgen 1.1">
<TITLE>PmwAboutDialog.py</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<PRE>
import Pmw
<STRONG><FONT COLOR="#CC6600">class AboutDialog</FONT></STRONG>(Pmw.MessageDialog):
<FONT COLOR="#DD0000"># Window to display version and contact information.</FONT>
# Class members containing resettable <FONT COLOR="#009900">'default'</FONT> values:
_version = <FONT COLOR="#009900">''</FONT>
_copyright = <FONT COLOR="#009900">''</FONT>
_contact = <FONT COLOR="#009900">''</FONT>
<STRONG> def __init__</STRONG>(self, parent = None, **kw):
<FONT COLOR="#DD0000"># Define the megawidget options.</FONT>
INITOPT = Pmw.INITOPT
optiondefs = (
(<FONT COLOR="#009900">'applicationname'</FONT>, <FONT COLOR="#009900">''</FONT>, INITOPT),
(<FONT COLOR="#009900">'iconpos'</FONT>, <FONT COLOR="#009900">'w'</FONT>, None),
(<FONT COLOR="#009900">'icon_bitmap'</FONT>, <FONT COLOR="#009900">'info'</FONT>, None),
(<FONT COLOR="#009900">'buttons'</FONT>, (<FONT COLOR="#009900">'Close'</FONT>,), None),
(<FONT COLOR="#009900">'defaultbutton'</FONT>, 0, None),
)
self.defineoptions(kw, optiondefs)
<FONT COLOR="#DD0000"># Initialise the base class (after defining the options).</FONT>
Pmw.MessageDialog.__init__(self, parent)
applicationname = self[<FONT COLOR="#009900">'applicationname'</FONT>]
self.configure(title = <FONT COLOR="#009900">'About '</FONT> + applicationname)
text = applicationname + <FONT COLOR="#009900">'\n\n'</FONT>
if AboutDialog._version != <FONT COLOR="#009900">''</FONT>:
text = text + <FONT COLOR="#009900">'Version '</FONT> + AboutDialog._version + <FONT COLOR="#009900">'\n'</FONT>
if AboutDialog._copyright != <FONT COLOR="#009900">''</FONT>:
text = text + AboutDialog._copyright + <FONT COLOR="#009900">'\n\n'</FONT>
if AboutDialog._contact != <FONT COLOR="#009900">''</FONT>:
text = text + AboutDialog._contact
self.configure(message_text=text)
<FONT COLOR="#DD0000"># Check keywords and initialise options.</FONT>
self.initialiseoptions(AboutDialog)
<STRONG>def aboutversion</STRONG>(value):
AboutDialog._version = value
<STRONG>def aboutcopyright</STRONG>(value):
AboutDialog._copyright = value
<STRONG>def aboutcontact</STRONG>(value):
AboutDialog._contact = value
</PRE>
</BODY> </HTML>
|