home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 19.ddi / OWLINC.PAK / EDITVIEW.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.7 KB  |  58 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1993 by Borland International
  3. //   include\owl\editview.h
  4. //   Defines classes TEditView
  5. //----------------------------------------------------------------------------
  6. #if !defined(__OWL_EDITVIEW_H)
  7. #define __OWL_EDITVIEW_H
  8.  
  9. #if !defined(__OWL_DOCMANAG_H)
  10.   #include <owl\docmanag.h>
  11. #endif
  12. #if !defined(__OWL_EDITSEAR_H)
  13.   #include <owl\editsear.h>
  14. #endif
  15.  
  16. //
  17. //  class TEditView
  18. //  ----- ---------
  19. //
  20. class _OWLCLASS TEditView : public TEditSearch, public TView {
  21.   public:
  22.     TEditView(TDocument& doc, TWindow* parent = 0);
  23.    ~TEditView();
  24.     static LPCSTR StaticName() {return "Edit View";}  // put in resource
  25.     //
  26.     // overridden virtuals from TView
  27.     //
  28.     LPCSTR   GetViewName(){return StaticName();}
  29.     TWindow* GetWindow()  {return (TWindow*)this;}
  30.     BOOL     SetDocTitle(LPCSTR docname, int index)
  31.                           {return TEditSearch::SetDocTitle(docname, index); }
  32.     //
  33.     // overridden virtuals from TWindow
  34.     //
  35.     BOOL   Create();
  36.     void   PerformCreate(int menuOrId);
  37.     BOOL   CanClose()   {return TEditSearch::CanClose() && Doc->CanClose();}
  38.  
  39.   protected:
  40.     long   Origin;
  41.     BOOL   LoadData();
  42.     //
  43.     // message response functions
  44.     //
  45.     void   EvNCDestroy();
  46.     BOOL   VnCommit(BOOL force);
  47.     BOOL   VnRevert(BOOL clear);
  48.     BOOL   VnIsWindow(HWND hWnd) {return HWindow == hWnd;}
  49.     BOOL   VnIsDirty()  {return TEditSearch::IsModified();}
  50.     BOOL   VnDocClosed(int omode);
  51.         
  52.   DECLARE_RESPONSE_TABLE(TEditView);
  53.   DECLARE_STREAMABLE(_OWLCLASS, TEditView,1);
  54. };
  55.  
  56. #endif  // __OWL_EDITVIEW_H
  57.  
  58.