CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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 > > CFxDisplayDevice OdGsIfcModelHelper OdGsModelLayoutHelper OdGsPaperLayoutHelper

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>

See also
<link tv_working_with_base_classes_device, Work with Visualize Graphics Devices>
<link gs_OdGsDevice, Work with Graphics Devices>

Definition at line 1437 of file Gs.h.

Member Function Documentation

◆ addView()

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

Associates the specified Viewport object with this Device object.

Parameters
pView[in] Pointer to the OdGsView object.

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

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ eraseAllViews()

virtual void OdGsDevice::eraseAllViews ( )
pure virtual

Erases all views associated with this Device object.

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

◆ eraseView() [1/2]

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

Erases the specified View object.

Parameters
viewIndex[in] View index.
Returns
Returns true if and only if successful.

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

◆ eraseView() [2/2]

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

Erases the specified View object.

Parameters
pView[in] Pointer to the OdGsView object.
Returns
Returns true if and only if successful.

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

◆ getBackgroundColor()

virtual ODCOLORREF OdGsDevice::getBackgroundColor ( )
pure virtual

Returns the Background Color of the GUI window of this Device object.

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

◆ getLogicalPalette()

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

Returns the logical pallete used by this Device object.

Parameters
numColors[out] Number of colors in palette.

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

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ 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 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ 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 OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >, and OdGsBaseVectorizeDevice.

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ invalidate() [1/2]

virtual void OdGsDevice::invalidate ( )
pure virtual

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

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

◆ invalidate() [2/2]

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

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

Parameters
screenRect[in] Rectangular area.

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

◆ 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.
Returns
true if the provided model is compatible with this device, false otherwise.
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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ isValid()

virtual bool OdGsDevice::isValid ( ) const
pure virtual

Checks whether the GUI window for this Device object is showing the correct image.

Returns
true if the GUI window for this Device object is showing the correct image, false otherwise.
Remarks
This implies the following: No part of GUI area is flagged for refresh. All rasterizations are complete The rendering pipeline has been flushed.

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

◆ loadDeviceState()

virtual bool OdGsDevice::loadDeviceState ( OdGsFiler pFiler)
virtual

Restores device state from filer object.

Parameters
pFiler[in] Filer object.
Returns
true if device state is successfully loaded, false if device state loading is not supported.

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

◆ numViews()

virtual int OdGsDevice::numViews ( ) const
pure virtual

Returns the number of views associated with this Device object.

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

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ 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 palette.

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

◆ onRealizeForegroundPalette()

virtual void OdGsDevice::onRealizeForegroundPalette ( )
pure virtual
Remarks
Causes this Device object to realize its foreground palette.

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

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ 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 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.

See also
<link gs_DeviceProps, ODA Vectorization Devices Properties>

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

◆ saveDeviceState()

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

Stores current device state into filer object.

Parameters
pFiler[out] Filer object.
Returns
true if device state is successfully saved, false if device state saving is not supported.

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

◆ setBackgroundColor()

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

Sets the Background Color of the GUI window of this Device object.

Parameters
backgroundColor[in] Background color.

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

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ setUpdateManager()

virtual void OdGsDevice::setUpdateManager ( OdGsUpdateManagerPtr  pManager)
virtual

◆ setUserGiContext()

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

Sets the User Context object associated with this Device object.

Parameters
pUserGiContext[in] Pointer to the User Context.

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

◆ 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 OdGsBaseVectorizeDevice, and OdGsDeviceWrapper< OdGsDevice, OdGsDefaultRedirectionBase< OdGsDevice, OdGsDevice > >.

◆ userGiContext()

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

Returns the User Context object associated with this Device object.

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

◆ viewAt()

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

Returns the specified OdGsView object associated with this Device object.

Parameters
viewIndex[in] View index.

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


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