Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-01-22 23:10:54 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-01-22 23:11:11 +0300
commit9184a403b4645f17fbc732b33715891f4a7653b5 (patch)
tree0d4f7679ca0732590f9964ea2e3eec0ef44d6df9 /src/Display/Menu.h
parentcc8de620887759dbb6ade8b5b0bffc6e9194222e (diff)
Towards version 1.21RC1
Added multi-tap probing Added M260/M281 I2C send and receive Added absolute babystepping mode Fix for pressure advance with non-uniform extrusoin rate Disabled cache oin SAM4E Fixed FTP "listen failed" bug Fixed crash when trying to confoigure a filament monitor on a DueX endstop input Change endstops 5-9 pin allocation when no DueX board present Show board revision as 1.02 if VSSA sense present Ported DHCP fixes form lwip 2 to Duet 06/085 build M304 bug fix Bug fix to recent PrintMonitor change when getting "Generated by" string
Diffstat (limited to 'src/Display/Menu.h')
-rw-r--r--src/Display/Menu.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/Display/Menu.h b/src/Display/Menu.h
new file mode 100644
index 00000000..2177042c
--- /dev/null
+++ b/src/Display/Menu.h
@@ -0,0 +1,67 @@
+/*
+ * Menu.h
+ *
+ * Created on: 22 Jan 2018
+ * Author: David
+ */
+
+#ifndef SRC_DISPLAY_MENU_H_
+#define SRC_DISPLAY_MENU_H_
+
+#include "RepRapFirmware.h"
+
+class Lcd7920;
+
+class MenuItem
+{
+public:
+ friend class EnumeratedMenu;
+
+protected:
+ MenuItem();
+
+private:
+ MenuItem *next;
+};
+
+class Menu
+{
+public:
+ virtual void Show(Lcd7920& lcd) = 0;
+
+ void SetParent(Menu *p) { parent = p; }
+
+protected:
+ Menu(const char *nm) : name(nm) { parent = nullptr; }
+
+ Menu *parent;
+ const char *name;
+};
+
+class EnumeratedMenu : public Menu
+{
+public:
+ EnumeratedMenu(const char *nm);
+
+ void AddItem(MenuItem *newItem);
+ void Show(Lcd7920& lcd) override;
+
+private:
+ MenuItem *items;
+};
+
+class FilesMenu : public Menu
+{
+public:
+ FilesMenu(const char *nm);
+
+ void Show(Lcd7920& lcd) override;
+
+private:
+ static constexpr size_t DisplayedFilenameLength = 20;
+ static constexpr size_t MaxFiles = 6;
+ String<DisplayedFilenameLength> fileNames[MaxFiles];
+ String<FILENAME_LENGTH> previousFile; // the last filename displayed on the previous page
+};
+
+#endif /* SRC_DISPLAY_MENU_H_ */