Programming Reference


ODAIXCanvas

     

Class definition file

AIXPCanv.idl

Class C++ Binding

AIXPCanv.xh

Class hierarchy

SOMObject
   ODObject
      ODPlatformCanvas
         ODAIXCanvas

Description

The ODAIXCanvas class is an AIX X-Windows specific SOM class that serves as a platform parent class for other classes used to encapsulate AIX drawing contexts. The ODAIXCanvas class is derived from ODPlatformCanvas and wraps an X-Windows graphics context (GC). It can be instantiated directly to access the CreateConcreteCanvas factory method for creating instances of ODAIXStandardCanvas and ODAIXWindowCanvas. These two classes override nearly all of the methods of ODAIXCanvas. ODAIXStandardCanvas is used to initialize offscreen static, offscreen dynamic, and onscreen static canvases. ODAIXWindowCanvas is used to initialize onscreen dynamic canvases. Because ODAIXStandardCanvas and ODAIXWindowCanvas do not introduce any new methods, objects of both classes can be referred to using a pointer to an ODAIXCanvas.

Methods

The methods defined for the ODAIXCanvas class include:

Overridden methods

The methods overridden by the ODAIXCanvas class include:

   

GetDisplay (AIX)

This method returns the X-Windows display pointer associated with this platform canvas.

Signature
Display *GetDisplay ()

Parameters

None.

Returns

rv  (Display *)  -  returns 

An X-Windows display pointer.

Remarks

This method must be overridden by a subclass. This method returns a kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.

   


GetGC (AIX)

This method returns a handle to the graphics context of this platform canvas.

Signature
GC GetGC ()

Parameters

None.

Returns

rv  (GC)  -  returns 

A handle to the graphics context of the platform canvas.

Remarks

This method must be overridden by a subclass. This method returns a kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

If this platform canvas is a subclass, and it has been initialized, then the handle to the device context will be returned.

The user is responsible for freeing the graphics context when it is no longer used by the canvas.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.

   


GetPixmap (AIX)

This method returns a reference to the pixmap associated with this platform canvas.

Signature
Pixmap GetPixmap ()

Parameters

None.

Returns

rv  (Pixmap)  -  returns 

An X-Windows pixmap handle.

Remarks

This method must be overridden by a subclass. This method returns a kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

If this platform canvas is an ODAIXWindowCanvas, and it has been initialized, then this method returns a pixmap associated with this platform canvas.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.

   


GetWidget (AIX)

This method returns a reference to the widget associated with this platform canvas.

Signature
Widget GetWidget ()

Parameters

None.

Returns

rv  (Widget)  -  returns 

An X-Windows Toolkit widget handle.

Remarks

This method must be overridden by a subclass. This method returns a kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

If this platform canvas is an ODAIXWindowCanvas, and it has been initialized, then this method returns the widget associated with this platform canvas.

This widget may be NULL.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.

   


GetWindow (AIX)

This method returns a reference to the window associated with this platform canvas.

Signature
Window GetWindow ()

Parameters

None.

Returns

rv  (Window)  -  returns 

An X-Windows window handle.

Remarks

This method must be overridden by a subclass. This method returns a kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

If this platform canvas is an ODAIXWindowCanvas, and it has been initialized, then this method returns a window associated with this platform canvas.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.

   


InitPlatformCanvas (AIX)

This method initializes the platform canvas using a handle to a pixmap and a graphics context.

Signature
void InitPlatformCanvas (Display *display,
                         Pixmap pixmap,
                         GC gc)

Parameters

display  (Display *)  -  input 

A pointer to a valid X-Windows display structure.

pixmap  (Pixmap)  -  input 

An X-Windows pixmap handle.

gc  (GC)  -  input 

An X-Windows graphics context.

Returns

None.

Remarks

This method must be overridden by a subclass. This method returns kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.

   


InitPlatformWindowCanvas (AIX)

This method initializes the platform canvas using a handle to a window and a graphics context.

Signature
void InitPlatformWindowCanvas (Display *display,
                               Window window,
                               Widget widget,
                               GC gc)

Parameters

display  (Display *)  -  input 

A pointer to a valid X-Windows display structure.

window  (Window)  -  input 

An X-Windows window handle.

widget  (Widget)  -  input 

An X-Windows Tookit Widget, may be NULL if a widget is not associated with this canvas.

gc  (GC)  -  input 

An X-Windows graphics context.

Returns

None.

Remarks

This method must be overridden by a subclass. This method returns kODErrInvalidObjectType if this platform canvas is an ODAIXCanvas.

Exception Handling

kODErrInvalidObjectType

This method is not valid on this object.


[ Top | Previous | Next | Contents | Index | Documentation Homepage ]