PrusaSlicer/src/slic3r/GUI/Widgets/StaticBox.hpp
YuSanka c0aef5ff0a Skinned UI: WIP
* Non-MSW specific: Next improvements for BG of the controls
  + Create wrap class BitmapToggleButton to correct create under all platforms
  + TabFilament: Fixes crash on recreating of the app

* Next improvements for background under nonMSW systems
 + Fixed Field::SpinCtrl::propagate_value

* DropDown: Implemented transparent background for rounded corners.
  + Tab: use TextInput and SwitchButton for substitutions
  + nonMSW specific: Don't set BackgroundColors for panels

* ObjectManipulation: Use TextInput instead wxTextCtrl

* Process rectangle/rounded controls
  + Preferences: Added "Suppress round corners" parameter

* Skinned UI: SwitchButton. Use it for CheckBox Field

* Skinned UI: SpinInput
  + ScalableBitmap/ScalableButton respects to different width and height of bitmap.

* Skinned UI: ComboBox

* Skinned UI: CheckBox
2023-10-18 16:32:12 +02:00

60 lines
1.4 KiB
C++

#ifndef slic3r_GUI_StaticBox_hpp_
#define slic3r_GUI_StaticBox_hpp_
#include "../wxExtensions.hpp"
#include "StateHandler.hpp"
#include <wx/window.h>
class StaticBox : public wxWindow
{
public:
StaticBox();
StaticBox(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = 0);
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = 0);
void SetCornerRadius(double radius);
void SetBorderWidth(int width);
void SetBorderColor(StateColor const & color);
void SetBorderColorNormal(wxColor const &color);
virtual void SetBackgroundColor(StateColor const &color);
void SetBackgroundColorNormal(wxColor const &color);
void SetBackgroundColor2(StateColor const &color);
static wxColor GetParentBackgroundColor(wxWindow * parent);
protected:
void paintEvent(wxPaintEvent& evt);
void render(wxDC& dc);
virtual void doRender(wxDC& dc);
double radius;
int border_width = 1;
StateHandler state_handler;
StateColor border_color;
StateColor background_color;
StateColor background_color2;
DECLARE_EVENT_TABLE()
};
#endif // !slic3r_GUI_StaticBox_hpp_