X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31528cd3cac75558beef4bce0ba21fd182a808ab..399b60a0ad232265cd74ce8bf6a53a1f2cc57ff2:/src/motif/choice.cpp diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 71981d44d2..45a2430847 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -17,16 +17,20 @@ #include "wx/choice.h" #include "wx/utils.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include #include #include #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#endif void wxChoiceCallback (Widget w, XtPointer clientData, XtPointer ptr); @@ -477,3 +481,77 @@ void wxChoice::ChangeForegroundColour() for (i = 0; i < m_noStrings; i++) DoChangeForegroundColour(m_widgetList[i], m_foregroundColour); } + + +// These implement functions needed by wxControlWithItems. +// Unfortunately, they're not all implemented yet. + +int wxChoice::GetCount() const +{ + return Number(); +} + +int wxChoice::DoAppend(const wxString& item) +{ + Append(item); + return GetCount() - 1; +} + +// Just appends, doesn't yet insert +void wxChoice::DoInsertItems(const wxArrayString& items, int WXUNUSED(pos)) +{ + size_t nItems = items.GetCount(); + + for ( size_t n = 0; n < nItems; n++ ) + { + Append( items[n]); + } +} + +void wxChoice::DoSetItems(const wxArrayString& items, void **WXUNUSED(clientData)) +{ + Clear(); + size_t nItems = items.GetCount(); + + for ( size_t n = 0; n < nItems; n++ ) + { + Append(items[n]); + } +} + +void wxChoice::DoSetFirstItem(int WXUNUSED(n)) +{ + wxFAIL_MSG( wxT("wxChoice::DoSetFirstItem not implemented") ); +} + +void wxChoice::DoSetItemClientData(int WXUNUSED(n), void* WXUNUSED(clientData)) +{ + wxFAIL_MSG( wxT("wxChoice::DoSetItemClientData not implemented") ); +} + +void* wxChoice::DoGetItemClientData(int WXUNUSED(n)) const +{ + wxFAIL_MSG( wxT("wxChoice::DoGetItemClientData not implemented") ); + return (void*) NULL; +} + +void wxChoice::DoSetItemClientObject(int WXUNUSED(n), wxClientData* WXUNUSED(clientData)) +{ + wxFAIL_MSG( wxT("wxChoice::DoSetItemClientObject not implemented") ); +} + +wxClientData* wxChoice::DoGetItemClientObject(int WXUNUSED(n)) const +{ + wxFAIL_MSG( wxT("wxChoice::DoGetItemClientObject not implemented") ); + return (wxClientData*) NULL; +} + +void wxChoice::Select(int n) +{ + SetSelection(n); +} + +void wxChoice::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s)) +{ + wxFAIL_MSG( wxT("wxChoice::SetString not implemented") ); +}