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

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1993 by Borland International
  3. //   include\owl\listview.h
  4. //   Defines class TListView
  5. //----------------------------------------------------------------------------
  6. #if !defined(__OWL_LISTVIEW_H)
  7. #define __OWL_LISTVIEW_H
  8.  
  9. #if !defined(__OWL_DOCMANAG_H)
  10.   #include <owl\docmanag.h>
  11. #endif
  12. #if !defined(__OWL_LISTBOX_H)
  13.   #include <owl\listbox.h>
  14. #endif
  15. #include <owl\listview.rc>
  16.  
  17. //
  18. //  class TListView
  19. //  ----- ---------
  20. //
  21. class _OWLCLASS TListView : public TListBox, public TView {
  22.   public:
  23.     TListView(TDocument& doc, TWindow* parent = 0);
  24.     static LPCSTR StaticName() {return "List View";}  // put in resource
  25.     BOOL DirtyFlag;
  26.     //
  27.     // overridden virtuals from TView
  28.     //
  29.     LPCSTR   GetViewName(){return StaticName();}
  30.     TWindow* GetWindow()  {return (TWindow*)this;}
  31.     BOOL     SetDocTitle(LPCSTR docname, int index)
  32.                           {return TListBox::SetDocTitle(docname, index); }
  33.     //
  34.     // overridden virtuals from TWindow
  35.     //
  36.     BOOL CanClose()   {return TListBox::CanClose() && Doc->CanClose();}
  37.     BOOL Create();
  38.  
  39.   protected:
  40.     long Origin;
  41.     int  MaxWidth;    // maximum horizontal extent
  42.     void SetExtent(LPSTR str);
  43.     BOOL LoadData(int top, int sel);
  44.     //
  45.     // message response functions
  46.     //
  47.     void CmEditUndo();
  48.     void CmEditCut();
  49.     void CmEditCopy();
  50.     void CmEditPaste();
  51.     void CmEditDelete();
  52.     void CmEditClear();
  53.     void CmEditAdd();
  54.     void CmEditItem();
  55.     UINT EvGetDlgCode(MSG far*);
  56.     BOOL VnDocClosed(int omode);
  57.     BOOL VnCommit(BOOL force);
  58.     BOOL VnRevert(BOOL clear);
  59.     BOOL VnIsWindow(HWND hWnd) {return HWindow == hWnd;}
  60.     BOOL VnIsDirty()       {return DirtyFlag;}
  61.     void CmSelChange(){} // to prevent interpreting as unprocessed accelerator
  62.  
  63.   DECLARE_RESPONSE_TABLE(TListView);
  64.   DECLARE_STREAMABLE(_OWLCLASS, TListView,1);
  65. };
  66.  
  67. #endif  // __OWL_LISTVIEW_H
  68.  
  69.