# Visualization
TKService
Aspect

# Aspect_Window Class Reference

This class allows the definition of a window
Warning: The position and size for the creation of the window
are defined in Device Screen Unit (DSU)
floating [0,1] space.
.

`#include <Aspect_Window.hxx>`

Inheritance diagram for Aspect_Window:

[legend]

## Public Member Functions

virtual Standard_EXPORT void | SetBackground (const Aspect_Background &ABack)=0
| Modifies the window background. .
virtual Standard_EXPORT void | SetBackground (const Quantity_NameOfColor BackColor)=0
| Modifies the window background from a Named Color. .
virtual Standard_EXPORT void | SetBackground (const Quantity_Color &color)=0
| Modifies the window background. .
virtual Standard_EXPORT Standard_Boolean | SetBackground (const Standard_CString aName, const Aspect_FillMethod aMethod=Aspect_FM_CENTERED)=0
| Loads the window background from an image file <aname> defined with a supported format XWD,GIF or BMP and returns TRUE if the operation is successfull. .
virtual Standard_EXPORT void | SetBackground (const Aspect_Handle aBitmap)=0
| Loads the window background from a predefined bitmap. Warning: the bitmap and window must have the same depth. .
virtual Standard_EXPORT void | SetDoubleBuffer (const Standard_Boolean DBmode)=0
| Activates/Deactivates the Double Buffering capability for this window. Warning: Double Buffering is always DISABLE by default If there is not enought ressources to activate the double-buffering the DB mode flag can be set to FALSE. .
virtual Standard_EXPORT void | Flush () const =0
| Flushs all graphics to the screen and Swap the Double buffer if Enable .
virtual Standard_EXPORT void | Map () const =0
| Opens the window <me>. .
virtual Standard_EXPORT void | Unmap () const =0
| Closes the window <me>. .
virtual Standard_EXPORT Aspect_TypeOfResize | DoResize () const =0
| Apply the resizing to the window <me>. .
virtual Standard_EXPORT Standard_Boolean | DoMapping () const =0
| Apply the mapping change to the window <me>. and returns TRUE if the window is mapped at screen. .
virtual Standard_EXPORT void | Destroy ()=0
| Destroy the Window .
virtual Standard_EXPORT void | Clear () const =0
| Clear The Window in the Background Color .
virtual Standard_EXPORT void | ClearArea (const Standard_Integer XCenter, const Standard_Integer YCenter, const Standard_Integer Width, const Standard_Integer Height) const =0
| Clear The Window Area defined in PIXELS in the Background Color .
virtual Standard_EXPORT void | Restore () const =0
| Restore the BackingStored Window <me>. .
virtual Standard_EXPORT void | RestoreArea (const Standard_Integer XCenter, const Standard_Integer YCenter, const Standard_Integer Width, const Standard_Integer Height) const =0
| Restore the BackingStored Window Area defined in PIXELS. .
virtual Standard_EXPORT Standard_Boolean | Dump (const Standard_CString aFilename, const Standard_Real aGammaValue=1.0) const =0
| Dumps the Window to a XWD,GIF or BMP file with .
virtual Standard_EXPORT Standard_Boolean | DumpArea (const Standard_CString aFilename, const Standard_Integer Xc, const Standard_Integer Yc, const Standard_Integer Width, const Standard_Integer Height, const Standard_Real aGammaValue=1.0) const =0
| Dumps the Window Area defined by his center and PIXEL size to an XWD,GIF or BMP file with an optional gamma correction value according to the graphic system .
virtual Standard_EXPORT Standard_Boolean | Load (const Standard_CString aFilename) const =0
| Loads the XWD file to this Window. Returns TRUE if the loading occurs normaly. Warning: Note that the Window is enlarged automatically .
virtual Standard_EXPORT Standard_Boolean | LoadArea (const Standard_CString aFilename, const Standard_Integer Xc, const Standard_Integer Yc, const Standard_Integer Width, const Standard_Integer Height) const =0
| Loads the XWD file to Window Area defined by his center .
Standard_EXPORT Aspect_Background | Background () const
| Returns the window background. .
Standard_EXPORT Standard_CString | BackgroundImage () const
| Returns the current image background string or NULL if nothing is defined. .
Standard_EXPORT Aspect_FillMethod | BackgroundFillMethod () const
| Returns the current image background fill mode. .
Aspect_Handle | HBackground () const
| Returns the background bitmap handle or 0 when nothing is defined .
Standard_EXPORT Handle_Aspect_GraphicDevice | GraphicDevice () const
| Returns the Graphic Device associated to this Window. .
virtual Standard_EXPORT Standard_Boolean | IsMapped () const =0
| Returns True if the window <me> is opened and False if the window is closed. .
virtual Standard_EXPORT Quantity_Ratio | Ratio () const =0
| Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions .
virtual Standard_EXPORT void | Position (Quantity_Parameter &X1, Quantity_Parameter &Y1, Quantity_Parameter &X2, Quantity_Parameter &Y2) const =0
| Returns The Window POSITION in DSU .
virtual Standard_EXPORT void | Position (Standard_Integer &X1, Standard_Integer &Y1, Standard_Integer &X2, Standard_Integer &Y2) const =0
| Returns The Window POSITION in PIXEL .
virtual Standard_EXPORT void | Size (Quantity_Parameter &Width, Quantity_Parameter &Height) const =0
| Returns The Window SIZE in DSU .
virtual Standard_EXPORT void | Size (Standard_Integer &Width, Standard_Integer &Height) const =0
| Returns The Window SIZE in PIXEL .
virtual Standard_EXPORT void | MMSize (Standard_Real &Width, Standard_Real &Height) const =0
| Returns The Window SIZE in MM .
virtual Standard_EXPORT Quantity_Parameter | Convert (const Standard_Integer PV) const =0
| Returns the DSU value depending of the PIXEL value. .
virtual Standard_EXPORT Standard_Integer | Convert (const Quantity_Parameter DV) const =0
| Returns the PIXEL value depending of the DSU value. .
virtual Standard_EXPORT void | Convert (const Standard_Integer PX, const Standard_Integer PY, Quantity_Parameter &DX, Quantity_Parameter &DY) const =0
| Returns the DSU position depending of the PIXEL position. .
virtual Standard_EXPORT void | Convert (const Quantity_Parameter DX, const Quantity_Parameter DY, Standard_Integer &PX, Standard_Integer &PY) const =0
| Returns the PIXEL position depending of the DSU position. .
virtual Standard_EXPORT Standard_Boolean | BackingStore () const =0
| Returns the BackingStore capability for this Window . If Answer is True Exposure can be recovered by Restore RestoreArea methods . If Answer is False,Application must Redraw the exposed area. .
virtual Standard_EXPORT Standard_Boolean | DoubleBuffer () const =0
| Returns the DoubleBuffer state. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Member Functions

Standard_EXPORT | Aspect_Window (const Handle(Aspect_GraphicDevice)&aGraphicDevice)
| Initializes the datas of a Window. .

## Protected Attributes

Handle_Aspect_GraphicDevice | MyGraphicDevice
Aspect_Background | MyBackground
TCollection_AsciiString | MyBackgroundImage
Aspect_FillMethod | MyBackgroundFillMethod
Aspect_Handle | MyHBackground

## Constructor & Destructor Documentation

Standard_EXPORT Aspect_Window::Aspect_Window | ( | const Handle(Aspect_GraphicDevice)& | aGraphicDevice | ) | `[protected]`

## Member Function Documentation

Standard_EXPORT Aspect_Background Aspect_Window::Background | ( |  | ) | const

Standard_EXPORT Aspect_FillMethod Aspect_Window::BackgroundFillMethod | ( |  | ) | const

Standard_EXPORT Standard_CString Aspect_Window::BackgroundImage | ( |  | ) | const

virtual Standard_EXPORT Standard_Boolean Aspect_Window::BackingStore | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Clear | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::ClearArea | ( | const Standard_Integer | XCenter,
|  | const Standard_Integer | YCenter,
|  | const Standard_Integer | Width,
|  | const Standard_Integer | Height
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Convert | ( | const Quantity_Parameter | DX,
|  | const Quantity_Parameter | DY,
|  | Standard_Integer & | PX,
|  | Standard_Integer & | PY
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Convert | ( | const Standard_Integer | PX,
|  | const Standard_Integer | PY,
|  | Quantity_Parameter & | DX,
|  | Quantity_Parameter & | DY
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Integer Aspect_Window::Convert | ( | const Quantity_Parameter | DV | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Quantity_Parameter Aspect_Window::Convert | ( | const Standard_Integer | PV | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Destroy | ( |  | ) | `[pure virtual]`

| Implemented in WNT_IconBox, WNT_Window, Xw_IconBox, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::DoMapping | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Aspect_TypeOfResize Aspect_Window::DoResize | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::DoubleBuffer | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::Dump | ( | const Standard_CString | aFilename,
|  | const Standard_Real | aGammaValue = `1.0`
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::DumpArea | ( | const Standard_CString | aFilename,
|  | const Standard_Integer | Xc,
|  | const Standard_Integer | Yc,
|  | const Standard_Integer | Width,
|  | const Standard_Integer | Height,
|  | const Standard_Real | aGammaValue = `1.0`
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Flush | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

Standard_EXPORT Handle_Aspect_GraphicDevice Aspect_Window::GraphicDevice | ( |  | ) | const

Standard_EXPORT const Aspect_Window::Handle | ( | Standard_Type |  | ) | const

| Reimplemented in WNT_IconBox, WNT_Window, Xw_IconBox, and Xw_Window.

Aspect_Handle Aspect_Window::HBackground | ( |  | ) | const`[inline]`

virtual Standard_EXPORT Standard_Boolean Aspect_Window::IsMapped | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::Load | ( | const Standard_CString | aFilename | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::LoadArea | ( | const Standard_CString | aFilename,
|  | const Standard_Integer | Xc,
|  | const Standard_Integer | Yc,
|  | const Standard_Integer | Width,
|  | const Standard_Integer | Height
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Map | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::MMSize | ( | Standard_Real & | Width,
|  | Standard_Real & | Height
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Position | ( | Standard_Integer & | X1,
|  | Standard_Integer & | Y1,
|  | Standard_Integer & | X2,
|  | Standard_Integer & | Y2
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Position | ( | Quantity_Parameter & | X1,
|  | Quantity_Parameter & | Y1,
|  | Quantity_Parameter & | X2,
|  | Quantity_Parameter & | Y2
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Quantity_Ratio Aspect_Window::Ratio | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Restore | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::RestoreArea | ( | const Standard_Integer | XCenter,
|  | const Standard_Integer | YCenter,
|  | const Standard_Integer | Width,
|  | const Standard_Integer | Height
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::SetBackground | ( | const Aspect_Handle | aBitmap | ) | `[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT Standard_Boolean Aspect_Window::SetBackground | ( | const Standard_CString | aName,
|  | const Aspect_FillMethod | aMethod = `Aspect_FM_CENTERED`
| ) | `[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::SetBackground | ( | const Quantity_Color & | color | ) | `[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::SetBackground | ( | const Quantity_NameOfColor | BackColor | ) | `[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::SetBackground | ( | const Aspect_Background & | ABack | ) | `[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::SetDoubleBuffer | ( | const Standard_Boolean | DBmode | ) | `[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Size | ( | Standard_Integer & | Width,
|  | Standard_Integer & | Height
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Size | ( | Quantity_Parameter & | Width,
|  | Quantity_Parameter & | Height
| ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

virtual Standard_EXPORT void Aspect_Window::Unmap | ( |  | ) | const`[pure virtual]`

| Implemented in WNT_Window, and Xw_Window.

## Field Documentation

Aspect_Background Aspect_Window::MyBackground `[protected]`

Aspect_FillMethod Aspect_Window::MyBackgroundFillMethod `[protected]`

TCollection_AsciiString Aspect_Window::MyBackgroundImage `[protected]`

Handle_Aspect_GraphicDevice Aspect_Window::MyGraphicDevice `[protected]`

Aspect_Handle Aspect_Window::MyHBackground `[protected]`

The documentation for this class was generated from the following files:

- Aspect_Window.hxx
- Aspect_Window.lxx