// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "choice.h"
#endif
#endif
NULL);
- DoChangeBackgroundColour((WXWidget) w, m_backgroundColour);
+ wxDoChangeBackgroundColour((WXWidget) w, m_backgroundColour);
if( m_font.Ok() )
wxDoChangeFont( w, m_font );
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
void wxChoice::ChangeBackgroundColour()
{
- DoChangeBackgroundColour(m_formWidget, m_backgroundColour);
- DoChangeBackgroundColour(m_buttonWidget, m_backgroundColour);
- DoChangeBackgroundColour(m_menuWidget, m_backgroundColour);
+ wxDoChangeBackgroundColour(m_formWidget, m_backgroundColour);
+ wxDoChangeBackgroundColour(m_buttonWidget, m_backgroundColour);
+ wxDoChangeBackgroundColour(m_menuWidget, m_backgroundColour);
size_t i;
for (i = 0; i < m_noStrings; i++)
- DoChangeBackgroundColour(m_widgetArray[i], m_backgroundColour);
+ wxDoChangeBackgroundColour(m_widgetArray[i], m_backgroundColour);
}
void wxChoice::ChangeForegroundColour()
{
- DoChangeForegroundColour(m_formWidget, m_foregroundColour);
- DoChangeForegroundColour(m_buttonWidget, m_foregroundColour);
- DoChangeForegroundColour(m_menuWidget, m_foregroundColour);
+ wxDoChangeForegroundColour(m_formWidget, m_foregroundColour);
+ wxDoChangeForegroundColour(m_buttonWidget, m_foregroundColour);
+ wxDoChangeForegroundColour(m_menuWidget, m_foregroundColour);
size_t i;
for (i = 0; i < m_noStrings; i++)
- DoChangeForegroundColour(m_widgetArray[i], m_foregroundColour);
+ wxDoChangeForegroundColour(m_widgetArray[i], m_foregroundColour);
}
int wxChoice::GetCount() const
// 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 );