home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / RLSHELL.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  5KB  |  160 lines

  1. /* @(#)Z 1.9 com/src/docshell/rlshell.h, odshell, od96os2, odos29646d 96/11/15 15:52:00 (96/10/29 09:24:50) */
  2. /*====START_GENERATED_PROLOG======================================
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: odshell
  6.  *
  7.  *   CLASSES:   RealShell
  8.  *
  9.  *   ORIGINS: 27
  10.  *
  11.  *
  12.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13.  *   All Rights Reserved
  14.  *   Licensed Materials - Property of IBM
  15.  *   US Government Users Restricted Rights - Use, duplication or
  16.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17.  *       
  18.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24.  *   OR PERFORMANCE OF THIS SOFTWARE.
  25.  */
  26. /*====END_GENERATED_PROLOG========================================
  27.  */
  28.  
  29.  
  30. #ifndef _RLSHELL_
  31. #define _RLSHELL_
  32.  
  33. #include <stdio.h>
  34.  
  35. #ifdef _PLATFORM_OS2_
  36. #include <ODos2.h>
  37. #endif // _PLATFORM_OS2_
  38.  
  39. #ifdef _PLATFORM_WIN32_
  40. #include <windows.h>
  41. extern HINSTANCE ApplicationInstance;
  42. extern int       WindowDisplayMode;
  43. #endif // _PLATFORM_WIN32_
  44.  
  45. #ifdef _PLATFORM_UNIX_
  46. #include <Xm/XmAll.h>
  47. #endif
  48.  
  49. #include <Disptch.xh>
  50. #include <WinStat.xh>
  51. #include <Window.xh>
  52. // #include <MenuBar.xh>
  53. #include <ODSessn.xh>
  54. #include <ODStor.xh>
  55. #include <StorageU.xh>
  56. #include <Document.xh>
  57. #include <ODCtr.xh>
  58. #include <Draft.xh>
  59. #include <Part.xh>
  60. #include <StdTypes.xh>
  61. #include <StdProps.xh>
  62. #include <StdTypIO.h>
  63. #include <StorUtil.h>
  64. #include <ODMemory.h>
  65. #include <ODTypesF.h>
  66. #include <ODTypes.h>
  67. #include <PlfmFile.h>
  68. #include <TempObj.h>
  69.  
  70. // Classes used by this interface
  71. class ODSession;
  72. class ODDispatcher;
  73. class ODWindowState;
  74. class ODArbitrator;
  75. class ODDraft;
  76. class ODDocument;
  77. class ODContainer;
  78. class ODMenuBar;
  79. class PlatformFile;
  80.  
  81.  
  82. //==============================================================================
  83. // RealShell
  84. //==============================================================================
  85.  
  86. class RealShell
  87. {
  88.  
  89. public:
  90.  
  91. //------------------------------------------------------------------------------
  92. // Constructor/Destructor
  93. //------------------------------------------------------------------------------
  94.  
  95.   RealShell();
  96.   ODVMethod ~RealShell();
  97.  
  98. //------------------------------------------------------------------------------
  99. // Main Entry Point
  100. //------------------------------------------------------------------------------
  101.   ODVMethod int go(int argc, char *argv[]);
  102.  
  103. protected:
  104.  
  105. //-------------------------------------------------------------------------------------
  106. // Initialization
  107. //-------------------------------------------------------------------------------------
  108.  
  109.   ODMethod void Initialize();
  110.   ODMethod ODBoolean InitWindowSystem();
  111.   ODMethod void ProcessArgs(int argc, char *argv[]);
  112.  
  113.   ODMethod void OpenDocumentWithPart(ODValueType PartType);
  114.   ODMethod PlatformFile* NewDocument(ODValueType PartType);
  115.   ODMethod void OpenFile(PlatformFile *pFile);
  116.   ODMethod void Open();
  117.   ODMethod PlatformFile* CreateUntitledContainer(ODDocument **documentPtr,
  118.                          ODContainer **containerPtr);
  119.   ODMethod void CreateDocument(ODContainer *container, ODValueType PartType);
  120.  
  121. //-------------------------------------------------------------------------------------
  122. // Main Event Loop
  123. //-------------------------------------------------------------------------------------
  124.  
  125. #ifdef _PLATFORM_UNIX_
  126.   ODMethod void MainLoop();
  127.   ODMethod void DispatchEvent(ODEventData* event);
  128. #else
  129.   ODMethod int MainLoop();
  130. #endif
  131.  
  132. //-------------------------------------------------------------------------------------
  133. // Private Fields
  134. //-------------------------------------------------------------------------------------
  135.   Environment*        fEV;
  136.   ODSession*        fSession;
  137.   ODWindowState*    fWindowState;
  138.   ODDispatcher*        fDispatcher;
  139.   ODArbitrator*        fArbitrator;
  140.   ODContainer*        fContainer;
  141.   ODDocument*        fDocument;
  142.   ODDraft*         fDraft;
  143.   ODDraftPermissions    fPermissions;
  144.   char            fFilename[256];
  145.   char            fRootPartKind[256];
  146. #ifdef  _PLATFORM_OS2_
  147.   HAB                   fhab;
  148.   HMQ                   fhmq; 
  149. #endif
  150. #ifdef  _PLATFORM_UNIX_
  151.   XtAppContext          fAppContext;
  152.   Widget                fApplicationShell;
  153.   Widget                fMainWinWidget;
  154.   Display*              fDisplay;
  155.   Screen*               fScreen;
  156. #endif
  157. };
  158.  
  159. #endif  // _RLSHELL_
  160.