To design a Workplace Shell class, first identify all the actions to which an object instance can respond. Based on this list, define the methods in the class definition file that correspond to the actions that were identified. To illustrate this process and understand how method requirements for a class are identified, consider the WPObject and WPAbstract classes.
Based on the general description of user objects in a CUA-conforming user environment, objects have the following:
These characteristics and behaviors should be reflected in the methods in the class definition file for the WPObject class. The following table shows the mapping of characteristics and behaviors common to all Workplace Shell objects defined for this class:
┌───────────────┬────────────────────────────┬─────────────────┐│Method Group │Method Name │Characteristic │ ├───────────────┼────────────────────────────┼─────────────────┤ │Container │wpCnrInsertObject │Object containers│ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCnrRemoveObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCnrSetEmphasis │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRegisterView │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsInsertMultipleObjects │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Details │wpIsSortAttribAvailable │Object criteria │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryDetailsData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryFldrDetailsClass │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryFldrSort │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryFldrSortClass │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetFldrDetailsClass │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetFldrSort │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetFldrSortClass │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetSortAttribAvailable │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDetails │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDetailsInfo │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Direct │wpDragCell │Object mobility │ │manipulation │ │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpDraggedOverObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpDragOver │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpDrop │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpDroppedOnObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpEndConversation │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpFormatDragItem │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRender │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRenderComplete │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Error handling │wpQueryError │Object errors │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsSetError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Help │wpDisplayHelp │Object aid │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpMenuItemHelpSelected │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryDefaultHelp │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetDefaultHelp │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDefaultHelp │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Memory │wpAllocMem │Object memory │ │allocation │ │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpFreeMem │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Notebook │wpAddObjectGeneralPage │Object properties│ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpAddObjectGeneralPage2 │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpAddObjectWindowPage │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpAddSettingsPages │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCnrRefreshDetails │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpInsertSettingsPage │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Pop-Up menu │wpClose │Object user │ │ │ │action │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCopyObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCreateFromTemplate │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCreateShadowObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpDelete │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpFilterPopupMenu │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpHide │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpInsertPopupMenuItems │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpMenuItemSelected │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpModifyPopupMenu │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpMoveObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpOpen │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpPrintObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRestore │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpViewObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Save/Restore │wpRestoreData │Object │ │state │ │persistence │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRestoreLong │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRestoreState │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpRestoreString │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSaveData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSaveDeferred │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSaveImmediate │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSaveLong │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSaveState │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSaveString │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Setup/Cleanup │wpFree │Object │ │ │ │initialization │ │ │ │and termination │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpInitData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpIsObjectInitialized │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpObjectReady │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpScanSetupString │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetup │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetupOnce │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpUnInitData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsInitData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsUnInitData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Usage │wpAddToObjUseList │Object usage │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpCnrDeleteUseItem │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpDeleteFromObjUseList │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpFindUseItem │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpFindViewItem │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpIsLocked │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpLockObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpUnlockObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │Set/Query │wpModifyStyle │Object │ │ │ │information │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryButtonAppearance │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryConcurrentView │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryConfirmations │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryContainerFlagPtr │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryCoreRecord │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryDefaultHelp │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryDefaultIconPos │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryDefaultView │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryDetailsData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryFolder │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryHandle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryIcon │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryIconData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryMinWindow │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryNameClashOptions │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryObjectID │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryScreenGroupID │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryStyle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpQueryTitle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetButtonAppearance │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetConcurrentView │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetDefaultHelp │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetDefaultIconPos │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetDefaultView │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetIcon │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetIconData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetMinWindow │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetObjectID │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetStyle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpSetTitle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryButtonAppearance │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDefaultHelp │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDefaultView │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDetails │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryDetailsInfo │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryExtendedCriteria │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryFolder │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryIcon │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryIconData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryObject │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQuerySettingsPageSize │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryStyle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsQueryTitle │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsSetError │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsSetIcon │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsSetIconData │ │ ├───────────────┼────────────────────────────┼─────────────────┤ │ │wpclsSetSettingsPageSize │ │ └───────────────┴────────────────────────────┴─────────────────┘