X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa61d3525370a9b9fa8c797d9b7f89d96994db5f..ae6a64b6af83a95769363424e09d117a96a15a4c:/src/motif/listbox.cpp diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index cc73babadf..07670065d8 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -14,18 +14,21 @@ #if wxUSE_LISTBOX +#include "wx/listbox.h" + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/settings.h" + #include "wx/arrstr.h" +#endif + #ifdef __VMS #define XtParent XTPARENT #define XtDisplay XTDISPLAY #endif -# include "wx/listbox.h" -#include "wx/settings.h" -#include "wx/dynarray.h" -#include "wx/log.h" -#include "wx/utils.h" -#include "wx/arrstr.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif @@ -206,33 +209,18 @@ void wxListBox::DoSetFirstItem( int N ) void wxListBox::Delete(unsigned int n) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild (listBox); - XmListDeletePos (listBox, n + 1); - if (managed) - XtManageChild (listBox); - - sk.Restore(); m_clientDataDict.Delete(n, HasClientObjectData()); m_noItems --; } int wxListBox::DoAppend(const wxString& item) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild (listBox); int n; XtVaGetValues (listBox, XmNitemCount, &n, NULL); wxXmString text( item ); @@ -243,10 +231,6 @@ int wxListBox::DoAppend(const wxString& item) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild (listBox); - - sk.Restore(); m_noItems ++; return GetCount() - 1; @@ -254,16 +238,11 @@ int wxListBox::DoAppend(const wxString& item) void wxListBox::DoSetItems(const wxArrayString& items, void** clientData) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; if( HasClientObjectData() ) m_clientDataDict.DestroyData(); - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild (listBox); XmString *text = new XmString[items.GetCount()]; unsigned int i; for (i = 0; i < items.GetCount(); ++i) @@ -282,11 +261,6 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild (listBox); - - sk.Restore(); - m_noItems = items.GetCount(); } @@ -484,14 +458,8 @@ wxString wxListBox::GetString(unsigned int n) const void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild(listBox); - XmString *text = new XmString[items.GetCount()]; unsigned int i; // Steve Hammes: Motif 1.1 compatibility @@ -517,11 +485,6 @@ void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild(listBox); - - sk.Restore(); - m_noItems += items.GetCount(); }