Open CASCADE Technology  7.7.0
Public Member Functions | Protected Attributes
Aspect_NeutralWindow Class Reference

Defines a platform-neutral window. This class is intended to be used in context when window management (including OpenGL context creation) is performed on application side (e.g. using external framework). More...

#include <Aspect_NeutralWindow.hxx>

Inheritance diagram for Aspect_NeutralWindow:
Inheritance graph
[legend]

Public Member Functions

 Aspect_NeutralWindow ()
 Empty constructor. Note that window is considered "mapped" by default. More...
 
virtual Aspect_Drawable NativeHandle () const override
 Return native handle of this drawable. More...
 
virtual Aspect_Drawable NativeParentHandle () const override
 Return native handle of the parent drawable. More...
 
virtual Aspect_FBConfig NativeFBConfig () const override
 Return FBConfig. More...
 
Standard_Boolean SetNativeHandle (Aspect_Drawable theWindow)
 Set native handle. More...
 
Standard_Boolean SetNativeHandles (Aspect_Drawable theWindow, Aspect_Drawable theParentWindow, Aspect_FBConfig theFbConfig)
 Set native handles. More...
 
virtual Standard_Boolean IsMapped () const override
 Return true if window is not hidden. More...
 
virtual void Map () const override
 Change window mapped flag to TRUE. More...
 
virtual void Unmap () const override
 Change window mapped flag to FALSE. More...
 
virtual Aspect_TypeOfResize DoResize () override
 Resize window - do nothing. More...
 
virtual Standard_Boolean DoMapping () const override
 Map window - do nothing. More...
 
virtual Standard_Real Ratio () const override
 Returns window ratio equal to the physical width/height dimensions. More...
 
virtual void Position (Standard_Integer &theX1, Standard_Integer &theY1, Standard_Integer &theX2, Standard_Integer &theY2) const override
 Return the window position. More...
 
Standard_Boolean SetPosition (Standard_Integer theX1, Standard_Integer theY1)
 Set the window position. More...
 
Standard_Boolean SetPosition (Standard_Integer theX1, Standard_Integer theY1, Standard_Integer theX2, Standard_Integer theY2)
 Set the window position. More...
 
virtual void Size (Standard_Integer &theWidth, Standard_Integer &theHeight) const override
 Return the window size. More...
 
Standard_Boolean SetSize (const Standard_Integer theWidth, const Standard_Integer theHeight)
 Set the window size. More...
 
- Public Member Functions inherited from Aspect_Window
Standard_Boolean IsVirtual () const
 Returns True if the window <me> is virtual. More...
 
void SetVirtual (const Standard_Boolean theVirtual)
 Setup the virtual state. More...
 
Graphic3d_Vec2i TopLeft () const
 Returns window top-left corner. More...
 
Graphic3d_Vec2i Dimensions () const
 Returns window dimensions. More...
 
const Handle< Aspect_DisplayConnection > & DisplayConnection () const
 Returns connection to Display or NULL. 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...
 
void SetBackground (const Aspect_Background &theBack)
 Modifies the window background. More...
 
void SetBackground (const Quantity_Color &theColor)
 Modifies the window background. More...
 
void SetBackground (const Aspect_GradientBackground &theBackground)
 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...
 
virtual void SetTitle (const TCollection_AsciiString &theTitle)
 Sets window title. More...
 
virtual void InvalidateContent (const Handle< Aspect_DisplayConnection > &theDisp)
 Invalidate entire window content. More...
 
virtual Standard_Real DevicePixelRatio () const
 Return device pixel ratio (logical to backing store scale factor). More...
 
virtual Graphic3d_Vec2d ConvertPointToBacking (const Graphic3d_Vec2d &thePnt) const
 Convert point from logical units into backing store units. More...
 
virtual Graphic3d_Vec2d ConvertPointFromBacking (const Graphic3d_Vec2d &thePnt) const
 Convert point from backing store units to logical units. More...
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. 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 void Delete () const
 Memory deallocator for transient classes. 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

Aspect_Drawable myHandle
 
Aspect_Drawable myParentHandle
 
Aspect_FBConfig myFBConfig
 
Standard_Integer myPosX
 
Standard_Integer myPosY
 
Standard_Integer myWidth
 
Standard_Integer myHeight
 
Standard_Boolean myIsMapped
 
- Protected Attributes inherited from Aspect_Window
Handle< Aspect_DisplayConnectionmyDisplay
 Display connection. More...
 
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 data of a Window. More...
 

Detailed Description

Defines a platform-neutral window. This class is intended to be used in context when window management (including OpenGL context creation) is performed on application side (e.g. using external framework).

Window properties should be managed by application and assigned to this class as properties.

Constructor & Destructor Documentation

◆ Aspect_NeutralWindow()

Aspect_NeutralWindow::Aspect_NeutralWindow ( )

Empty constructor. Note that window is considered "mapped" by default.

Member Function Documentation

◆ DoMapping()

virtual Standard_Boolean Aspect_NeutralWindow::DoMapping ( ) const
inlineoverridevirtual

Map window - do nothing.

Implements Aspect_Window.

◆ DoResize()

virtual Aspect_TypeOfResize Aspect_NeutralWindow::DoResize ( )
inlineoverridevirtual

Resize window - do nothing.

Implements Aspect_Window.

◆ IsMapped()

virtual Standard_Boolean Aspect_NeutralWindow::IsMapped ( ) const
inlineoverridevirtual

Return true if window is not hidden.

Implements Aspect_Window.

◆ Map()

virtual void Aspect_NeutralWindow::Map ( ) const
inlineoverridevirtual

Change window mapped flag to TRUE.

Implements Aspect_Window.

◆ NativeFBConfig()

virtual Aspect_FBConfig Aspect_NeutralWindow::NativeFBConfig ( ) const
inlineoverridevirtual

Return FBConfig.

Implements Aspect_Window.

◆ NativeHandle()

virtual Aspect_Drawable Aspect_NeutralWindow::NativeHandle ( ) const
inlineoverridevirtual

Return native handle of this drawable.

Implements Aspect_Window.

◆ NativeParentHandle()

virtual Aspect_Drawable Aspect_NeutralWindow::NativeParentHandle ( ) const
inlineoverridevirtual

Return native handle of the parent drawable.

Implements Aspect_Window.

◆ Position()

virtual void Aspect_NeutralWindow::Position ( Standard_Integer theX1,
Standard_Integer theY1,
Standard_Integer theX2,
Standard_Integer theY2 
) const
inlineoverridevirtual

Return the window position.

Implements Aspect_Window.

◆ Ratio()

virtual Standard_Real Aspect_NeutralWindow::Ratio ( ) const
inlineoverridevirtual

Returns window ratio equal to the physical width/height dimensions.

Implements Aspect_Window.

◆ SetNativeHandle()

Standard_Boolean Aspect_NeutralWindow::SetNativeHandle ( Aspect_Drawable  theWindow)
inline

Set native handle.

Returns
true if definition has been changed

◆ SetNativeHandles()

Standard_Boolean Aspect_NeutralWindow::SetNativeHandles ( Aspect_Drawable  theWindow,
Aspect_Drawable  theParentWindow,
Aspect_FBConfig  theFbConfig 
)

Set native handles.

Returns
true if definition has been changed

◆ SetPosition() [1/2]

Standard_Boolean Aspect_NeutralWindow::SetPosition ( Standard_Integer  theX1,
Standard_Integer  theY1 
)

Set the window position.

Returns
true if position has been changed

◆ SetPosition() [2/2]

Standard_Boolean Aspect_NeutralWindow::SetPosition ( Standard_Integer  theX1,
Standard_Integer  theY1,
Standard_Integer  theX2,
Standard_Integer  theY2 
)

Set the window position.

Returns
true if position has been changed

◆ SetSize()

Standard_Boolean Aspect_NeutralWindow::SetSize ( const Standard_Integer  theWidth,
const Standard_Integer  theHeight 
)

Set the window size.

Returns
true if size has been changed

◆ Size()

virtual void Aspect_NeutralWindow::Size ( Standard_Integer theWidth,
Standard_Integer theHeight 
) const
inlineoverridevirtual

Return the window size.

Implements Aspect_Window.

◆ Unmap()

virtual void Aspect_NeutralWindow::Unmap ( ) const
inlineoverridevirtual

Change window mapped flag to FALSE.

Implements Aspect_Window.

Field Documentation

◆ myFBConfig

Aspect_FBConfig Aspect_NeutralWindow::myFBConfig
protected

◆ myHandle

Aspect_Drawable Aspect_NeutralWindow::myHandle
protected

◆ myHeight

Standard_Integer Aspect_NeutralWindow::myHeight
protected

◆ myIsMapped

Standard_Boolean Aspect_NeutralWindow::myIsMapped
mutableprotected

◆ myParentHandle

Aspect_Drawable Aspect_NeutralWindow::myParentHandle
protected

◆ myPosX

Standard_Integer Aspect_NeutralWindow::myPosX
protected

◆ myPosY

Standard_Integer Aspect_NeutralWindow::myPosY
protected

◆ myWidth

Standard_Integer Aspect_NeutralWindow::myWidth
protected

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