Open CASCADE Technology  7.0.0
Public Member Functions | Protected Attributes

WNT_Window Class Reference

This class defines Windows NT window. More...

#include <WNT_Window.hxx>

Inheritance diagram for WNT_Window:
Inheritance graph
[legend]

Public Member Functions

 WNT_Window (const Standard_CString theTitle, const Handle< WNT_WClass > &theClass, const WNT_Dword &theStyle, const Standard_Integer thePxLeft, const Standard_Integer thePxTop, const Standard_Integer thePxWidth, const Standard_Integer thePxHeight, const Quantity_NameOfColor theBackColor=Quantity_NOC_MATRAGRAY, const Aspect_Handle theParent=0, const Aspect_Handle theMenu=0, const Standard_Address theClientStruct=0)
 Creates a Window defined by his position and size in pixles from the Parent Window. Trigger: Raises WindowDefinitionError if the Position out of the Screen Space or the window creation failed. More...
 
 WNT_Window (const Aspect_Handle aHandle, const Quantity_NameOfColor aBackColor=Quantity_NOC_MATRAGRAY)
 Creates a Window based on the existing window handle. This handle equals ( aPart1 << 16 ) + aPart2. More...
 
 ~WNT_Window ()
 Destroys the Window and all resourses attached to it. More...
 
void SetCursor (const Aspect_Handle aCursor) const
 Sets cursor <aCursor> for ENTIRE WINDOW CLASS to which the Window belongs. More...
 
virtual void Map () const override
 Opens the window <me>. More...
 
void Map (const Standard_Integer aMapMode) const
 Opens a window <me> according to <aMapMode>. This method is specific to Windows NT. <aMapMode> can be one of SW_xxx constants defined in <windows.h>. See documentation. More...
 
virtual void Unmap () const override
 Closes the window <me>. More...
 
virtual Aspect_TypeOfResize DoResize () const override
 Applies the resizing to the window <me>. More...
 
virtual Standard_Boolean DoMapping () const override
 Apply the mapping change to the window <me> and returns TRUE if the window is mapped at screen. More...
 
void SetPos (const Standard_Integer X, const Standard_Integer Y, const Standard_Integer X1, const Standard_Integer Y1)
 Changes variables due to window position. More...
 
virtual Standard_Boolean IsMapped () const override
 Returns True if the window <me> is opened and False if the window is closed. More...
 
virtual Quantity_Ratio Ratio () const override
 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 override
 Returns The Window POSITION in PIXEL. More...
 
virtual void Size (Standard_Integer &Width, Standard_Integer &Height) const override
 Returns The Window SIZE in PIXEL. More...
 
Aspect_Handle HWindow () const
 Returns the Windows NT handle of the created window <me>. More...
 
Aspect_Handle HParentWindow () const
 Returns the Windows NT handle parent of the created window <me>. More...
 
virtual Aspect_Drawable NativeHandle () const override
 Returns native Window handle (HWND) More...
 
virtual Aspect_Drawable NativeParentHandle () const override
 Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on) More...
 
virtual Aspect_FBConfig NativeFBConfig () const override
 Returns nothing on Windows. More...
 
- 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 override
 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 opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::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 opencascade::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...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Attributes

Standard_Integer aXLeft
 
Standard_Integer aYTop
 
Standard_Integer aXRight
 
Standard_Integer aYBottom
 
Handle< WNT_WClassmyWClass
 
Aspect_Handle myHWindow
 
Aspect_Handle myHParentWindow
 
Standard_Boolean myIsForeign
 
- Protected Attributes inherited from Aspect_Window
Aspect_Background MyBackground
 
Aspect_GradientBackground MyGradientBackground
 
Aspect_FillMethod MyBackgroundFillMethod
 
Standard_Boolean MyIsVirtual
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 
- Protected Member Functions inherited from Aspect_Window
 Aspect_Window ()
 Initializes the datas of a Window. More...
 

Detailed Description

This class defines Windows NT window.

Constructor & Destructor Documentation

WNT_Window::WNT_Window ( const Standard_CString  theTitle,
const Handle< WNT_WClass > &  theClass,
const WNT_Dword theStyle,
const Standard_Integer  thePxLeft,
const Standard_Integer  thePxTop,
const Standard_Integer  thePxWidth,
const Standard_Integer  thePxHeight,
const Quantity_NameOfColor  theBackColor = Quantity_NOC_MATRAGRAY,
const Aspect_Handle  theParent = 0,
const Aspect_Handle  theMenu = 0,
const Standard_Address  theClientStruct = 0 
)

Creates a Window defined by his position and size in pixles from the Parent Window. Trigger: Raises WindowDefinitionError if the Position out of the Screen Space or the window creation failed.

WNT_Window::WNT_Window ( const Aspect_Handle  aHandle,
const Quantity_NameOfColor  aBackColor = Quantity_NOC_MATRAGRAY 
)

Creates a Window based on the existing window handle. This handle equals ( aPart1 << 16 ) + aPart2.

WNT_Window::~WNT_Window ( )

Destroys the Window and all resourses attached to it.

Member Function Documentation

virtual Standard_Boolean WNT_Window::DoMapping ( ) const
overridevirtual

Apply the mapping change to the window <me> and returns TRUE if the window is mapped at screen.

Implements Aspect_Window.

virtual Aspect_TypeOfResize WNT_Window::DoResize ( ) const
overridevirtual

Applies the resizing to the window <me>.

Implements Aspect_Window.

Aspect_Handle WNT_Window::HParentWindow ( ) const

Returns the Windows NT handle parent of the created window <me>.

Aspect_Handle WNT_Window::HWindow ( ) const

Returns the Windows NT handle of the created window <me>.

virtual Standard_Boolean WNT_Window::IsMapped ( ) const
overridevirtual

Returns True if the window <me> is opened and False if the window is closed.

Implements Aspect_Window.

virtual void WNT_Window::Map ( ) const
overridevirtual

Opens the window <me>.

Implements Aspect_Window.

void WNT_Window::Map ( const Standard_Integer  aMapMode) const

Opens a window <me> according to <aMapMode>. This method is specific to Windows NT. <aMapMode> can be one of SW_xxx constants defined in <windows.h>. See documentation.

virtual Aspect_FBConfig WNT_Window::NativeFBConfig ( ) const
inlineoverridevirtual

Returns nothing on Windows.

Implements Aspect_Window.

virtual Aspect_Drawable WNT_Window::NativeHandle ( ) const
overridevirtual

Returns native Window handle (HWND)

Implements Aspect_Window.

virtual Aspect_Drawable WNT_Window::NativeParentHandle ( ) const
overridevirtual

Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)

Implements Aspect_Window.

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

Returns The Window POSITION in PIXEL.

Implements Aspect_Window.

virtual Quantity_Ratio WNT_Window::Ratio ( ) const
overridevirtual

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

Implements Aspect_Window.

void WNT_Window::SetCursor ( const Aspect_Handle  aCursor) const

Sets cursor <aCursor> for ENTIRE WINDOW CLASS to which the Window belongs.

void WNT_Window::SetPos ( const Standard_Integer  X,
const Standard_Integer  Y,
const Standard_Integer  X1,
const Standard_Integer  Y1 
)

Changes variables due to window position.

virtual void WNT_Window::Size ( Standard_Integer Width,
Standard_Integer Height 
) const
overridevirtual

Returns The Window SIZE in PIXEL.

Implements Aspect_Window.

virtual void WNT_Window::Unmap ( ) const
overridevirtual

Closes the window <me>.

Implements Aspect_Window.

Field Documentation

Standard_Integer WNT_Window::aXLeft
protected
Standard_Integer WNT_Window::aXRight
protected
Standard_Integer WNT_Window::aYBottom
protected
Standard_Integer WNT_Window::aYTop
protected
Aspect_Handle WNT_Window::myHParentWindow
protected
Aspect_Handle WNT_Window::myHWindow
protected
Standard_Boolean WNT_Window::myIsForeign
protected
Handle< WNT_WClass > WNT_Window::myWClass
protected

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