home *** CD-ROM | disk | FTP | other *** search
- #if !defined(__emedtapp_h) // Sentry, use file only if it's not already included.
- #define __emedtapp_h
-
- /* Project emedit
- Early Morning Software
- Copyright ⌐ 1994. All Rights Reserved.
-
- SUBSYSTEM: emedit.exe Application
- FILE: emedtapp.h
- AUTHOR: Ted Stockwell
-
-
- OVERVIEW
- ========
- Class definition for emeditApp (TApplication).
- */
-
-
- #include <owl\owlpch.h>
-
- #include <owl\statusba.h>
- #include <owl\controlb.h>
- #include <owl\buttonga.h>
- #include <owl\printer.h>
-
- #include <classlib\bags.h>
- #include <bivbx.h> // includes definition of ENUM
- #pragma hdrstop
-
-
- #include "emedtapp.rh" // Definition of all resources.
- #include "mdtmssgb.h" // definition of status bar
-
-
- // TFileDrop class Maintains information about a dropped file, its name, where it was dropped,
- // and whether or not it was in the client area
- class TFileDrop {
- public:
- operator == (const TFileDrop& other) const {return this == &other;}
-
- char* FileName;
- TPoint Point;
- BOOL InClientArea;
-
- HICON Icon;
- BOOL DefIcon;
-
- TFileDrop (char*, TPoint&, BOOL, TModule* module);
- ~TFileDrop ();
-
- const char* WhoAmI ();
- private:
- //
- // hidden to prevent accidental copying or assignment
- //
- TFileDrop (const TFileDrop&);
- TFileDrop & operator = (const TFileDrop&);
- };
-
- typedef TIBagAsVector<TFileDrop> TFileList;
- typedef TIBagAsVectorIterator<TFileDrop> TFileListIter;
-
-
- //{{TApplication = emeditApp}}
- class emeditApp : public TApplication {
- private:
- // BOOL HelpState; // Has the help engine been used.
- // BOOL ContextHelp; // SHIFT-F1 state (context sensitive HELP)
- // HCURSOR HelpCursor; // Context sensitive help cursor
-
- // global data used thoughout the app:
- emeditMessageBar* pStatusBar;
- ENUM gDefaultBlockType;
- BOOL gInsertMode;
-
- private:
- void SetupSpeedBar (TDecoratedMDIFrame *frame);
- void AddFiles (TFileList* files);
-
- public:
- emeditApp ();
- virtual ~emeditApp ();
-
- // Public data members used by the print menu commands and Paint routine in MDIChild.
- TPrinter *Printer; // Printer support.
- BOOL Printing; // Printing in progress.
-
- emeditMessageBar* StatusBar() { return pStatusBar; }
- ENUM GetDefaultBlockType() const { return gDefaultBlockType; }
- void SetDefaultBlockType( ENUM T ) { gDefaultBlockType= T; }
- BOOL GetInsertMode() const { return gInsertMode; }
- void SetInsertMode();
- // void UpdateStatusBar();
-
-
- //{{emeditAppVIRTUAL_BEGIN}}
- public:
- virtual void InitMainWindow();
- virtual void InitInstance();
- virtual BOOL CanClose ();
- virtual BOOL ProcessAppMsg (MSG& msg);
- //{{emeditAppVIRTUAL_END}}
- //{{emeditAppRSP_TBL_BEGIN}}
- protected:
- void CmHelpContents ();
- void CmHelpUsing ();
- void CmHelpAbout ();
- void EvDropFiles (TDropInfo drop);
- void EvWinIniChange (char far* section);
- //{{emeditAppRSP_TBL_END}}
- DECLARE_RESPONSE_TABLE(emeditApp);
- }; //{{emeditApp}}
-
-
- #endif // __emedtapp_h sentry.
-