1// Copyright (c) 1999-2014 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14#include <TCollection_HAsciiString.hxx>
15
16//=======================================================================
17//function : SetName
18//purpose  : Sets scale name
19//=======================================================================
20
21inline void Message_ProgressScale::SetName(const Standard_CString theName)
22{
23  myName = new TCollection_HAsciiString ( theName );
24}
25
26//=======================================================================
27//function : SetName
28//purpose  : Sets scale name
29//=======================================================================
30
31inline void Message_ProgressScale::SetName(const Handle(TCollection_HAsciiString)& theName)
32{
33  myName = theName;
34}
35
36//=======================================================================
37//function : GetName
38//purpose  : Returns scale name
39//=======================================================================
40
41inline Handle(TCollection_HAsciiString) Message_ProgressScale::GetName() const
42{
43  return myName;
44}
45
46//=======================================================================
47//function : SetMin
48//purpose  : Sets minimum value of scale
49//=======================================================================
50
51inline void Message_ProgressScale::SetMin(const Standard_Real theMin)
52{
53  myMin = theMin;
54}
55
56//=======================================================================
57//function : GetMin
58//purpose  : Returns minimum value of scale
59//=======================================================================
60
61inline Standard_Real Message_ProgressScale::GetMin() const
62{
63  return myMin;
64}
65
66//=======================================================================
67//function : SetMax
68//purpose  : Sets minimum value of scale
69//=======================================================================
70
71inline void Message_ProgressScale::SetMax(const Standard_Real theMax)
72{
73  myMax = theMax;
74}
75
76//=======================================================================
77//function : GetMax
78//purpose  : Returns minimum value of scale
79//=======================================================================
80
81inline Standard_Real Message_ProgressScale::GetMax() const
82{
83  return myMax;
84}
85
86//=======================================================================
87//function : SetRange
88//purpose  : Sets both min and max
89//=======================================================================
90
91inline void Message_ProgressScale::SetRange(const Standard_Real theMin,
92					     const Standard_Real theMax)
93{
94  myMin = theMin;
95  myMax = theMax;
96}
97
98//=======================================================================
99//function : SetStep
100//purpose  : Sets default step
101//=======================================================================
102
103inline void Message_ProgressScale::SetStep(const Standard_Real theStep)
104{
105  myStep = theStep;
106}
107
108//=======================================================================
109//function : GetStep
110//purpose  : Returns default step
111//=======================================================================
112
113inline Standard_Real Message_ProgressScale::GetStep() const
114{
115  return myStep;
116}
117
118//=======================================================================
119//function : SetInfinite
120//purpose  : Sets flag for infinite scale
121//=======================================================================
122
123inline void Message_ProgressScale::SetInfinite(const Standard_Boolean theInfinite)
124{
125  myInfinite = theInfinite;
126}
127
128//=======================================================================
129//function : GetInfinite
130//purpose  : Returns flag for infinite scale
131//=======================================================================
132
133inline Standard_Boolean Message_ProgressScale::GetInfinite() const
134{
135  return myInfinite;
136}
137
138//=======================================================================
139//function : SetScale
140//purpose  : Set all scale parameters
141//=======================================================================
142
143inline void Message_ProgressScale::SetScale(const Standard_Real theMin,
144					     const Standard_Real theMax,
145					     const Standard_Real theStep,
146					     const Standard_Boolean theInfinite)
147{
148  myMin = theMin;
149  myMax = theMax;
150  myStep = theStep;
151  myInfinite = theInfinite;
152}
153
154//=======================================================================
155//function : SetSpan
156//purpose  : Sets span on a basis scale
157//=======================================================================
158
159inline void Message_ProgressScale::SetSpan(const Standard_Real theFirst,
160					    const Standard_Real theLast)
161{
162  myFirst = theFirst;
163  myLast  = theLast;
164}
165
166//=======================================================================
167//function : GetFirst
168//purpose  :
169//=======================================================================
170
171inline Standard_Real Message_ProgressScale::GetFirst () const
172{
173  return myFirst;
174}
175
176//=======================================================================
177//function : GetLast
178//purpose  :
179//=======================================================================
180
181inline Standard_Real Message_ProgressScale::GetLast () const
182{
183  return myLast;
184}
185
186