0024624: Lost word in license statement in source files
[occt.git] / src / Aspect / Aspect_Window.cxx
CommitLineData
b311480e 1// Created by: NW,JPB,CAL,GG
2// Copyright (c) 1991-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
7fd59977 16// Modified: GG 28/11/00 G002
17// Add BackgroundImage() and BackgroundFillMethod() methods
18
7fd59977 19
20//-Version
21
22//-Design Creation d'une fenetre
23
24//-Warning
25
26//-References
27
28//-Language C++ 2.0
29
30//-Declarations
31
32// for the class
33#include <Aspect_Window.ixx>
34
35//-Aliases
36
37//-Global data definitions
38
39//-Destructors
40
41//-Constructors
42
dc3fe572 43Aspect_Window::Aspect_Window()
44: MyBackground(),
7fd59977 45 MyGradientBackground(),
dc3fe572 46 MyBackgroundFillMethod(Aspect_FM_NONE)
7fd59977 47{
48}
49
7fd59977 50Aspect_Background Aspect_Window::Background() const
51{
52 return MyBackground;
53}
54
7fd59977 55Aspect_FillMethod Aspect_Window::BackgroundFillMethod() const
56{
57 return MyBackgroundFillMethod;
58}
59
60Aspect_GradientBackground Aspect_Window::GradientBackground() const
61{
62 return MyGradientBackground;
63}
64
65Standard_Boolean Aspect_Window::IsVirtual() const
66{
67 return MyIsVirtual;
68}
69
70void Aspect_Window::SetVirtual (const Standard_Boolean theVirtual)
71{
72 MyIsVirtual = theVirtual;
73}
dc3fe572 74
75void Aspect_Window::SetBackground (const Aspect_Background& theBackground)
76{
77 SetBackground (theBackground.Color());
78}
79
80void Aspect_Window::SetBackground (const Quantity_NameOfColor theNameOfColor)
81{
82 MyBackground.SetColor (theNameOfColor);
83}
84
85void Aspect_Window::SetBackground (const Quantity_Color& theColor)
86{
87 MyBackground.SetColor (theColor);
88}
89
90void Aspect_Window::SetBackground (const Aspect_GradientBackground& theBackground)
91{
92 Quantity_Color aFirstColor, aSecondColor;
93 theBackground.Colors (aFirstColor, aSecondColor);
94 SetBackground (aFirstColor, aSecondColor, theBackground.BgGradientFillMethod());
95}
96
97void Aspect_Window::SetBackground (const Quantity_Color& theFirstColor,
98 const Quantity_Color& theSecondColor,
99 const Aspect_GradientFillMethod theFillMethod)
100{
101 MyGradientBackground.SetColors (theFirstColor, theSecondColor, theFillMethod);
102}