home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / APXSDI.PAK / APXSDAPP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.6 KB  |  92 lines

  1. //----------------------------------------------------------------------------
  2. //  Project ApxSdi
  3. //  Borland International
  4. //  Copyright ⌐ 1996. All Rights Reserved.
  5. //
  6. //  SUBSYSTEM:    ApxSdi Application
  7. //  FILE:         apxsdapp.h
  8. //  AUTHOR:       
  9. //
  10. //  OVERVIEW
  11. //  ~~~~~~~~
  12. //  Class definition for TApxSdiApp (TApplication).
  13. //
  14. //----------------------------------------------------------------------------
  15. #if !defined(apxsdapp_h)              // Sentry, use file only if it's not already included.
  16. #define apxsdapp_h
  17.  
  18. #include <owl/controlb.h>
  19. #include <owl/docking.h>
  20. #include <owl/mailer.h>
  21. #include <owl/opensave.h>
  22. #include <owl/printer.h>
  23. #include <owl/rcntfile.h>
  24.  
  25. #include <classlib/bags.h>
  26.  
  27. #include "apxprint.h"
  28. #include "apxprev.h"
  29.  
  30. #include "apxsdapp.rh"            // Definition of all resources.
  31.  
  32.  
  33. //
  34. // FrameWindow must be derived to override Paint for Preview and Print.
  35. //
  36. //{{TDecoratedFrame = TSDIDecFrame}}
  37. class TSDIDecFrame : public TDecoratedFrame {
  38.   public:
  39.     TSDIDecFrame(TWindow* parent, const char far* title, TWindow* clientWnd, bool trackMenuSelection = false, TModule* module = 0);
  40.     ~TSDIDecFrame();
  41. };    //{{TSDIDecFrame}}
  42.  
  43.  
  44. //{{TApplication = TApxSdiApp}}
  45. class TApxSdiApp : public TApplication, public TRecentFiles {
  46.   private:
  47.  
  48.     void SetupSpeedBar(TDecoratedFrame* frame);
  49.     void AddFile(const char* fileName);
  50.     void ProcessCmdLine(char * CmdLine);
  51.     void RegisterInfo();
  52.     void UnRegisterInfo();
  53.  
  54.   public:
  55.     TApxSdiApp();
  56.     virtual ~TApxSdiApp();
  57.  
  58.     TOpenSaveDialog::TData FileData;                    // Data to control open/saveas standard dialog.
  59.     void OpenFile(const char* fileName = 0);
  60.  
  61.     THarbor*        ApxHarbor;
  62.  
  63.     // Public data members used by the print menu commands and Paint routine in MDIChild.
  64.     //
  65.     TPrinter*       Printer;                            // Printer support.
  66.     int             Printing;                           // Printing in progress.
  67.  
  68. //{{TApxSdiAppVIRTUAL_BEGIN}}
  69.   public:
  70.     virtual void InitMainWindow();
  71.     virtual void InitInstance();
  72. //{{TApxSdiAppVIRTUAL_END}}
  73.  
  74. //{{TApxSdiAppRSP_TBL_BEGIN}}
  75.   protected:
  76.     void CmFileNew();
  77.     void CmFileOpen();
  78.     void CmFilePrint();
  79.     void CmFilePrintSetup();
  80.     void CmFilePrintPreview();
  81.     void CmPrintEnable(TCommandEnabler& tce);
  82.     void CmHelpAbout();
  83.     void EvDropFiles(TDropInfo drop);
  84.     void EvWinIniChange(char far* section);
  85.     int32 CmFileSelected(uint wp, int32 lp);
  86. //{{TApxSdiAppRSP_TBL_END}}
  87. DECLARE_RESPONSE_TABLE(TApxSdiApp);
  88. };    //{{TApxSdiApp}}
  89.  
  90.  
  91. #endif  // apxsdapp_h sentry.
  92.