summaryrefslogtreecommitdiff
path: root/Layout/LayoutScrollSelect.h
diff options
context:
space:
mode:
Diffstat (limited to 'Layout/LayoutScrollSelect.h')
-rw-r--r--Layout/LayoutScrollSelect.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Layout/LayoutScrollSelect.h b/Layout/LayoutScrollSelect.h
new file mode 100644
index 0000000..4811ae5
--- /dev/null
+++ b/Layout/LayoutScrollSelect.h
@@ -0,0 +1,40 @@
+#ifndef __LAYOUTSCROLLSELECT_H__
+#define __LAYOUTSCROLLSELECT_H__
+
+#include "Layout.h"
+#include <vector>
+
+typedef std::vector<std::string> Items;
+
+class LayoutScrollSelect : public Layout {
+ public:
+ LayoutScrollSelect(DOGS102* lcd, Items items, std::string info1 = "", std::string info2 = "");
+ ~LayoutScrollSelect();
+
+ void display();
+
+ void scroll();
+ std::string select();
+
+ private:
+ void increment(size_t& index);
+ void decrement(size_t& index);
+
+ Label _lSw1;
+ Label _lSw2;
+ Label _lInfo1;
+ Label _lInfo2;
+ Label _lCursor;
+
+ Field _fItem1;
+ Field _fItem2;
+ Field _fItem3;
+ Field _fItem4;
+ Field _fItem5;
+
+ Items _items;
+ size_t _selected;
+ size_t _size;
+};
+
+#endif