Files
QIDISlicer/src/slic3r/GUI/BitmapComboBox.hpp

53 lines
1.1 KiB
C++
Raw Normal View History

2023-06-10 10:14:12 +08:00
#ifndef slic3r_BitmapComboBox_hpp_
#define slic3r_BitmapComboBox_hpp_
#include <wx/bmpcbox.h>
#include <wx/gdicmn.h>
2023-12-27 18:02:35 +08:00
#include "Widgets/ComboBox.hpp"
2023-06-10 10:14:12 +08:00
#include "GUI_Utils.hpp"
// ---------------------------------
// *** BitmapComboBox ***
// ---------------------------------
namespace Slic3r {
namespace GUI {
// BitmapComboBox used to presets list on Sidebar and Tabs
2023-12-27 18:02:35 +08:00
//class BitmapComboBox : public wxBitmapComboBox
class BitmapComboBox : public ::ComboBox
2023-06-10 10:14:12 +08:00
{
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);
2023-12-27 18:02:35 +08:00
#if 0
2023-06-10 10:14:12 +08:00
~BitmapComboBox();
#ifdef _WIN32
int Append(const wxString& item);
#endif
int Append(const wxString& item, const wxBitmapBundle& bitmap)
{
return wxBitmapComboBox::Append(item, bitmap);
}
protected:
2023-12-27 18:02:35 +08:00
//#ifdef _WIN32
2023-06-10 10:14:12 +08:00
bool MSWOnDraw(WXDRAWITEMSTRUCT* item) override;
void DrawBackground_(wxDC& dc, const wxRect& rect, int WXUNUSED(item), int flags) const;
public:
void Rescale();
#endif
};
}}
#endif