1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00
2012-04-05 15:06:24 +10:00

35 lines
780 B
C++

#ifndef BoolField_h
#define BoolField_h
#include "Field.h"
class BoolField : public Field {
public:
explicit BoolField(const String &label);
BoolField(Form &form, const String &label);
BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value);
int dispatch(int event);
void enterField(bool reverse);
bool value() const { return _value; }
void setValue(bool value);
String trueLabel() const { return _trueLabel; }
void setTrueLabel(const String &trueLabel);
String falseLabel() const { return _falseLabel; }
void setFalseLabel(const String &falseLabel);
private:
String _trueLabel;
String _falseLabel;
int _printLen;
bool _value;
void printValue();
};
#endif