Category : Files from Magazines
Archive   : DFPP01.ZIP
Filename : CONTROL.H

 
Output of file : CONTROL.H contained in archive : DFPP01.ZIP

// ---------- control.h

#ifndef CONTROL_H
#define CONTROL_H

#include "dfwindow.h"

class TextBox;

class Control : public DFWindow {
Bool enabled; // true if control is enabled
public:
Control(char *ttl,int lf,int tp,int ht,int wd,DFWindow *par)
: DFWindow(ttl, lf, tp, ht, wd, par)
{ OpenControl(); }
Control(char *ttl, int ht, int wd, DFWindow *par)
: DFWindow(ttl, ht, wd, par)
{ OpenControl(); }
Control(int lf, int tp, int ht, int wd, DFWindow *par)
: DFWindow(lf, tp, ht, wd, par)
{ OpenControl(); }
Control(int ht,int wd,DFWindow *par) : DFWindow(ht,wd,par)
{ OpenControl(); }
Control(char *ttl) : DFWindow(ttl)
{ OpenControl(); }
virtual ~Control() { /* null */ }
virtual void Keyboard(int key);
void OpenControl() { Enable(); }
void Enable() { enabled = True; }
void Disable() { enabled = False; }
Bool isEnabled() { return enabled; }
};

#endif