summaryrefslogtreecommitdiff
path: root/inc/Draw_ProgressIndicator.hxx
blob: 6395443ce27e563cd982391b21147508e5458ca8 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Draw_ProgressIndicator_HeaderFile
#define _Draw_ProgressIndicator_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Draw_ProgressIndicator_HeaderFile
#include <Handle_Draw_ProgressIndicator.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Size_HeaderFile
#include <Standard_Size.hxx>
#endif
#ifndef _Message_ProgressIndicator_HeaderFile
#include <Message_ProgressIndicator.hxx>
#endif
class Draw_Interpretor;


//! Implements ProgressIndicator (interface provided by Message) <br>
//!          for DRAW, with possibility to output to TCL window <br>
//!          and/or trace file <br>
class Draw_ProgressIndicator : public Message_ProgressIndicator {

public:

  //! Creates a progress indicator and remembers pointer to <br>
//!          Draw_Interpretor <br>
//!          The updateTime, if given, defines time interval between <br>
//!          updates of the indicator (in seconds) <br>
  Standard_EXPORT   Draw_ProgressIndicator(const Draw_Interpretor& di,const Standard_Integer updateTime = 0);
  //! Destructor; calls Reset() <br>
  Standard_EXPORT     void Destroy() ;
~Draw_ProgressIndicator()
{
  Destroy();
}
  //! Sets text output mode (on/off) <br>
  Standard_EXPORT     void SetTextMode(const Standard_Boolean theTextMode) ;
  //! Gets text output mode (on/off) <br>
  Standard_EXPORT     Standard_Boolean GetTextMode() const;
  //! Sets graphical output mode (on/off) <br>
  Standard_EXPORT     void SetGraphMode(const Standard_Boolean theGraphMode) ;
  //! Gets graphical output mode (on/off) <br>
  Standard_EXPORT     Standard_Boolean GetGraphMode() const;
  //! Clears/erases opened TCL windows if any <br>
//!          and sets myBreak to False <br>
  Standard_EXPORT   virtual  void Reset() ;
  //! Defines method Show of Progress Indicator <br>
  Standard_EXPORT   virtual  Standard_Boolean Show(const Standard_Boolean force = Standard_True) ;
  //! Redefines method UserBreak of Progress Indicator <br>
  Standard_EXPORT   virtual  Standard_Boolean UserBreak() ;
  
  Standard_EXPORT   static  Standard_Boolean& DefaultTextMode() ;
  //! Get/Set default values for output modes <br>
  Standard_EXPORT   static  Standard_Boolean& DefaultGraphMode() ;
  //! Internal method for implementation of UserBreak mechanism <br>
  Standard_EXPORT   static  Standard_Integer& StopIndicator() ;



  DEFINE_STANDARD_RTTI(Draw_ProgressIndicator)

protected:




private: 


Standard_Boolean myTextMode;
Standard_Boolean myGraphMode;
Standard_Address myDraw;
Standard_Boolean myShown;
Standard_Boolean myBreak;
Standard_Integer myUpdateTime;
Standard_Size myLastUpdate;
Standard_Size myStartTime;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif