home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / df3os2.zip / CONTROL.H < prev    next >
C/C++ Source or Header  |  1993-09-27  |  1KB  |  44 lines

  1. // ---------- control.h
  2.  
  3. #ifndef CONTROL_H
  4. #define CONTROL_H
  5.  
  6. #include "dfwindow.h"
  7.  
  8. class TextBox;
  9. class Dialog;
  10.  
  11. class Control : public DFWindow    {
  12.     Bool enabled;       // true if control is enabled
  13. protected:
  14.     unsigned shortcut;
  15.     static unsigned LatestShortcut;
  16. public:
  17.     Control(const char *ttl,int lf,int tp,int ht,int wd,DFWindow *par)
  18.                         : DFWindow(ttl, lf, tp, ht, wd, par)
  19.         { OpenControl(); }
  20.     Control(const char *ttl, int ht, int wd, DFWindow *par)
  21.                         : DFWindow(ttl, ht, wd, par)
  22.         { OpenControl(); }
  23.     Control(int lf, int tp, int ht, int wd, DFWindow *par)
  24.                         : DFWindow(lf, tp, ht, wd, par)
  25.         { OpenControl(); }
  26.     Control(int ht,int wd,DFWindow *par) : DFWindow(ht,wd,par)
  27.         { OpenControl(); }
  28.     Control(const char *ttl) : DFWindow(ttl)
  29.         { OpenControl(); }
  30.     virtual void Keyboard(int key);
  31.     void OpenControl();
  32.     void Enable()      { enabled = True; }
  33.     void Disable()     { enabled = False; }
  34.     Bool isEnabled()   { return enabled; }
  35.     virtual void ShortcutSelect();
  36.     virtual Bool SetFocus();
  37.     unsigned Shortcut() { return shortcut; }
  38.     virtual void Select();
  39.     virtual void Choose();
  40. };
  41.  
  42. #endif
  43.  
  44.