1 // Copyright (c) 2016 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <Aspect_NeutralWindow.hxx>
16 IMPLEMENT_STANDARD_RTTIEXT(Aspect_NeutralWindow, Aspect_Window)
18 // =======================================================================
19 // function : Aspect_NeutralWindow
21 // =======================================================================
22 Aspect_NeutralWindow::Aspect_NeutralWindow()
30 myIsMapped (Standard_True) {}
32 // =======================================================================
33 // function : SetNativeHandles
35 // =======================================================================
36 Standard_Boolean Aspect_NeutralWindow::SetNativeHandles (Aspect_Drawable theWindow,
37 Aspect_Drawable theParentWindow,
38 Aspect_FBConfig theFbConfig)
40 if (myHandle == theWindow
41 && myParentHandle == theParentWindow
42 && myFBConfig == theFbConfig)
44 return Standard_False;
48 myParentHandle = theParentWindow;
49 myFBConfig = theFbConfig;
53 // =======================================================================
54 // function : SetPosition
56 // =======================================================================
57 Standard_Boolean Aspect_NeutralWindow::SetPosition (Standard_Integer theX1,
58 Standard_Integer theY1)
63 return Standard_False;
71 // =======================================================================
72 // function : SetPosition
74 // =======================================================================
75 Standard_Boolean Aspect_NeutralWindow::SetPosition (Standard_Integer theX1, Standard_Integer theY1,
76 Standard_Integer theX2, Standard_Integer theY2)
78 Standard_Integer aWidthNew = theX2 - theX1;
79 Standard_Integer aHeightNew = theY2 - theY1;
82 && myWidth == aWidthNew
83 && myHeight == aHeightNew)
85 return Standard_False;
91 myHeight = aHeightNew;
95 // =======================================================================
98 // =======================================================================
99 Standard_Boolean Aspect_NeutralWindow::SetSize (const Standard_Integer theWidth,
100 const Standard_Integer theHeight)
102 if (myWidth == theWidth
103 && myHeight == theHeight)
105 return Standard_False;
109 myHeight = theHeight;
110 return Standard_True;