diff --git a/xs/src/slic3r/GUI/TabIface.cpp b/xs/src/slic3r/GUI/TabIface.cpp new file mode 100644 index 0000000000..0155effc71 --- /dev/null +++ b/xs/src/slic3r/GUI/TabIface.cpp @@ -0,0 +1,9 @@ +#include "TabIface.hpp" +#include "Tab.h" + +namespace Slic3r { + +void TabIface::load_current_preset() { m_tab->load_current_preset(); } +void TabIface::rebuild_page_tree() { m_tab->rebuild_page_tree(); } + +}; // namespace Slic3r diff --git a/xs/src/slic3r/GUI/TabIface.hpp b/xs/src/slic3r/GUI/TabIface.hpp new file mode 100644 index 0000000000..a77cb72553 --- /dev/null +++ b/xs/src/slic3r/GUI/TabIface.hpp @@ -0,0 +1,18 @@ +namespace Slic3r { + +namespace GUI { + class Tab; +}; + +class TabIface { +public: + TabIface() : m_tab(nullptr) {} + TabIface(GUI::Tab *tab) : m_tab(tab) {} +// TabIface(const TabIface &rhs) : m_tab(rhs.m_tab) {} + void load_current_preset(); + void rebuild_page_tree(); +protected: + GUI::Tab *m_tab; +}; + +}; // namespace Slic3r diff --git a/xs/xsp/GUI_Tab.xsp b/xs/xsp/GUI_Tab.xsp new file mode 100644 index 0000000000..a557e0f19b --- /dev/null +++ b/xs/xsp/GUI_Tab.xsp @@ -0,0 +1,13 @@ +%module{Slic3r::XS}; + +%{ +#include +#include "slic3r/GUI/TabIface.hpp" +%} + +%name{Slic3r::GUI::Tab2} class TabIface { + TabIface(); + ~TabIface(); + void load_current_preset(); + void rebuild_page_tree(); +};