#include "wx/vector.h"
#include "wx/hashmap.h"
#include "wx/variant.h"
+#include "wx/any.h"
#include "wx/longlong.h"
#include "wx/clntdata.h"
wxPGHashMapI2I,
class WXDLLIMPEXP_PROPGRID);
+// Utility to find if specific item is in a vector. Returns index to
+// the item, or wxNOT_FOUND if not present.
+template<typename CONTAINER, typename T>
+int wxPGFindInVector( CONTAINER vector, const T& item )
+{
+ for ( unsigned int i=0; i<vector.size(); i++ )
+ {
+ if ( vector[i] == item )
+ return (int) i;
+ }
+ return wxNOT_FOUND;
+}
+
// -----------------------------------------------------------------------
enum wxPG_GETPROPERTYVALUES_FLAGS
\
virtual wxVariantData* Clone() const { return new classname##VariantData(m_value); } \
\
+ DECLARE_WXANY_CONVERSION() \
protected:\
classname m_value; \
};\
\
+IMPLEMENT_TRIVIAL_WXANY_CONVERSION(classname, classname##VariantData) \
+\
wxString classname##VariantData::GetType() const\
{\
return wxS(#classname);\