CFx SDK Documentation  2022 SP0
Public Member Functions | List of all members
OdGsDevice Class Referenceabstract

#include <Gs.h>

Inheritance diagram for OdGsDevice:
OdRxObject OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > CFxVectorizeDevice OdGsBaseVectorizeDevice OdGsIfcLayoutHelper OdGsLayoutHelper OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > > OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase > CFxDisplayDevice OdGsIfcModelHelper OdGsModelLayoutHelper OdGsPaperLayoutHelper OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGsDevice)
 
virtual OdRxDictionaryPtr properties ()=0
 
virtual OdGiContextuserGiContext () const =0
 
virtual void setUserGiContext (OdGiContext *pUserGiContext)=0
 
virtual void invalidate ()=0
 
virtual void invalidate (const OdGsDCRect &screenRect)=0
 
virtual bool isValid () const =0
 
virtual void update (OdGsDCRect *pUpdatedRect=0)=0
 
virtual void onSize (const OdGsDCRect &outputRect)=0
 
virtual void onSize (const OdGsDCRectDouble &outputRect)
 
virtual void getSize (OdGsDCRect &outputRect) const =0
 
virtual void getSize (OdGsDCRectDouble &outputRect) const
 
virtual void onRealizeForegroundPalette ()=0
 
virtual void onRealizeBackgroundPalette ()=0
 
virtual void onDisplayChange (int bitsPerPixel, int xPixels, int yPixels)=0
 
virtual OdGsViewPtr createView (const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)=0
 
virtual void addView (OdGsView *pView)=0
 
virtual OdGsModelPtr createModel ()=0
 
virtual bool isModelCompatible (OdGsModel *pModel) const
 
virtual bool saveDeviceState (OdGsFiler *pFiler) const
 
virtual bool loadDeviceState (OdGsFiler *pFiler)
 
virtual void insertView (int viewIndex, OdGsView *pView)=0
 
virtual bool eraseView (OdGsView *pView)=0
 
virtual bool eraseView (int viewIndex)=0
 
virtual void eraseAllViews ()=0
 
virtual int numViews () const =0
 
virtual OdGsViewviewAt (int viewIndex)=0
 
virtual bool setBackgroundColor (ODCOLORREF backgroundColor)=0
 
virtual ODCOLORREF getBackgroundColor ()=0
 
virtual void setLogicalPalette (const ODCOLORREF *logicalPalette, int numColors)=0
 
virtual const ODCOLORREFgetLogicalPalette (int &numColors) const =0
 
virtual void getSnapShot (OdGiRasterImagePtr &pImage, const OdGsDCRect &region)=0
 
virtual OdGsUpdateManagerPtr getUpdateManager (bool createIfNotExist=false)
 
virtual void setUpdateManager (OdGsUpdateManagerPtr pManager)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the abstract base class for classes that encapsulate GUI display windows.

Remarks
OdGsDevice objects own, update, and refresh one or more OdGsView objects.

In addition, they responds to operating system notifications, such as window resize, forwarded by the graphics system client.

Corresponding C++ library: TD_Gs

<group OdGs_Classes>

Definition at line 1060 of file Gs.h.

Member Function Documentation

◆ addView()

virtual void OdGsDevice::addView ( OdGsView pView)
pure virtual

◆ createModel()

virtual OdGsModelPtr OdGsDevice::createModel ( )
pure virtual

Creates a new OdGsModel object, and associates it with this Device object.

Returns
Returns a SmartPointer to the newly created object.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ createView()

virtual OdGsViewPtr OdGsDevice::createView ( const OdGsClientViewInfo pViewInfo = 0,
bool  enableLayerVisibilityPerView = false 
)
pure virtual

Creates a new OdGsView object, and associates it with this Device object.

Parameters
pViewInfo[in] Pointer to the Client View Information for this Device object.
enableLayerVisibilityPerView[in] Layer visibility per viewport is supported, if and only if true.
Returns
Returns a SmartPointer to the newly created object.

pViewInfo contains information returned by OdGiViewport::acadWindowId() and OdGiViewportDraw::viewportObjectId()

Implemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ eraseAllViews()

virtual void OdGsDevice::eraseAllViews ( )
pure virtual

◆ eraseView() [1/2]

virtual bool OdGsDevice::eraseView ( int  viewIndex)
pure virtual

◆ eraseView() [2/2]

virtual bool OdGsDevice::eraseView ( OdGsView pView)
pure virtual

◆ getBackgroundColor()

virtual ODCOLORREF OdGsDevice::getBackgroundColor ( )
pure virtual

◆ getLogicalPalette()

virtual const ODCOLORREF* OdGsDevice::getLogicalPalette ( int &  numColors) const
pure virtual

◆ getSize() [1/2]

virtual void OdGsDevice::getSize ( OdGsDCRect outputRect) const
pure virtual

Returns device surface output rectangle.

Parameters
outputRect[out] Obtains size of the output rectangle in device coordinates (pixels).

Implemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ getSize() [2/2]

virtual void OdGsDevice::getSize ( OdGsDCRectDouble outputRect) const
virtual

Returns device surface output rectangle.

Parameters
outputRect[out] Obtains size of the output rectangle in device coordinates (pixels).

Reimplemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ getSnapShot()

virtual void OdGsDevice::getSnapShot ( OdGiRasterImagePtr pImage,
const OdGsDCRect region 
)
pure virtual

Returns image of current device buffer.

Parameters
pImage[out] Pointer for image to return.
region[in] Rectangle specifies region to return.
Remarks
Implementation can throw eNotImplementedYet exception if current vectorization module doesn't support snap shots.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ getUpdateManager()

virtual OdGsUpdateManagerPtr OdGsDevice::getUpdateManager ( bool  createIfNotExist = false)
virtual

Returns OdGsUpdateManager associated with current device

Parameters
createIfNotExist[in] Creates instance of OdGsUpdateManager if no one associated with device

Reimplemented in OdGsBaseVectorizeDevice, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ insertView()

virtual void OdGsDevice::insertView ( int  viewIndex,
OdGsView pView 
)
pure virtual

Inserts the specified Viewport object to the specified position in this Device object.

Parameters
viewIndex[in] View index.
pView[in] Pointer to the OdGsView object.

Implemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ invalidate() [1/2]

virtual void OdGsDevice::invalidate ( )
pure virtual

Marks for refresh the specified region of the GUI window of this Device object.

Parameters
screenRect[in] Rectangular area.
Remarks
If screenRect is not specified, the entire GUI window is marked for refresh.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ invalidate() [2/2]

virtual void OdGsDevice::invalidate ( const OdGsDCRect screenRect)
pure virtual

◆ isModelCompatible()

virtual bool OdGsDevice::isModelCompatible ( OdGsModel pModel) const
virtual

Checks compatibility between specified OdGsModel and this Device object.

Parameters
pModel[in] Model object pointer to check compatibility.
Remarks
Use this method to check compatibility of exist Model object and newly created device to be sure the exist Model object could be used with this Device object.

By default this always returns false. It is must be implemented in inherited classes to enable Model object reuse support. If Device object use overriden Model object it should return false if input Model object doesn't overriden.

Typical way to check compatibility is using of RTTI.

If your metafiles cache doesn't support per-device sharing override and return false.

Reimplemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ isValid()

virtual bool OdGsDevice::isValid ( ) const
pure virtual

Returns true if and only if the GUI window for this Device object is showing the correct image.

Remarks
This implies the follow: No part of GUI area is flagged for refresh. All rasterizations are complete The rendering pipeline has been flushed.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ loadDeviceState()

virtual bool OdGsDevice::loadDeviceState ( OdGsFiler pFiler)
virtual

◆ numViews()

virtual int OdGsDevice::numViews ( ) const
pure virtual

◆ ODRX_DECLARE_MEMBERS()

OdGsDevice::ODRX_DECLARE_MEMBERS ( OdGsDevice  )

◆ onDisplayChange()

virtual void OdGsDevice::onDisplayChange ( int  bitsPerPixel,
int  xPixels,
int  yPixels 
)
pure virtual

Notification function called whenever the OS screen resolution and/or color depth have changed.

Parameters
bitsPerPixel[in] Color depth.
xPixels[in] X pixels.
yPixels[in] Y pixels.
Remarks
This function is called after the operation.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ onRealizeBackgroundPalette()

virtual void OdGsDevice::onRealizeBackgroundPalette ( )
pure virtual

Notification function typically called whenever the GUI window for this Device object loses focus.

Remarks
Causes this Device object to realize its background pallette.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ onRealizeForegroundPalette()

virtual void OdGsDevice::onRealizeForegroundPalette ( )
pure virtual

◆ onSize() [1/2]

virtual void OdGsDevice::onSize ( const OdGsDCRect outputRect)
pure virtual

Notification function called whenever the size of the GUI window for this Device object has changed.

Parameters
outputRect[in] New size of the output rectangle in device coordinates (pixels).
Remarks
This function should not be called if this Device object has a width and/or height of 0, .

Implemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ onSize() [2/2]

virtual void OdGsDevice::onSize ( const OdGsDCRectDouble outputRect)
virtual

Notification function called whenever the size of the GUI window for this Device object has changed.

Parameters
outputRect[in] New size of the output rectangle in device coordinates (pixels).
Remarks
This function should not be called if this Device object has a width and/or height of 0, .

Reimplemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ properties()

virtual OdRxDictionaryPtr OdGsDevice::properties ( )
pure virtual

Returns a SmartPointer to the dictionary containing the properties for this Device object.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ saveDeviceState()

virtual bool OdGsDevice::saveDeviceState ( OdGsFiler pFiler) const
virtual

Stores current device state into filer object.

Parameters
pFiler[in] Filer object.

Reimplemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ setBackgroundColor()

virtual bool OdGsDevice::setBackgroundColor ( ODCOLORREF  backgroundColor)
pure virtual

◆ setLogicalPalette()

virtual void OdGsDevice::setLogicalPalette ( const ODCOLORREF logicalPalette,
int  numColors 
)
pure virtual

Sets the logical pallete to be used by this Device object.

Parameters
logicalPalette[in] Logical palette.
numColors[in] Number of colors in palette.
Remarks
The logical pallete is used with calls to OdGiSubEntityTraits::setColor().

Implemented in OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ setUpdateManager()

virtual void OdGsDevice::setUpdateManager ( OdGsUpdateManagerPtr  pManager)
virtual

◆ setUserGiContext()

virtual void OdGsDevice::setUserGiContext ( OdGiContext pUserGiContext)
pure virtual

◆ update()

virtual void OdGsDevice::update ( OdGsDCRect pUpdatedRect = 0)
pure virtual

Updates the GUI window for this Device object.

Parameters
pUpdatedRect[out] Pointer to the a rectangle to receive the region updated by this function.
Remarks
This function call is propagated to all OdGsView objects owned by this Device object, thus displaying the correct image on the GUI window of this Device object.

Implemented in OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >, OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ userGiContext()

virtual OdGiContext* OdGsDevice::userGiContext ( ) const
pure virtual

◆ viewAt()

virtual OdGsView* OdGsDevice::viewAt ( int  viewIndex)
pure virtual

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