0025147: Visualization, TKOpenGl - support EGL as alternative to GLX
[occt.git] / src / Aspect / Aspect_Window.cdl
1 -- Created by: NW,JPB,CAL
2 -- Copyright (c) 1991-1999 Matra Datavision
3 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
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
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.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 deferred class Window from Aspect
17         ---Purpose: Defines a window.
18 inherits
19         TShared from MMgt
20
21 uses
22         Background         from Aspect,
23         Drawable           from Aspect,
24         GradientBackground from Aspect,
25         TypeOfResize       from Aspect,
26         FillMethod         from Aspect,
27         GradientFillMethod from Aspect,
28         Handle             from Aspect,
29         Ratio              from Quantity,
30         Parameter          from Quantity,
31         NameOfColor        from Quantity,
32         Color              from Quantity,
33         AsciiString        from TCollection
34
35 raises
36         WindowDefinitionError   from Aspect,
37         WindowError     from Aspect
38
39 is
40         Initialize;
41         ---Level: Public
42         ---Purpose: Initializes the datas of a Window.
43
44         ---------------------------------------------------
45         -- Category: Methods to modify the class definition
46         ---------------------------------------------------
47
48         SetBackground ( me      : mutable;
49                         ABack   : Background from Aspect );
50         ---Level: Public
51         ---Purpose: Modifies the window background.
52         ---Category: Methods to modify the class definition
53
54     SetBackground ( me : mutable ;
55                     theNameOfColor : NameOfColor from Quantity );
56     ---Level: Public
57     ---Purpose: Modifies the window background from a Named Color.
58     ---Category: Methods to modify the class definition
59
60     SetBackground ( me : mutable; color : Color from Quantity );
61     ---Level: Public
62     ---Purpose: Modifies the window background.
63     ---Category: Methods to modify the class definition
64
65     SetBackground( me: mutable;
66                    ABackground: GradientBackground from Aspect);
67     ---Level: Public
68     ---Purpose: Modifies the window gradient background.
69     ---Category: Methods to modify the class definition
70
71     SetBackground( me: mutable;
72                    theFirstColor:  Color from Quantity;
73                    theSecondColor: Color from Quantity;
74                    theFillMethod:  GradientFillMethod from Aspect);
75     ---Level: Public
76     ---Purpose: Modifies the window gradient background.
77     ---Category: Methods to modify the class definition
78
79         Map ( me )
80                 raises WindowError from Aspect is deferred;
81         ---Level: Public
82         ---Purpose: Opens the window <me>.
83         ---Category: Methods to modify the class definition
84
85         Unmap ( me )
86                 raises WindowError from Aspect is deferred;
87         ---Level: Public
88         ---Purpose: Closes the window <me>.
89         ---Category: Methods to modify the class definition
90
91         DoResize ( me ) returns TypeOfResize from Aspect
92                 raises WindowError from Aspect is deferred;
93         ---Level: Advanced
94         ---Purpose: Apply the resizing to the window <me>.
95         ---Category: Methods to modify the class definition
96
97         DoMapping ( me ) returns Boolean from Standard
98                 raises WindowError from Aspect is deferred;
99         ---Level: Advanced
100         ---Purpose: Apply the mapping change to the window <me>.
101         -- and returns TRUE if the window is mapped at screen.
102         ---Category: Methods to modify the class definition
103
104         Destroy ( me : mutable )
105                 raises WindowError from Aspect is deferred;
106         ---Level: Advanced
107         ---Purpose: Destroy the Window
108         ---Category: Methods to modify the class definition
109
110         ----------------------------
111         -- Category: Inquire methods
112         ----------------------------
113
114         Background ( me ) returns Background from Aspect;
115         ---Level: Public
116         ---Purpose: Returns the window background.
117         ---Category: Inquire methods
118
119         BackgroundFillMethod( me ) returns FillMethod from Aspect;
120         ---Level: Public
121         ---Purpose: Returns the current image background fill mode.
122
123         GradientBackground ( me ) returns GradientBackground from Aspect;
124         ---Level: Public
125         ---Purpose: Returns the window gradient background.
126
127         IsMapped ( me ) returns Boolean from Standard is deferred;
128         ---Level: Public
129         ---Purpose: Returns True if the window <me> is opened
130         --          and False if the window is closed.
131         ---Category: Inquire methods
132
133         IsVirtual ( me ) returns Boolean from Standard;
134         ---Level: Public
135         ---Purpose: Returns True if the window <me> is virtual
136         ---Category: Inquire methods
137
138         SetVirtual ( me : mutable;
139                      theVirtual : Boolean from Standard );
140         ---Level: Public
141         ---Purpose: Setup the virtual state
142         ---Category: Inquire methods
143
144         Ratio ( me ) returns Ratio from Quantity is deferred;
145         ---Level: Public
146         ---Purpose: Returns The Window RATIO equal to the physical
147         --          WIDTH/HEIGHT dimensions
148         ---Category: Inquire methods
149
150         Position ( me ;
151                 X1, Y1, X2, Y2 : out Integer from Standard )
152         is deferred;
153         ---Level: Public
154         ---Purpose: Returns The Window POSITION in PIXEL
155         ---Category: Inquire methods
156
157         Size ( me ;
158                Width, Height : out Integer from Standard )
159         is deferred;
160         ---Level: Public
161         ---Purpose: Returns The Window SIZE in PIXEL
162         ---Category: Inquire methods
163
164         NativeHandle ( me ) returns Drawable from Aspect is deferred;
165         ---Purpose: Returns native Window handle (HWND on Windows, Window with Xlib, and so on)
166
167         NativeParentHandle ( me ) returns Drawable from Aspect is deferred;
168         ---Purpose: Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
169
170 fields
171         MyBackground : Background from Aspect is protected;
172         MyGradientBackground   : GradientBackground from Aspect is protected;
173         MyBackgroundFillMethod : FillMethod from Aspect is protected;
174         MyIsVirtual : Boolean from Standard is protected;
175 end Window;