mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -06:00
Experiment with own ComboCtrl for preset_choice.
This commit is contained in:
parent
6053c8f54d
commit
e4b767e840
5 changed files with 118 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/combo.h>
|
||||
#include <wx/dataview.h>
|
||||
|
||||
class wxCheckListBoxComboPopup : public wxCheckListBox, public wxComboPopup
|
||||
{
|
||||
|
@ -25,4 +26,27 @@ public:
|
|||
void OnListBoxSelection(wxCommandEvent& evt);
|
||||
};
|
||||
|
||||
|
||||
// *** wxDataViewTreeCtrlComboBox ***
|
||||
|
||||
class wxDataViewTreeCtrlComboPopup: public wxDataViewTreeCtrl, public wxComboPopup
|
||||
{
|
||||
static const unsigned int DefaultWidth;
|
||||
static const unsigned int DefaultHeight;
|
||||
static const unsigned int DefaultItemHeight;
|
||||
|
||||
wxString m_text;
|
||||
int m_cnt_open_items=2;
|
||||
|
||||
public:
|
||||
virtual bool Create(wxWindow* parent);
|
||||
virtual wxWindow* GetControl() { return this; }
|
||||
virtual void SetStringValue(const wxString& value) { m_text = value; }
|
||||
virtual wxString GetStringValue() const { return m_text; }
|
||||
virtual wxSize GetAdjustedSize(int minWidth, int prefHeight, int maxHeight);
|
||||
|
||||
virtual void OnKeyEvent(wxKeyEvent& evt);
|
||||
void OnDataViewTreeCtrlSelection(wxCommandEvent& evt);
|
||||
};
|
||||
|
||||
#endif // slic3r_GUI_wxExtensions_hpp_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue