0025619: CAST analysis: Avoid classes with a non-empty destructor and not implementin...
[occt.git] / src / Message / Message_ProgressScale.cdl
CommitLineData
b311480e 1-- Created on: 2002-02-20
2-- Created by: Andrey BETENEV
973c2be1 3-- Copyright (c) 2002-2014 OPEN CASCADE SAS
b311480e 4--
973c2be1 5-- This file is part of Open CASCADE Technology software library.
b311480e 6--
d5f74e42 7-- This library is free software; you can redistribute it and/or modify it under
8-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9-- by the Free Software Foundation, with special exception defined in the file
10-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 12--
973c2be1 13-- Alternatively, this file may be used under the terms of Open CASCADE
14-- commercial license or contractual agreement.
7fd59977 15
16class ProgressScale from Message
17
18 ---Purpose: Internal data structure for scale in ProgressIndicator
19 --
20 -- Basically it defines three things:
21 -- - name that can be used for generating user messages
22 -- - limits and characteristics of the current scale,
23 -- along with derived coefficients to map it into basic scale [0-1]
24 -- - methods for conversion of values from current scale
25 -- to basic one and back
26 --
27 -- NOTE: There is no special protection against bad input data
28 -- like min > max etc. except cases when it can cause exception
29
30uses
31 HAsciiString from TCollection
32is
33
34 Create returns ProgressScale from Message;
35 ---Purpose: Creates scale ranged from 0 to 100 with step 1
36
37 ---Scope: Access to fields
38
39 SetName(me : out; theName : CString);
40 ---C++:inline
41 SetName(me : out; theName : HAsciiString from TCollection);
42 ---C++:inline
43 ---Purpose: Sets scale name
44
45 GetName(me) returns HAsciiString from TCollection;
46 ---C++:inline
47 ---Purpose: Gets scale name
48 -- Name may be Null handle if not set
49
50 SetMin(me : out; theMin : Real);
51 ---C++:inline
52 ---Purpose: Sets minimum value of scale
53
54 GetMin(me) returns Real;
55 ---C++:inline
56 ---Purpose: Gets minimum value of scale
57
58 SetMax(me : out; theMax : Real);
59 ---C++:inline
60 ---Purpose: Sets minimum value of scale
61
62 GetMax(me) returns Real;
63 ---C++:inline
64 ---Purpose: Gets minimum value of scale
65
66 SetRange (me: out; min, max: Real);
67 ---C++: inline
68 ---Purpose: Set both min and max
69
70 SetStep(me : out; theStep : Real);
71 ---C++:inline
72 ---Purpose: Sets default step
73
74 GetStep(me) returns Real;
75 ---C++:inline
76 ---Purpose: Gets default step
77
78 SetInfinite(me : out; theInfinite : Boolean = Standard_True);
79 ---C++:inline
80 ---Purpose: Sets flag for infinite scale
81
82 GetInfinite(me) returns Boolean;
83 ---C++:inline
84 ---Purpose: Gets flag for infinite scale
85
86 SetScale (me: out; min, max, step: Real; theInfinite : Boolean = Standard_True);
87 ---C++: inline
88 ---Purpose: Set all scale parameters
89
90 ---Scope: Mapping to base scale
91
92 SetSpan (me: out; first, last: Real);
93 ---C++: inline
94 ---Purpose: Defines span occupied by the scale on the basis scale
95
96 GetFirst (me) returns Real;
97 ---C++: inline
98 GetLast (me) returns Real;
99 ---C++: inline
100 ---Purpose: Return information on span occupied by the scale on the base scale
101
102 LocalToBase (me; val: Real) returns Real;
103 BaseToLocal (me; val: Real) returns Real;
104 ---Purpose: Convert value from this scale to base one and back
105
106fields
107
108 myName: HAsciiString from TCollection; -- name
109
110 myMin, myMax: Real; -- range of a scale
111 myStep : Real; -- default step
112 myInfinite: Boolean; -- flag for infinite scale
113
114 myFirst, myLast : Real; -- span on base scale
115
116end ProgressScale;