1 -- File: Draw_ProgressIndicator.cdl
2 -- Created: Wed Jun 25 16:31:08 2008
3 -- Author: data exchange team
5 ---Copyright: Matra Datavision 2008
7 class ProgressIndicator from Draw inherits ProgressIndicator from Message
9 ---Purpose: Implements ProgressIndicator (interface provided by Message)
10 -- for DRAW, with possibility to output to TCL window
17 Create (di: Interpretor from Draw; updateTime: Integer = 0)
18 returns ProgressIndicator from Draw;
19 ---Purpose: Creates a progress indicator and remembers pointer to
21 -- The updateTime, if given, defines time interval between
22 -- updates of the indicator (in seconds)
24 Destroy (me: mutable);
26 ---Purpose: Destructor; calls Reset()
28 SetTextMode(me : mutable; theTextMode : Boolean);
29 ---Purpose: Sets text output mode (on/off)
31 GetTextMode(me) returns Boolean;
32 ---Purpose: Gets text output mode (on/off)
34 SetGraphMode(me : mutable; theGraphMode : Boolean);
35 ---Purpose: Sets graphical output mode (on/off)
37 GetGraphMode(me) returns Boolean;
38 ---Purpose: Gets graphical output mode (on/off)
40 ---Scope: Redefined methods
42 Reset (me: mutable) is redefined;
43 ---Purpose: Clears/erases opened TCL windows if any
44 -- and sets myBreak to False
46 Show (me: mutable; force: Boolean = Standard_True)
47 returns Boolean is redefined;
48 ---Purpose: Defines method Show of Progress Indicator
50 UserBreak (me: mutable) returns Boolean is redefined;
51 ---Purpose: Redefines method UserBreak of Progress Indicator
53 ---Scope: Class methods maintaining static data
55 DefaultTextMode (myclass) returns Boolean;
57 DefaultGraphMode (myclass) returns Boolean;
59 ---Purpose: Get/Set default values for output modes
61 StopIndicator (myclass) returns Integer;
63 ---Purpose: Internal method for implementation of UserBreak mechanism
67 myTextMode : Boolean; -- text output mode (on/off)
68 myGraphMode : Boolean; -- graphical output mode (on/off)
70 myDraw: Address; -- pointer to Draw_Interpretor (!!!)
71 myShown: Boolean; -- whether graphical window is shown
72 myBreak: Boolean; -- whether user break was signaled
74 myUpdateTime: Integer; -- Time interval for update (in sec)
75 myLastUpdate: Size; -- Start time (first call to Show())
76 myStartTime: Size; -- Start time (first call to Show())
78 end ProgressIndicator;