## Pen for OS/2 Device Driver Reference

[prev][next][parent][TOC]

### Workplace Object Classes Hierarchy

The following shows the Pen object classes as they fit into the predefined Workplace object class hierarchy. Each branch in the tree represents an immediate descendant (subclass) of a Workplace object class.

         CLASS NAME                                   CLASS FILE NAME

         SOMObject                                      SOMOBJ.SC
            |
            \-WPObject (replaced by PenObject)          PENOBJ.SC
                 |
                 \-WPAbstract                           WPABS.SC
                      |
                      \-PenButtonDevice                 PENBTNDV.SC
                           |
                           |-PenDisplay                 WPDISPLY.SC
                           |
                           \-PenLocator                 WPLOCATR.SC
                                |
                                |-PenLocatorFinger      WPLOCFGR.SC
                                |
                                \-PenLocatorPen         WPLOCPEN.SC

Subclassing an object class creates a child class that modifies the behavior of the parent class based on the child's new methods, instance data, and overriding parent methods. An object class is subclassed by deriving the new child class from the parent class. The parent's methods can be altered or supplemented by the new class and new instance data can be added and manipulated by the new child class.

The predefined System Object Model (SOM) object class, SOMObject, is the root class for all SOM object classes, including all Workplace object classes. No external programming interfaces exist permitting another OS/2 process to invoke methods. However, some API functions exist, such as WinSetObjectData, enabling other processes limited communication with an object. The interface to the device objects is through Workplace published classes. Information on SOM and Workplace objects can be found in Workplace Shell Programming Reference and in Workplace Shell Programming Guide.

Invocation of the new device objects will work in a manner similar to the current Mouse object. You can alter the system parameters for these devices using the Settings notebook. While in the Settings notebook of a device object, you can set parameters used by a device driver and the Pen for OS/2 system. These parameters control the operational characteristics of a device. Parameters represent items such as tap rates, delay times, function switches, and the functions performed when device buttons are pressed.