home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / shr93.zip / ADDRBK.CSC < prev    next >
Text File  |  1993-04-12  |  5KB  |  151 lines

  1. #***********************************************************************
  2. #
  3. #  OS/2 Work Place Shell Sample Program - ShrAddressBook
  4. #
  5. #  Copyright (C) 1993 IBM Corporation
  6. #
  7. #    DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  8. #    sample code created by IBM Corporation.  This sample code is
  9. #    not part of any standard or IBM product and is provided to you
  10. #    solely for the purpose of assisting you in the development of
  11. #    your applications.  The code is provided "AS IS".  ALL
  12. #    WARRANTIES ARE EXPRESSLY DISCLAIMED, INCLUDING THE IMPLIED
  13. #    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  14. #    PURPOSE.  IBM shall not be liable for any damages arising out
  15. #    of your use of the sample code, even if IBM has been advised of
  16. #    the possibility of such damages.
  17. #
  18. #***********************************************************************
  19.  
  20. #***********************************************************************
  21. #   Include the class definition file for the parent class
  22. #***********************************************************************
  23.  
  24. include <shrfoldr.sc>
  25.  
  26. #***********************************************************************
  27. #   Define the new class
  28. #***********************************************************************
  29.  
  30. class: ShrAddressBook,
  31.        external stem   = adr,
  32.        local,
  33.        external prefix = adr_,
  34.        classprefix     = adrM_,
  35.        major version   = 1,
  36.        minor version   = 2;
  37.  
  38. --
  39. -- CLASS: ShrAddressBook
  40. --
  41. -- CLASS HIERARCHY:
  42. --
  43. --     SOMObject
  44. --       └── WPObject
  45. --             └── WPFileSystem
  46. --                   └── ShrFolder
  47. --                       └── ShrAddressBook
  48. --
  49. -- DESCRIPTION:
  50. --
  51. --   See ADDRBK.C and ADDRBKV.C for more details.
  52. --
  53.  
  54. #***********************************************************************
  55. #   Specify the parent class
  56. #***********************************************************************
  57.  
  58. parent: ShrFolder;
  59.  
  60. #***********************************************************************
  61. #   Passthru IMPLEMENTATION definitions to the .ih file
  62. #***********************************************************************
  63.  
  64. passthru: C.ih;
  65.  
  66. endpassthru;   /* .ih */
  67.  
  68. #***********************************************************************
  69. #   Passthru PUBLIC definitions to the .h file
  70. #***********************************************************************
  71.  
  72. passthru: C.h, after;
  73.  
  74. extern SOMClass *ShrFindAddressBookClass(VOID);
  75.  
  76. endpassthru;   /* C.h */
  77.  
  78. #***********************************************************************
  79. #   Define instance data
  80. #***********************************************************************
  81.  
  82. data:
  83.  
  84.    SOMObject *somNotifier;              // see shrQueryNotifier
  85.                                         //   in ADDRBK.C
  86.  
  87.    HMODULE hmod, class;                 // see shrclsQueryModuleHandle
  88.                                         //   in ADDRBK.C
  89.  
  90. #***********************************************************************
  91. #   Define methods
  92. #***********************************************************************
  93.  
  94. methods:
  95.  
  96. #***********************************************************************
  97. #   Define instance methods
  98. #***********************************************************************
  99.  
  100. #***********************************************************************
  101. # Generally, methods are invoked on the basis of information provided 
  102. # the class that introduces the method definition (called "offset
  103. # resolution").  However, this requires that the class of the method's
  104. # target object be known at compile time.  Sometimes a method 
  105. # definition is introduced by several classes.  For such methods,
  106. # "name lookup" (which invokes the method using the method's name
  107. # as a key) is a more appropriate choice.
  108. #
  109. # In this case shrQueryNotifier and shrclsQueryModuleHandle are
  110. # defined by ShrAddressBook and ShrPerson.  See "Determining an 
  111. # Object's Protocol" in README.TXT for more details. 
  112. #***********************************************************************
  113.  
  114. SOMObject *shrQueryNotifier(), name lookup;
  115.  
  116. #***********************************************************************
  117. #   Specify instance methods being overridden from WPS
  118. #***********************************************************************
  119.  
  120. override wpInitData;
  121.  
  122. override wpModifyPopupMenu;
  123. override wpMenuItemSelected;
  124. override wpMenuItemHelpSelected;
  125.  
  126. override wpOpen;
  127.  
  128. override wpDragOver;
  129.  
  130. #***********************************************************************
  131. #   Specify instance methods being overridden from ShrFolder
  132. #***********************************************************************
  133.  
  134. override shrAddedToContent;
  135. override shrRemovedFromContent;
  136.  
  137. #***********************************************************************
  138. #   Define class methods
  139. #***********************************************************************
  140.  
  141. HMODULE shrclsQueryModuleHandle(), class, name lookup;
  142. SOMObject *shrclsValidateObject(SOMAny *somObject), class;
  143.  
  144. #***********************************************************************
  145. #   Specify class methods being overridden
  146. #***********************************************************************
  147.  
  148. override wpclsQueryTitle, class;
  149. override wpclsQueryIconData, class;
  150. override wpclsQueryDefaultView, class;
  151.