home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / SG244883.ZIP / 2_7.5 < prev    next >
Text File  |  2001-01-27  |  6KB  |  117 lines

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2. <HTML>
  3. <HEAD>
  4. <base href="http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/BOOKS/EZ30OZ00/2.7.5">
  5. <title>
  6. 2.7.5 "OS/2 WARP and OpenDoc" 
  7.   via IBM BookManager BookServer
  8. </title>
  9. </head>
  10. <body background="/bookmgr/backdrop.gif">
  11. <banner><br>
  12. <a href="../../library"><img src="/bookmgr/libicon2.gif" border=0 alt="[Library]"></a>
  13. <a  href="CONTENTS#2.7.5"><img src="/bookmgr/contents.gif" border=0 alt="[Contents]"></a>
  14. <img src="/bookmgr/drevs.gif" border=0 alt="[Revisions]">
  15. <a href="2.7.4"><img src="/bookmgr/prev.gif" border=0 alt="[Prev Topic]"></a>
  16. <a href="2.7.6"><img src="/bookmgr/next.gif" border=0 alt="[Next Topic]"></a>
  17. <a href="../../search?book=EZ30OZ00"><img src="/bookmgr/search.gif" border=0 alt="[Search]" ></a>
  18. <img src="/bookmgr/dslist.gif" border=0 alt="[Search Results]">
  19. <img src="/bookmgr/dsprev.gif" border=0 alt="[Prev Topic Match]">
  20. <img src="/bookmgr/dsnext.gif" border=0 alt="[Next Topic Match]">
  21. <img src="/bookmgr/dnotes.gif" border=0 alt="[Notes]">
  22. <img src="/bookmgr/dlnotes.gif" border=0 alt="[List Notes]">
  23. <a  href="../../print?book=EZ30OZ00"><img src="/bookmgr/print.gif" border=0 alt="[Print]"></a>
  24. <a href="../../download/EZ30OZ00.boo"><img src="/bookmgr/download.gif" border=0 alt="[Download]" ></a>
  25. <a  href="../../help/book"><img src="/bookmgr/help.gif" border=0 alt="[Help]"></a>
  26. <hr>
  27. <a name="HDR4610DSO"><H3> 2.7.5   SOM and OpenDoc</H3></a>
  28. </banner>
  29. <pre width="80">
  30.    OpenDoc is implemented as a class library defined as a set of SOM classes. 
  31.    The classes are shown in <a href="#FIG4610D12">Figure 45</a>.  All OpenDoc parts are derived from 
  32.    one abstract class ODPart, which has encapsulated all of the base methods 
  33.    of a OpenDoc component, such as defining embedding, drag and drop, 
  34.    linking, component activation and binding, basic frame behavior, 
  35.    containment and user interface handling as shown in<a href="#FIG4610D12"> Figure 45</a>. 
  36. <p>
  37. <a name="FIG4610D12"><hr>
  38.  </a>
  39. <p>
  40. <p>
  41.                                    <a href="picture-45?mode=zoom"><img src="/bookmgr/pictures/EZ30OZ00.P45.GIF" alt="PICTURE 45"></a>           
  42. <p>
  43. <p>
  44. <hr>
  45.  
  46.    Figure 45. OpenDoc Class Hierarchy 
  47. <p>
  48.    Some of the classes are part of the OpenDoc run-time environment and only 
  49.    instantiated by OpenDoc; some of the classes are abstract classes, to be 
  50.    used and overridden by components.  There are a couple of classes 
  51.    available, derived from ODPart, that have already implemented many of the 
  52.    base behavior for drag and drop, containment, linking and more. Many of 
  53.    them are part of the OS/2 Toolkit or delivered with Partmeister as shown 
  54.    in the example of <a href="2.9.1#HDR4610DIP">"Sample IDL File Generated by Partmeister" in</a> 
  55.    <a href="2.9.1#HDR4610DIP">topic 2.9.1</a>, which is derived from IBM_Non_Container, a class drived from 
  56.    ODPart. 
  57. <p>
  58.    A developer minimumly has to define how to store the data and how to 
  59.    initialize a part handler with data already stored, and how to define the 
  60.    way the view of the component is shown on the screen (see <a href="#FIG4610D42">Figure 46</a>). 
  61. <p>
  62. <a name="FIG4610D42"><hr>
  63.  </a>
  64. <p>
  65. <p>
  66.                                    <a href="picture-46?mode=zoom"><img src="/bookmgr/pictures/EZ30OZ00.P46.GIF" alt="PICTURE 46"></a>           
  67. <p>
  68. <p>
  69. <hr>
  70.  
  71.    Figure 46. OpenDoc ODPart 
  72. <p>
  73.    Components of an OpenDoc document share one OS/2 process.  This process is 
  74.    called DocShell.  DocShell handles all functions that must be provided 
  75.    across all the parts.  One reason that pieces of an application must be 
  76.    redesigned when they are migrated to become part handler is due to the 
  77.    fact that the resources of an OS/2 process are now shared between 
  78.    different part handlers.  These resources such as windows, queues, 
  79.    storage, and event handling, are normally owned exclusively by an 
  80.    application .  OpenDoc is initializing this run-time environment by 
  81.    instantiating a couple of OpenDoc classes.  The class relationships are 
  82.    shown in <a href="#FIG4610D13">Figure 47</a>.  The root class that knows all references to the other 
  83.    classes is ODSession, as shown in <a href="2.4#FIG4610D43">Figure 21 in topic 2.4</a>. 
  84. <p>
  85. <a name="FIG4610D13"><hr>
  86.  </a>
  87. <p>
  88. <p>
  89.                                    <a href="picture-47?mode=zoom"><img src="/bookmgr/pictures/EZ30OZ00.P47.GIF" alt="PICTURE 47"></a>           
  90. <p>
  91. <p>
  92. <hr>
  93.  
  94.    Figure 47. OpenDoc Class Relationships 
  95. <p>
  96.    Another central class, as you can see in <a href="#FIG4610D13">Figure 47</a>, is ODStorageUnit which 
  97.    is used from many any other classes such as drag/drop and clipboard.  The 
  98.    GA Version of the OpenDoc Toolkit, which is included in the updated OS/2 
  99.    Warp Developer Toolkit available from The Developer Connection for OS/2 
  100.    Volume 9 Special Edition, also supports direct-to-SOM (DTS) component 
  101.    development.  This enables developers to define and code their OpenDoc 
  102.    parts directly in C++. The required IDL is then generated from Visual Age 
  103.    C++ out of the C++ header files.  More details about the component 
  104.    development can be found in the <cite>OpenDoc</cite> <cite>Programming</cite> <cite>Guide</cite> <cite>and</cite> <cite>Reference</cite>, 
  105.    which is delivered with the updated IBM Developer's Toolkit for OS/2 Warp 
  106.    Version 3, of The Developer Connection for OS/2 Volume 9 Special Edition. 
  107.    A good starting point for component development is the samples provided 
  108.    with the IBM Developer's Toolkit for OS/2 Warp Version 3. 
  109. </pre>
  110. </pre>
  111. <hr>
  112. <br><a href="2.7.4"><img src="/bookmgr/prev.gif" border=0 alt="[Prev Topic]"></a>
  113. <a href="2.7.6"><img src="/bookmgr/next.gif" border=0 alt="[Next Topic]"></a>
  114. <cite>  ⌐ Copyright IBM Corp. 1996</cite>
  115. <HR><p><h6><a href="/cgi-bin/bookmgr/library">IBM BookManager« BookServer</a> Copyright 1989, 1999<a href="http://www.ibm.com/"> IBM</a> Corporation.  All rights reserved.</h6><p>
  116. </BODY></HTML>
  117.