merged 2.2 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2000-07-15 19:51:35 +00:00
parent 8a693e6e04
commit f6bcfd974e
1835 changed files with 237729 additions and 67990 deletions

View File

@@ -67,11 +67,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
XmNstaticList, ((style & wxCB_SIMPLE) == wxCB_SIMPLE),
NULL);
XtAddCallback (buttonWidget, XmNselectionCallback, (XtCallbackProc) wxComboBoxCallback,
(XtPointer) this);
XtAddCallback (buttonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxComboBoxCallback,
(XtPointer) this);
int i;
for (i = 0; i < n; i++)
{
@@ -91,6 +86,11 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
m_font = parent->GetFont();
ChangeFont(FALSE);
XtAddCallback (buttonWidget, XmNselectionCallback, (XtCallbackProc) wxComboBoxCallback,
(XtPointer) this);
XtAddCallback (buttonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxComboBoxCallback,
(XtPointer) this);
SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
@@ -151,6 +151,16 @@ void wxComboBox::Delete(int n)
delete[] (char *)node->Data();
delete node;
}
node = m_clientList.Nth( n );
if (node)
{
if ( HasClientObjectData() )
{
delete (wxClientData *)node->Data();
}
delete node;
}
m_noStrings--;
}
@@ -158,6 +168,21 @@ void wxComboBox::Clear()
{
XmComboBoxDeleteAllItems((Widget) m_mainWidget);
m_stringList.Clear();
if ( HasClientObjectData() )
{
// destroy the data (due to Robert's idea of using wxList<wxObject>
// and not wxList<wxClientData> we can't just say
// m_clientList.DeleteContents(TRUE) - this would crash!
wxNode *node = m_clientList.First();
while ( node )
{
delete (wxClientData *)node->Data();
node = node->Next();
}
}
m_clientList.Clear();
m_noStrings = 0;
}
void wxComboBox::SetSelection (int n)