Tech ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION set as default

This commit is contained in:
enricoturri1966 2020-09-10 08:49:50 +02:00
parent 3527cd48e8
commit 88457bf412
14 changed files with 77 additions and 393 deletions

View file

@ -94,7 +94,7 @@ static wxString dots("…", wxConvUTF8);
class GUI_App : public wxApp
{
#if ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#if ENABLE_GCODE_VIEWER
public:
enum class EAppMode : unsigned char
{
@ -103,13 +103,13 @@ public:
};
private:
#endif // ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#endif // ENABLE_GCODE_VIEWER
bool m_initialized { false };
bool app_conf_exists{ false };
#if ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#if ENABLE_GCODE_VIEWER
EAppMode m_app_mode{ EAppMode::Editor };
#endif // ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#endif // ENABLE_GCODE_VIEWER
wxColour m_color_label_modified;
wxColour m_color_label_sys;
@ -144,18 +144,18 @@ public:
bool OnInit() override;
bool initialized() const { return m_initialized; }
#if ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#if ENABLE_GCODE_VIEWER
explicit GUI_App(EAppMode mode = EAppMode::Editor);
#else
GUI_App();
#endif // ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#endif // ENABLE_GCODE_VIEWER
~GUI_App() override;
#if ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#if ENABLE_GCODE_VIEWER
EAppMode get_app_mode() const { return m_app_mode; }
bool is_editor() const { return m_app_mode == EAppMode::Editor; }
bool is_gcode_viewer() const { return m_app_mode == EAppMode::GCodeViewer; }
#endif // ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION
#endif // ENABLE_GCODE_VIEWER
static std::string get_gl_info(bool format_as_html, bool extensions);
wxGLContext* init_glcontext(wxGLCanvas& canvas);