mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-02 03:24:00 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
101
src/slic3r/GUI/Widgets/StepCtrl.hpp
Normal file
101
src/slic3r/GUI/Widgets/StepCtrl.hpp
Normal file
|
@ -0,0 +1,101 @@
|
|||
#ifndef slic3r_GUI_StepCtrlBase_hpp_
|
||||
#define slic3r_GUI_StepCtrlBase_hpp_
|
||||
|
||||
#include "StaticBox.hpp"
|
||||
|
||||
wxDECLARE_EVENT( EVT_STEP_CHANGING, wxCommandEvent );
|
||||
wxDECLARE_EVENT( EVT_STEP_CHANGED, wxCommandEvent );
|
||||
|
||||
class StepCtrlBase : public StaticBox
|
||||
{
|
||||
protected:
|
||||
wxFont font_tip;
|
||||
StateColor clr_bar;
|
||||
StateColor clr_step;
|
||||
StateColor clr_text;
|
||||
StateColor clr_tip;
|
||||
int radius = 7;
|
||||
int bar_width = 4;
|
||||
|
||||
std::vector<wxString> steps;
|
||||
std::vector<wxString> tips;
|
||||
|
||||
int step = -1;
|
||||
|
||||
wxPoint drag_offset;
|
||||
wxPoint pos_thumb;
|
||||
|
||||
public:
|
||||
StepCtrlBase(wxWindow * parent,
|
||||
wxWindowID id,
|
||||
const wxPoint & pos = wxDefaultPosition,
|
||||
const wxSize & size = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
~StepCtrlBase();
|
||||
|
||||
public:
|
||||
bool SetTipFont(wxFont const & font);
|
||||
|
||||
public:
|
||||
int AppendItem(const wxString &item, wxString const & tip = {});
|
||||
|
||||
void DeleteAllItems();
|
||||
|
||||
unsigned int GetCount() const;
|
||||
|
||||
int GetSelection() const;
|
||||
|
||||
void SelectItem(int item);
|
||||
void Idle();
|
||||
|
||||
wxString GetItemText(unsigned int item) const;
|
||||
void SetItemText(unsigned int item, wxString const &value);
|
||||
|
||||
private:
|
||||
// some useful events
|
||||
bool sendStepCtrlEvent(bool changing = false);
|
||||
};
|
||||
|
||||
class StepCtrl : public StepCtrlBase
|
||||
{
|
||||
ScalableBitmap bmp_thumb;
|
||||
|
||||
public:
|
||||
StepCtrl(wxWindow * parent,
|
||||
wxWindowID id,
|
||||
const wxPoint & pos = wxDefaultPosition,
|
||||
const wxSize & size = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
virtual void Rescale();
|
||||
|
||||
private:
|
||||
void mouseDown(wxMouseEvent &event);
|
||||
void mouseMove(wxMouseEvent &event);
|
||||
void mouseUp(wxMouseEvent &event);
|
||||
|
||||
void doRender(wxDC &dc) override;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class StepIndicator : public StepCtrlBase
|
||||
{
|
||||
ScalableBitmap bmp_ok;
|
||||
|
||||
public:
|
||||
StepIndicator(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint & pos = wxDefaultPosition,
|
||||
const wxSize & size = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
virtual void Rescale();
|
||||
|
||||
void SelectNext();
|
||||
private:
|
||||
void doRender(wxDC &dc) override;
|
||||
};
|
||||
|
||||
#endif // !slic3r_GUI_StepCtrlBase_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue