Correction of unstable testing cases
[occt.git] / src / WNT / WNT_ImageManager.cdl
CommitLineData
b311480e 1-- Created on: 1996-03-11
2-- Created by: PLOTNIKOV Eugeny <eugeny@maniax>
3-- Copyright (c) 1996-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21-- Modifications: PLOTNIKOV Eugeny at July 1998 (BUC60286)
7fd59977 22
23
24class ImageManager from WNT inherits TShared from MMgt
25
26 ---Purpose: This class defines image management
27
28 uses
29
30 Handle from Aspect,
31 Window from WNT,
32 SequenceOfImage from WNT,
33 TypeOfImage from WNT,
34 Image from WNT,
35 WindowPtr from WNT
36
37 is
38
39 Create ( aWindow : WindowPtr from WNT )
40 returns mutable ImageManager from WNT;
41 ---Purpose: Creates a class instance
42
43 Destroy ( me : mutable )
44 is virtual;
45 ---Purpose: Deletes all resources associated with the class instance.
46 ---C++: alias ~
47
48 SetFormat ( me : mutable; aFormat : TypeOfImage from WNT = WNT_TOI_XWD )
49 is static;
50 ---Purpose: Sets image format for output.
51
52 Add ( me : mutable; anImage : Image from WNT )
53 is static;
54 ---Purpose: Adds <anImage> to manager.
55
56 Image ( me : mutable; anIndex : Integer from Standard )
57 returns Image from WNT is static;
58 ---Purpose: returns Image stored at <anIndex>.
59
60 Load ( me : mutable; aFileName : CString from Standard )
61 returns Integer from Standard
62 is static;
63 ---Purpose: Loads image from file and returns its index in the
64 -- sequence.
65 -- Warning: Returns 0 if loading was failed.
66
67 Save (
68 me;
69 aFileName : CString from Standard;
70 aX, aY, aWidth, aHeight : Integer from Standard
71 )
72 returns Boolean from Standard
73 is static;
74 ---Purpose: Stories image to the file according to <myFormat>
75 -- class field. Returns True on success, otherwise
76 -- returns False.
77
78 SaveBuffer (
79 me;
80 aFileName : CString from Standard;
81 aX, aY, aWidth, aHeight : Integer from Standard
82 )
83 returns Boolean from Standard
84 is static;
85 ---Purpose: Stories contents of the double buffer window pixmap.
86 -- See "Save" method.
87
88 Draw (
89 me : mutable;
90 anIndex : Integer from Standard;
91 Xc, Yc : Integer from Standard;
92 aWidth : Integer from Standard;
93 aHeight : Integer from Standard;
94 anAngle : Real from Standard = 0.0
95 )
96 is static;
97 ---Purpose: Displays the image according to the DoubleBuffer state
98 -- of the associated window.
99
100 Delete ( me : mutable; anIndex : Integer from Standard )
101 is static;
102 ---Purpose: Deletes an image at index <anIndex>.
103
104 Discard ( me : mutable; anIndex : Integer from Standard )
105 is static;
106 ---Purpose: Places an image to the trash
107
108 Scale (
109 me : mutable;
110 anIndex : Integer from Standard;
111 aScaleX : Real from Standard;
112 aScaleY : Real from Standard;
113 aReplace : Boolean from Standard = Standard_False
114 ) returns Handle from Aspect is static;
115 ---Purpose: Scales the specified image.
116
117 Size ( me ) returns Integer from Standard is static;
118 ---Purpose: Returns number of loaded images.
119
120 ImageHandle (
121 me : mutable;
122 anIndex : Integer from Standard
123 ) returns Handle from Aspect is static;
124 ---Purpose: Returns image handle.
125
126 Dim (
127 me : mutable;
128 anIndex : Integer from Standard;
129 aWidth, aHeight : out Integer from Standard
130 )
131 is static;
132 ---Purpose: Returns image dimensions.
133
134 HashCode (
135 me : mutable;
136 anIndex : Integer from Standard
137 )
138 returns Integer from Standard is redefined static;
139 ---Purpose: Returns image's hash code.
140
141 Index (
142 me : mutable;
143 aHashCode : Integer from Standard
144 )
145 returns Integer from Standard is static;
146 ---Purpose: Returns image's index.
147
148 StringHashCode (
149 me : mutable;
150 aString : CString from Standard
151 )
152 returns Integer from Standard is static;
153 ---Purpose: Returns hash code of the string.
154
155 Open (
156 me : mutable;
157 aDC : Handle from Aspect;
158 aWidth : Integer from Standard;
159 aHeight : Integer from Standard;
160 aHashCode : Integer from Standard
161 )
162 returns Integer from Standard is static;
163 ---Purpose: Creates new empty image and returns its index
164
165 fields
166
167 myWindow : Address from Standard is protected;
168 myImages : SequenceOfImage from WNT is protected;
169 myTrash : SequenceOfImage from WNT is protected;
170 myFormat : TypeOfImage from WNT is protected;
171 myLastImage : Image from WNT is protected;
172 myLastIndex : Integer from Standard is protected;
173
174 friends
175
7fd59977 176 class Window from WNT
177
178end ImageManager;