PrusaSlicer/src/slic3r/GUI/BitmapComboBox.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

58 lines
1.3 KiB
C++

///|/ Copyright (c) Prusa Research 2021 - 2022 Oleksandra Iushchenko @YuSanka
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
#ifndef slic3r_BitmapComboBox_hpp_
#define slic3r_BitmapComboBox_hpp_
#include <wx/bmpcbox.h>
#include <wx/gdicmn.h>
#include "Widgets/ComboBox.hpp"
#include "GUI_Utils.hpp"
// ---------------------------------
// *** BitmapComboBox ***
// ---------------------------------
namespace Slic3r {
namespace GUI {
// BitmapComboBox used to presets list on Sidebar and Tabs
//class BitmapComboBox : public wxBitmapComboBox
class BitmapComboBox : public ::ComboBox
{
public:
BitmapComboBox(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0,
const wxString choices[] = NULL,
long style = 0);
#if 0
~BitmapComboBox();
#ifdef _WIN32
int Append(const wxString& item);
#endif
int Append(const wxString& item, const wxBitmapBundle& bitmap)
{
return wxBitmapComboBox::Append(item, bitmap);
}
protected:
//#ifdef _WIN32
bool MSWOnDraw(WXDRAWITEMSTRUCT* item) override;
void DrawBackground_(wxDC& dc, const wxRect& rect, int WXUNUSED(item), int flags) const;
public:
void Rescale();
#endif
};
}}
#endif