mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -06:00
Modifiers Gallery (#6703)
* Added GalleryDialog * GalleryDialog improvements: * Added DnD functionality * Added "Delete custom shapes" function
This commit is contained in:
parent
569b7d7dab
commit
d6fdf2d5c2
23 changed files with 528 additions and 7 deletions
58
src/slic3r/GUI/GalleryDialog.hpp
Normal file
58
src/slic3r/GUI/GalleryDialog.hpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef slic3r_GalleryDialog_hpp_
|
||||
#define slic3r_GalleryDialog_hpp_
|
||||
|
||||
#include "GUI_Utils.hpp"
|
||||
|
||||
class wxListCtrl;
|
||||
class wxImageList;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
namespace GUI {
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
// GalleryDialog
|
||||
//------------------------------------------
|
||||
|
||||
class GalleryDialog : public DPIDialog
|
||||
{
|
||||
wxListCtrl* m_list_ctrl { nullptr };
|
||||
wxImageList* m_image_list { nullptr };
|
||||
|
||||
struct Item {
|
||||
std::string name;
|
||||
bool is_system;
|
||||
};
|
||||
std::vector<Item> m_selected_items;
|
||||
|
||||
int ID_BTN_ADD_CUSTOM_SHAPE;
|
||||
int ID_BTN_DEL_CUSTOM_SHAPE;
|
||||
int ID_BTN_REPLACE_CUSTOM_PNG;
|
||||
|
||||
void load_label_icon_list();
|
||||
void add_custom_shapes(wxEvent& event);
|
||||
void del_custom_shapes(wxEvent& event);
|
||||
void replace_custom_png(wxEvent& event);
|
||||
void select(wxListEvent& event);
|
||||
void deselect(wxListEvent& event);
|
||||
|
||||
void update();
|
||||
|
||||
public:
|
||||
GalleryDialog(wxWindow* parent);
|
||||
~GalleryDialog();
|
||||
|
||||
void get_input_files(wxArrayString& input_files);
|
||||
bool load_files(const wxArrayString& input_files);
|
||||
|
||||
protected:
|
||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
void on_sys_color_changed() override {};
|
||||
};
|
||||
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif //slic3r_GalleryDialog_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue