The main idea behind these classes is to provide a single interface to several
kinds of user messages - so far, text and progress bar messages are
implemented.
Usage: simple message:
popupmessage('This is important information!')
progress bar: ::
msg = popupprogressmessage('time-consuming operation!', 30) # prepare
for i in range(30):
<lengthy computation>
msg() # update
statusmessage() and statusprogressmessage() work in a similar way, but
direct their output to the currently active status widget (i.e., the
status bar of the top frame of the application or a widget registered
with a call to .setstatuswidget).
If -1 is passed as the second argument to a progress message, the
progress bar will wrap and start at the beginning.
sets up a progress bar in the widget that is currently set as the
status widget. Note that if the current status widget defines a
.``GetFiledRect`` method (like wxPython.wx.wxStatusBar), the first
status bar field is used to place the progress bar in. For all other
widgets, the full size (as determined by the .``GetRect`` method) is
used.
show a GUI status message. The following additional options will be
recognized (only one of them at a time can be used, though):
push: boolean; if true, push messageString on the status message
stack
pop: boolean; if true, pop the last message from the status
message stack (the messageString argument will be ignored in
this case)
duration: float or callable; display messageString for either
for the specified duration in seconds or until the callable
returns, then pop the previous message.
abstract base class for displaying user message display
Detail:
presents an integrated interface to both simple messages and
progress bar messages in the .__call__ method, which can be
called with a single string as argument (simple message) or a
string and an integer as arguments (progress bar of the range
given by the integer value and displaying the string as
message).
Derived classes shoud provide the following methods:
ShowMessage(messageString,**optionD): shows a message
displaying the string given in messageString. optionD
contains additional keyword arguments passed to __call__;
PrepareProgressBar(messageString,**optionD): creates a
progress bar displaying messageString. optionD contains
additional keyword arguments passed to __call__;
ShowProgress(newPosition,currentPosition): update the
position of the progress bar. newPosition gives the
requested new, currentPosition the current position of the
indicator;
CloseProgressBar(): performs clean-up after the process
finished.
allows redirection of status messages to any widget
Detail:
call .setStatusWidget with a widget instance as argument to
redirect all future status messages to it. The default status
widget is the status bar of the top frame of the application;
it can be re-enabled by calling .setStatusWidget with None
as argument.
displays a status message in the GUI statusbar or on the console,
if no GUI is available. If no messageString is passed, the current
message is cleared.