[ 1506733 ] wxOwnerDrawnComboBox::SetPopupControl argument type check.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
af1a6227cc
commit
db53c6ea2e
@ -156,7 +156,10 @@ public:
|
|||||||
|
|
||||||
// set interface class instance derived from wxComboPopup
|
// set interface class instance derived from wxComboPopup
|
||||||
// NULL popup can be used to indicate default in a derived class
|
// NULL popup can be used to indicate default in a derived class
|
||||||
virtual void SetPopupControl( wxComboPopup* popup );
|
void SetPopupControl( wxComboPopup* popup )
|
||||||
|
{
|
||||||
|
DoSetPopupControl(popup);
|
||||||
|
}
|
||||||
|
|
||||||
// get interface class instance derived from wxComboPopup
|
// get interface class instance derived from wxComboPopup
|
||||||
wxComboPopup* GetPopupControl()
|
wxComboPopup* GetPopupControl()
|
||||||
@ -381,6 +384,9 @@ protected:
|
|||||||
// override the base class virtuals involved in geometry calculations
|
// override the base class virtuals involved in geometry calculations
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
// NULL popup can be used to indicate default in a derived class
|
||||||
|
virtual void DoSetPopupControl(wxComboPopup* popup);
|
||||||
|
|
||||||
// ensures there is atleast the default popup
|
// ensures there is atleast the default popup
|
||||||
void EnsurePopupControl();
|
void EnsurePopupControl();
|
||||||
|
|
||||||
|
@ -254,8 +254,11 @@ public:
|
|||||||
|
|
||||||
virtual ~wxOwnerDrawnComboBox();
|
virtual ~wxOwnerDrawnComboBox();
|
||||||
|
|
||||||
// NULL popup can be used to indicate default interface
|
// Prevent app from using wxComboPopup
|
||||||
virtual void SetPopupControl( wxComboPopup* popup );
|
void SetPopupControl(wxVListBoxComboPopup* popup)
|
||||||
|
{
|
||||||
|
DoSetPopupControl(popup);
|
||||||
|
}
|
||||||
|
|
||||||
// wxControlWithItems methods
|
// wxControlWithItems methods
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
@ -296,6 +299,9 @@ protected:
|
|||||||
// OnDrawItem.
|
// OnDrawItem.
|
||||||
virtual void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags ) const;
|
virtual void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags ) const;
|
||||||
|
|
||||||
|
// NULL popup can be used to indicate default interface
|
||||||
|
virtual void DoSetPopupControl(wxComboPopup* popup);
|
||||||
|
|
||||||
// clears all allocated client datas
|
// clears all allocated client datas
|
||||||
void ClearClientDatas();
|
void ClearClientDatas();
|
||||||
|
|
||||||
|
@ -1559,7 +1559,7 @@ void wxComboCtrlBase::DestroyPopup()
|
|||||||
m_popup = (wxWindow*) NULL;
|
m_popup = (wxWindow*) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboCtrlBase::SetPopupControl( wxComboPopup* iface )
|
void wxComboCtrlBase::DoSetPopupControl(wxComboPopup* iface)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( iface, wxT("no popup interface set for wxComboCtrl") );
|
wxCHECK_RET( iface, wxT("no popup interface set for wxComboCtrl") );
|
||||||
|
|
||||||
|
@ -664,14 +664,14 @@ wxOwnerDrawnComboBox::~wxOwnerDrawnComboBox()
|
|||||||
m_popupInterface->ClearClientDatas();
|
m_popupInterface->ClearClientDatas();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxOwnerDrawnComboBox::SetPopupControl( wxComboPopup* popup )
|
void wxOwnerDrawnComboBox::DoSetPopupControl(wxComboPopup* popup)
|
||||||
{
|
{
|
||||||
if ( !popup )
|
if ( !popup )
|
||||||
{
|
{
|
||||||
popup = new wxVListBoxComboPopup();
|
popup = new wxVListBoxComboPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxComboCtrl::SetPopupControl(popup);
|
wxComboCtrl::DoSetPopupControl(popup);
|
||||||
|
|
||||||
wxASSERT(popup);
|
wxASSERT(popup);
|
||||||
m_popupInterface = (wxVListBoxComboPopup*) popup;
|
m_popupInterface = (wxVListBoxComboPopup*) popup;
|
||||||
|
Loading…
Reference in New Issue
Block a user