mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 23:31:13 -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
66
src/slic3r/GUI/Widgets/ProgressBar.hpp
Normal file
66
src/slic3r/GUI/Widgets/ProgressBar.hpp
Normal file
|
@ -0,0 +1,66 @@
|
|||
#ifndef slic3r_GUI_ProgressBar_hpp_
|
||||
#define slic3r_GUI_ProgressBar_hpp_
|
||||
|
||||
#include <wx/window.h>
|
||||
#include "../wxExtensions.hpp"
|
||||
|
||||
class ProgressBar : public wxWindow
|
||||
{
|
||||
public:
|
||||
ProgressBar();
|
||||
ProgressBar(wxWindow * parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
int max = 100,
|
||||
const wxPoint & pos = wxDefaultPosition,
|
||||
const wxSize & size = wxDefaultSize,
|
||||
bool shown = false);
|
||||
|
||||
|
||||
void create(wxWindow *parent, wxWindowID id, const wxPoint &pos, wxSize &size);
|
||||
|
||||
~ProgressBar();
|
||||
|
||||
public:
|
||||
bool m_shownumber = {false};
|
||||
int m_disable = {false};
|
||||
int m_max = {100};
|
||||
int m_step = {0};
|
||||
int m_miniHeight = {0};
|
||||
const int miniHeight = {14};
|
||||
double m_radius = {7};
|
||||
double m_proportion = {0};
|
||||
wxColour m_progress_background_colour = {233, 233, 233};
|
||||
wxColour m_progress_colour = {0, 174, 66};
|
||||
wxColour m_progress_colour_disable = {255, 111, 0};
|
||||
wxString m_disable_text;
|
||||
|
||||
|
||||
public:
|
||||
void ShowNumber(bool shown);
|
||||
void Disable(wxString text);
|
||||
void SetValue(int step);
|
||||
void Reset();
|
||||
void SetProgress(int step);
|
||||
void SetRadius(double radius);
|
||||
void SetProgressForedColour(wxColour colour);
|
||||
void SetProgressBackgroundColour(wxColour colour);
|
||||
void Rescale();
|
||||
void SetHeight(int height) {
|
||||
m_minHeight = height;
|
||||
m_radius = m_minHeight / 2;
|
||||
SetSize(GetSize().x, height);
|
||||
}
|
||||
virtual void SetMinSize(const wxSize &size) override;
|
||||
|
||||
protected:
|
||||
void paintEvent(wxPaintEvent &evt);
|
||||
void render(wxDC &dc);
|
||||
void doRender(wxDC &dc);
|
||||
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // !slic3r_GUI_ProgressBar_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue