summaryrefslogtreecommitdiff
path: root/inc/Message_ProgressSentry.lxx
blob: b8e918ec43f628665db99e37fa63dd55bfe3bf47 (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
#include <Message_ProgressIndicator.hxx>

//=======================================================================
//function : Relieve
//purpose  : 
//=======================================================================

inline void Message_ProgressSentry::Relieve ()
{
  if ( ! myActive ) return;
  myProgress->EndScope();
  myActive = 0;
}

//=======================================================================
//function : Next
//purpose  : 
//=======================================================================

inline void Message_ProgressSentry::Next (const Standard_CString name) const
{
  if ( myActive ) myProgress->NextScope(name);
}

//=======================================================================
//function : Next
//purpose  : 
//=======================================================================

inline void Message_ProgressSentry::Next (const Standard_Real span, 
					  const Standard_CString name) const
{
  if ( myActive ) myProgress->NextScope(span, name);
}

//=======================================================================
//function : Next
//purpose  : 
//=======================================================================

inline void Message_ProgressSentry::Next (const Standard_Real span, 
					  const Handle(TCollection_HAsciiString)& name) const
{
  if ( myActive ) {
    myProgress->EndScope();
    myProgress->NewScope(span, name);
  }
}

//=======================================================================
//function : More
//purpose  : 
//=======================================================================

inline Standard_Boolean Message_ProgressSentry::More () const
{
  return myActive ? ! myProgress->UserBreak() : Standard_True;
}

//=======================================================================
//function : Show
//purpose  : 
//=======================================================================

inline void Message_ProgressSentry::Show () const
{
  if ( ! myProgress.IsNull() ) myProgress->Show();
}