4 #include "wellobject.h"
6 enum SwitchMode
{ OnlySet
, OnlyReset
, SetReset
};
8 class WellSwitch
: public WellObject
11 ObjectCaller object_on_switch
;
16 bool press(int mx
, int my
);
17 bool highlight(int mx
, int my
);
20 WellSwitch(char* keyname
);
21 void set_object_on_switch(ObjectCaller o
) { object_on_switch
=o
;};
22 virtual bool process_event(wEvent
);
25 virtual void redraw();
26 void set_value(bool v
) { value
=v
; if(shown
) redraw();};
27 bool get_value() { return value
;};
28 void set_mode(SwitchMode m
) { mode
=m
;};