make the command queue static so it is shared by all screen instances
[clinton/Smoothieware.git] / src / modules / utils / panel / PanelScreen.h
index 3ae8b62..b249dee 100644 (file)
@@ -9,17 +9,21 @@
 #define PANELSCREEN_H
 
 #include <string>
+#include <vector>
 
 class Panel;
+
 class PanelScreen
 {
 public:
     PanelScreen();
+    virtual ~PanelScreen();
+
     virtual void on_refresh();
     virtual void on_main_loop();
-    PanelScreen *set_panel(Panel *parent);
     PanelScreen *set_parent(PanelScreen *passed_parent);
     virtual void on_enter();
+    virtual void on_exit(){};
     // if you completely rewrite the screen do not clear it, this avoids flicker
     void refresh_screen(bool clear);
     void refresh_menu(bool clear);
@@ -27,12 +31,14 @@ public:
     virtual void display_menu_line(uint16_t line) = 0;
     // default idle timeout for a screen, each screen can override this
     virtual int idle_timeout_secs(){ return 10; }
-    Panel *panel;
-    PanelScreen *parent;
 
+    friend class Panel;
 protected:
     void send_gcode(std::string g);
+    void send_gcode(const char *gm_code, char parameter, float value);
     void send_command(const char *gcstr);
+    static std::vector<std::string> command_queue;
+    PanelScreen *parent;
 };
 
 #endif