Class Definition File | OS2PCanv.idl |
Class C++ Binding | OS2PCanv.xh |
Class Hierarchy |
SOMObject ODObject ODPlatformCanvas ODOS2Canvas |
Description | ODOS2Canvas is an OS/2 specific class that serves as a platform parent class for other classes used to encapsulate window's drawing contexts. The ODOS2Canvas is derived from ODPlatformCanvas and wraps a presentation space. It can be instantiated directly to access the CreateConcreteCanvas factory method for creating instances of ODOS2StandardCanvas and ODOS2WindowCanvas. These two classes override nearly all of the methods of ODOS2Canvas. ODOS2StandardCanvas initializes offscreen static, offscreen dynamic, and onscreen static canvases. ODOS2WindowCanvas initializes onscreen dynamic canvases. Because ODOS2StandardCanvas and ODOS2WindowCanvas do not introduce any new methods, objects of both classes can be referred to using a pointer to an ODOS2Canvas. |
Methods | The methods defined for the ODOS2Canvas class include: |
Overridden Methods | The methods overridden by the ODOS2Canvas class include:
|
This method returns a handle to the presentation space of this platform canvas.
Signature
HPS *GetPS () |
Parameters
None.
Returns
Remarks
This method must be overridden by a subclass and will return a kODErrInvalidObjectType if this platform canvas is an ODOS2Canvas. If this platform canvas is a subclass and is initialized, then the handle to the presentation space will be returned. If this platform canvas is an ODOS2WindowCanvas, then you must release the presentation space using ReleasePS when you finish drawing.
Exception Handling
kODErrInvalidObjectType | This method is not valid on this object. |
This method returns a reference to the window associated with this platform canvas.
Signature
HWND GetWindow () |
Parameters
None.
Returns
Remarks
This method must be overridden by a subclass and returns a kODErrInvalidObjectType if this platform canvas is an ODOS2Canvas. If this platform canvas is an ODOS2WindowCanvas and is initialized, then it returns the window associated with this platform canvas.
Exception Handling
kODErrInvalidObjectType | This method is not valid on this object. |
This method initializes the platform canvas using a handle to a presentation space.
Signature
void InitPlatformCanvas (HPS hps) |
Parameters
Returns
None.
Remarks
This method must be overridden by a subclass. This method returns kODErrInvalidObjectType if this platform canvas is an ODOS2Canvas.
Exception Handling
kODErrInvalidObjectType | This method is not valid on this object. |
This method initializes the platform canvas using a handle to a window.
Signature
void InitPlatformWindowCanvas (HWND hwnd) |
Parameters
Returns
None.
Remarks
This method must be overridden by a subclass. This method returns kODErrInvalidObjectType if this platform canvas is an ODOS2Canvas.
Exception Handling
kODErrInvalidObjectType | This method is not valid on this object. |
This method decrements the reference count and releases the presentation space when the reference count reaches zero.
Signature
void ReleasePS () |
Parameters
None.
Returns
None.
Remarks
This method must be overridden by a subclass and returns a kODErrInvalidObjectType if this platform canvas is an ODOS2Canvas. If this platform canvas is an ODOS2WindowCanvas and is initialized, then it decrements the reference count. When the reference count reaches zero, the presentation space is released.
Exception Handling
kODErrInvalidObjectType | This method is not valid on this object. |
This method sets the presentation space of this platform canvas.
Signature
void SetPS () |
Parameters
None.
Returns
None.
Remarks
This method must be overridden by a subclass and returns a kODErrInvalidObjectType if this platform canvas is an ODOS2Canvas. If this platform canvas is a subclass and is initialized, then this method returns the handle to the presentation space. If this platform canvas is an ODOS2WindowCanvas, then you must release the presentation space using ReleasePS when you finish drawing.
Exception Handling
kODErrInvalidObjectType | This method is not valid on this object. |