home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 3.ddi / OWLINC.ZIP / EDITWND.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  2.3 KB  |  87 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. #ifndef __EDITWND_H
  4. #define __EDITWND_H
  5.  
  6. #ifndef __EDIT_H
  7. #include <edit.h>
  8. #endif
  9.  
  10. #ifndef __CHECKBOX_H
  11. #include <checkbox.h>
  12. #endif
  13.  
  14. #pragma option -Vo-
  15. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  16. #pragma option -po-
  17. #endif
  18.  
  19. struct _CLASSTYPE TSearchStruct { // _CLASSTYPE needed for BC++ 2.0
  20.   char SearchText[81];
  21.   BOOL CaseSensitive;
  22.   char ReplaceText[81];
  23.   BOOL ReplaceAll;
  24.   BOOL PromptOnReplace;
  25. };
  26.  
  27. _CLASSDEF(TEditWindow)
  28. _CLASSDEF(TSearchDialog)
  29.  
  30. /* TEditWindow declaration */
  31.  
  32. class _EXPORT TEditWindow : public TWindow
  33. {
  34. public:
  35.     PTEdit Editor;
  36.     TSearchStruct SearchStruct;
  37.     BOOL IsReplaceOp; // True if the search is a search and replace.
  38.  
  39.     TEditWindow(PTWindowsObject AParent, LPSTR ATitle,
  40.         PTModule AModule = NULL);
  41.     void DoSearch();
  42.  
  43.     static PTStreamable build();
  44.  
  45. protected:
  46.     virtual void WMSize(RTMessage Msg) = [WM_FIRST + WM_SIZE];
  47.     virtual void WMSetFocus(RTMessage Msg) = [WM_FIRST + WM_SETFOCUS];
  48.     virtual void CMEditFind(RTMessage Msg) = [CM_FIRST + CM_EDITFIND];
  49.     virtual void CMEditFindNext(RTMessage Msg) =
  50.                                [CM_FIRST + CM_EDITFINDNEXT];
  51.     virtual void CMEditReplace(RTMessage Msg) =
  52.                                [CM_FIRST + CM_EDITREPLACE];
  53.  
  54.     TEditWindow(StreamableInit) : TWindow(streamableInit) {};
  55.     virtual void write (Ropstream os);
  56.     virtual Pvoid read (Ripstream is);
  57.  
  58. private:
  59.     virtual const Pchar streamableName() const
  60.         { return "TEditWindow"; }
  61. };
  62.  
  63. inline Ripstream operator >> ( Ripstream is, RTEditWindow cl )
  64.     { return is >> (RTStreamable )cl; }
  65. inline Ripstream operator >> ( Ripstream is, RPTEditWindow cl )
  66.     { return is >> (RPvoid)cl; }
  67.  
  68. inline Ropstream operator << ( Ropstream os, RTEditWindow cl )
  69.     { return os << (RTStreamable )cl; }
  70. inline Ropstream operator << ( Ropstream os, PTEditWindow cl )
  71.     { return os << (PTStreamable )cl; }
  72.  
  73. class _EXPORT TSearchDialog : public TDialog
  74. {
  75. public:
  76.   TSearchDialog(PTWindowsObject AParent, int ResourceId,
  77.                 TSearchStruct _FAR &SearchStruct,
  78.                 PTModule AModule = NULL);
  79. };
  80.  
  81. #pragma option -Vo.
  82. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  83. #pragma option -po.
  84. #endif
  85.  
  86. #endif
  87.