mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 21:02:23 +00:00
NEW: Add FilamentMapDialog
support drag drop to modify the filament map jira: none Change-Id: I0ed3180a0fa8e95e7c871bb039eb844faccd1344 (cherry picked from commit 67f67d76889668fdd80ae5e496b6cbca5f771a43)
This commit is contained in:
39
src/slic3r/GUI/DragDropPanel.hpp
Normal file
39
src/slic3r/GUI/DragDropPanel.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef slic3r_DragDropPanel_hpp_
|
||||
#define slic3r_DragDropPanel_hpp_
|
||||
|
||||
#include "GUI.hpp"
|
||||
#include "GUI_Utils.hpp"
|
||||
|
||||
#include <wx/simplebook.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/timer.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
class ColorPanel;
|
||||
class DragDropPanel : public wxPanel
|
||||
{
|
||||
public:
|
||||
DragDropPanel(wxWindow *parent, const wxString &label);
|
||||
|
||||
void AddColorBlock(const wxColour &color, int filament_id);
|
||||
void RemoveColorBlock(ColorPanel *panel);
|
||||
void DoDragDrop(ColorPanel *panel, const wxColour &color, int filament_id);
|
||||
|
||||
std::vector<int> GetAllFilaments() const;
|
||||
|
||||
void set_is_draging(bool is_draging) { m_is_draging = is_draging; }
|
||||
bool is_draging() const { return m_is_draging; }
|
||||
|
||||
private:
|
||||
wxBoxSizer *m_sizer;
|
||||
wxGridSizer *m_grid_item_sizer;
|
||||
|
||||
private:
|
||||
bool m_is_draging = false;
|
||||
};
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
#endif /* slic3r_DragDropPanel_hpp_ */
|
||||
Reference in New Issue
Block a user