]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/choice.cpp
added wxUSE_NOTEBOOK to include/wx/msw/setup0.h, removed wxUSE_RADIOBUTTON (we
[wxWidgets.git] / src / motif / choice.cpp
index 71981d44d2be7c6b5adde7f17eda235854e0fbd0..45a24308472a5f420b16711e0bb68a7c44c36e2a 100644 (file)
 #include "wx/choice.h"
 #include "wx/utils.h"
 
+#ifdef __VMS__
+#pragma message disable nosimpint
+#endif
 #include <Xm/Xm.h>
 #include <Xm/PushBG.h>
 #include <Xm/PushB.h>
 #include <Xm/RowColumn.h>
+#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") );
+}