Open CASCADE Technology  6.9.0
Public Member Functions | Protected Attributes

Xw_Window Class Reference

This class defines XLib window intended for creation of OpenGL context. More...

#include <Xw_Window.hxx>

Inheritance diagram for Xw_Window:
Inheritance graph
[legend]

Public Member Functions

 Xw_Window (const Handle< Aspect_DisplayConnection > &theXDisplay, const Standard_CString theTitle, const Standard_Integer thePxLeft, const Standard_Integer thePxTop, const Standard_Integer thePxWidth, const Standard_Integer thePxHeight)
 Creates a XLib window defined by his position and size in pixels. Throws exception if window can not be created or Display do not support GLX extension. More...
 
 Xw_Window (const Handle< Aspect_DisplayConnection > &theXDisplay, const Window theXWin)
 Creates a wrapper over existing Window handle. More...
 
virtual void Destroy ()
 Destroies the Window and all resourses attached to it. More...
 
 ~Xw_Window ()
 
virtual void Map () const
 Opens the window <me> More...
 
virtual void Unmap () const
 Closes the window <me> More...
 
virtual Aspect_TypeOfResize DoResize () const
 Applies the resizing to the window <me> More...
 
virtual Standard_Boolean DoMapping () const
 Apply the mapping change to the window <me> More...
 
virtual Standard_Boolean IsMapped () const
 Returns True if the window <me> is opened. More...
 
virtual Quantity_Ratio Ratio () const
 Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions. More...
 
virtual void Position (Standard_Integer &X1, Standard_Integer &Y1, Standard_Integer &X2, Standard_Integer &Y2) const
 Returns The Window POSITION in PIXEL. More...
 
virtual void Size (Standard_Integer &theWidth, Standard_Integer &theHeight) const
 Returns The Window SIZE in PIXEL. More...
 
Window XWindow () const
 
const Handle
< Aspect_DisplayConnection > & 
DisplayConnection () const
 
virtual Aspect_Drawable NativeHandle () const
 
virtual Aspect_Drawable NativeParentHandle () const
 
- Public Member Functions inherited from Aspect_Window
void SetBackground (const Aspect_Background &ABack)
 Modifies the window background. More...
 
void SetBackground (const Quantity_NameOfColor theNameOfColor)
 Modifies the window background from a Named Color. More...
 
void SetBackground (const Quantity_Color &color)
 Modifies the window background. More...
 
void SetBackground (const Aspect_GradientBackground &ABackground)
 Modifies the window gradient background. More...
 
void SetBackground (const Quantity_Color &theFirstColor, const Quantity_Color &theSecondColor, const Aspect_GradientFillMethod theFillMethod)
 Modifies the window gradient background. More...
 
Aspect_Background Background () const
 Returns the window background. More...
 
Aspect_FillMethod BackgroundFillMethod () const
 Returns the current image background fill mode. More...
 
Aspect_GradientBackground GradientBackground () const
 Returns the window gradient background. More...
 
Standard_Boolean IsVirtual () const
 Returns True if the window <me> is virtual. More...
 
void SetVirtual (const Standard_Boolean theVirtual)
 Setup the virtual state. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Protected Attributes

Handle< Aspect_DisplayConnectionmyDisplay
 X Display connection. More...
 
Window myXWindow
 XLib window handle. More...
 
Standard_Integer myXLeft
 left position in pixels More...
 
Standard_Integer myYTop
 top position in pixels More...
 
Standard_Integer myXRight
 right position in pixels More...
 
Standard_Integer myYBottom
 bottom position in pixels More...
 
Standard_Boolean myIsOwnWin
 flag to indicate own window handle (to be deallocated on destruction) More...
 
- Protected Attributes inherited from Aspect_Window
Aspect_Background MyBackground
 
Aspect_GradientBackground MyGradientBackground
 
Aspect_FillMethod MyBackgroundFillMethod
 
Standard_Boolean MyIsVirtual
 

Additional Inherited Members

- Protected Member Functions inherited from Aspect_Window
 Aspect_Window ()
 Initializes the datas of a Window. More...
 

Detailed Description

This class defines XLib window intended for creation of OpenGL context.

Constructor & Destructor Documentation

Xw_Window::Xw_Window ( const Handle< Aspect_DisplayConnection > &  theXDisplay,
const Standard_CString  theTitle,
const Standard_Integer  thePxLeft,
const Standard_Integer  thePxTop,
const Standard_Integer  thePxWidth,
const Standard_Integer  thePxHeight 
)

Creates a XLib window defined by his position and size in pixels. Throws exception if window can not be created or Display do not support GLX extension.

Xw_Window::Xw_Window ( const Handle< Aspect_DisplayConnection > &  theXDisplay,
const Window  theXWin 
)

Creates a wrapper over existing Window handle.

Xw_Window::~Xw_Window ( )
inline

Member Function Documentation

virtual void Xw_Window::Destroy ( )
virtual

Destroies the Window and all resourses attached to it.

Implements Aspect_Window.

const Handle< Aspect_DisplayConnection >& Xw_Window::DisplayConnection ( ) const
Returns
connection to X Display
virtual Standard_Boolean Xw_Window::DoMapping ( ) const
virtual

Apply the mapping change to the window <me>

Implements Aspect_Window.

virtual Aspect_TypeOfResize Xw_Window::DoResize ( ) const
virtual

Applies the resizing to the window <me>

Implements Aspect_Window.

virtual Standard_Boolean Xw_Window::IsMapped ( ) const
virtual

Returns True if the window <me> is opened.

Implements Aspect_Window.

virtual void Xw_Window::Map ( ) const
virtual

Opens the window <me>

Implements Aspect_Window.

virtual Aspect_Drawable Xw_Window::NativeHandle ( ) const
inlinevirtual
Returns
native Window handle

Implements Aspect_Window.

virtual Aspect_Drawable Xw_Window::NativeParentHandle ( ) const
inlinevirtual
Returns
parent of native Window handle

Implements Aspect_Window.

virtual void Xw_Window::Position ( Standard_Integer X1,
Standard_Integer Y1,
Standard_Integer X2,
Standard_Integer Y2 
) const
virtual

Returns The Window POSITION in PIXEL.

Implements Aspect_Window.

virtual Quantity_Ratio Xw_Window::Ratio ( ) const
virtual

Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions.

Implements Aspect_Window.

virtual void Xw_Window::Size ( Standard_Integer theWidth,
Standard_Integer theHeight 
) const
virtual

Returns The Window SIZE in PIXEL.

Implements Aspect_Window.

virtual void Xw_Window::Unmap ( ) const
virtual

Closes the window <me>

Implements Aspect_Window.

Window Xw_Window::XWindow ( ) const
Returns
native Window handle

Field Documentation

Handle< Aspect_DisplayConnection > Xw_Window::myDisplay
protected

X Display connection.

Standard_Boolean Xw_Window::myIsOwnWin
protected

flag to indicate own window handle (to be deallocated on destruction)

Standard_Integer Xw_Window::myXLeft
protected

left position in pixels

Standard_Integer Xw_Window::myXRight
protected

right position in pixels

Window Xw_Window::myXWindow
protected

XLib window handle.

Standard_Integer Xw_Window::myYBottom
protected

bottom position in pixels

Standard_Integer Xw_Window::myYTop
protected

top position in pixels


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