CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase > Class Template Reference

#include <GsInterfaceWrappers.h>

Inheritance diagram for OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >:
OdGsDefaultRedirectionBase< RedirectionBaseInterface, RedirectionInterface > OdGsDeviceWrapperMinimalImpl< GsDeviceInterface, RedirectionBase >

Public Member Functions

 OdGsDeviceWrapper (OdGsDevice *pRedirectionDevice=NULL)
 
OdRxDictionaryPtr properties ()
 
OdGiContextuserGiContext () const
 
void setUserGiContext (OdGiContext *pUserGiContext)
 
void invalidate ()
 
void invalidate (const OdGsDCRect &screenRect)
 
bool isValid () const
 
void update (OdGsDCRect *pUpdatedRect=0)
 
void onSize (const OdGsDCRect &outputRect)
 
void onSize (const OdGsDCRectDouble &outputRect)
 
void getSize (OdGsDCRect &outputRect) const
 
void getSize (OdGsDCRectDouble &outputRect) const
 
void onRealizeForegroundPalette ()
 
void onRealizeBackgroundPalette ()
 
void onDisplayChange (int bitsPerPixel, int xPixels, int yPixels)
 
OdGsViewPtr createView (const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)
 
void addView (OdGsView *pView)
 
OdGsModelPtr createModel ()
 
bool isModelCompatible (OdGsModel *pModel) const
 
bool saveDeviceState (OdGsFiler *pFiler) const
 
bool loadDeviceState (OdGsFiler *pFiler)
 
void insertView (int viewIndex, OdGsView *pView)
 
bool eraseView (OdGsView *pView)
 
bool eraseView (int viewIndex)
 
void eraseAllViews ()
 
int numViews () const
 
OdGsViewviewAt (int viewIndex)
 
bool setBackgroundColor (ODCOLORREF backgroundColor)
 
ODCOLORREF getBackgroundColor ()
 
void setLogicalPalette (const ODCOLORREF *logicalPalette, int numColors)
 
const ODCOLORREFgetLogicalPalette (int &numColors) const
 
void getSnapShot (OdGiRasterImagePtr &pImage, const OdGsDCRect &region)
 
OdGsUpdateManagerPtr getUpdateManager (bool createIfNotExist)
 
void setUpdateManager (OdGsUpdateManagerPtr pManager)
 
- Public Member Functions inherited from OdGsDefaultRedirectionBase< RedirectionBaseInterface, RedirectionInterface >
 OdGsDefaultRedirectionBase (RedirectionBaseInterface *pRedirectionObj=NULL)
 
bool hasRedirection () const
 
const RedirectionBaseInterface * redirection () const
 
RedirectionBaseInterface * redirection ()
 
void setRedirection (RedirectionBaseInterface *pRedirectionObj)
 
void resetRedirection ()
 

Detailed Description

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
class OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >

Base template for OdGsDevice class wrappers.

Corresponding C++ library: TD_Gs

<group OdGs_Classes>

Definition at line 1674 of file GsInterfaceWrappers.h.

Constructor & Destructor Documentation

◆ OdGsDeviceWrapper()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::OdGsDeviceWrapper ( OdGsDevice pRedirectionDevice = NULL)
inline

Default constructor for the OdGsDeviceWrapper class. Sets the redirection (wrapped) device.

Parameters
pRedirectionDevice[in] Pointer to the redirection (wrapped) device.

Definition at line 1687 of file GsInterfaceWrappers.h.

Member Function Documentation

◆ addView()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::addView ( OdGsView pView)
inline

Associates the specified Viewport object with this Device object.

Parameters
pView[in] Pointer to the OdGsView object.

Definition at line 1889 of file GsInterfaceWrappers.h.

◆ createModel()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdGsModelPtr OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::createModel ( )
inline

Creates a new OdGsModel object, and associates it with this Device object. This method returns a NULL smart pointer to a model if there is no redirection device.

Returns
Returns a SmartPointer to the newly created object.

Definition at line 1902 of file GsInterfaceWrappers.h.

◆ createView()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdGsViewPtr OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::createView ( const OdGsClientViewInfo pViewInfo = 0,
bool  enableLayerVisibilityPerView = false 
)
inline

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. This method returns a NULL smart pointer to a view if there is no redirection device. pViewInfo contains information returned by OdGiViewport::acadWindowId() and OdGiViewportDraw::viewportObjectId()

Definition at line 1877 of file GsInterfaceWrappers.h.

◆ eraseAllViews()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::eraseAllViews ( )
inline

Erases all views associated with this Device object.

Definition at line 2007 of file GsInterfaceWrappers.h.

◆ eraseView() [1/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::eraseView ( int  viewIndex)
inline

Erases the specified View object.

Parameters
viewIndex[in] View index.
Returns
true if view is erased successfully false otherwise. This method returns false if there is no redirection device.

Definition at line 1997 of file GsInterfaceWrappers.h.

◆ eraseView() [2/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::eraseView ( OdGsView pView)
inline

Erases the specified View object.

Parameters
pView[in] Pointer to the OdGsView object.
Returns
true if view is erased successfully false otherwise. This method returns false if there is no redirection device.

Definition at line 1982 of file GsInterfaceWrappers.h.

◆ getBackgroundColor()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
ODCOLORREF OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::getBackgroundColor ( )
inline

Returns the Background Color of the GUI window of this Device object. This method returns ODRGB(0, 0, 0) if there is no redirection device.

Definition at line 2054 of file GsInterfaceWrappers.h.

◆ getLogicalPalette()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
const ODCOLORREF * OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::getLogicalPalette ( int &  numColors) const
inline

Returns the logical palette used by this Device object. This method returns NULL if there is no redirection device.

Parameters
numColors[out] Number of colors in palette.

Definition at line 2082 of file GsInterfaceWrappers.h.

◆ getSize() [1/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::getSize ( OdGsDCRect outputRect) const
inline

Returns device surface output rectangle.

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

Definition at line 1815 of file GsInterfaceWrappers.h.

◆ getSize() [2/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::getSize ( OdGsDCRectDouble outputRect) const
inline

Returns device surface output rectangle.

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

Definition at line 1826 of file GsInterfaceWrappers.h.

◆ getSnapShot()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::getSnapShot ( OdGiRasterImagePtr pImage,
const OdGsDCRect region 
)
inline

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.

Definition at line 2098 of file GsInterfaceWrappers.h.

◆ getUpdateManager()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdGsUpdateManagerPtr OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::getUpdateManager ( bool  createIfNotExist)
inline

Returns OdGsUpdateManager associated with current device. This method returns not valid smart pointer to update manager if there is no redirection device.

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

Definition at line 2110 of file GsInterfaceWrappers.h.

◆ insertView()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::insertView ( int  viewIndex,
OdGsView pView 
)
inline

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.

Definition at line 1968 of file GsInterfaceWrappers.h.

◆ invalidate() [1/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::invalidate ( )
inline

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

Definition at line 1731 of file GsInterfaceWrappers.h.

◆ invalidate() [2/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::invalidate ( const OdGsDCRect screenRect)
inline

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

Parameters
screenRect[in] Rectangular area.

Definition at line 1742 of file GsInterfaceWrappers.h.

◆ isModelCompatible()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::isModelCompatible ( OdGsModel pModel) const
inline

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. This method returns false if there is no redirection device.
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.

Definition at line 1925 of file GsInterfaceWrappers.h.

◆ isValid()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::isValid ( ) const
inline

Checks whether the GUI window for this Device object is showing the correct image. This method returns NULL if there is no redirection device.

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.

Definition at line 1760 of file GsInterfaceWrappers.h.

◆ loadDeviceState()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::loadDeviceState ( OdGsFiler pFiler)
inline

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. This method returns false if there is no redirection device.

Definition at line 1955 of file GsInterfaceWrappers.h.

◆ numViews()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
int OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::numViews ( ) const
inline

Returns the number of views associated with this Device object. This method returns 0 if there is no redirection device.

Definition at line 2017 of file GsInterfaceWrappers.h.

◆ onDisplayChange()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::onDisplayChange ( int  bitsPerPixel,
int  xPixels,
int  yPixels 
)
inline

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.

Definition at line 1860 of file GsInterfaceWrappers.h.

◆ onRealizeBackgroundPalette()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::onRealizeBackgroundPalette ( )
inline

Causes this Device object to realize its background palette.

Definition at line 1844 of file GsInterfaceWrappers.h.

◆ onRealizeForegroundPalette()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::onRealizeForegroundPalette ( )
inline

Causes this Device object to realize its foreground palette.

Definition at line 1835 of file GsInterfaceWrappers.h.

◆ onSize() [1/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::onSize ( const OdGsDCRect outputRect)
inline

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

Definition at line 1790 of file GsInterfaceWrappers.h.

◆ onSize() [2/2]

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::onSize ( const OdGsDCRectDouble outputRect)
inline

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

Definition at line 1804 of file GsInterfaceWrappers.h.

◆ properties()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdRxDictionaryPtr OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::properties ( )
inline

Returns a SmartPointer to the dictionary containing the properties for this Device object. This method returns smart pointer to an empty dictionary if there is no redirection device.

See also
<link gs_DeviceProps, ODA Vectorization Devices Properties>

Definition at line 1700 of file GsInterfaceWrappers.h.

◆ saveDeviceState()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::saveDeviceState ( OdGsFiler pFiler) const
inline

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. This method returns false if there is no redirection device.

Definition at line 1940 of file GsInterfaceWrappers.h.

◆ setBackgroundColor()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
bool OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::setBackgroundColor ( ODCOLORREF  backgroundColor)
inline

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

Parameters
backgroundColor[in] Background color.
Returns
true if background color is set successfully, false otherwise. This method returns false if there is no redirection device.

Definition at line 2043 of file GsInterfaceWrappers.h.

◆ setLogicalPalette()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::setLogicalPalette ( const ODCOLORREF logicalPalette,
int  numColors 
)
inline

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

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

Definition at line 2070 of file GsInterfaceWrappers.h.

◆ setUpdateManager()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::setUpdateManager ( OdGsUpdateManagerPtr  pManager)
inline

Associates OdGsUpdateManager with device

Parameters
pManager[in] Pointer to the OdGsUpdateManager

Definition at line 2125 of file GsInterfaceWrappers.h.

◆ setUserGiContext()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::setUserGiContext ( OdGiContext pUserGiContext)
inline

Sets the User Context object associated with this Device object.

Parameters
pUserGiContext[in] Pointer to the User Context.

Definition at line 1722 of file GsInterfaceWrappers.h.

◆ update()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
void OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::update ( OdGsDCRect pUpdatedRect = 0)
inline

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.

Definition at line 1776 of file GsInterfaceWrappers.h.

◆ userGiContext()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdGiContext * OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::userGiContext ( ) const
inline

Returns the User Context object associated with this Device object. This method returns NULL if there is no redirection device.

Definition at line 1711 of file GsInterfaceWrappers.h.

◆ viewAt()

template<typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface>>
OdGsView * OdGsDeviceWrapper< GsDeviceInterface, RedirectionBase >::viewAt ( int  viewIndex)
inline

Returns the specified OdGsView object associated with this Device object. This method returns NULL if there is no redirection device.

Parameters
viewIndex[in] View index.

Definition at line 2029 of file GsInterfaceWrappers.h.


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