mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
Merged the C++ port of the GUI Tabs / OptionGroup / Option classes
by @YuSanka, thanks @lordofhyphens for the initial port of the OptionGroup / Option.
This commit is contained in:
commit
f1840a52db
41 changed files with 11765 additions and 699 deletions
|
@ -31,16 +31,27 @@ void set_main_frame(SV *ui)
|
|||
|
||||
void set_tab_panel(SV *ui)
|
||||
%code%{ Slic3r::GUI::set_tab_panel((wxNotebook*)wxPli_sv_2_object(aTHX_ ui, "Wx::Notebook")); %};
|
||||
|
||||
void add_debug_menu(SV *ui, int event_language_change)
|
||||
%code%{ Slic3r::GUI::add_debug_menu((wxMenuBar*)wxPli_sv_2_object(aTHX_ ui, "Wx::MenuBar"), event_language_change); %};
|
||||
|
||||
void add_debug_menu(SV *ui)
|
||||
%code%{ Slic3r::GUI::add_debug_menu((wxMenuBar*)wxPli_sv_2_object(aTHX_ ui, "Wx::MenuBar")); %};
|
||||
void create_preset_tabs(PresetBundle *preset_bundle, AppConfig *app_config,
|
||||
bool no_controller, bool is_disabled_button_browse, bool is_user_agent,
|
||||
int event_value_change, int event_presets_changed,
|
||||
int event_button_browse, int event_button_test)
|
||||
%code%{ Slic3r::GUI::create_preset_tabs(preset_bundle, app_config, no_controller,
|
||||
is_disabled_button_browse, is_user_agent,
|
||||
event_value_change, event_presets_changed,
|
||||
event_button_browse, event_button_test); %};
|
||||
|
||||
void create_preset_tab(const char *name)
|
||||
%code%{ Slic3r::GUI::create_preset_tab(name); %};
|
||||
Ref<TabIface> get_preset_tab(char *name)
|
||||
%code%{ RETVAL=Slic3r::GUI::get_preset_tab_iface(name); %};
|
||||
|
||||
bool load_language()
|
||||
%code%{ RETVAL=Slic3r::GUI::load_language(); %};
|
||||
|
||||
void create_combochecklist(SV *ui, std::string text, std::string items, bool initial_value)
|
||||
%code%{ Slic3r::GUI::create_combochecklist((wxComboCtrl*)wxPli_sv_2_object(aTHX_ ui, "Wx::ComboCtrl"), text, items, initial_value); %};
|
||||
|
||||
int combochecklist_get_flags(SV *ui)
|
||||
%code%{ RETVAL=Slic3r::GUI::combochecklist_get_flags((wxComboCtrl*)wxPli_sv_2_object(aTHX_ ui, "Wx::ComboCtrl")); %};
|
||||
|
23
xs/xsp/GUI_Tab.xsp
Normal file
23
xs/xsp/GUI_Tab.xsp
Normal file
|
@ -0,0 +1,23 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "slic3r/GUI/TabIface.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::GUI::Tab2} class TabIface {
|
||||
TabIface();
|
||||
~TabIface();
|
||||
void load_current_preset();
|
||||
void update_tab_ui();
|
||||
void update_ui_from_settings();
|
||||
void select_preset(char* name);
|
||||
void load_config(DynamicPrintConfig* config);
|
||||
bool current_preset_is_dirty();
|
||||
void load_key_value(char* opt_key, char* value);
|
||||
void OnActivate();
|
||||
std::string title();
|
||||
Ref<DynamicPrintConfig> get_config();
|
||||
Ref<PresetCollection> get_presets();
|
||||
std::vector<std::string> get_dependent_tabs();
|
||||
};
|
|
@ -54,6 +54,12 @@ set_var_dir(dir)
|
|||
CODE:
|
||||
Slic3r::set_var_dir(dir);
|
||||
|
||||
void
|
||||
set_local_dir(dir)
|
||||
char *dir;
|
||||
CODE:
|
||||
Slic3r::set_local_dir(dir);
|
||||
|
||||
char*
|
||||
var_dir()
|
||||
CODE:
|
||||
|
|
|
@ -233,6 +233,8 @@ PresetBundle* O_OBJECT_SLIC3R
|
|||
Ref<PresetBundle> O_OBJECT_SLIC3R_T
|
||||
PresetHints* O_OBJECT_SLIC3R
|
||||
Ref<PresetHints> O_OBJECT_SLIC3R_T
|
||||
TabIface* O_OBJECT_SLIC3R
|
||||
Ref<TabIface> O_OBJECT_SLIC3R_T
|
||||
|
||||
Axis T_UV
|
||||
ExtrusionLoopRole T_UV
|
||||
|
|
|
@ -210,6 +210,8 @@
|
|||
%typemap{Ref<PresetBundle>}{simple};
|
||||
%typemap{PresetHints*};
|
||||
%typemap{Ref<PresetHints>}{simple};
|
||||
%typemap{TabIface*};
|
||||
%typemap{Ref<TabIface>}{simple};
|
||||
|
||||
%typemap{PrintRegionPtrs*};
|
||||
%typemap{PrintObjectPtrs*};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue