home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / OWLINC.PAK / EDITVIEW.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  2KB  |  59 lines

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