mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 01:01:15 -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/Button.hpp
Normal file
66
src/slic3r/GUI/Widgets/Button.hpp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
#ifndef slic3r_GUI_Button_hpp_
|
||||
#define slic3r_GUI_Button_hpp_
|
||||
|
||||
#include "../wxExtensions.hpp"
|
||||
#include "StaticBox.hpp"
|
||||
|
||||
class Button : public StaticBox
|
||||
{
|
||||
wxSize textSize;
|
||||
wxSize minSize; // set by outer
|
||||
wxSize paddingSize;
|
||||
ScalableBitmap active_icon;
|
||||
ScalableBitmap inactive_icon;
|
||||
|
||||
StateColor text_color;
|
||||
|
||||
bool pressedDown = false;
|
||||
bool m_selected = true;
|
||||
|
||||
static const int buttonWidth = 200;
|
||||
static const int buttonHeight = 50;
|
||||
|
||||
public:
|
||||
Button();
|
||||
|
||||
Button(wxWindow* parent, wxString text, wxString icon = "", long style = 0, int iconSize = 0);
|
||||
|
||||
bool Create(wxWindow* parent, wxString text, wxString icon = "", long style = 0, int iconSize = 0);
|
||||
|
||||
void SetLabel(const wxString& label) override;
|
||||
|
||||
void SetIcon(const wxString& icon);
|
||||
|
||||
void SetInactiveIcon(const wxString& icon);
|
||||
|
||||
void SetMinSize(const wxSize& size) override;
|
||||
|
||||
void SetPaddingSize(const wxSize& size);
|
||||
|
||||
void SetTextColor(StateColor const &color);
|
||||
|
||||
void SetTextColorNormal(wxColor const &color);
|
||||
|
||||
void SetSelected(bool selected = true) { m_selected = selected; }
|
||||
|
||||
bool Enable(bool enable = true);
|
||||
|
||||
void Rescale();
|
||||
|
||||
private:
|
||||
void paintEvent(wxPaintEvent& evt);
|
||||
|
||||
void render(wxDC& dc);
|
||||
|
||||
void messureSize();
|
||||
|
||||
// some useful events
|
||||
void mouseDown(wxMouseEvent& event);
|
||||
void mouseReleased(wxMouseEvent& event);
|
||||
|
||||
void sendButtonEvent();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // !slic3r_GUI_Button_hpp_
|
||||
Loading…
Add table
Add a link
Reference in a new issue