mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
59
src/slic3r/GUI/TabButton.hpp
Normal file
59
src/slic3r/GUI/TabButton.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef slic3r_GUI_TabButton_hpp_
|
||||
#define slic3r_GUI_TabButton_hpp_
|
||||
|
||||
#include "wxExtensions.hpp"
|
||||
#include "Widgets/StaticBox.hpp"
|
||||
|
||||
class TabButton : public StaticBox
|
||||
{
|
||||
wxSize textSize;
|
||||
wxSize minSize;
|
||||
wxSize paddingSize;
|
||||
wxBitmap icon;
|
||||
|
||||
StateColor text_color;
|
||||
StateColor border_color;
|
||||
bool pressedDown = false;
|
||||
|
||||
public:
|
||||
TabButton();
|
||||
|
||||
TabButton(wxWindow *parent, wxString text, wxBitmap &icon, long style = 0, int iconSize = 0);
|
||||
|
||||
bool Create(wxWindow *parent, wxString text, wxBitmap &icon, long style = 0, int iconSize = 0);
|
||||
|
||||
void SetLabel(const wxString& label) override;
|
||||
|
||||
void SetMinSize(const wxSize& size) override;
|
||||
|
||||
void SetPaddingSize(const wxSize& size);
|
||||
|
||||
void SetTextColor(StateColor const &color);
|
||||
|
||||
void SetBorderColor(StateColor const &color);
|
||||
|
||||
void SetBGColor(StateColor const &color);
|
||||
|
||||
void SetBitmap(wxBitmap &bitmap);
|
||||
|
||||
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_
|
||||
Reference in New Issue
Block a user