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

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. #ifndef __BUTTON_H
  4. #define __BUTTON_H
  5.  
  6. #ifndef __CONTROL_H
  7. #include <control.h>
  8. #endif
  9.  
  10. #pragma option -Vo-
  11. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  12. #pragma option -po-
  13. #endif
  14.  
  15. /* --------------------------------------------------------
  16.   TButton object
  17.   -------------------------------------------------------- */
  18.  
  19. _CLASSDEF(TButton)
  20.  
  21. class _EXPORT TButton : public TControl
  22. {
  23. public:
  24.     BOOL IsDefPB;
  25.  
  26.     TButton(PTWindowsObject AParent, int AnId, LPSTR AText,
  27.             int X, int Y, int W, int H, BOOL IsDefault,
  28.         PTModule AModule = NULL);
  29.     TButton(PTWindowsObject AParent, int ResourceId,
  30.         PTModule AModule = NULL);
  31.  
  32.     static PTStreamable build();
  33.     virtual void write (Ropstream os);
  34.     virtual Pvoid read (Ripstream is);
  35.  
  36. protected:
  37.     BOOL IsCurrentDefPB;
  38.  
  39.     virtual LPSTR GetClassName()
  40.         { return "BUTTON"; }
  41.     virtual void SetupWindow();
  42.  
  43.     virtual void WMGetDlgCode(RTMessage Msg) =
  44.                          [WM_FIRST + WM_GETDLGCODE];
  45.     virtual void BMSetStyle(RTMessage Msg) = [WM_FIRST + BM_SETSTYLE];
  46.  
  47.     TButton(StreamableInit) : TControl(streamableInit) {};
  48.  
  49. private:
  50.     virtual const Pchar streamableName() const
  51.         { return "TButton"; }
  52. };
  53.  
  54. inline Ripstream operator >> ( Ripstream is, RTButton cl )
  55.     { return is >> (RTStreamable)cl; }
  56. inline Ripstream operator >> ( Ripstream is, RPTButton cl )
  57.     { return is >> (RPvoid)cl; }
  58.  
  59. inline Ropstream operator << ( Ropstream os, RTButton cl )
  60.     { return os << (RTStreamable)cl; }
  61. inline Ropstream operator << ( Ropstream os, PTButton cl )
  62.     { return os << (PTStreamable)cl; }
  63.  
  64. #pragma option -Vo.
  65. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  66. #pragma option -po.
  67. #endif
  68.  
  69. #endif
  70.