add M117 to add an arbitrary LCD message
[clinton/Smoothieware.git] / src / modules / utils / panel / PanelScreen.h
CommitLineData
35089dc7
JM
1/*
2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
6*/
7
8#ifndef PANELSCREEN_H
9#define PANELSCREEN_H
10
11#include "libs/Kernel.h"
12#include "libs/nuts_bolts.h"
13#include "libs/utils.h"
14#include "libs/Pin.h"
15#include "LcdBase.h"
16#include "Panel.h"
17
18class Panel;
19class PanelScreen {
20 public:
21 PanelScreen();
22 virtual void on_refresh();
23 virtual void on_main_loop();
24 PanelScreen* set_panel(Panel* parent);
25 PanelScreen* set_parent(PanelScreen* passed_parent);
26 virtual void on_enter();
27 // if you completely rewrite the screen do not clear it, this avoids flicker
28 void refresh_screen(bool clear);
29 void refresh_menu(bool clear);
30 void refresh_menu(void){ refresh_menu(true); };
f54d25cb 31 virtual void display_menu_line(uint16_t line)= 0;
35089dc7
JM
32
33 Panel* panel;
34 PanelScreen* parent;
dcf86322
JM
35
36 protected:
37 void send_gcode(std::string g);
35089dc7
JM
38};
39
40
41
42
43
44
45#endif