1 -- Created on: 1996-01-26
2 -- Created by: PLOTNIKOV Eugeny
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Window from WNT inherits Window from Aspect
19 ---Purpose: This class defines Windows NT window
24 TypeOfResize from Aspect,
25 NameOfColor from Quantity,
34 WindowDefinitionError from Aspect,
35 WindowError from Aspect
39 Create (theTitle : CString from Standard;
40 theClass : WClass from WNT;
41 theStyle : Dword from WNT;
42 thePxLeft : Integer from Standard;
43 thePxTop : Integer from Standard;
44 thePxWidth : Integer from Standard;
45 thePxHeight : Integer from Standard;
46 theBackColor : NameOfColor from Quantity = Quantity_NOC_MATRAGRAY;
47 theParent : Handle from Aspect = 0;
48 theMenu : Handle from Aspect = 0;
49 theClientStruct : Address from Standard = 0)
50 returns Window from WNT
52 ---Purpose: Creates a Window defined by his position and size
53 -- in pixles from the Parent Window.
54 -- Trigger: Raises WindowDefinitionError if the Position out of the
55 -- Screen Space or the window creation failed.
56 raises WindowDefinitionError from Aspect;
59 aHandle : Handle from Aspect;
60 aBackColor : NameOfColor from Quantity = Quantity_NOC_MATRAGRAY
62 returns Window from WNT;
64 ---Purpose: Creates a Window based on the existing window handle.
65 -- This handle equals ( aPart1 << 16 ) + aPart2.
67 Destroy ( me : mutable )
70 ---Purpose: Destroies the Window and all resourses attached to it.
74 ---------------------------------------------------
75 -- Category: Methods to modify the class definition
76 ---------------------------------------------------
78 SetCursor ( me; aCursor : Handle from Aspect )
81 ---Purpose: Sets cursor <aCursor> for ENTIRE WINDOW CLASS to which
82 -- the Window belongs.
87 ---Purpose: Opens the window <me>.
89 Map ( me; aMapMode : Integer from Standard )
92 ---Purpose: Opens a window <me> according to <aMapMode>.
93 -- This method is specific to Windows NT.
94 -- <aMapMode> can be one of SW_xxx constants defined
95 -- in <windows.h>. See documentation.
100 ---Purpose: Closes the window <me>.
103 returns TypeOfResize from Aspect
105 ---Purpose: Applies the resizing to the window <me>.
106 raises WindowError from Aspect is virtual;
108 DoMapping ( me ) returns Boolean from Standard
109 raises WindowError from Aspect is virtual;
112 ---Purpose: Apply the mapping change to the window <me>
113 -- and returns TRUE if the window is mapped at screen.
114 ---Category: Methods to modify the class definition
116 SetPos ( me : mutable; X, Y, X1, Y1 : Integer from Standard )
119 ---Purpose: Changes variables due to window position.
121 ----------------------------
122 -- Category: Inquire methods
123 ----------------------------
126 returns Boolean from Standard is virtual;
128 ---Purpose: Returns True if the window <me> is opened
129 -- and False if the window is closed.
132 returns Ratio from Quantity is virtual;
134 ---Purpose: Returns The Window RATIO equal to the physical
135 -- WIDTH/HEIGHT dimensions.
139 X1 : out Integer from Standard;
140 Y1 : out Integer from Standard;
141 X2 : out Integer from Standard;
142 Y2 : out Integer from Standard
146 ---Purpose: Returns The Window POSITION in PIXEL
150 Width : out Integer from Standard;
151 Height : out Integer from Standard
155 ---Purpose: Returns The Window SIZE in PIXEL
158 returns Handle from Aspect is static;
160 ---Purpose: Returns the Windows NT handle of the created window <me>.
164 returns Handle from Aspect is static;
166 ---Purpose: Returns the Windows NT handle parent of the created window <me>.
171 aXLeft : Integer from Standard is protected; -- Window coordinates
172 aYTop : Integer from Standard is protected;
173 aXRight : Integer from Standard is protected;
174 aYBottom : Integer from Standard is protected;
175 myWClass : WClass from WNT is protected; -- Window class
176 myHWindow : Handle from Aspect is protected; -- Window handle
177 myHParentWindow : Handle from Aspect is protected; -- Parent window handle
178 myIsForeign : Boolean from Standard is protected;