// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "univcombobox.h"
#endif
}
protected:
- void OnButton(wxCommandEvent& event) { m_combo->ShowPopup(); }
+ void OnButton(wxCommandEvent& WXUNUSED(event)) { m_combo->ShowPopup(); }
virtual wxSize DoGetBestClientSize() const
{
// implement wxComboPopup methods
virtual bool SetSelection(const wxString& value);
+ virtual void SetSelection(int n, bool select)
+ { wxListBox::SetSelection( n, select); };
virtual wxControl *GetControl() { return this; }
virtual void OnShow();
- virtual wxCoord wxComboListBox::GetBestWidth() const;
+ virtual wxCoord GetBestWidth() const;
protected:
// we shouldn't return height too big from here
// ----------------------------------------------------------------------------
void wxComboControl::DoSetSize(int x, int y,
- int width, int height,
+ int width, int WXUNUSED(height),
int sizeFlags)
{
// combo height is always fixed
return GetLBox()->Append(item);
}
+int wxComboBox::DoInsert(const wxString& item, int pos)
+{
+ wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
+ wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
+
+ if (pos == GetCount())
+ return DoAppend(item);
+
+ GetLBox()->Insert(item, pos);
+ return pos;
+}
+
void wxComboBox::DoSetItemClientData(int n, void* clientData)
{
GetLBox()->SetClientData(n, clientData);