mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-01 16:58:01 +02:00
1st installment of preview ported in c++
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
|
||||
#include "Tab.hpp"
|
||||
#include "TabIface.hpp"
|
||||
//##############################################################################################################################################################
|
||||
#include "GUI_Preview.hpp"
|
||||
#include "GUI_PreviewIface.hpp"
|
||||
//##############################################################################################################################################################
|
||||
#include "AboutDialog.hpp"
|
||||
#include "AppConfig.hpp"
|
||||
#include "ConfigSnapshotDialog.hpp"
|
||||
@@ -148,6 +152,10 @@ wxStaticBitmap *g_manifold_warning_icon = nullptr;
|
||||
bool g_show_print_info = false;
|
||||
bool g_show_manifold_warning_icon = false;
|
||||
|
||||
//##############################################################################################################################################################
|
||||
PreviewIface* g_preview = nullptr; // <<< FIXME ENRICO -> add code to delete the pointer when the application closes
|
||||
//##############################################################################################################################################################
|
||||
|
||||
static void init_label_colours()
|
||||
{
|
||||
auto luma = get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
@@ -665,6 +673,19 @@ TabIface* get_preset_tab_iface(char *name)
|
||||
return new TabIface(nullptr);
|
||||
}
|
||||
|
||||
//##############################################################################################################################################################
|
||||
PreviewIface* create_preview_iface(wxNotebook* parent, DynamicPrintConfig* config, Print* print, GCodePreviewData* gcode_preview_data)
|
||||
{
|
||||
if (g_preview == nullptr)
|
||||
{
|
||||
Preview* panel = new Preview(parent, config, print, gcode_preview_data);
|
||||
g_preview = new PreviewIface(panel);
|
||||
}
|
||||
|
||||
return g_preview;
|
||||
}
|
||||
//##############################################################################################################################################################
|
||||
|
||||
// opt_index = 0, by the reason of zero-index in ConfigOptionVector by default (in case only one element)
|
||||
void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt_key, const boost::any& value, int opt_index /*= 0*/)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user