mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-22 19:50:44 +00:00
support drag drop to modify the filament map jira: none Change-Id: I0ed3180a0fa8e95e7c871bb039eb844faccd1344 (cherry picked from commit 67f67d76889668fdd80ae5e496b6cbca5f771a43)
40 lines
914 B
C++
40 lines
914 B
C++
#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_ */
|