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 >
Wrap
Text File
|
2001-01-27
|
6KB
|
117 lines
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<base href="http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/BOOKS/EZ30OZ00/2.7.5">
<title>
2.7.5 "OS/2 WARP and OpenDoc"
via IBM BookManager BookServer
</title>
</head>
<body background="/bookmgr/backdrop.gif">
<banner><br>
<a href="../../library"><img src="/bookmgr/libicon2.gif" border=0 alt="[Library]"></a>
<a href="CONTENTS#2.7.5"><img src="/bookmgr/contents.gif" border=0 alt="[Contents]"></a>
<img src="/bookmgr/drevs.gif" border=0 alt="[Revisions]">
<a href="2.7.4"><img src="/bookmgr/prev.gif" border=0 alt="[Prev Topic]"></a>
<a href="2.7.6"><img src="/bookmgr/next.gif" border=0 alt="[Next Topic]"></a>
<a href="../../search?book=EZ30OZ00"><img src="/bookmgr/search.gif" border=0 alt="[Search]" ></a>
<img src="/bookmgr/dslist.gif" border=0 alt="[Search Results]">
<img src="/bookmgr/dsprev.gif" border=0 alt="[Prev Topic Match]">
<img src="/bookmgr/dsnext.gif" border=0 alt="[Next Topic Match]">
<img src="/bookmgr/dnotes.gif" border=0 alt="[Notes]">
<img src="/bookmgr/dlnotes.gif" border=0 alt="[List Notes]">
<a href="../../print?book=EZ30OZ00"><img src="/bookmgr/print.gif" border=0 alt="[Print]"></a>
<a href="../../download/EZ30OZ00.boo"><img src="/bookmgr/download.gif" border=0 alt="[Download]" ></a>
<a href="../../help/book"><img src="/bookmgr/help.gif" border=0 alt="[Help]"></a>
<hr>
<a name="HDR4610DSO"><H3> 2.7.5 SOM and OpenDoc</H3></a>
</banner>
<pre width="80">
OpenDoc is implemented as a class library defined as a set of SOM classes.
The classes are shown in <a href="#FIG4610D12">Figure 45</a>. All OpenDoc parts are derived from
one abstract class ODPart, which has encapsulated all of the base methods
of a OpenDoc component, such as defining embedding, drag and drop,
linking, component activation and binding, basic frame behavior,
containment and user interface handling as shown in<a href="#FIG4610D12"> Figure 45</a>.
<p>
<a name="FIG4610D12"><hr>
</a>
<p>
<p>
<a href="picture-45?mode=zoom"><img src="/bookmgr/pictures/EZ30OZ00.P45.GIF" alt="PICTURE 45"></a>
<p>
<p>
<hr>
Figure 45. OpenDoc Class Hierarchy
<p>
Some of the classes are part of the OpenDoc run-time environment and only
instantiated by OpenDoc; some of the classes are abstract classes, to be
used and overridden by components. There are a couple of classes
available, derived from ODPart, that have already implemented many of the
base behavior for drag and drop, containment, linking and more. Many of
them are part of the OS/2 Toolkit or delivered with Partmeister as shown
in the example of <a href="2.9.1#HDR4610DIP">"Sample IDL File Generated by Partmeister" in</a>
<a href="2.9.1#HDR4610DIP">topic 2.9.1</a>, which is derived from IBM_Non_Container, a class drived from
ODPart.
<p>
A developer minimumly has to define how to store the data and how to
initialize a part handler with data already stored, and how to define the
way the view of the component is shown on the screen (see <a href="#FIG4610D42">Figure 46</a>).
<p>
<a name="FIG4610D42"><hr>
</a>
<p>
<p>
<a href="picture-46?mode=zoom"><img src="/bookmgr/pictures/EZ30OZ00.P46.GIF" alt="PICTURE 46"></a>
<p>
<p>
<hr>
Figure 46. OpenDoc ODPart
<p>
Components of an OpenDoc document share one OS/2 process. This process is
called DocShell. DocShell handles all functions that must be provided
across all the parts. One reason that pieces of an application must be
redesigned when they are migrated to become part handler is due to the
fact that the resources of an OS/2 process are now shared between
different part handlers. These resources such as windows, queues,
storage, and event handling, are normally owned exclusively by an
application . OpenDoc is initializing this run-time environment by
instantiating a couple of OpenDoc classes. The class relationships are
shown in <a href="#FIG4610D13">Figure 47</a>. The root class that knows all references to the other
classes is ODSession, as shown in <a href="2.4#FIG4610D43">Figure 21 in topic 2.4</a>.
<p>
<a name="FIG4610D13"><hr>
</a>
<p>
<p>
<a href="picture-47?mode=zoom"><img src="/bookmgr/pictures/EZ30OZ00.P47.GIF" alt="PICTURE 47"></a>
<p>
<p>
<hr>
Figure 47. OpenDoc Class Relationships
<p>
Another central class, as you can see in <a href="#FIG4610D13">Figure 47</a>, is ODStorageUnit which
is used from many any other classes such as drag/drop and clipboard. The
GA Version of the OpenDoc Toolkit, which is included in the updated OS/2
Warp Developer Toolkit available from The Developer Connection for OS/2
Volume 9 Special Edition, also supports direct-to-SOM (DTS) component
development. This enables developers to define and code their OpenDoc
parts directly in C++. The required IDL is then generated from Visual Age
C++ out of the C++ header files. More details about the component
development can be found in the <cite>OpenDoc</cite> <cite>Programming</cite> <cite>Guide</cite> <cite>and</cite> <cite>Reference</cite>,
which is delivered with the updated IBM Developer's Toolkit for OS/2 Warp
Version 3, of The Developer Connection for OS/2 Volume 9 Special Edition.
A good starting point for component development is the samples provided
with the IBM Developer's Toolkit for OS/2 Warp Version 3.
</pre>
</pre>
<hr>
<br><a href="2.7.4"><img src="/bookmgr/prev.gif" border=0 alt="[Prev Topic]"></a>
<a href="2.7.6"><img src="/bookmgr/next.gif" border=0 alt="[Next Topic]"></a>
<cite> ⌐ Copyright IBM Corp. 1996</cite>
<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>
</BODY></HTML>