0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[occt.git] / src / Aspect / Aspect_Window.hxx
CommitLineData
42cf5bc1 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#ifndef _Aspect_Window_HeaderFile
17#define _Aspect_Window_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <Aspect_Background.hxx>
23#include <Aspect_GradientBackground.hxx>
b6bf4ec1 24#include <Aspect_FBConfig.hxx>
42cf5bc1 25#include <Aspect_FillMethod.hxx>
26#include <Standard_Boolean.hxx>
27#include <MMgt_TShared.hxx>
87432b82 28#include <Quantity_Color.hxx>
42cf5bc1 29#include <Aspect_GradientFillMethod.hxx>
30#include <Aspect_TypeOfResize.hxx>
42cf5bc1 31#include <Standard_Integer.hxx>
32#include <Aspect_Drawable.hxx>
33class Aspect_WindowDefinitionError;
34class Aspect_WindowError;
35class Aspect_Background;
42cf5bc1 36class Aspect_GradientBackground;
37
42cf5bc1 38class Aspect_Window;
39DEFINE_STANDARD_HANDLE(Aspect_Window, MMgt_TShared)
40
41//! Defines a window.
42class Aspect_Window : public MMgt_TShared
43{
44
45public:
42cf5bc1 46
47 //! Modifies the window background.
48 Standard_EXPORT void SetBackground (const Aspect_Background& ABack);
87432b82 49
42cf5bc1 50 //! Modifies the window background.
51 Standard_EXPORT void SetBackground (const Quantity_Color& color);
52
53 //! Modifies the window gradient background.
54 Standard_EXPORT void SetBackground (const Aspect_GradientBackground& ABackground);
55
56 //! Modifies the window gradient background.
57 Standard_EXPORT void SetBackground (const Quantity_Color& theFirstColor, const Quantity_Color& theSecondColor, const Aspect_GradientFillMethod theFillMethod);
58
59 //! Opens the window <me>.
60 Standard_EXPORT virtual void Map() const = 0;
61
62 //! Closes the window <me>.
63 Standard_EXPORT virtual void Unmap() const = 0;
64
65 //! Apply the resizing to the window <me>.
66 Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const = 0;
67
68 //! Apply the mapping change to the window <me>.
69 //! and returns TRUE if the window is mapped at screen.
70 Standard_EXPORT virtual Standard_Boolean DoMapping() const = 0;
71
42cf5bc1 72 //! Returns the window background.
73 Standard_EXPORT Aspect_Background Background() const;
74
75 //! Returns the current image background fill mode.
76 Standard_EXPORT Aspect_FillMethod BackgroundFillMethod() const;
77
78 //! Returns the window gradient background.
79 Standard_EXPORT Aspect_GradientBackground GradientBackground() const;
80
81 //! Returns True if the window <me> is opened
82 //! and False if the window is closed.
83 Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0;
84
85 //! Returns True if the window <me> is virtual
86 Standard_EXPORT Standard_Boolean IsVirtual() const;
87
88 //! Setup the virtual state
89 Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual);
90
91 //! Returns The Window RATIO equal to the physical
92 //! WIDTH/HEIGHT dimensions
ee2be2a8 93 Standard_EXPORT virtual Standard_Real Ratio() const = 0;
42cf5bc1 94
95 //! Returns The Window POSITION in PIXEL
96 Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_Integer& Y1, Standard_Integer& X2, Standard_Integer& Y2) const = 0;
97
98 //! Returns The Window SIZE in PIXEL
99 Standard_EXPORT virtual void Size (Standard_Integer& Width, Standard_Integer& Height) const = 0;
100
101 //! Returns native Window handle (HWND on Windows, Window with Xlib, and so on)
102 Standard_EXPORT virtual Aspect_Drawable NativeHandle() const = 0;
103
104 //! Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
105 Standard_EXPORT virtual Aspect_Drawable NativeParentHandle() const = 0;
106
b6bf4ec1 107 //! Returns native Window FB config (GLXFBConfig on Xlib)
108 Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0;
42cf5bc1 109
92efcf78 110 DEFINE_STANDARD_RTTIEXT(Aspect_Window,MMgt_TShared)
42cf5bc1 111
112protected:
113
42cf5bc1 114 //! Initializes the datas of a Window.
115 Standard_EXPORT Aspect_Window();
116
87432b82 117protected:
118
42cf5bc1 119 Aspect_Background MyBackground;
120 Aspect_GradientBackground MyGradientBackground;
121 Aspect_FillMethod MyBackgroundFillMethod;
122 Standard_Boolean MyIsVirtual;
123
42cf5bc1 124};
125
42cf5bc1 126#endif // _Aspect_Window_HeaderFile