2014-08-24 01:50:11 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/qt/combobox.h
|
|
|
|
// Author: Peter Most, Mariano Reingart
|
|
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_QT_COMBOBOX_H_
|
|
|
|
#define _WX_QT_COMBOBOX_H_
|
|
|
|
|
|
|
|
#include "wx/choice.h"
|
2016-08-25 15:56:00 +00:00
|
|
|
class QComboBox;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxComboBox : public wxChoice, public wxTextEntry
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxComboBox();
|
|
|
|
|
|
|
|
wxComboBox(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
|
|
|
|
wxComboBox(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
|
2017-11-05 21:56:57 +00:00
|
|
|
virtual void SetSelection(int n) wxOVERRIDE { wxChoice::SetSelection(n); }
|
|
|
|
virtual void SetSelection(long from, long to) wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2017-11-05 21:56:57 +00:00
|
|
|
virtual int GetSelection() const wxOVERRIDE { return wxChoice::GetSelection(); }
|
|
|
|
virtual void GetSelection(long *from, long *to) const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2017-11-05 21:56:57 +00:00
|
|
|
virtual wxString GetStringSelection() const wxOVERRIDE
|
2014-08-24 01:50:11 +00:00
|
|
|
{
|
|
|
|
return wxItemContainer::GetStringSelection();
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:56:57 +00:00
|
|
|
virtual void Clear() wxOVERRIDE
|
2014-08-24 01:50:11 +00:00
|
|
|
{
|
|
|
|
wxTextEntry::Clear();
|
|
|
|
wxItemContainer::Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
// See wxComboBoxBase discussion of IsEmpty().
|
|
|
|
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
|
|
|
|
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
|
|
|
|
|
|
|
|
virtual void Popup();
|
|
|
|
virtual void Dismiss();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
// From wxTextEntry:
|
2017-11-05 21:56:57 +00:00
|
|
|
virtual wxString DoGetValue() const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
// From wxTextEntry:
|
|
|
|
virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; }
|
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxComboBox);
|
2014-08-24 01:50:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_QT_COMBOBOX_H_
|