]> git.saurik.com Git - wxWidgets.git/commitdiff
added WX_IMPLEMENT_PROPERTY
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 29 Aug 2003 19:07:58 +0000 (19:07 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 29 Aug 2003 19:07:58 +0000 (19:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/xti.h

index 166502080a13473430ab9f37f275856012cc6a2a..db55674802e81b9b94b02c6f3a2ebb4119c39eeb 100644 (file)
@@ -1140,6 +1140,17 @@ WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo* , wxPropertyInfoMap , clas
     static wxDelegateTypeInfo _typeInfo##name( eventType , lastEventType , CLASSINFO( eventClass ) ) ; \
     static wxPropertyInfo _propertyInfo##name( first , class_t::GetClassInfoStatic() , wxT(#name) , &_typeInfo##name , NULL , wxxVariant() ) ; \
 
     static wxDelegateTypeInfo _typeInfo##name( eventType , lastEventType , CLASSINFO( eventClass ) ) ; \
     static wxPropertyInfo _propertyInfo##name( first , class_t::GetClassInfoStatic() , wxT(#name) , &_typeInfo##name , NULL , wxxVariant() ) ; \
 
+// ----------------------------------------------------------------------------
+// Implementation Helper for Simple Properties
+// ----------------------------------------------------------------------------
+
+#define WX_IMPLEMENT_PROPERTY(name, type) \
+private:\
+    type m_##name; \
+public: \
+  void  Set##name( type const & p) { m_##name = p; } \
+  type const & Get##name() const  { return m_##name; }
+
 // ----------------------------------------------------------------------------
 // Handler Info
 //
 // ----------------------------------------------------------------------------
 // Handler Info
 //