X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99ab3e3f56ab43fe1127eb565cad1a619cad0499..0e878cfcc6486c7903ae89b316bc71700320199d:/src/motif/listbox.cpp diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index 1b2a48a223..6beec8c9e7 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -272,12 +272,12 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData) m_noItems = items.GetCount(); } -int wxListBox::FindString(const wxString& s) const +int wxDoFindStringInList(Widget w, const wxString& s) { wxXmString str( s ); int *positions = NULL; int no_positions = 0; - bool success = XmListGetMatchPos ((Widget) m_mainWidget, str(), + bool success = XmListGetMatchPos (w, str(), &positions, &no_positions); if (success) @@ -291,6 +291,11 @@ int wxListBox::FindString(const wxString& s) const return -1; } +int wxListBox::FindString(const wxString& s) const +{ + return wxDoFindStringInList( (Widget)m_mainWidget, s ); +} + void wxListBox::Clear() { if (m_noItems <= 0) @@ -415,9 +420,8 @@ int wxListBox::GetSelections(wxArrayInt& aSelections) const } // Get single selection, for single choice list items -int wxListBox::GetSelection() const +int wxDoGetSelectionInList(Widget listBox) { - Widget listBox = (Widget) m_mainWidget; int *posList = NULL; int posCnt = 0; bool flag = XmListGetSelectedPos (listBox, &posList, &posCnt); @@ -433,6 +437,11 @@ int wxListBox::GetSelection() const return -1; } +int wxListBox::GetSelection() const +{ + return wxDoGetSelectionInList((Widget) m_mainWidget); +} + // Find string for position wxString wxListBox::GetString(int N) const {