diff --git a/include/wx/ctrlsub.h b/include/wx/ctrlsub.h index 118a212c70..284847e355 100644 --- a/include/wx/ctrlsub.h +++ b/include/wx/ctrlsub.h @@ -18,6 +18,10 @@ #include "wx/arrstr.h" #include "wx/control.h" // base class +#if wxUSE_STD_CONTAINERS_COMPATIBLY +#include +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY + // ---------------------------------------------------------------------------- // wxItemContainer defines an interface which is implemented by all controls // which have string subitems each of which may be selected. @@ -216,9 +220,11 @@ public: wxClientData **clientData) { return AppendItems(wxArrayStringsAdapter(n, items), clientData); } +#if wxUSE_STD_CONTAINERS_COMPATIBLY template int Append(const std::vector& items) { return AppendItems(items); } +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY // only for RTTI needs (separate name) void AppendString(const wxString& item) @@ -259,9 +265,11 @@ public: wxClientData **clientData) { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); } +#if wxUSE_STD_CONTAINERS_COMPATIBLY template int Insert(const std::vector& items, unsigned int pos) { return InsertItems(items, pos); } +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY // replacing items // --------------- @@ -279,9 +287,11 @@ public: void Set(unsigned int n, const wxString *items, wxClientData **clientData) { Clear(); Append(n, items, clientData); } +#if wxUSE_STD_CONTAINERS_COMPATIBLY template void Set(const std::vector& items) { Clear(); Append(items); } +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY // deleting items // --------------