mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 03:11:47 +00:00
Micro-refactor
This commit is contained in:
@@ -10,8 +10,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <wx/bookctrl.h>
|
||||
#include <wx/imaglist.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/webview.h>
|
||||
|
||||
@@ -33,8 +32,8 @@ public:
|
||||
void on_new_window(wxWebViewEvent& event);
|
||||
void on_script_message(wxWebViewEvent& event);
|
||||
void push_message(const std::string& message);
|
||||
void set_icon_image_id(int id) { m_icon_image_id = id; }
|
||||
int get_icon_image_id() const { return m_icon_image_id; }
|
||||
void set_icon(const wxBitmap& icon) { m_icon = icon; }
|
||||
const wxBitmap& icon() const { return m_icon; }
|
||||
|
||||
private:
|
||||
void load_plugin_content();
|
||||
@@ -45,8 +44,7 @@ private:
|
||||
std::shared_ptr<PagesPluginCapability> m_cap;
|
||||
std::shared_ptr<std::atomic<PluginPage*>> m_lifetime;
|
||||
bool m_content_loaded{false};
|
||||
|
||||
int m_icon_image_id = wxBookCtrlBase::NO_IMAGE;
|
||||
wxBitmap m_icon;
|
||||
};
|
||||
|
||||
class PluginPages
|
||||
@@ -66,7 +64,6 @@ public:
|
||||
void on_plugin_register(const std::string& plugin_key);
|
||||
void on_plugin_deregister(const std::string& plugin_key);
|
||||
|
||||
int get_visible_page_count() const { return m_visible_page_count; }
|
||||
void set_visible_page_count(int count);
|
||||
|
||||
void relayout();
|
||||
@@ -83,7 +80,6 @@ private:
|
||||
std::vector<PluginCapabilityId> m_order;
|
||||
Notebook* m_parent{nullptr};
|
||||
|
||||
std::unique_ptr<wxImageList> m_image_list;
|
||||
int m_visible_page_count{0};
|
||||
|
||||
std::optional<PluginCapabilityId> m_swapped_in_id;
|
||||
|
||||
Reference in New Issue
Block a user