Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes
Aspect_Window Class Referenceabstract

Defines a window. More...

#include <Aspect_Window.hxx>

Inheritance diagram for Aspect_Window:
Inheritance graph
[legend]

Public Member Functions

bool IsVirtual () const
 Returns True if the window <me> is virtual.
 
void SetVirtual (const bool theVirtual)
 Setup the virtual state.
 
NCollection_Vec2< intTopLeft () const
 Returns window top-left corner.
 
NCollection_Vec2< intDimensions () 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 bool IsMapped () const =0
 Returns True if the window <me> is opened and False if the window is closed.
 
virtual void Map () const =0
 Opens the window <me>.
 
virtual void Unmap () const =0
 Closes the window <me>.
 
virtual Aspect_TypeOfResize DoResize ()=0
 Apply the resizing to the window <me>.
 
virtual bool DoMapping () const =0
 Apply the mapping change to the window <me>. and returns TRUE if the window is mapped at screen.
 
virtual double Ratio () const =0
 Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions.
 
virtual void Position (int &X1, int &Y1, int &X2, int &Y2) const =0
 Returns The Window POSITION in PIXEL.
 
virtual void Size (int &Width, int &Height) const =0
 Returns The Window SIZE in PIXEL.
 
virtual Aspect_Drawable NativeHandle () const =0
 Returns native Window handle (HWND on Windows, Window with Xlib, and so on)
 
virtual Aspect_Drawable NativeParentHandle () const =0
 Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
 
virtual Aspect_FBConfig NativeFBConfig () const =0
 Returns native Window FB config (GLXFBConfig on Xlib)
 
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< doubleConvertPointToBacking (const NCollection_Vec2< double > &thePnt) const
 Convert point from logical units into backing store units.
 
virtual NCollection_Vec2< doubleConvertPointFromBacking (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_Transientoperator= (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_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.
 
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 Member Functions

 Aspect_Window ()
 Initializes the data of a Window.
 

Protected Attributes

occ::handle< Aspect_DisplayConnectionmyDisplay
 Display connection.
 
Aspect_Background MyBackground
 
Aspect_GradientBackground MyGradientBackground
 
Aspect_FillMethod MyBackgroundFillMethod
 
bool MyIsVirtual
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_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.
 

Detailed Description

Defines a window.

Constructor & Destructor Documentation

◆ Aspect_Window()

Aspect_Window::Aspect_Window ( )
protected

Initializes the data of a Window.

Member Function Documentation

◆ Background()

Aspect_Background Aspect_Window::Background ( ) const

Returns the window background.

◆ BackgroundFillMethod()

Aspect_FillMethod Aspect_Window::BackgroundFillMethod ( ) const

Returns the current image background fill mode.

◆ ConvertPointFromBacking()

virtual NCollection_Vec2< double > Aspect_Window::ConvertPointFromBacking ( const NCollection_Vec2< double > & thePnt) const
inlinevirtual

Convert point from backing store units to logical units.

◆ ConvertPointToBacking()

virtual NCollection_Vec2< double > Aspect_Window::ConvertPointToBacking ( const NCollection_Vec2< double > & thePnt) const
inlinevirtual

Convert point from logical units into backing store units.

◆ DevicePixelRatio()

virtual double Aspect_Window::DevicePixelRatio ( ) const
inlinevirtual

Return device pixel ratio (logical to backing store scale factor).

Reimplemented in Wasm_Window.

◆ Dimensions()

NCollection_Vec2< int > Aspect_Window::Dimensions ( ) const
inline

Returns window dimensions.

◆ DisplayConnection()

const occ::handle< Aspect_DisplayConnection > & Aspect_Window::DisplayConnection ( ) const
inline

Returns connection to Display or NULL.

◆ DoMapping()

virtual bool Aspect_Window::DoMapping ( ) const
pure virtual

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

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ DoResize()

virtual Aspect_TypeOfResize Aspect_Window::DoResize ( )
pure virtual

Apply the resizing to the window <me>.

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ DumpJson()

void Aspect_Window::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const

Dumps the content of me into the stream.

◆ GradientBackground()

Aspect_GradientBackground Aspect_Window::GradientBackground ( ) const

Returns the window gradient background.

◆ InvalidateContent()

virtual void Aspect_Window::InvalidateContent ( const occ::handle< Aspect_DisplayConnection > & theDisp)
inlinevirtual

Invalidate entire window content.

Implementation is expected to allow calling this method from non-GUI thread, e.g. by queuing exposure event into window message queue or in other thread-safe manner.

Optional display argument should be passed when called from non-GUI thread on platforms implementing thread-unsafe connections to display. NULL can be passed instead otherwise.

Reimplemented in Wasm_Window, Xw_Window, and Cocoa_Window.

◆ IsMapped()

virtual bool Aspect_Window::IsMapped ( ) const
pure virtual

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

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ IsVirtual()

bool Aspect_Window::IsVirtual ( ) const

Returns True if the window <me> is virtual.

◆ Map()

virtual void Aspect_Window::Map ( ) const
pure virtual

Opens the window <me>.

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ NativeFBConfig()

virtual Aspect_FBConfig Aspect_Window::NativeFBConfig ( ) const
pure virtual

Returns native Window FB config (GLXFBConfig on Xlib)

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ NativeHandle()

virtual Aspect_Drawable Aspect_Window::NativeHandle ( ) const
pure virtual

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

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ NativeParentHandle()

virtual Aspect_Drawable Aspect_Window::NativeParentHandle ( ) const
pure virtual

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

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ Position()

virtual void Aspect_Window::Position ( int & X1,
int & Y1,
int & X2,
int & Y2 ) const
pure virtual

Returns The Window POSITION in PIXEL.

Implemented in Aspect_NeutralWindow, Wasm_Window, Cocoa_Window, and Xw_Window.

◆ Ratio()

virtual double Aspect_Window::Ratio ( ) const
pure virtual

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

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ SetBackground() [1/4]

void Aspect_Window::SetBackground ( const Aspect_Background & theBack)

Modifies the window background.

◆ SetBackground() [2/4]

void Aspect_Window::SetBackground ( const Aspect_GradientBackground & theBackground)

Modifies the window gradient background.

◆ SetBackground() [3/4]

void Aspect_Window::SetBackground ( const Quantity_Color & theColor)

Modifies the window background.

◆ SetBackground() [4/4]

void Aspect_Window::SetBackground ( const Quantity_Color & theFirstColor,
const Quantity_Color & theSecondColor,
const Aspect_GradientFillMethod theFillMethod )

Modifies the window gradient background.

◆ SetTitle()

virtual void Aspect_Window::SetTitle ( const TCollection_AsciiString & theTitle)
inlinevirtual

Sets window title.

Reimplemented in Cocoa_Window, and Xw_Window.

◆ SetVirtual()

void Aspect_Window::SetVirtual ( const bool theVirtual)

Setup the virtual state.

◆ Size()

virtual void Aspect_Window::Size ( int & Width,
int & Height ) const
pure virtual

Returns The Window SIZE in PIXEL.

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

◆ TopLeft()

NCollection_Vec2< int > Aspect_Window::TopLeft ( ) const
inline

Returns window top-left corner.

◆ Unmap()

virtual void Aspect_Window::Unmap ( ) const
pure virtual

Closes the window <me>.

Implemented in Aspect_NeutralWindow, Cocoa_Window, Wasm_Window, and Xw_Window.

Field Documentation

◆ MyBackground

Aspect_Background Aspect_Window::MyBackground
protected

◆ MyBackgroundFillMethod

Aspect_FillMethod Aspect_Window::MyBackgroundFillMethod
protected

◆ myDisplay

occ::handle<Aspect_DisplayConnection> Aspect_Window::myDisplay
protected

Display connection.

◆ MyGradientBackground

Aspect_GradientBackground Aspect_Window::MyGradientBackground
protected

◆ MyIsVirtual

bool Aspect_Window::MyIsVirtual
protected

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