X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a236aa2058ccf3d36e9cafc20fa7375080c4be50..b64845917a8aa2e6b6186ba6bd291debc2afc195:/samples/widgets/itemcontainer.h diff --git a/samples/widgets/itemcontainer.h b/samples/widgets/itemcontainer.h index 30d79ec558..59e26b308c 100644 --- a/samples/widgets/itemcontainer.h +++ b/samples/widgets/itemcontainer.h @@ -10,17 +10,22 @@ #ifndef _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_ #define _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_ -// for compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - #include "widgets.h" +// define a common base class for sorted and normal string arrays +#if wxUSE_STL + typedef wxBaseArrayStringBase wxMaybeSortedArrayString; +#else + // in non-STL build wxSortedArrayString derives from wxArrayString + typedef wxArrayString wxMaybeSortedArrayString; +#endif + class ItemContainerWidgetsPage : public WidgetsPage { public: ItemContainerWidgetsPage(WidgetsBookCtrl *book, wxImageList *image_list, - char* icon[]); + const char *const icon[]); virtual ~ItemContainerWidgetsPage(); void OnButtonTestItemContainer(wxCommandEvent& event); @@ -29,7 +34,7 @@ public: private: void StartTest(const wxString& label); - void EndTest(const wxArrayString& result); + void EndTest(const wxMaybeSortedArrayString& result); // Track client data in wxItemContainer instances wxClientData* CreateClientData(int value); @@ -40,7 +45,7 @@ private: bool VerifyAllClientDataDestroyed(); bool VerifyClientData(wxUIntPtr i, const wxString& str); - wxString DumpContainerData(const wxArrayString& expected) const; + wxString DumpContainerData(const wxMaybeSortedArrayString& expected) const; wxArrayString m_items; wxSortedArrayString m_itemsSorted;