Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CdgBusy Class Reference

Inheritance diagram for CdgBusy:

Inheritance graph
[legend]
Collaboration diagram for CdgBusy:

Collaboration graph
[legend]
List of all members.

Detailed Description

CdgBusy - dialog indicating work in progress. This class is used to display a dialog while a computational intensive operation is scheduled in the background. It stays open as long as the bacground computation has no finished. The user is given an "interrupt" button to signal the background computation that it might terminate earlier. Actually to let the user do that the background computation has to be written cooperatively as we have no real concurrency in tcl. This is accomplished by a frequent call to "update" somewhere in your computation loop.

The busy dialog should also be closed in case of any errors. This is accomplished by overwriting the tcl commands "error", "catch" and "bgerror" in error.tcl.

Author:
Michael Daum (see also AUTHORS and THANKS for more)
Id
busy.tcl,v 1.24 2004/10/11 15:23:31 micha Exp

Definition at line 27 of file busy.tcl.

Public Member Functions

 CdgBusy (TclList args)
 compute (TclString text, TclList args)
 interrupt (TclList args)

Public Attributes

TclNumber wait = 500

Private Member Functions

 blink ()
 enterAction (TclWidget w, TclNumber x, TclNumber y)
 leaveAction ()
 reset ()

Private Attributes

TclString blinkJob = ""
TclString computeText = ""
TclNumber isActive = 0
TclNumber ledState = 0
TclString oldCursor = ""


Constructor & Destructor Documentation

CdgBusy::CdgBusy TclList  args  ) 
 

constructor

Definition at line 57 of file busy.tcl.


Member Function Documentation

CdgBusy::blink  )  [private]
 

indicate computation

Definition at line 143 of file busy.tcl.

CdgBusy::compute TclString  text,
TclList  args
 

execute the command. This method first shows the dialog and the spawns an after _compute().

Parameters:
text the message to be displayed in the dialog
args the script to be computed.
Returns:
the return value of the evaluated script
Definition at line 89 of file busy.tcl.

References _errorFlag.

CdgBusy::enterAction TclWidget  w,
TclNumber  x,
TclNumber  y
[private]
 

display the busy balloon. This slot is connected to the <enter> event. Definition at line 179 of file busy.tcl.

CdgBusy::interrupt TclList  args  ) 
 

interrupt the current computation.

Definition at line 121 of file busy.tcl.

References _errorFlag.

CdgBusy::leaveAction  )  [private]
 

disable the busy balloon. This slot is connected to the <leave> event. Definition at line 187 of file busy.tcl.

CdgBusy::reset  )  [private]
 

reset the blinker to a normal state.

Definition at line 159 of file busy.tcl.


The documentation for this class was generated from the following file:
XCDG 0.95 (20 Oct 2004)