mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
39 lines
664 B
C++
39 lines
664 B
C++
#ifndef Field_h
|
|
#define Field_h
|
|
|
|
#include "Form.h"
|
|
|
|
class Field {
|
|
public:
|
|
explicit Field(const String &label);
|
|
Field(Form &form, const String &label);
|
|
~Field();
|
|
|
|
Form *form() const { return _form; }
|
|
|
|
virtual int dispatch(int event);
|
|
|
|
virtual void enterField(bool reverse);
|
|
virtual void exitField();
|
|
|
|
const String &label() const { return _label; }
|
|
void setLabel(const String &label);
|
|
|
|
bool isCurrent() const;
|
|
|
|
protected:
|
|
LiquidCrystal *lcd() const { return _form->_lcd; }
|
|
|
|
virtual void updateCursor();
|
|
|
|
private:
|
|
String _label;
|
|
Form *_form;
|
|
Field *next;
|
|
Field *prev;
|
|
|
|
friend class Form;
|
|
};
|
|
|
|
#endif
|