OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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:

    Public Member Functions

     Aspect_NeutralWindow ()
     Empty constructor. Note that window is considered "mapped" by default.
    Aspect_Drawable NativeHandle () const override
     Return native handle of this drawable.
    Aspect_Drawable NativeParentHandle () const override
     Return native handle of the parent drawable.
    Aspect_FBConfig NativeFBConfig () const override
     Return FBConfig.
    bool SetNativeHandle (Aspect_Drawable theWindow)
     Set native handle.
    bool SetNativeHandles (Aspect_Drawable theWindow, Aspect_Drawable theParentWindow, Aspect_FBConfig theFbConfig)
     Set native handles.
    bool IsMapped () const override
     Return true if window is not hidden.
    void Map () const override
     Change window mapped flag to TRUE.
    void Unmap () const override
     Change window mapped flag to FALSE.
    Aspect_TypeOfResize DoResize () override
     Resize window - do nothing.
    bool DoMapping () const override
     Map window - do nothing.
    double Ratio () const override
     Returns window ratio equal to the physical width/height dimensions.
    void Position (int &theX1, int &theY1, int &theX2, int &theY2) const override
     Return the window position.
    bool SetPosition (int theX1, int theY1)
     Set the window position.
    bool SetPosition (int theX1, int theY1, int theX2, int theY2)
     Set the window position.
    void Size (int &theWidth, int &theHeight) const override
     Return the window size.
    bool SetSize (const int theWidth, const int theHeight)
     Set the window size.
    Public Member Functions inherited from Aspect_Window
    bool IsVirtual () const
     Returns True if the window <me> is virtual.
    void SetVirtual (const bool theVirtual)
     Setup the virtual state.
    NCollection_Vec2< int > TopLeft () const
     Returns window top-left corner.
    NCollection_Vec2< int > Dimensions () const
     Returns window dimensions.
    const occ::handle< Aspect_DisplayConnection > & DisplayConnection () const
     Returns connection to Display or NULL.
    Aspect_Background Background () const
     Returns the window background.
    Aspect_FillMethod BackgroundFillMethod () const
     Returns the current image background fill mode.
    Aspect_GradientBackground GradientBackground () const
     Returns the window gradient background.
    void SetBackground (const Aspect_Background &theBack)
     Modifies the window background.
    void SetBackground (const Quantity_Color &theColor)
     Modifies the window background.
    void SetBackground (const Aspect_GradientBackground &theBackground)
     Modifies the window gradient background.
    void SetBackground (const Quantity_Color &theFirstColor, const Quantity_Color &theSecondColor, const Aspect_GradientFillMethod theFillMethod)
     Modifies the window gradient background.
    virtual void SetTitle (const TCollection_AsciiString &theTitle)
     Sets window title.
    virtual void InvalidateContent (const occ::handle< Aspect_DisplayConnection > &theDisp)
     Invalidate entire window content.
    virtual double DevicePixelRatio () const
     Return device pixel ratio (logical to backing store scale factor).
    virtual NCollection_Vec2< double > ConvertPointToBacking (const NCollection_Vec2< double > &thePnt) const
     Convert point from logical units into backing store units.
    virtual NCollection_Vec2< double > ConvertPointFromBacking (const NCollection_Vec2< double > &thePnt) const
     Convert point from backing store units to logical units.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transient & operator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool 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.
    bool IsKind (const char *const 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.
    Standard_Transient * This () 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.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Protected Attributes

    Aspect_Drawable myHandle
    Aspect_Drawable myParentHandle
    Aspect_FBConfig myFBConfig
    int myPosX
    int myPosY
    int myWidth
    int myHeight
    bool myIsMapped
    Protected Attributes inherited from Aspect_Window
    occ::handle< Aspect_DisplayConnection > myDisplay
     Display connection.
    Aspect_Background MyBackground
    Aspect_GradientBackground MyGradientBackground
    Aspect_FillMethod MyBackgroundFillMethod
    bool MyIsVirtual

    Additional Inherited Members

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

    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()

    bool Aspect_NeutralWindow::DoMapping ( ) const
    inlineoverridevirtual

    Map window - do nothing.

    Implements Aspect_Window.

    ◆ DoResize()

    Aspect_TypeOfResize Aspect_NeutralWindow::DoResize ( )
    inlineoverridevirtual

    Resize window - do nothing.

    Implements Aspect_Window.

    ◆ IsMapped()

    bool Aspect_NeutralWindow::IsMapped ( ) const
    inlineoverridevirtual

    Return true if window is not hidden.

    Implements Aspect_Window.

    ◆ Map()

    void Aspect_NeutralWindow::Map ( ) const
    inlineoverridevirtual

    Change window mapped flag to TRUE.

    Implements Aspect_Window.

    ◆ NativeFBConfig()

    Aspect_FBConfig Aspect_NeutralWindow::NativeFBConfig ( ) const
    inlineoverridevirtual

    Return FBConfig.

    Implements Aspect_Window.

    ◆ NativeHandle()

    Aspect_Drawable Aspect_NeutralWindow::NativeHandle ( ) const
    inlineoverridevirtual

    Return native handle of this drawable.

    Implements Aspect_Window.

    ◆ NativeParentHandle()

    Aspect_Drawable Aspect_NeutralWindow::NativeParentHandle ( ) const
    inlineoverridevirtual

    Return native handle of the parent drawable.

    Implements Aspect_Window.

    ◆ Position()

    void Aspect_NeutralWindow::Position ( int & theX1,
    int & theY1,
    int & theX2,
    int & theY2 ) const
    inlineoverridevirtual

    Return the window position.

    Implements Aspect_Window.

    ◆ Ratio()

    double Aspect_NeutralWindow::Ratio ( ) const
    inlineoverridevirtual

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

    Implements Aspect_Window.

    ◆ SetNativeHandle()

    bool Aspect_NeutralWindow::SetNativeHandle ( Aspect_Drawable theWindow)
    inline

    Set native handle.

    Returns
    true if definition has been changed

    ◆ SetNativeHandles()

    bool 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]

    bool Aspect_NeutralWindow::SetPosition ( int theX1,
    int theY1 )

    Set the window position.

    Returns
    true if position has been changed

    ◆ SetPosition() [2/2]

    bool Aspect_NeutralWindow::SetPosition ( int theX1,
    int theY1,
    int theX2,
    int theY2 )

    Set the window position.

    Returns
    true if position has been changed

    ◆ SetSize()

    bool Aspect_NeutralWindow::SetSize ( const int theWidth,
    const int theHeight )

    Set the window size.

    Returns
    true if size has been changed

    ◆ Size()

    void Aspect_NeutralWindow::Size ( int & theWidth,
    int & theHeight ) const
    inlineoverridevirtual

    Return the window size.

    Implements Aspect_Window.

    ◆ Unmap()

    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

    int Aspect_NeutralWindow::myHeight
    protected

    ◆ myIsMapped

    bool Aspect_NeutralWindow::myIsMapped
    mutableprotected

    ◆ myParentHandle

    Aspect_Drawable Aspect_NeutralWindow::myParentHandle
    protected

    ◆ myPosX

    int Aspect_NeutralWindow::myPosX
    protected

    ◆ myPosY

    int Aspect_NeutralWindow::myPosY
    protected

    ◆ myWidth

    int Aspect_NeutralWindow::myWidth
    protected

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