]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/xtiprop.h
Use (newly) added wxStaticCastVariantData() to fix wxNO_RTTI build.
[wxWidgets.git] / include / wx / xtiprop.h
index 6ccc21e737021052a15d922c94f70ea6faf8e23c..a79364c9e70d59b2647853e9eb6c54a98c86b817 100644 (file)
 #include "wx/xti.h"
 #include "wx/any.h"
 
+/*
 class WXDLLIMPEXP_BASE wxObject;
 class WXDLLIMPEXP_BASE wxClassInfo;
 class WXDLLIMPEXP_BASE wxDynamicClassInfo;
+*/
 class WXDLLIMPEXP_BASE wxHashTable;
 class WXDLLIMPEXP_BASE wxHashTable_Node;
 class WXDLLIMPEXP_BASE wxEvent;
@@ -302,7 +304,7 @@ enum
 
 class WXDLLIMPEXP_BASE wxPropertyInfo
 {
-    friend class WXDLLIMPEXP_BASE wxDynamicClassInfo;
+    friend class /* WXDLLIMPEXP_BASE */ wxDynamicClassInfo;
 
 public:
     wxPropertyInfo(wxPropertyInfo* &iter,
@@ -328,30 +330,6 @@ public:
            Insert(iter);
        }
 
-#if wxUSE_UNICODE
-    wxPropertyInfo(wxPropertyInfo* &iter,
-                   wxClassInfo* itsClass,
-                   const wxString& name,
-                   const char* typeName,
-                   wxPropertyAccessor *accessor,
-                   wxAny dv,
-                   wxPropertyInfoFlags flags = 0,
-                   const wxString& helpString = wxEmptyString,
-                   const wxString& groupString = wxEmptyString) :
-                   m_itsClass(itsClass),
-           m_name(name),
-           m_typeInfo(NULL),
-           m_typeName(wxString::FromAscii(typeName)),
-           m_collectionElementTypeInfo(NULL),
-           m_accessor(accessor),
-           m_defaultValue(dv),
-           m_flags(flags),
-           m_helpString(helpString),
-           m_groupString(groupString)
-       {
-           Insert(iter);
-       }
-#endif
     wxPropertyInfo(wxPropertyInfo* &iter,
                    wxClassInfo* itsClass,
                    const wxString& name,
@@ -396,29 +374,6 @@ public:
         Insert(iter);
     }
 
-#if wxUSE_UNICODE
-    wxPropertyInfo(wxPropertyInfo* &iter,
-            wxClassInfo* itsClass, const wxString& name,
-            const char* collectionTypeName,
-            const char* elementTypeName,
-            wxPropertyAccessor *accessor,
-            wxPropertyInfoFlags flags = 0,
-            const wxString& helpString = wxEmptyString,
-            const wxString& groupString = wxEmptyString) :
-        m_itsClass(itsClass),
-        m_name(name),
-        m_typeInfo(NULL),
-        m_typeName(wxString::FromAscii(collectionTypeName)),
-        m_collectionElementTypeInfo(NULL),
-        m_collectionElementTypeName(wxString::FromAscii(elementTypeName)),
-        m_accessor(accessor),
-        m_flags(flags),
-        m_helpString(helpString),
-        m_groupString(groupString)
-    {
-        Insert(iter);
-    }
-#endif
     ~wxPropertyInfo()
         { Remove(); }
 
@@ -490,9 +445,20 @@ private:
     // when the component is dropped on the container.
 };
 
-WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMap, 
+// stl is giving problems when forwarding declarations, therefore we define it as a subclass
+
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMapBase, 
                                       class WXDLLIMPEXP_BASE );
 
+class WXDLLIMPEXP_BASE wxPropertyInfoMap : public wxPropertyInfoMapBase {
+};
+
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxAny, wxStringToAnyHashMapBase,
+                                     class WXDLLIMPEXP_BASE );
+
+class WXDLLIMPEXP_FWD_BASE wxStringToAnyHashMap : public wxStringToAnyHashMapBase {
+};
+
 #define wxBEGIN_PROPERTIES_TABLE(theClass)                      \
     wxPropertyInfo *theClass::GetPropertiesStatic()             \
     {                                                           \
@@ -570,13 +536,13 @@ WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMap,
         &_accessor##pname, flags, help, group  );
 
 #define wxEVENT_PROPERTY( name, eventType, eventClass )                               \
-    static wxEventSourceTypeInfo _typeInfo##name( eventType, CLASSINFO( eventClass ) );  \
+    static wxEventSourceTypeInfo _typeInfo##name( eventType, wxCLASSINFO( eventClass ) );  \
     static wxPropertyInfo _propertyInfo##name( first,class_t::GetClassInfoStatic(),   \
         wxT(#name), &_typeInfo##name, NULL, wxAny() );
 
 #define wxEVENT_RANGE_PROPERTY( name, eventType, lastEventType, eventClass )          \
     static wxEventSourceTypeInfo _typeInfo##name( eventType, lastEventType,              \
-                                               CLASSINFO( eventClass ) );             \
+                                               wxCLASSINFO( eventClass ) );             \
     static wxPropertyInfo _propertyInfo##name( first, class_t::GetClassInfoStatic(),  \
         wxT(#name), &_typeInfo##name, NULL, wxAny() );
 
@@ -591,8 +557,5 @@ public:                                                 \
   void  Set##name( type const & p) { m_##name = p; }    \
   type const & Get##name() const  { return m_##name; }
 
-WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxAny, wxStringToAnyHashMap,
-    class WXDLLIMPEXP_BASE );
-
 #endif      // wxUSE_EXTENDED_RTTI
 #endif      // _XTIPROP_H_