// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "choice.h"
#endif
return GetCount() - 1;
}
+int wxChoice::DoInsert(const wxString& item, int pos)
+{
+ wxCHECK_MSG(FALSE, -1, wxT("insert not implemented"));
+
+// wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
+// if (pos == GetCount()) return DoAppend(item);
+}
+
void wxChoice::Delete(int n)
{
Widget w = (Widget)m_widgetArray[n];
XtRemoveCallback(w, XmNactivateCallback, (XtCallbackProc)wxChoiceCallback,
(XtPointer)this);
- m_stringList.DeleteNode(m_stringList.Item(n));
+ m_stringList.Erase(m_stringList.Item(n));
m_widgetArray.RemoveAt(size_t(n));
m_clientDataDict.Delete(n, HasClientObjectData());
if (!s.IsEmpty())
{
int i = 0;
- for (wxStringListNode* node = m_stringList.GetFirst ();
+ for (wxStringList::compatibility_iterator node = m_stringList.GetFirst ();
node; node = node->GetNext ())
{
if (wxStrcmp(node->GetData(), s.c_str()) == 0)
{
m_inSetValue = TRUE;
- wxStringListNode *node = m_stringList.Item(n);
+ wxStringList::compatibility_iterator node = m_stringList.Item(n);
if (node)
{
#if 0
int wxChoice::FindString(const wxString& s) const
{
int i = 0;
- for (wxStringListNode* node = m_stringList.GetFirst();
+ for (wxStringList::compatibility_iterator node = m_stringList.GetFirst();
node; node = node->GetNext ())
{
if (s == node->GetData())
wxString wxChoice::GetString(int n) const
{
- wxStringListNode *node = m_stringList.Item(n);
+ wxStringList::compatibility_iterator node = m_stringList.Item(n);
if (node)
return node->GetData();
else
// get my
GetTextExtent( "|", &x, &my );
- wxStringList::Node* curr = m_stringList.GetFirst();
+ wxStringList::compatibility_iterator curr = m_stringList.GetFirst();
while( curr )
{
GetTextExtent( curr->GetData(), &x, &y );