0025147: Visualization, TKOpenGl - support EGL as alternative to GLX
[occt.git] / src / WNT / WNT_Window.cdl
CommitLineData
b311480e 1-- Created on: 1996-01-26
2-- Created by: PLOTNIKOV Eugeny
3-- Copyright (c) 1996-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 17class Window from WNT inherits Window from Aspect
18
19 ---Purpose: This class defines Windows NT window
7fd59977 20
21 uses
22
23 Handle from Aspect,
25b97fac 24 Drawable from Aspect,
7fd59977 25 TypeOfResize from Aspect,
7fd59977 26 NameOfColor from Quantity,
27 Color from Quantity,
7fd59977 28 Ratio from Quantity,
7fd59977 29 WClass from WNT,
30 Uint from WNT,
eaf5c5e0 31 Dword from WNT
7fd59977 32
33 raises
34
35 WindowDefinitionError from Aspect,
36 WindowError from Aspect
37
38 is
dc3fe572 39
40 Create (theTitle : CString from Standard;
7fd59977 41 theClass : WClass from WNT;
42 theStyle : Dword from WNT;
43 thePxLeft : Integer from Standard;
44 thePxTop : Integer from Standard;
45 thePxWidth : Integer from Standard;
46 thePxHeight : Integer from Standard;
47 theBackColor : NameOfColor from Quantity = Quantity_NOC_MATRAGRAY;
48 theParent : Handle from Aspect = 0;
49 theMenu : Handle from Aspect = 0;
50 theClientStruct : Address from Standard = 0)
6e33d3ce 51 returns Window from WNT
7fd59977 52 ---Level: Public
53 ---Purpose: Creates a Window defined by his position and size
54 -- in pixles from the Parent Window.
55 -- Trigger: Raises WindowDefinitionError if the Position out of the
56 -- Screen Space or the window creation failed.
57 raises WindowDefinitionError from Aspect;
58
59 Create (
7fd59977 60 aHandle : Handle from Aspect;
61 aBackColor : NameOfColor from Quantity = Quantity_NOC_MATRAGRAY
62 )
6e33d3ce 63 returns Window from WNT;
7fd59977 64 ---Level: Public
65 ---Purpose: Creates a Window based on the existing window handle.
66 -- This handle equals ( aPart1 << 16 ) + aPart2.
67
7fd59977 68 Destroy ( me : mutable )
69 is virtual;
70 ---Level: Public
71 ---Purpose: Destroies the Window and all resourses attached to it.
72 ---C++: alias ~
73
74
75 ---------------------------------------------------
76 -- Category: Methods to modify the class definition
77 ---------------------------------------------------
78
7fd59977 79 SetCursor ( me; aCursor : Handle from Aspect )
80 is static;
81 ---Level: Public
82 ---Purpose: Sets cursor <aCursor> for ENTIRE WINDOW CLASS to which
83 -- the Window belongs.
84
7fd59977 85 Map ( me )
86 is virtual;
87 ---Level: Public
88 ---Purpose: Opens the window <me>.
89
90 Map ( me; aMapMode : Integer from Standard )
91 is static;
92 ---Level: Public
93 ---Purpose: Opens a window <me> according to <aMapMode>.
94 -- This method is specific to Windows NT.
95 -- <aMapMode> can be one of SW_xxx constants defined
96 -- in <windows.h>. See documentation.
97
98 Unmap ( me )
99 is virtual;
100 ---Level: Public
101 ---Purpose: Closes the window <me>.
102
103 DoResize ( me )
104 returns TypeOfResize from Aspect
105 ---Level: Public
106 ---Purpose: Applies the resizing to the window <me>.
107 raises WindowError from Aspect is virtual;
108
109 DoMapping ( me ) returns Boolean from Standard
110 raises WindowError from Aspect is virtual;
eaf5c5e0 111 ---C++: inline
7fd59977 112 ---Level: Advanced
113 ---Purpose: Apply the mapping change to the window <me>
114 -- and returns TRUE if the window is mapped at screen.
115 ---Category: Methods to modify the class definition
116
7fd59977 117 SetPos ( me : mutable; X, Y, X1, Y1 : Integer from Standard )
118 is static;
119 ---Level: Internal
120 ---Purpose: Changes variables due to window position.
121
7fd59977 122 ----------------------------
123 -- Category: Inquire methods
124 ----------------------------
125
7fd59977 126 IsMapped ( me )
127 returns Boolean from Standard is virtual;
128 ---Level: Public
129 ---Purpose: Returns True if the window <me> is opened
130 -- and False if the window is closed.
131
132 Ratio ( me )
133 returns Ratio from Quantity is virtual;
134 ---Level: Public
135 ---Purpose: Returns The Window RATIO equal to the physical
136 -- WIDTH/HEIGHT dimensions.
137
138 Position (
139 me;
7fd59977 140 X1 : out Integer from Standard;
141 Y1 : out Integer from Standard;
142 X2 : out Integer from Standard;
143 Y2 : out Integer from Standard
144 )
145 is virtual;
146 ---Level: Public
147 ---Purpose: Returns The Window POSITION in PIXEL
148
149 Size (
150 me;
7fd59977 151 Width : out Integer from Standard;
152 Height : out Integer from Standard
153 )
154 is virtual;
155 ---Level: Public
156 ---Purpose: Returns The Window SIZE in PIXEL
157
7fd59977 158 HWindow ( me )
159 returns Handle from Aspect is static;
160 ---Level: Public
161 ---Purpose: Returns the Windows NT handle of the created window <me>.
162 ---C++: inline
163
164 HParentWindow ( me )
165 returns Handle from Aspect is static;
166 ---Level: Public
167 ---Purpose: Returns the Windows NT handle parent of the created window <me>.
168 ---C++: inline
169
25b97fac 170 NativeHandle ( me ) returns Drawable from Aspect is virtual;
171 ---Purpose: Returns native Window handle (HWND)
172 ---C++: inline
173
174 NativeParentHandle ( me ) returns Drawable from Aspect is virtual;
175 ---Purpose: Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
176 ---C++: inline
177
7fd59977 178 fields
179
180 aXLeft : Integer from Standard is protected; -- Window coordinates
181 aYTop : Integer from Standard is protected;
182 aXRight : Integer from Standard is protected;
183 aYBottom : Integer from Standard is protected;
184 myWClass : WClass from WNT is protected; -- Window class
185 myHWindow : Handle from Aspect is protected; -- Window handle
186 myHParentWindow : Handle from Aspect is protected; -- Parent window handle
eaf5c5e0 187 myIsForeign : Boolean from Standard is protected;
7fd59977 188
7fd59977 189end Window;