1 // Created by: NW,JPB,CAL,GG
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and / or modify it
8 // under the terms of the GNU Lesser General Public 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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // Modified: GG 28/11/00 G002
17 // Add BackgroundImage() and BackgroundFillMethod() methods
22 //-Design Creation d'une fenetre
33 #include <Aspect_Window.ixx>
37 //-Global data definitions
43 Aspect_Window::Aspect_Window()
45 MyGradientBackground(),
46 MyBackgroundFillMethod(Aspect_FM_NONE)
50 Aspect_Background Aspect_Window::Background() const
55 Aspect_FillMethod Aspect_Window::BackgroundFillMethod() const
57 return MyBackgroundFillMethod;
60 Aspect_GradientBackground Aspect_Window::GradientBackground() const
62 return MyGradientBackground;
65 Standard_Boolean Aspect_Window::IsVirtual() const
70 void Aspect_Window::SetVirtual (const Standard_Boolean theVirtual)
72 MyIsVirtual = theVirtual;
75 void Aspect_Window::SetBackground (const Aspect_Background& theBackground)
77 SetBackground (theBackground.Color());
80 void Aspect_Window::SetBackground (const Quantity_NameOfColor theNameOfColor)
82 MyBackground.SetColor (theNameOfColor);
85 void Aspect_Window::SetBackground (const Quantity_Color& theColor)
87 MyBackground.SetColor (theColor);
90 void Aspect_Window::SetBackground (const Aspect_GradientBackground& theBackground)
92 Quantity_Color aFirstColor, aSecondColor;
93 theBackground.Colors (aFirstColor, aSecondColor);
94 SetBackground (aFirstColor, aSecondColor, theBackground.BgGradientFillMethod());
97 void Aspect_Window::SetBackground (const Quantity_Color& theFirstColor,
98 const Quantity_Color& theSecondColor,
99 const Aspect_GradientFillMethod theFillMethod)
101 MyGradientBackground.SetColors (theFirstColor, theSecondColor, theFillMethod);