1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/**************************************************************************\
ibtk (Insomnia's Basic ToolKit)
By Insomnia (Steaphan Greene)
(insomnia@core.binghamton.edu)
Copyright (C) 1999 Steaphan Greene
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
\**************************************************************************/
#ifndef IREALBOX_H
#define IREALBOX_H
#include <X11/X.h>
#include <X11/Xlib.h>
#include "ibox.h"
#include "iwindow.h"
#include "ibutton.h"
class IRealBox : public IBox {
public:
IRealBox(double v, IWindow *w, int xp, int yp, int xs, int ys, double i=1.0);
virtual ~IRealBox();
virtual int Type() { return DODAD_REALBOX; };
void Disable();
void Enable();
virtual int KeyDown(XKeyEvent ev);
virtual int KeyUp(XKeyEvent ev);
virtual void Redraw();
virtual void Rebuild();
char *GetText() { return text; };
double GetVal() { return val; };
void SetText(char *txt);
virtual void SetVal(double v);
virtual void SetIncVal(double i);
void SetNextFocus(IDoDad *in) { nextfocus = in; };
void SetMax(double mx);
void SetMin(double mn);
protected:
IRealBox() {};
double val, vmax, vmin, inc;
IButton *upb, *dnb;
void Increment(IDoDad *wb, int mb);
void Decrement(IDoDad *wb, int mb);
friend IButton;
friend void __Callback__IRealBox__Increment(IDoDad *p, IDoDad *d, int v);
friend void __Callback__IRealBox__Decrement(IDoDad *p, IDoDad *d, int v);
};
#endif
|