merging back XTI branch part 2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-01-04 08:31:53 +00:00
parent f0c6b96336
commit 2895324520
244 changed files with 4364 additions and 5859 deletions

View File

@@ -499,6 +499,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/ptr_shrd.h
wx/recguard.h
wx/regex.h
wx/rtti.h
wx/scopedarray.h
wx/scopedptr.h
wx/scopeguard.h
@@ -551,6 +552,10 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/xlocale.h
wx/xti.h
wx/xtistrm.h
wx/xtictor.h
wx/xtihandler.h
wx/xtiprop.h
wx/xtitypes.h
wx/zipstrm.h
wx/zstream.h
wx/meta/convertible.h
@@ -648,9 +653,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/artstd.cpp
src/common/arttango.cpp
src/common/bmpbase.cpp
src/common/bmpbtncmn.cpp
src/common/bookctrl.cpp
src/common/btncmn.cpp
src/common/cairo.cpp
src/common/calctrlcmn.cpp
src/common/checkboxcmn.cpp
src/common/checklstcmn.cpp
src/common/choiccmn.cpp
src/common/clipcmn.cpp
src/common/clrpickercmn.cpp
@@ -667,6 +676,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/dcbufcmn.cpp
src/common/dcgraph.cpp
src/common/dcsvg.cpp
src/common/dirctrlcmn.cpp
src/common/dlgcmn.cpp
src/common/dndcmn.cpp
src/common/dobjcmn.cpp
@@ -693,6 +703,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/geometry.cpp
src/common/gifdecod.cpp
src/common/graphcmn.cpp
src/common/gridcmn.cpp
src/common/headercolcmn.cpp
src/common/headerctrlcmn.cpp
src/common/helpbase.cpp
@@ -717,23 +728,32 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/menucmn.cpp
src/common/mousemanager.cpp
src/common/nbkbase.cpp
src/common/odcombocmn.cpp
src/common/overlaycmn.cpp
src/common/ownerdrwcmn.cpp
src/common/paper.cpp
src/common/panelcmn.cpp
src/common/persist.cpp
src/common/pickerbase.cpp
src/common/popupcmn.cpp
src/common/prntbase.cpp
src/common/quantize.cpp
src/common/radiobtncmn.cpp
src/common/radiocmn.cpp
src/common/rearrangectrl.cpp
src/common/rendcmn.cpp
src/common/rgncmn.cpp
src/common/scrolbarcmn.cpp
src/common/settcmn.cpp
src/common/sizer.cpp
src/common/slidercmn.cpp
src/common/spinbtncmn.cpp
src/common/spinctrlcmn.cpp
src/common/srchcmn.cpp
src/common/statbar.cpp
src/common/statbmpcmn.cpp
src/common/statboxcmn.cpp
src/common/statlinecmn.cpp
src/common/stattextcmn.cpp
src/common/stockitem.cpp
src/common/tbarbase.cpp

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1455,6 +1455,10 @@ SOURCE=..\..\include\wx\regex.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\rtti.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\scopedarray.h
# End Source File
# Begin Source File
@@ -1655,10 +1659,26 @@ SOURCE=..\..\include\wx\xti.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\xtictor.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\xtihandler.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\xtiprop.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\xtistrm.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\xtitypes.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\zipstrm.h
# End Source File
# Begin Source File

View File

@@ -276,6 +276,10 @@ SOURCE=..\..\src\common\bmpbase.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\bmpbtncmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\bookctrl.cpp
# End Source File
# Begin Source File
@@ -288,6 +292,18 @@ SOURCE=..\..\src\common\cairo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\calctrlcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\checkboxcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\checklstcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\choiccmn.cpp
# End Source File
# Begin Source File
@@ -352,6 +368,10 @@ SOURCE=..\..\src\common\dcsvg.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\dirctrlcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\dlgcmn.cpp
# End Source File
# Begin Source File
@@ -466,6 +486,10 @@ SOURCE=..\..\src\common\graphcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\gridcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\headercolcmn.cpp
# End Source File
# Begin Source File
@@ -566,6 +590,10 @@ SOURCE=..\..\src\common\nbkbase.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\odcombocmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\overlaycmn.cpp
# End Source File
# Begin Source File
@@ -574,6 +602,10 @@ SOURCE=..\..\src\common\ownerdrwcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\panelcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\paper.cpp
# End Source File
# Begin Source File
@@ -598,6 +630,10 @@ SOURCE=..\..\src\common\quantize.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\radiobtncmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\radiocmn.cpp
# End Source File
# Begin Source File
@@ -614,6 +650,10 @@ SOURCE=..\..\src\common\rgncmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\scrolbarcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\settcmn.cpp
# End Source File
# Begin Source File
@@ -622,6 +662,14 @@ SOURCE=..\..\src\common\sizer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\slidercmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\spinbtncmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\spinctrlcmn.cpp
# End Source File
# Begin Source File
@@ -634,6 +682,18 @@ SOURCE=..\..\src\common\statbar.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\statbmpcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\statboxcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\statlinecmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\stattextcmn.cpp
# End Source File
# Begin Source File

View File

@@ -1523,6 +1523,9 @@
<File
RelativePath="..\..\include\wx\regex.h">
</File>
<File
RelativePath="..\..\include\wx\rtti.h">
</File>
<File
RelativePath="..\..\include\wx\scopedarray.h">
</File>
@@ -1673,9 +1676,21 @@
<File
RelativePath="..\..\include\wx\xti.h">
</File>
<File
RelativePath="..\..\include\wx\xtictor.h">
</File>
<File
RelativePath="..\..\include\wx\xtihandler.h">
</File>
<File
RelativePath="..\..\include\wx\xtiprop.h">
</File>
<File
RelativePath="..\..\include\wx\xtistrm.h">
</File>
<File
RelativePath="..\..\include\wx\xtitypes.h">
</File>
<File
RelativePath="..\..\include\wx\zipstrm.h">
</File>

View File

@@ -552,6 +552,9 @@
<File
RelativePath="..\..\src\common\bmpbase.cpp">
</File>
<File
RelativePath="..\..\src\common\bmpbtncmn.cpp">
</File>
<File
RelativePath="..\..\src\common\bookctrl.cpp">
</File>
@@ -561,6 +564,15 @@
<File
RelativePath="..\..\src\common\cairo.cpp">
</File>
<File
RelativePath="..\..\src\common\calctrlcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\checkboxcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\checklstcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\choiccmn.cpp">
</File>
@@ -609,6 +621,9 @@
<File
RelativePath="..\..\src\common\dcsvg.cpp">
</File>
<File
RelativePath="..\..\src\common\dirctrlcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\dlgcmn.cpp">
</File>
@@ -741,6 +756,9 @@
<File
RelativePath="..\..\src\common\graphcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\gridcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\headercolcmn.cpp">
</File>
@@ -816,12 +834,18 @@
<File
RelativePath="..\..\src\common\nbkbase.cpp">
</File>
<File
RelativePath="..\..\src\common\odcombocmn.cpp">
</File>
<File
RelativePath="..\..\src\common\overlaycmn.cpp">
</File>
<File
RelativePath="..\..\src\common\ownerdrwcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\panelcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\paper.cpp">
</File>
@@ -840,6 +864,9 @@
<File
RelativePath="..\..\src\common\quantize.cpp">
</File>
<File
RelativePath="..\..\src\common\radiobtncmn.cpp">
</File>
<File
RelativePath="..\..\src\common\radiocmn.cpp">
</File>
@@ -852,12 +879,21 @@
<File
RelativePath="..\..\src\common\rgncmn.cpp">
</File>
<File
RelativePath="..\..\src\common\scrolbarcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\settcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\sizer.cpp">
</File>
<File
RelativePath="..\..\src\common\slidercmn.cpp">
</File>
<File
RelativePath="..\..\src\common\spinbtncmn.cpp">
</File>
<File
RelativePath="..\..\src\common\spinctrlcmn.cpp">
</File>
@@ -867,6 +903,15 @@
<File
RelativePath="..\..\src\common\statbar.cpp">
</File>
<File
RelativePath="..\..\src\common\statbmpcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\statboxcmn.cpp">
</File>
<File
RelativePath="..\..\src\common\statlinecmn.cpp">
</File>
<File
RelativePath="..\..\src\common\stattextcmn.cpp">
</File>

View File

@@ -2049,6 +2049,10 @@
RelativePath="..\..\include\wx\regex.h"
>
</File>
<File
RelativePath="..\..\include\wx\rtti.h"
>
</File>
<File
RelativePath="..\..\include\wx\scopedarray.h"
>
@@ -2249,10 +2253,26 @@
RelativePath="..\..\include\wx\xti.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtictor.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtihandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtiprop.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtistrm.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtitypes.h"
>
</File>
<File
RelativePath="..\..\include\wx\zipstrm.h"
>

View File

@@ -770,6 +770,10 @@
RelativePath="..\..\src\common\bmpbase.cpp"
>
</File>
<File
RelativePath="..\..\src\common\bmpbtncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\bookctrl.cpp"
>
@@ -782,6 +786,18 @@
RelativePath="..\..\src\common\cairo.cpp"
>
</File>
<File
RelativePath="..\..\src\common\calctrlcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\checkboxcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\checklstcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\choiccmn.cpp"
>
@@ -846,6 +862,10 @@
RelativePath="..\..\src\common\dcsvg.cpp"
>
</File>
<File
RelativePath="..\..\src\common\dirctrlcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\dlgcmn.cpp"
>
@@ -1022,6 +1042,10 @@
RelativePath="..\..\src\common\graphcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\gridcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\headercolcmn.cpp"
>
@@ -1122,6 +1146,10 @@
RelativePath="..\..\src\common\nbkbase.cpp"
>
</File>
<File
RelativePath="..\..\src\common\odcombocmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\overlaycmn.cpp"
>
@@ -1130,6 +1158,10 @@
RelativePath="..\..\src\common\ownerdrwcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\panelcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\paper.cpp"
>
@@ -1154,6 +1186,10 @@
RelativePath="..\..\src\common\quantize.cpp"
>
</File>
<File
RelativePath="..\..\src\common\radiobtncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\radiocmn.cpp"
>
@@ -1170,6 +1206,10 @@
RelativePath="..\..\src\common\rgncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\scrolbarcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\settcmn.cpp"
>
@@ -1178,6 +1218,14 @@
RelativePath="..\..\src\common\sizer.cpp"
>
</File>
<File
RelativePath="..\..\src\common\slidercmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\spinbtncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\spinctrlcmn.cpp"
>
@@ -1190,6 +1238,18 @@
RelativePath="..\..\src\common\statbar.cpp"
>
</File>
<File
RelativePath="..\..\src\common\statbmpcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\statboxcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\statlinecmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\stattextcmn.cpp"
>

View File

@@ -2045,6 +2045,10 @@
RelativePath="..\..\include\wx\regex.h"
>
</File>
<File
RelativePath="..\..\include\wx\rtti.h"
>
</File>
<File
RelativePath="..\..\include\wx\scopedarray.h"
>
@@ -2245,10 +2249,26 @@
RelativePath="..\..\include\wx\xti.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtictor.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtihandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtiprop.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtistrm.h"
>
</File>
<File
RelativePath="..\..\include\wx\xtitypes.h"
>
</File>
<File
RelativePath="..\..\include\wx\zipstrm.h"
>

View File

@@ -766,6 +766,10 @@
RelativePath="..\..\src\common\bmpbase.cpp"
>
</File>
<File
RelativePath="..\..\src\common\bmpbtncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\bookctrl.cpp"
>
@@ -778,6 +782,18 @@
RelativePath="..\..\src\common\cairo.cpp"
>
</File>
<File
RelativePath="..\..\src\common\calctrlcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\checkboxcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\checklstcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\choiccmn.cpp"
>
@@ -842,6 +858,10 @@
RelativePath="..\..\src\common\dcsvg.cpp"
>
</File>
<File
RelativePath="..\..\src\common\dirctrlcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\dlgcmn.cpp"
>
@@ -1018,6 +1038,10 @@
RelativePath="..\..\src\common\graphcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\gridcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\headercolcmn.cpp"
>
@@ -1118,6 +1142,10 @@
RelativePath="..\..\src\common\nbkbase.cpp"
>
</File>
<File
RelativePath="..\..\src\common\odcombocmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\overlaycmn.cpp"
>
@@ -1126,6 +1154,10 @@
RelativePath="..\..\src\common\ownerdrwcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\panelcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\paper.cpp"
>
@@ -1150,6 +1182,10 @@
RelativePath="..\..\src\common\quantize.cpp"
>
</File>
<File
RelativePath="..\..\src\common\radiobtncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\radiocmn.cpp"
>
@@ -1166,6 +1202,10 @@
RelativePath="..\..\src\common\rgncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\scrolbarcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\settcmn.cpp"
>
@@ -1174,6 +1214,14 @@
RelativePath="..\..\src\common\sizer.cpp"
>
</File>
<File
RelativePath="..\..\src\common\slidercmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\spinbtncmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\spinctrlcmn.cpp"
>
@@ -1186,6 +1234,18 @@
RelativePath="..\..\src\common\statbar.cpp"
>
</File>
<File
RelativePath="..\..\src\common\statbmpcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\statboxcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\statlinecmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\stattextcmn.cpp"
>

View File

@@ -1439,6 +1439,95 @@ typedef double wxDouble;
#endif
#endif
/* ---------------------------------------------------------------------------- */
/* XTI workarounds for dummy compilers */
/* ---------------------------------------------------------------------------- */
#if defined(__GNUC__) && !wxCHECK_GCC_VERSION( 3, 4 )
// GCC <= 3.4 has buggy template support
# define wxUSE_MEMBER_TEMPLATES 0
#endif
#if defined(_MSC_VER) && _MSC_VER <= 1200
// MSVC <= 6.0 has buggy template support
# define wxUSE_MEMBER_TEMPLATES 0
# define wxUSE_FUNC_TEMPLATE_POINTER 0
#endif
#ifndef wxUSE_MEMBER_TEMPLATES
# define wxUSE_MEMBER_TEMPLATES 1
#endif
#ifndef wxUSE_FUNC_TEMPLATE_POINTER
# define wxUSE_FUNC_TEMPLATE_POINTER 1
#endif
#if wxUSE_MEMBER_TEMPLATES
# define wxTEMPLATED_MEMBER_CALL( method, type ) method<type>()
# define wxTEMPLATED_MEMBER_FIX( type )
#else
# define wxTEMPLATED_MEMBER_CALL( method, type ) method((type*)NULL)
# define wxTEMPLATED_MEMBER_FIX( type ) type* =NULL
#endif
#if defined(_MSC_VER) && _MSC_VER <= 1200
# define wxTEMPLATED_FUNCTION_FIX( type ), wxTEMPLATED_MEMBER_FIX(type)
# define wxINFUNC_CLASS_TYPE_FIX( type ) typedef type type;
#else
# define wxTEMPLATED_FUNCTION_FIX( type )
# define wxINFUNC_CLASS_TYPE_FIX( type )
#endif
#if wxUSE_FUNC_TEMPLATE_POINTER
# define wxTO_STRING(type) wxToStringConverter<type>
# define wxTO_STRING_IMP(type)
# define wxFROM_STRING(type) wxFromStringConverter<type>
# define wxFROM_STRING_IMP(type)
#else
# define wxTO_STRING(type) ToString##type
# define wxTO_STRING_IMP(type) \
inline void ToString##type( const wxVariantBase& data, wxString &result ) \
{ wxToStringConverter<type>(data, result); }
# define wxFROM_STRING(type) FromString##type
# define wxFROM_STRING_IMP(type) \
inline void FromString##type( const wxString& data, wxVariantBase &result ) \
{ wxFromStringConverter<type>(data, result); }
#endif
// XTI helper macro. This one is used both by xti.h and rtti.h and
// thus needs to go in a common header to avoid redundancy.
#define wxDECLARE_CLASS_INFO_ITERATORS() \
class WXDLLIMPEXP_BASE const_iterator \
{ \
typedef wxHashTable_Node Node; \
public: \
typedef const wxClassInfo* value_type; \
typedef const value_type& const_reference; \
typedef const_iterator itor; \
typedef value_type* ptr_type; \
\
Node* m_node; \
wxHashTable* m_table; \
public: \
typedef const_reference reference_type; \
typedef ptr_type pointer_type; \
\
const_iterator(Node* node, wxHashTable* table) \
: m_node(node), m_table(table) { } \
const_iterator() : m_node(NULL), m_table(NULL) { } \
value_type operator*() const; \
itor& operator++(); \
const itor operator++(int); \
bool operator!=(const itor& it) const \
{ return it.m_node != m_node; } \
bool operator==(const itor& it) const \
{ return it.m_node == m_node; } \
}; \
\
static const_iterator begin_classinfo(); \
static const_iterator end_classinfo();
/* ---------------------------------------------------------------------------- */
/* Geometric flags */
/* ---------------------------------------------------------------------------- */

View File

@@ -153,7 +153,9 @@ private :
unsigned long m_data;
};
#define WX_DEFINE_FLAGS( flags ) \
#if wxUSE_EXTENDED_RTTI
#define wxDEFINE_FLAGS( flags ) \
class WXDLLIMPEXP_BASE flags \
{\
public : \
@@ -162,4 +164,14 @@ private :
bool operator ==(const flags &rhs) const { return m_data == rhs.m_data; }\
} ;
#else
#define wxDEFINE_FLAGS( flags )
#endif
#if WXWIN_COMPATIBILITY_2_8
#define WX_DEFINE_FLAGS wxDEFINE_FLAGS
#endif
#endif

View File

@@ -392,6 +392,39 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxMenuBase);
};
#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// XTI accessor
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxMenuInfo : public wxObject
{
public:
wxMenuInfo() { m_menu = NULL; }
virtual ~wxMenuInfo() { }
bool Create( wxMenu *menu, const wxString &title )
{
m_menu = menu;
m_title = title;
return true;
}
wxMenu* GetMenu() const { return m_menu; }
wxString GetTitle() const { return m_title; }
private:
wxMenu *m_menu;
wxString m_title;
DECLARE_DYNAMIC_CLASS(wxMenuInfo)
};
WX_DECLARE_EXPORTED_LIST(wxMenuInfo, wxMenuInfoList );
#endif
// ----------------------------------------------------------------------------
// wxMenuBar
// ----------------------------------------------------------------------------
@@ -508,6 +541,13 @@ public:
virtual bool CanBeOutsideClientArea() const { return true; }
#if wxUSE_EXTENDED_RTTI
// XTI helpers:
bool AppendMenuInfo( const wxMenuInfo *info )
{ return Append( info->GetMenu(), info->GetTitle() ); }
const wxMenuInfoList& GetMenuInfos() const;
#endif
#if WXWIN_COMPATIBILITY_2_8
// get or change the label of the menu at given position
// Deprecated in favour of SetMenuLabel
@@ -520,6 +560,11 @@ protected:
// the list of all our menus
wxMenuList m_menus;
#if wxUSE_EXTENDED_RTTI
// used by XTI
wxMenuInfoList m_menuInfos;
#endif
// the frame we are attached to (may be NULL)
wxFrame *m_menuBarFrame;

View File

@@ -56,6 +56,48 @@ typedef wxWindow wxNotebookPage; // so far, any window can be a page
extern WXDLLIMPEXP_DATA_CORE(const char) wxNotebookNameStr[];
#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// XTI accessor
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxNotebookPageInfo : public wxObject
{
public:
wxNotebookPageInfo() { m_page = NULL; m_imageId = -1; m_selected = false; }
virtual ~wxNotebookPageInfo() { }
bool Create(wxNotebookPage *page,
const wxString& text,
bool selected,
int imageId)
{
m_page = page;
m_text = text;
m_selected = selected;
m_imageId = imageId;
return true;
}
wxNotebookPage* GetPage() const { return m_page; }
wxString GetText() const { return m_text; }
bool GetSelected() const { return m_selected; }
int GetImageId() const { return m_imageId; }
private:
wxNotebookPage *m_page;
wxString m_text;
bool m_selected;
int m_imageId;
DECLARE_DYNAMIC_CLASS(wxNotebookPageInfo)
};
WX_DECLARE_EXPORTED_LIST(wxNotebookPageInfo, wxNotebookPageInfoList );
#endif
// ----------------------------------------------------------------------------
// wxNotebookBase: define wxNotebook interface
// ----------------------------------------------------------------------------
@@ -103,7 +145,16 @@ public:
// focus because we have tabs
virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); }
#if wxUSE_EXTENDED_RTTI
// XTI accessors
virtual void AddPageInfo( wxNotebookPageInfo* info );
virtual const wxNotebookPageInfoList& GetPageInfos() const;
#endif
protected:
#if wxUSE_EXTENDED_RTTI
wxNotebookPageInfoList m_pageInfos;
#endif
wxDECLARE_NO_COPY_CLASS(wxNotebookBase);
};

View File

@@ -19,226 +19,12 @@
#include "wx/memory.h"
class WXDLLIMPEXP_FWD_BASE wxObject;
class WXDLLIMPEXP_FWD_BASE wxString;
#ifndef wxUSE_EXTENDED_RTTI
#define wxUSE_EXTENDED_RTTI 0
#endif
#define wxDECLARE_CLASS_INFO_ITERATORS() \
class WXDLLIMPEXP_BASE const_iterator \
{ \
typedef wxHashTable_Node Node; \
public: \
typedef const wxClassInfo* value_type; \
typedef const value_type& const_reference; \
typedef const_iterator itor; \
typedef value_type* ptr_type; \
\
Node* m_node; \
wxHashTable* m_table; \
public: \
typedef const_reference reference_type; \
typedef ptr_type pointer_type; \
\
const_iterator(Node* node, wxHashTable* table) \
: m_node(node), m_table(table) { } \
const_iterator() : m_node(NULL), m_table(NULL) { } \
value_type operator*() const; \
itor& operator++(); \
const itor operator++(int); \
bool operator!=(const itor& it) const \
{ return it.m_node != m_node; } \
bool operator==(const itor& it) const \
{ return it.m_node == m_node; } \
}; \
\
static const_iterator begin_classinfo(); \
static const_iterator end_classinfo()
#if wxUSE_EXTENDED_RTTI
// based on the value of wxUSE_EXTENDED_RTTI symbol,
// only one of the RTTI system will be compiled:
// - the "old" one (defined by rtti.h) or
// - the "new" one (defined by xti.h)
#include "wx/xti.h"
#else
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxClassInfo;
class WXDLLIMPEXP_FWD_BASE wxHashTable;
class WXDLLIMPEXP_FWD_BASE wxObject;
class WXDLLIMPEXP_FWD_BASE wxPluginLibrary;
class WXDLLIMPEXP_FWD_BASE wxHashTable_Node;
// ----------------------------------------------------------------------------
// wxClassInfo
// ----------------------------------------------------------------------------
typedef wxObject *(*wxObjectConstructorFn)(void);
class WXDLLIMPEXP_BASE wxClassInfo
{
friend class WXDLLIMPEXP_FWD_BASE wxObject;
friend WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name);
public:
wxClassInfo( const wxChar *className,
const wxClassInfo *baseInfo1,
const wxClassInfo *baseInfo2,
int size,
wxObjectConstructorFn ctor )
: m_className(className)
, m_objectSize(size)
, m_objectConstructor(ctor)
, m_baseInfo1(baseInfo1)
, m_baseInfo2(baseInfo2)
, m_next(sm_first)
{
sm_first = this;
Register();
}
~wxClassInfo();
wxObject *CreateObject() const
{ return m_objectConstructor ? (*m_objectConstructor)() : 0; }
bool IsDynamic() const { return (NULL != m_objectConstructor); }
const wxChar *GetClassName() const { return m_className; }
const wxChar *GetBaseClassName1() const
{ return m_baseInfo1 ? m_baseInfo1->GetClassName() : NULL; }
const wxChar *GetBaseClassName2() const
{ return m_baseInfo2 ? m_baseInfo2->GetClassName() : NULL; }
const wxClassInfo *GetBaseClass1() const { return m_baseInfo1; }
const wxClassInfo *GetBaseClass2() const { return m_baseInfo2; }
int GetSize() const { return m_objectSize; }
wxObjectConstructorFn GetConstructor() const
{ return m_objectConstructor; }
static const wxClassInfo *GetFirst() { return sm_first; }
const wxClassInfo *GetNext() const { return m_next; }
static wxClassInfo *FindClass(const wxString& className);
// Climb upwards through inheritance hierarchy.
// Dual inheritance is catered for.
bool IsKindOf(const wxClassInfo *info) const
{
return info != 0 &&
( info == this ||
( m_baseInfo1 && m_baseInfo1->IsKindOf(info) ) ||
( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) );
}
wxDECLARE_CLASS_INFO_ITERATORS();
private:
const wxChar *m_className;
int m_objectSize;
wxObjectConstructorFn m_objectConstructor;
// Pointers to base wxClassInfos
const wxClassInfo *m_baseInfo1;
const wxClassInfo *m_baseInfo2;
// class info object live in a linked list:
// pointers to its head and the next element in it
static wxClassInfo *sm_first;
wxClassInfo *m_next;
static wxHashTable *sm_classTable;
protected:
// registers the class
void Register();
void Unregister();
wxDECLARE_NO_COPY_CLASS(wxClassInfo);
};
WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name);
// ----------------------------------------------------------------------------
// Dynamic class macros
// ----------------------------------------------------------------------------
#define wxDECLARE_ABSTRACT_CLASS(name) \
public: \
static wxClassInfo ms_classInfo; \
virtual wxClassInfo *GetClassInfo() const
#define wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(name) \
wxDECLARE_NO_ASSIGN_CLASS(name); \
wxDECLARE_DYNAMIC_CLASS(name)
#define wxDECLARE_DYNAMIC_CLASS_NO_COPY(name) \
wxDECLARE_NO_COPY_CLASS(name); \
wxDECLARE_DYNAMIC_CLASS(name)
#define wxDECLARE_DYNAMIC_CLASS(name) \
wxDECLARE_ABSTRACT_CLASS(name); \
static wxObject* wxCreateObject()
#define wxDECLARE_CLASS(name) \
wxDECLARE_DYNAMIC_CLASS(name)
// common part of the macros below
#define wxIMPLEMENT_CLASS_COMMON(name, basename, baseclsinfo2, func) \
wxClassInfo name::ms_classInfo(wxT(#name), \
&basename::ms_classInfo, \
baseclsinfo2, \
(int) sizeof(name), \
func); \
\
wxClassInfo *name::GetClassInfo() const \
{ return &name::ms_classInfo; }
#define wxIMPLEMENT_CLASS_COMMON1(name, basename, func) \
wxIMPLEMENT_CLASS_COMMON(name, basename, NULL, func)
#define wxIMPLEMENT_CLASS_COMMON2(name, basename1, basename2, func) \
wxIMPLEMENT_CLASS_COMMON(name, basename1, &basename2::ms_classInfo, func)
// -----------------------------------
// for concrete classes
// -----------------------------------
// Single inheritance with one base class
#define wxIMPLEMENT_DYNAMIC_CLASS(name, basename) \
wxIMPLEMENT_CLASS_COMMON1(name, basename, name::wxCreateObject) \
wxObject* name::wxCreateObject() \
{ return new name; }
// Multiple inheritance with two base classes
#define wxIMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \
wxIMPLEMENT_CLASS_COMMON2(name, basename1, basename2, \
name::wxCreateObject) \
wxObject* name::wxCreateObject() \
{ return new name; }
// -----------------------------------
// for abstract classes
// -----------------------------------
// Single inheritance with one base class
#define wxIMPLEMENT_ABSTRACT_CLASS(name, basename) \
wxIMPLEMENT_CLASS_COMMON1(name, basename, NULL)
// Multiple inheritance with two base classes
#define wxIMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \
wxIMPLEMENT_CLASS_COMMON2(name, basename1, basename2, NULL)
#define wxIMPLEMENT_CLASS(name, basename) \
wxIMPLEMENT_ABSTRACT_CLASS(name, basename)
#define wxIMPLEMENT_CLASS2(name, basename1, basename2) \
IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2)
#endif // !wxUSE_EXTENDED_RTTI
#include "wx/rtti.h"
// -----------------------------------
// for pluggable classes

File diff suppressed because it is too large Load Diff

View File

@@ -12,12 +12,15 @@
#ifndef _WX_XTISTRMH__
#define _WX_XTISTRMH__
#include "wx/wx.h"
#include "wx/defs.h"
#if wxUSE_EXTENDED_RTTI
const int wxInvalidObjectID = -2 ;
const int wxNullObjectID = -3 ;
#include "wx/string.h"
#include "wx/object.h"
const int wxInvalidObjectID = -2;
const int wxNullObjectID = -3;
// Filer contains the interfaces for streaming objects in and out of XML,
// rendering them either to objects in memory, or to code. Note: We
@@ -27,73 +30,109 @@ const int wxNullObjectID = -3 ;
// in mind when looking at the property streamers and callback interfaces
// listed below.
/*
Main interfaces for streaming out objects.
*/
// ----------------------------------------------------------------------------
// wxPersister
// wxObjectReaderCallback
//
// This class will be asked during the streaming-out process about every single
// property or object instance. It can veto streaming out by returning false
// or modify the value before it is streamed-out.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxWriter ;
class WXDLLIMPEXP_FWD_BASE wxReader ;
class WXDLLIMPEXP_BASE wxObjectWriter;
class WXDLLIMPEXP_BASE wxObjectReader;
class WXDLLIMPEXP_BASE wxClassInfo;
class WXDLLIMPEXP_BASE wxVariantBaseArray;
class WXDLLIMPEXP_BASE wxPropertyInfo;
class WXDLLIMPEXP_BASE wxVariantBase;
class WXDLLIMPEXP_BASE wxObjectWriter;
class WXDLLIMPEXP_BASE wxHandlerInfo;
class WXDLLIMPEXP_BASE wxPersister
class WXDLLIMPEXP_BASE wxObjectReaderCallback
{
public :
virtual ~wxPersister() {}
public:
virtual ~wxObjectReaderCallback() {}
// will be called before an object is written, may veto by returning false
virtual bool BeforeWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) , wxxVariantArray &WXUNUSED(metadata)) { return true ; }
virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo *WXUNUSED(classInfo),
wxVariantBaseArray &WXUNUSED(metadata))
{ return true; }
// will be called after this object has been written, may be needed for adjusting stacks
virtual void AfterWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) ) {}
// will be called after this object has been written, may be
// needed for adjusting stacks
virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo *WXUNUSED(classInfo) )
{}
// will be called before a property gets written, may change the value , eg replace a concrete wxSize by wxSize( wxDefaultCoord , wxDefaultCoord ) or veto
// writing that property at all by returning false
virtual bool BeforeWriteProperty( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxPropertyInfo *WXUNUSED(propInfo) , wxxVariant &WXUNUSED(value) ) { return true ; }
// will be called before a property gets written, may change the value,
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
// or veto writing that property at all by returning false
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxPropertyInfo *WXUNUSED(propInfo),
wxVariantBase &WXUNUSED(value) )
{ return true; }
// will be called before a property gets written, may change the value , eg replace a concrete wxSize by wxSize( wxDefaultCoord , wxDefaultCoord ) or veto
// writing that property at all by returning false
virtual bool BeforeWriteProperty( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxPropertyInfo *WXUNUSED(propInfo) , wxxVariantArray &WXUNUSED(value) ) { return true ; }
// will be called before a property gets written, may change the value,
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
// or veto writing that property at all by returning false
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxPropertyInfo *WXUNUSED(propInfo),
wxVariantBaseArray &WXUNUSED(value) )
{ return true; }
// will be called after a property has been written out, may be needed for adjusting stacks
virtual void AfterWriteProperty( wxWriter *WXUNUSED(writer) , const wxPropertyInfo *WXUNUSED(propInfo) ) {}
// will be called after a property has been written out, may be needed
// for adjusting stacks
virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer),
const wxPropertyInfo *WXUNUSED(propInfo) )
{}
// will be called before this delegate gets written
virtual bool BeforeWriteDelegate( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxClassInfo* WXUNUSED(classInfo) , const wxPropertyInfo *WXUNUSED(propInfo) ,
const wxObject *&WXUNUSED(eventSink) , const wxHandlerInfo* &WXUNUSED(handlerInfo) ) { return true ; }
virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo* WXUNUSED(classInfo),
const wxPropertyInfo *WXUNUSED(propInfo),
const wxObject *&WXUNUSED(eventSink),
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
{ return true; }
virtual void AfterWriteDelegate( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxClassInfo* WXUNUSED(classInfo) , const wxPropertyInfo *WXUNUSED(propInfo) ,
const wxObject *&WXUNUSED(eventSink) , const wxHandlerInfo* &WXUNUSED(handlerInfo) ) { }
} ;
virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo* WXUNUSED(classInfo),
const wxPropertyInfo *WXUNUSED(propInfo),
const wxObject *&WXUNUSED(eventSink),
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
{ }
};
class WXDLLIMPEXP_BASE wxWriter : public wxObject
class WXDLLIMPEXP_BASE wxObjectWriter: public wxObject
{
public :
wxWriter() ;
virtual ~wxWriter() ;
public:
wxObjectWriter();
virtual ~wxObjectWriter();
// with this call you start writing out a new top-level object
void WriteObject(const wxObject *object, const wxClassInfo *classInfo , wxPersister *persister , const wxString &name , wxxVariantArray &WXUNUSED(metadata)) ;
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
wxObjectReaderCallback *persister, const wxString &name,
wxVariantBaseArray &WXUNUSED(metadata));
//
// Managing the object identity table a.k.a context
//
// these methods make sure that no object gets written twice, because sometimes multiple calls to the WriteObject will be
// made without wanting to have duplicate objects written, the object identity table will be reset manually
virtual void ClearObjectContext() ;
// these methods make sure that no object gets written twice,
// because sometimes multiple calls to the WriteObject will be
// made without wanting to have duplicate objects written, the
// object identity table will be reset manually
virtual void ClearObjectContext();
// gets the object Id for a passed in object in the context
int GetObjectID(const wxObject *obj) ;
int GetObjectID(const wxObject *obj);
// returns true if this object has already been written in this context
bool IsObjectKnown( const wxObject *obj ) ;
bool IsObjectKnown( const wxObject *obj );
//
// streaming callbacks
@@ -101,71 +140,87 @@ public :
// these callbacks really write out the values in the stream format
// begins writing out a new toplevel entry which has the indicated unique name
virtual void DoBeginWriteTopLevelEntry( const wxString &name ) = 0 ;
virtual void DoBeginWriteTopLevelEntry( const wxString &name ) = 0;
// ends writing out a new toplevel entry which has the indicated unique name
virtual void DoEndWriteTopLevelEntry( const wxString &name ) = 0 ;
virtual void DoEndWriteTopLevelEntry( const wxString &name ) = 0;
// start of writing an object having the passed in ID
virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo, int objectID , wxxVariantArray &metadata ) = 0 ;
virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo,
int objectID, wxVariantBaseArray &metadata ) = 0;
// end of writing an toplevel object name param is used for unique identification within the container
virtual void DoEndWriteObject(const wxObject *object, const wxClassInfo *classInfo, int objectID ) = 0 ;
// end of writing an toplevel object name param is used for unique
// identification within the container
virtual void DoEndWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID ) = 0;
// writes a simple property in the stream format
virtual void DoWriteSimpleType( wxxVariant &value ) = 0 ;
virtual void DoWriteSimpleType( wxVariantBase &value ) = 0;
// start of writing a complex property into the stream (
virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo ) = 0 ;
virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo ) = 0;
// end of writing a complex property into the stream
virtual void DoEndWriteProperty( const wxPropertyInfo *propInfo ) = 0;
virtual void DoBeginWriteElement() = 0 ;
virtual void DoEndWriteElement() = 0 ;
virtual void DoBeginWriteElement() = 0;
virtual void DoEndWriteElement() = 0;
// insert an object reference to an already written object
virtual void DoWriteRepeatedObject( int objectID ) = 0 ;
virtual void DoWriteRepeatedObject( int objectID ) = 0;
// insert a null reference
virtual void DoWriteNullObject() = 0 ;
virtual void DoWriteNullObject() = 0;
// writes a delegate in the stream format
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo , const wxPropertyInfo *propInfo ,
const wxObject *eventSink , int sinkObjectID , const wxClassInfo* eventSinkClassInfo , const wxHandlerInfo* handlerIndo ) = 0;
private :
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo,
const wxPropertyInfo *propInfo, const wxObject *eventSink,
int sinkObjectID, const wxClassInfo* eventSinkClassInfo,
const wxHandlerInfo* handlerIndo ) = 0;
struct wxWriterInternal ;
wxWriterInternal* m_data ;
private:
struct wxObjectWriterInternal;
wxObjectWriterInternal* m_data;
struct wxWriterInternalPropertiesData ;
struct wxObjectWriterInternalPropertiesData;
void WriteAllProperties( const wxObject * obj , const wxClassInfo* ci , wxPersister *persister, wxWriterInternalPropertiesData * data ) ;
void WriteOneProperty( const wxObject *obj , const wxClassInfo* ci , const wxPropertyInfo* pi , wxPersister *persister , wxWriterInternalPropertiesData *data ) ;
void WriteObject(const wxObject *object, const wxClassInfo *classInfo , wxPersister *persister , bool isEmbedded, wxxVariantArray &metadata ) ;
void FindConnectEntry(const wxEvtHandler * evSource,const wxDelegateTypeInfo* dti, const wxObject* &sink , const wxHandlerInfo *&handler) ;
} ;
void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
wxObjectReaderCallback *persister,
wxObjectWriterInternalPropertiesData * data );
void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
const wxPropertyInfo* pi, wxObjectReaderCallback *persister,
wxObjectWriterInternalPropertiesData *data );
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
wxObjectReaderCallback *persister, bool isEmbedded, wxVariantBaseArray &metadata );
void FindConnectEntry(const wxEvtHandler * evSource,
const wxEventSourceTypeInfo* dti, const wxObject* &sink,
const wxHandlerInfo *&handler);
};
/*
Streaming callbacks for depersisting XML to code, or running objects
*/
class WXDLLIMPEXP_FWD_BASE wxDepersister ;
class WXDLLIMPEXP_BASE wxObjectWriterCallback;
/*
wxReader handles streaming in a class from a arbitrary format. While walking through
it issues calls out to interfaces to depersist the guts from the underlying storage format.
wxObjectReader handles streaming in a class from a arbitrary format.
While walking through it issues calls out to interfaces to depersist
the guts from the underlying storage format.
*/
class WXDLLIMPEXP_BASE wxReader : public wxObject
class WXDLLIMPEXP_BASE wxObjectReader: public wxObject
{
public :
wxReader() ;
virtual ~wxReader() ;
public:
wxObjectReader();
virtual ~wxObjectReader();
// the only thing wxReader knows about is the class info by object ID
wxClassInfo *GetObjectClassInfo(int objectID) ;
bool HasObjectClassInfo( int objectID ) ;
// the only thing wxObjectReader knows about is the class info by object ID
wxClassInfo *GetObjectClassInfo(int objectID);
bool HasObjectClassInfo( int objectID );
void SetObjectClassInfo(int objectID, wxClassInfo* classInfo);
// Reads the component the reader is pointed at from the underlying format.
@@ -173,25 +228,26 @@ public :
// then be used to ask the depersister about that object
// if there was a problem you will get back wxInvalidObjectID and the current
// error log will carry the problems encoutered
virtual int ReadObject( const wxString &name , wxDepersister *depersist ) = 0 ;
virtual int ReadObject( const wxString &name, wxObjectWriterCallback *depersist ) = 0;
private :
struct wxReaderInternal;
wxReaderInternal *m_data;
} ;
private:
struct wxObjectReaderInternal;
wxObjectReaderInternal *m_data;
};
// This abstract class matches the allocate-init/create model of creation of objects.
// At runtime, these will create actual instances, and manipulate them.
// When generating code, these will just create statements of C++
// code to create the objects.
class WXDLLIMPEXP_BASE wxDepersister
class WXDLLIMPEXP_BASE wxObjectWriterCallback
{
public :
virtual ~wxDepersister() {}
public:
virtual ~wxObjectWriterCallback() {}
// allocate the new object on the heap, that object will have the passed in ID
virtual void AllocateObject(int objectID, wxClassInfo *classInfo, wxxVariantArray &metadata) = 0;
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxVariantBaseArray &metadata) = 0;
// initialize the already allocated object having the ID objectID with the Create method
// creation parameters which are objects are having their Ids passed in objectIDValues
@@ -200,232 +256,146 @@ public :
virtual void CreateObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxxVariant *VariantValues ,
int *objectIDValues ,
const wxClassInfo **objectClassInfos ,
wxxVariantArray &metadata) = 0;
wxVariantBase *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos,
wxVariantBaseArray &metadata) = 0;
// construct the new object on the heap, that object will have the passed in ID (for objects that
// don't support allocate-create type of creation)
// creation parameters which are objects are having their Ids passed in objectIDValues
// having objectId <> wxInvalidObjectID
// construct the new object on the heap, that object will have the passed in ID
// (for objects that don't support allocate-create type of creation)
// creation parameters which are objects are having their Ids passed in
// objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxxVariant *VariantValues ,
int *objectIDValues ,
const wxClassInfo **objectClassInfos ,
wxxVariantArray &metadata) = 0;
wxVariantBase *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos,
wxVariantBaseArray &metadata) = 0;
// destroy the heap-allocated object having the ID objectID, this may be used if an object
// is embedded in another object and set via value semantics, so the intermediate
// object can be destroyed after safely
// destroy the heap-allocated object having the ID objectID, this may be used
// if an object is embedded in another object and set via value semantics,
// so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo) = 0;
// set the corresponding property
virtual void SetProperty(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxxVariant &VariantValue) = 0;
const wxPropertyInfo* propertyInfo,
const wxVariantBase &VariantValue) = 0;
// sets the corresponding property (value is an object)
virtual void SetPropertyAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxPropertyInfo* propertyInfo,
int valueObjectId) = 0;
// adds an element to a property collection
virtual void AddToPropertyCollection( int objectID ,
virtual void AddToPropertyCollection( int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxxVariant &VariantValue) = 0;
const wxPropertyInfo* propertyInfo,
const wxVariantBase &VariantValue) = 0;
// sets the corresponding property (value is an object)
virtual void AddToPropertyCollectionAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxPropertyInfo* propertyInfo,
int valueObjectId) = 0;
// sets the corresponding event handler
virtual void SetConnect(int EventSourceObjectID,
const wxClassInfo *EventSourceClassInfo,
const wxPropertyInfo *delegateInfo ,
const wxClassInfo *EventSinkClassInfo ,
const wxHandlerInfo* handlerInfo ,
const wxPropertyInfo *delegateInfo,
const wxClassInfo *EventSinkClassInfo,
const wxHandlerInfo* handlerInfo,
int EventSinkObjectID ) = 0;
};
/*
wxRuntimeDepersister implements the callbacks that will depersist
wxObjectRuntimeReaderCallback implements the callbacks that will depersist
an object into a running memory image, as opposed to writing
C++ initialization code to bring the object to life.
*/
class WXDLLIMPEXP_BASE wxRuntimeDepersister : public wxDepersister
class WXDLLIMPEXP_BASE wxObjectRuntimeReaderCallback: public wxObjectWriterCallback
{
struct wxRuntimeDepersisterInternal ;
wxRuntimeDepersisterInternal * m_data ;
public :
wxRuntimeDepersister();
virtual ~wxRuntimeDepersister();
struct wxObjectRuntimeReaderCallbackInternal;
wxObjectRuntimeReaderCallbackInternal * m_data;
public:
wxObjectRuntimeReaderCallback();
virtual ~wxObjectRuntimeReaderCallback();
// returns the object having the corresponding ID fully constructed
wxObject *GetObject(int objectID) ;
wxObject *GetObject(int objectID);
// allocate the new object on the heap, that object will have the passed in ID
virtual void AllocateObject(int objectID, wxClassInfo *classInfo ,
wxxVariantArray &metadata) ;
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxVariantBaseArray &metadata);
// initialize the already allocated object having the ID objectID with the Create method
// creation parameters which are objects are having their Ids passed in objectIDValues
// having objectId <> wxInvalidObjectID
// initialize the already allocated object having the ID objectID with
// the Create method creation parameters which are objects are having
// their Ids passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void CreateObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxxVariant *VariantValues ,
wxVariantBase *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos ,
wxxVariantArray &metadata
) ;
const wxClassInfo **objectClassInfos,
wxVariantBaseArray &metadata
);
// construct the new object on the heap, that object will have the passed in ID (for objects that
// don't support allocate-create type of creation)
// creation parameters which are objects are having their Ids passed in objectIDValues
// having objectId <> wxInvalidObjectID
// construct the new object on the heap, that object will have the
// passed in ID (for objects that don't support allocate-create type of
// creation) creation parameters which are objects are having their Ids
// passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxxVariant *VariantValues ,
int *objectIDValues ,
const wxClassInfo **objectClassInfos ,
wxxVariantArray &metadata) ;
// destroy the heap-allocated object having the ID objectID, this may be used if an object
// is embedded in another object and set via value semantics, so the intermediate
// object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo) ;
// set the corresponding property
virtual void SetProperty(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxxVariant &variantValue);
// sets the corresponding property (value is an object)
virtual void SetPropertyAsObject(int objectId,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
int valueObjectId) ;
// adds an element to a property collection
virtual void AddToPropertyCollection( int objectID ,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxxVariant &VariantValue) ;
// sets the corresponding property (value is an object)
virtual void AddToPropertyCollectionAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
int valueObjectId) ;
// sets the corresponding event handler
virtual void SetConnect(int eventSourceObjectID,
const wxClassInfo *eventSourceClassInfo,
const wxPropertyInfo *delegateInfo ,
const wxClassInfo *eventSinkClassInfo ,
const wxHandlerInfo* handlerInfo ,
int eventSinkObjectID ) ;
};
/*
wxDepersisterCode implements the callbacks that will depersist
an object into a C++ initialization function. this will move to
a utility lib soon
*/
class WXDLLIMPEXP_FWD_BASE wxTextOutputStream ;
class WXDLLIMPEXP_BASE wxCodeDepersister : public wxDepersister
{
private :
struct wxCodeDepersisterInternal ;
wxCodeDepersisterInternal * m_data ;
wxTextOutputStream *m_fp;
wxString ValueAsCode( const wxxVariant &param ) ;
public:
wxCodeDepersister(wxTextOutputStream *out);
virtual ~wxCodeDepersister();
// allocate the new object on the heap, that object will have the passed in ID
virtual void AllocateObject(int objectID, wxClassInfo *classInfo ,
wxxVariantArray &metadata) ;
// initialize the already allocated object having the ID objectID with the Create method
// creation parameters which are objects are having their Ids passed in objectIDValues
// having objectId <> wxInvalidObjectID
virtual void CreateObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxxVariant *variantValues ,
wxVariantBase *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos ,
wxxVariantArray &metadata
) ;
const wxClassInfo **objectClassInfos,
wxVariantBaseArray &metadata);
// construct the new object on the heap, that object will have the passed in ID (for objects that
// don't support allocate-create type of creation)
// creation parameters which are objects are having their Ids passed in objectIDValues
// having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxxVariant *VariantValues ,
int *objectIDValues ,
const wxClassInfo **objectClassInfos ,
wxxVariantArray &metadata) ;
// destroy the heap-allocated object having the ID objectID, this may be used if an object
// is embedded in another object and set via value semantics, so the intermediate
// object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo) ;
// destroy the heap-allocated object having the ID objectID, this may be
// used if an object is embedded in another object and set via value semantics,
// so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo);
// set the corresponding property
virtual void SetProperty(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxxVariant &variantValue);
const wxPropertyInfo* propertyInfo,
const wxVariantBase &variantValue);
// sets the corresponding property (value is an object)
virtual void SetPropertyAsObject(int objectId,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
int valueObjectId) ;
const wxPropertyInfo* propertyInfo,
int valueObjectId);
// adds an element to a property collection
virtual void AddToPropertyCollection( int objectID ,
virtual void AddToPropertyCollection( int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
const wxxVariant &VariantValue) ;
const wxPropertyInfo* propertyInfo,
const wxVariantBase &VariantValue);
// sets the corresponding property (value is an object)
virtual void AddToPropertyCollectionAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo ,
int valueObjectId) ;
const wxPropertyInfo* propertyInfo,
int valueObjectId);
// sets the corresponding event handler
virtual void SetConnect(int eventSourceObjectID,
const wxClassInfo *eventSourceClassInfo,
const wxPropertyInfo *delegateInfo ,
const wxClassInfo *eventSinkClassInfo ,
const wxHandlerInfo* handlerInfo ,
int eventSinkObjectID ) ;
const wxPropertyInfo *delegateInfo,
const wxClassInfo *eventSinkClassInfo,
const wxHandlerInfo* handlerInfo,
int eventSinkObjectID );
};
#endif // wxUSE_EXTENDED_RTTI

View File

@@ -12,20 +12,27 @@
#ifndef _WX_XTIXMLH__
#define _WX_XTIXMLH__
#include "wx/wx.h"
#include "wx/defs.h"
#if wxUSE_EXTENDED_RTTI
#include "wx/string.h"
#include "wx/xtistrm.h"
class WXDLLIMPEXP_FWD_XML wxXmlNode ;
class WXDLLIMPEXP_XML wxXmlNode;
class WXDLLIMPEXP_BASE wxPropertyInfo;
class WXDLLIMPEXP_BASE wxObject;
class WXDLLIMPEXP_BASE wxClassInfo;
class WXDLLIMPEXP_BASE wxVariantBaseArray;
class WXDLLIMPEXP_BASE wxHandlerInfo;
class WXDLLIMPEXP_BASE wxObjectWriterCallback;
class WXDLLIMPEXP_XML wxXmlWriter : public wxWriter
class WXDLLIMPEXP_XML wxObjectXmlWriter: public wxObjectWriter
{
public :
public:
wxXmlWriter( wxXmlNode * parent ) ;
virtual ~wxXmlWriter() ;
wxObjectXmlWriter( wxXmlNode * parent );
virtual ~wxObjectXmlWriter();
//
// streaming callbacks
@@ -39,66 +46,71 @@ public :
// these callbacks really write out the values in the stream format
// begins writing out a new toplevel entry which has the indicated unique name
virtual void DoBeginWriteTopLevelEntry( const wxString &name ) ;
virtual void DoBeginWriteTopLevelEntry( const wxString &name );
// ends writing out a new toplevel entry which has the indicated unique name
virtual void DoEndWriteTopLevelEntry( const wxString &name ) ;
virtual void DoEndWriteTopLevelEntry( const wxString &name );
// start of writing an object having the passed in ID
virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo, int objectID , wxxVariantArray &metadata ) ;
virtual void DoBeginWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID, wxVariantBaseArray &metadata );
// end of writing an toplevel object name param is used for unique identification within the container
virtual void DoEndWriteObject(const wxObject *object, const wxClassInfo *classInfo, int objectID ) ;
// end of writing an toplevel object name param is used for unique
// identification within the container
virtual void DoEndWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID );
// writes a simple property in the stream format
virtual void DoWriteSimpleType( wxxVariant &value ) ;
virtual void DoWriteSimpleType( wxVariantBase &value );
// start of writing a complex property into the stream (
virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo ) ;
virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo );
// end of writing a complex property into the stream
virtual void DoEndWriteProperty( const wxPropertyInfo *propInfo ) ;
virtual void DoEndWriteProperty( const wxPropertyInfo *propInfo );
virtual void DoBeginWriteElement() ;
virtual void DoEndWriteElement() ;
virtual void DoBeginWriteElement();
virtual void DoEndWriteElement();
// insert an object reference to an already written object
virtual void DoWriteRepeatedObject( int objectID ) ;
virtual void DoWriteRepeatedObject( int objectID );
// insert a null reference
virtual void DoWriteNullObject() ;
virtual void DoWriteNullObject();
// writes a delegate in the stream format
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo , const wxPropertyInfo *propInfo ,
const wxObject *eventSink , int sinkObjectID , const wxClassInfo* eventSinkClassInfo , const wxHandlerInfo* handlerIndo ) ;
private :
struct wxXmlWriterInternal ;
wxXmlWriterInternal* m_data ;
} ;
virtual void DoWriteDelegate( const wxObject *object,
const wxClassInfo* classInfo, const wxPropertyInfo *propInfo,
const wxObject *eventSink, int sinkObjectID,
const wxClassInfo* eventSinkClassInfo, const wxHandlerInfo* handlerIndo );
private:
struct wxObjectXmlWriterInternal;
wxObjectXmlWriterInternal* m_data;
};
/*
wxXmlReader handles streaming in a class from XML
wxObjectXmlReader handles streaming in a class from XML
*/
class WXDLLIMPEXP_XML wxXmlReader : public wxReader
class WXDLLIMPEXP_XML wxObjectXmlReader: public wxObjectReader
{
public:
wxXmlReader(wxXmlNode *parent) { m_parent = parent ; }
virtual ~wxXmlReader() {}
wxObjectXmlReader(wxXmlNode *parent) { m_parent = parent; }
virtual ~wxObjectXmlReader() {}
// Reads a component from XML. The return value is the root object ID, which can
// then be used to ask the depersister about that object
virtual int ReadObject( const wxString &name , wxDepersister *depersist ) ;
virtual int ReadObject( const wxString &name, wxObjectWriterCallback *depersist );
private :
int ReadComponent(wxXmlNode *parent, wxDepersister *callbacks);
private:
int ReadComponent(wxXmlNode *parent, wxObjectWriterCallback *callbacks);
// read the content of this node (simple type) and return the corresponding value
wxxVariant ReadValue(wxXmlNode *Node,
const wxTypeInfo *type );
wxVariantBase ReadValue(wxXmlNode *Node, const wxTypeInfo *type );
wxXmlNode * m_parent ;
wxXmlNode * m_parent;
};
#endif // wxUSE_EXTENDED_RTTI

View File

@@ -24,7 +24,6 @@
#import <AppKit/NSButton.h>
#import <Foundation/NSString.h>
IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxControl)
BEGIN_EVENT_TABLE(wxBitmapButton, wxBitmapButtonBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxBitmapButton,NSButton,NSControl,NSView)

View File

@@ -26,7 +26,6 @@
#import <AppKit/NSButton.h>
#import <Foundation/NSString.h>
IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
BEGIN_EVENT_TABLE(wxCheckBox, wxCheckBoxBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxCheckBox,NSButton,NSControl,NSView)

View File

@@ -29,7 +29,6 @@
#import <Foundation/NSNotification.h>
#import <Foundation/NSDictionary.h>
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems)
BEGIN_EVENT_TABLE(wxChoice, wxChoiceBase)
END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxChoice,NSButton,NSControl,NSView)

View File

@@ -22,8 +22,6 @@
#import <AppKit/NSColor.h>
IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
void wxColour::Init()
{
m_cocoaNSColor = NULL;

View File

@@ -168,7 +168,6 @@ WX_IMPLEMENT_GET_OBJC_CLASS(wxPoserNSComboBox,NSComboBox)
#import <AppKit/NSComboBox.h>
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
BEGIN_EVENT_TABLE(wxComboBox, wxControl)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxComboBox,NSComboBox,NSTextField,NSView)

View File

@@ -34,8 +34,6 @@
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
void wxFrame::Init()
{
m_frameNSView = nil;

View File

@@ -27,8 +27,6 @@
#include <math.h>
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
BEGIN_EVENT_TABLE(wxGauge, wxGaugeBase)
END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxGauge,NSProgressIndicator,NSView,NSView)

View File

@@ -68,7 +68,6 @@ static void _SetWidthOfTableColumnToFitItems(NSTableColumn *tableColumn, NSArray
// class wxListBox
// ============================================================================
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxListBox,NSTableView,NSControl,NSView)

View File

@@ -28,7 +28,6 @@
WX_DEFINE_LIST(wxRadioButtonList);
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
// wxRadioButtonBase == wxControl
BEGIN_EVENT_TABLE(wxRadioButton, wxControl)
END_EVENT_TABLE()

View File

@@ -21,7 +21,6 @@
#import <AppKit/NSScroller.h>
IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
BEGIN_EVENT_TABLE(wxScrollBar, wxScrollBarBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxScrollBar,NSScroller,NSControl,NSView)

View File

@@ -26,8 +26,7 @@
#import <AppKit/NSEvent.h>
#import <AppKit/NSWindow.h>
IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)

View File

@@ -19,9 +19,6 @@
#import <AppKit/NSStepper.h>
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
BEGIN_EVENT_TABLE(wxSpinButton, wxSpinButtonBase)
END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxSpinButton,NSStepper,NSControl,NSView)

View File

@@ -21,8 +21,6 @@
#import <AppKit/NSImageView.h>
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)

View File

@@ -23,7 +23,6 @@
#import <AppKit/NSBox.h>
#import <Foundation/NSString.h>
IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
BEGIN_EVENT_TABLE(wxStaticBox, wxStaticBoxBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxStaticBox,NSBox,NSView,NSView)

View File

@@ -19,7 +19,6 @@
#import <AppKit/NSBox.h>
IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView)

View File

@@ -26,7 +26,6 @@
#import <AppKit/NSTextField.h>
#include <math.h>
IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
BEGIN_EVENT_TABLE(wxStaticText, wxControl)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxStaticText,NSTextField,NSControl,NSView)

View File

@@ -29,7 +29,6 @@
#include <math.h>
IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxTextCtrl,NSTextField,NSControl,NSView)

View File

@@ -928,8 +928,6 @@ void wxWindowCocoaScrollView::Cocoa_FrameChanged(void)
// normally the base classes aren't included, but wxWindow is special
#ifdef __WXUNIVERSAL__
IMPLEMENT_ABSTRACT_CLASS(wxWindowCocoa, wxWindowBase)
#else
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
#endif
BEGIN_EVENT_TABLE(wxWindowCocoa, wxWindowBase)

View File

@@ -30,6 +30,68 @@
#include "wx/toplevel.h"
#endif //WX_PRECOMP
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxButtonStyle )
wxBEGIN_FLAGS( wxButtonStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxBU_LEFT)
wxFLAGS_MEMBER(wxBU_RIGHT)
wxFLAGS_MEMBER(wxBU_TOP)
wxFLAGS_MEMBER(wxBU_BOTTOM)
wxFLAGS_MEMBER(wxBU_EXACTFIT)
wxEND_FLAGS( wxButtonStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl, "wx/button.h")
wxBEGIN_PROPERTIES_TABLE(wxButton)
wxEVENT_PROPERTY( Click, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent )
wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("The font associated with the button label"), wxT("group"))
wxPROPERTY( Label, wxString, SetLabel, GetLabel, wxString(), \
0 /*flags*/, wxT("The button label"), wxT("group") )
wxPROPERTY_FLAGS( WindowStyle, wxButtonStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("The button style"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxButton)
wxCONSTRUCTOR_6( wxButton, wxWindow*, Parent, wxWindowID, Id, wxString, \
Label, wxPoint, Position, wxSize, Size, long, WindowStyle )
// ============================================================================
// implementation
// ============================================================================

View File

@@ -29,6 +29,70 @@ wxDEFINE_EVENT(wxEVT_DATE_CHANGED, wxDateEvent);
#include "wx/calctrl.h"
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxCalendarCtrlStyle )
wxBEGIN_FLAGS( wxCalendarCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxCAL_SUNDAY_FIRST)
wxFLAGS_MEMBER(wxCAL_MONDAY_FIRST)
wxFLAGS_MEMBER(wxCAL_SHOW_HOLIDAYS)
wxFLAGS_MEMBER(wxCAL_NO_YEAR_CHANGE)
wxFLAGS_MEMBER(wxCAL_NO_MONTH_CHANGE)
wxFLAGS_MEMBER(wxCAL_SEQUENTIAL_MONTH_SELECTION)
wxFLAGS_MEMBER(wxCAL_SHOW_SURROUNDING_WEEKS)
wxEND_FLAGS( wxCalendarCtrlStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCalendarCtrl, wxControl, "wx/calctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxCalendarCtrl)
wxEVENT_RANGE_PROPERTY( Updated, wxEVT_CALENDAR_SEL_CHANGED, \
wxEVT_CALENDAR_WEEKDAY_CLICKED, wxCalendarEvent )
wxHIDE_PROPERTY( Children )
wxPROPERTY( Date,wxDateTime, SetDate, GetDate, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxCalendarCtrlStyle, long, \
SetWindowStyleFlag, GetWindowStyleFlag, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \
wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxCalendarCtrl)
wxCONSTRUCTOR_6( wxCalendarCtrl, wxWindow*, Parent, wxWindowID, Id, \
wxDateTime, Date, wxPoint, Position, wxSize, Size, long, WindowStyle )
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------

View File

@@ -33,6 +33,67 @@
const char wxChoiceNameStr[] = "choice";
wxDEFINE_FLAGS( wxChoiceStyle )
wxBEGIN_FLAGS( wxChoiceStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxEND_FLAGS( wxChoiceStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControlWithItems, "wx/choice.h")
wxBEGIN_PROPERTIES_TABLE(wxChoice)
wxEVENT_PROPERTY( Select, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent )
wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_COLLECTION( Choices, wxArrayString, wxString, AppendString, \
GetStrings, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( Selection,int, SetSelection, GetSelection, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
/*
TODO PROPERTIES
selection (long)
content (list)
item
*/
wxPROPERTY_FLAGS( WindowStyle, wxChoiceStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxChoice)
wxCONSTRUCTOR_4( wxChoice, wxWindow*, Parent, wxWindowID, Id, \
wxPoint, Position, wxSize, Size )
// ============================================================================
// implementation
// ============================================================================

View File

@@ -30,6 +30,59 @@
IMPLEMENT_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
#endif
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
#if wxUSE_EXTENDED_RTTI
#include <string.h>
template<> void wxStringReadValue(const wxString &s, wxColour &data )
{
if ( !data.Set(s) )
{
wxLogError(_("String To Colour : Incorrect colour specification : %s"),
s.c_str() );
data = wxNullColour;
}
}
template<> void wxStringWriteValue(wxString &s, const wxColour &data )
{
s = data.GetAsString(wxC2S_HTML_SYNTAX);
}
wxTO_STRING_IMP( wxColour )
wxFROM_STRING_IMP( wxColour )
wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour, wxObject, \
"wx/colour.h", &wxTO_STRING( wxColour ), &wxFROM_STRING( wxColour ))
wxBEGIN_PROPERTIES_TABLE(wxColour)
wxREADONLY_PROPERTY( Red, unsigned char, Red, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxREADONLY_PROPERTY( Green, unsigned char, Green, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxREADONLY_PROPERTY( Blue, unsigned char, Blue, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxDIRECT_CONSTRUCTOR_3( wxColour, unsigned char, Red, \
unsigned char, Green, unsigned char, Blue )
wxEMPTY_HANDLERS_TABLE(wxColour)
#else
#if wxCOLOUR_IS_GDIOBJECT
wxIMPLEMENT_DYNAMIC_CLASS(wxColour, wxGDIObject)
#else
wxIMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
#endif
#endif
// ============================================================================
// wxString <-> wxColour conversions
// ============================================================================

View File

@@ -41,6 +41,71 @@
#include "wx/combo.h"
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxComboBoxStyle )
wxBEGIN_FLAGS( wxComboBoxStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxCB_SIMPLE)
wxFLAGS_MEMBER(wxCB_SORT)
wxFLAGS_MEMBER(wxCB_READONLY)
wxFLAGS_MEMBER(wxCB_DROPDOWN)
wxEND_FLAGS( wxComboBoxStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxChoice, "wx/combobox.h")
wxBEGIN_PROPERTIES_TABLE(wxComboBox)
wxEVENT_PROPERTY( Select, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent )
wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent )
// TODO DELEGATES
wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_COLLECTION( Choices, wxArrayString, wxString, AppendString, \
GetStrings, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( Value,wxString, SetValue, GetValue, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( Selection,int, SetSelection, GetSelection, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxComboBoxStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxComboBox)
wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \
wxString, Value, wxPoint, Position, wxSize, Size )
// constants
// ----------------------------------------------------------------------------

View File

@@ -48,6 +48,67 @@
#include "wx/display.h"
#endif
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxDialogStyle )
wxBEGIN_FLAGS( wxDialogStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxNO_BORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
// dialog styles
wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY)
wxFLAGS_MEMBER(wxSTAY_ON_TOP)
wxFLAGS_MEMBER(wxCAPTION)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxTHICK_FRAME)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxSYSTEM_MENU)
wxFLAGS_MEMBER(wxRESIZE_BORDER)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxRESIZE_BOX)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxCLOSE_BOX)
wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
wxFLAGS_MEMBER(wxMINIMIZE_BOX)
wxEND_FLAGS( wxDialogStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxDialog, wxTopLevelWindow, "wx/dialog.h")
wxBEGIN_PROPERTIES_TABLE(wxDialog)
wxPROPERTY( Title, wxString, SetTitle, GetTitle, wxString(), \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxDialogStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxDialog)
wxCONSTRUCTOR_6( wxDialog, wxWindow*, Parent, wxWindowID, Id, \
wxString, Title, wxPoint, Position, wxSize, Size, long, WindowStyle)
// ----------------------------------------------------------------------------
// wxDialogBase
// ----------------------------------------------------------------------------

View File

@@ -71,6 +71,56 @@ extern const char *wxDumpFont(const wxFont *font)
return buf;
}
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxBEGIN_ENUM( wxFontFamily )
wxENUM_MEMBER( wxDEFAULT )
wxENUM_MEMBER( wxDECORATIVE )
wxENUM_MEMBER( wxROMAN )
wxENUM_MEMBER( wxSCRIPT )
wxENUM_MEMBER( wxSWISS )
wxENUM_MEMBER( wxMODERN )
wxENUM_MEMBER( wxTELETYPE )
wxEND_ENUM( wxFontFamily )
wxBEGIN_ENUM( wxFontStyle )
wxENUM_MEMBER( wxNORMAL )
wxENUM_MEMBER( wxITALIC )
wxENUM_MEMBER( wxSLANT )
wxEND_ENUM( wxFontStyle )
wxBEGIN_ENUM( wxFontWeight )
wxENUM_MEMBER( wxNORMAL )
wxENUM_MEMBER( wxLIGHT )
wxENUM_MEMBER( wxBOLD )
wxEND_ENUM( wxFontWeight )
wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI(wxFont, wxGDIObject, "wx/font.h")
wxBEGIN_PROPERTIES_TABLE(wxFont)
wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT, \
0 /*flags*/, wxT("Helpstring"), wxT("group")) // wxFontFamily
wxPROPERTY( Style, int, SetStyle, GetStyle, (int)wxNORMAL, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // wxFontStyle
wxPROPERTY( Weight, int, SetWeight, GetWeight, (int)wxNORMAL, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // wxFontWeight
wxPROPERTY( Underlined, bool, SetUnderlined, GetUnderlined, false, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY( Face, wxString, SetFaceName, GetFaceName, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( Encoding, wxFontEncoding, SetEncoding, GetEncoding, \
wxFONTENCODING_DEFAULT, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxCONSTRUCTOR_6( wxFont, int, Size, int, Family, int, Style, int, Weight, \
bool, Underlined, wxString, Face )
wxEMPTY_HANDLERS_TABLE(wxFont)
// ============================================================================
// implementation
// ============================================================================

View File

@@ -52,61 +52,62 @@
#include "wx/encconv.h"
#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxBEGIN_ENUM( wxFontEncoding )
wxENUM_MEMBER( wxFONTENCODING_SYSTEM )
wxENUM_MEMBER( wxFONTENCODING_DEFAULT )
wxENUM_MEMBER( wxFONTENCODING_SYSTEM )
wxENUM_MEMBER( wxFONTENCODING_DEFAULT )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_1 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_2 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_3 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_4 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_5 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_6 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_7 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_8 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_9 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_10 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_11 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_12 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_13 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_14 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_15 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_MAX )
wxENUM_MEMBER( wxFONTENCODING_KOI8 )
wxENUM_MEMBER( wxFONTENCODING_KOI8_U )
wxENUM_MEMBER( wxFONTENCODING_ALTERNATIVE )
wxENUM_MEMBER( wxFONTENCODING_BULGARIAN )
wxENUM_MEMBER( wxFONTENCODING_CP437 )
wxENUM_MEMBER( wxFONTENCODING_CP850 )
wxENUM_MEMBER( wxFONTENCODING_CP852 )
wxENUM_MEMBER( wxFONTENCODING_CP855 )
wxENUM_MEMBER( wxFONTENCODING_CP866 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_1 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_2 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_3 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_4 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_5 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_6 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_7 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_8 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_9 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_10 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_11 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_12 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_13 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_14 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_15 )
wxENUM_MEMBER( wxFONTENCODING_ISO8859_MAX )
wxENUM_MEMBER( wxFONTENCODING_KOI8 )
wxENUM_MEMBER( wxFONTENCODING_KOI8_U )
wxENUM_MEMBER( wxFONTENCODING_ALTERNATIVE )
wxENUM_MEMBER( wxFONTENCODING_BULGARIAN )
wxENUM_MEMBER( wxFONTENCODING_CP437 )
wxENUM_MEMBER( wxFONTENCODING_CP850 )
wxENUM_MEMBER( wxFONTENCODING_CP852 )
wxENUM_MEMBER( wxFONTENCODING_CP855 )
wxENUM_MEMBER( wxFONTENCODING_CP866 )
wxENUM_MEMBER( wxFONTENCODING_CP874 )
wxENUM_MEMBER( wxFONTENCODING_CP932 )
wxENUM_MEMBER( wxFONTENCODING_CP936 )
wxENUM_MEMBER( wxFONTENCODING_CP949 )
wxENUM_MEMBER( wxFONTENCODING_CP950 )
wxENUM_MEMBER( wxFONTENCODING_CP1250 )
wxENUM_MEMBER( wxFONTENCODING_CP1251 )
wxENUM_MEMBER( wxFONTENCODING_CP1252 )
wxENUM_MEMBER( wxFONTENCODING_CP1253 )
wxENUM_MEMBER( wxFONTENCODING_CP1254 )
wxENUM_MEMBER( wxFONTENCODING_CP1255 )
wxENUM_MEMBER( wxFONTENCODING_CP1256 )
wxENUM_MEMBER( wxFONTENCODING_CP1257 )
wxENUM_MEMBER( wxFONTENCODING_CP12_MAX )
wxENUM_MEMBER( wxFONTENCODING_UTF7 )
wxENUM_MEMBER( wxFONTENCODING_UTF8 )
wxENUM_MEMBER( wxFONTENCODING_GB2312 )
wxENUM_MEMBER( wxFONTENCODING_BIG5 )
wxENUM_MEMBER( wxFONTENCODING_SHIFT_JIS )
wxENUM_MEMBER( wxFONTENCODING_EUC_JP )
wxENUM_MEMBER( wxFONTENCODING_UNICODE )
wxENUM_MEMBER( wxFONTENCODING_CP874 )
wxENUM_MEMBER( wxFONTENCODING_CP932 )
wxENUM_MEMBER( wxFONTENCODING_CP936 )
wxENUM_MEMBER( wxFONTENCODING_CP949 )
wxENUM_MEMBER( wxFONTENCODING_CP950 )
wxENUM_MEMBER( wxFONTENCODING_CP1250 )
wxENUM_MEMBER( wxFONTENCODING_CP1251 )
wxENUM_MEMBER( wxFONTENCODING_CP1252 )
wxENUM_MEMBER( wxFONTENCODING_CP1253 )
wxENUM_MEMBER( wxFONTENCODING_CP1254 )
wxENUM_MEMBER( wxFONTENCODING_CP1255 )
wxENUM_MEMBER( wxFONTENCODING_CP1256 )
wxENUM_MEMBER( wxFONTENCODING_CP1257 )
wxENUM_MEMBER( wxFONTENCODING_CP12_MAX )
wxENUM_MEMBER( wxFONTENCODING_UTF7 )
wxENUM_MEMBER( wxFONTENCODING_UTF8 )
wxENUM_MEMBER( wxFONTENCODING_GB2312 )
wxENUM_MEMBER( wxFONTENCODING_BIG5 )
wxENUM_MEMBER( wxFONTENCODING_SHIFT_JIS )
wxENUM_MEMBER( wxFONTENCODING_EUC_JP )
wxENUM_MEMBER( wxFONTENCODING_UNICODE )
wxEND_ENUM( wxFontEncoding )
#endif
// ----------------------------------------------------------------------------
// constants

View File

@@ -52,6 +52,79 @@ END_EVENT_TABLE()
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxFrameStyle )
wxBEGIN_FLAGS( wxFrameStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
// frame styles
wxFLAGS_MEMBER(wxSTAY_ON_TOP)
wxFLAGS_MEMBER(wxCAPTION)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxTHICK_FRAME)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxSYSTEM_MENU)
wxFLAGS_MEMBER(wxRESIZE_BORDER)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxRESIZE_BOX)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxCLOSE_BOX)
wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
wxFLAGS_MEMBER(wxMINIMIZE_BOX)
wxFLAGS_MEMBER(wxFRAME_TOOL_WINDOW)
wxFLAGS_MEMBER(wxFRAME_FLOAT_ON_PARENT)
wxFLAGS_MEMBER(wxFRAME_SHAPED)
wxEND_FLAGS( wxFrameStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxFrame, wxTopLevelWindow, "wx/frame.h")
wxBEGIN_PROPERTIES_TABLE(wxFrame)
wxEVENT_PROPERTY( Menu, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent)
wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxString(), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxFrameStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxPROPERTY( MenuBar, wxMenuBar *, SetMenuBar, GetMenuBar, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxFrame)
wxCONSTRUCTOR_6( wxFrame, wxWindow*, Parent, wxWindowID, Id, wxString, Title, \
wxPoint, Position, wxSize, Size, long, WindowStyle)
// ----------------------------------------------------------------------------
// construction/destruction
// ----------------------------------------------------------------------------

View File

@@ -42,6 +42,69 @@ wxGaugeBase::~wxGaugeBase()
// this destructor is required for Darwin
}
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxGaugeStyle )
wxBEGIN_FLAGS( wxGaugeStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxGA_HORIZONTAL)
wxFLAGS_MEMBER(wxGA_VERTICAL)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxGA_PROGRESSBAR)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxGA_SMOOTH)
wxEND_FLAGS( wxGaugeStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl, "wx/gauge.h")
wxBEGIN_PROPERTIES_TABLE(wxGauge)
wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY( Range, int, SetRange, GetRange, 0, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY( ShadowWidth, int, SetShadowWidth, GetShadowWidth, \
0, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( BezelFace, int, SetBezelFace, GetBezelFace, \
0, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxGaugeStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxGauge)
wxCONSTRUCTOR_6( wxGauge, wxWindow*, Parent, wxWindowID, Id, int, Range, \
wxPoint, Position, wxSize, Size, long, WindowStyle )
// ----------------------------------------------------------------------------
// wxGauge creation
// ----------------------------------------------------------------------------

View File

@@ -44,6 +44,78 @@ wxListBoxBase::~wxListBoxBase()
// this destructor is required for Darwin
}
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxListBoxStyle )
wxBEGIN_FLAGS( wxListBoxStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxLB_SINGLE)
wxFLAGS_MEMBER(wxLB_MULTIPLE)
wxFLAGS_MEMBER(wxLB_EXTENDED)
wxFLAGS_MEMBER(wxLB_HSCROLL)
wxFLAGS_MEMBER(wxLB_ALWAYS_SB)
wxFLAGS_MEMBER(wxLB_NEEDED_SB)
wxFLAGS_MEMBER(wxLB_SORT)
wxEND_FLAGS( wxListBoxStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControlWithItems, "wx/listbox.h")
wxBEGIN_PROPERTIES_TABLE(wxListBox)
wxEVENT_PROPERTY( Select, wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEvent )
wxEVENT_PROPERTY( DoubleClick, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEvent )
wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY_COLLECTION( Choices, wxArrayString, wxString, AppendString, \
GetStrings, 0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Selection, int, SetSelection, GetSelection, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY_FLAGS( WindowStyle, wxListBoxStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxListBox)
wxCONSTRUCTOR_4( wxListBox, wxWindow*, Parent, wxWindowID, Id, \
wxPoint, Position, wxSize, Size )
/*
TODO PROPERTIES
selection
content
item
*/
// ----------------------------------------------------------------------------
// selection
// ----------------------------------------------------------------------------

View File

@@ -51,4 +51,81 @@ wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEvent );
wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_FOCUSED, wxListEvent );
wxDEFINE_EVENT( wxEVT_COMMAND_LIST_CACHE_HINT, wxListEvent );
// -----------------------------------------------------------------------------
// XTI
// -----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxListCtrlStyle )
wxBEGIN_FLAGS( wxListCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxLC_LIST)
wxFLAGS_MEMBER(wxLC_REPORT)
wxFLAGS_MEMBER(wxLC_ICON)
wxFLAGS_MEMBER(wxLC_SMALL_ICON)
wxFLAGS_MEMBER(wxLC_ALIGN_TOP)
wxFLAGS_MEMBER(wxLC_ALIGN_LEFT)
wxFLAGS_MEMBER(wxLC_AUTOARRANGE)
wxFLAGS_MEMBER(wxLC_USER_TEXT)
wxFLAGS_MEMBER(wxLC_EDIT_LABELS)
wxFLAGS_MEMBER(wxLC_NO_HEADER)
wxFLAGS_MEMBER(wxLC_SINGLE_SEL)
wxFLAGS_MEMBER(wxLC_SORT_ASCENDING)
wxFLAGS_MEMBER(wxLC_SORT_DESCENDING)
wxFLAGS_MEMBER(wxLC_VIRTUAL)
wxEND_FLAGS( wxListCtrlStyle )
#if ((!defined(__WXMSW__) && !(defined(__WXMAC__) && wxOSX_USE_CARBON)) || defined(__WXUNIVERSAL__))
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxGenericListCtrl, "wx/listctrl.h")
#else
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl, "wx/listctrl.h")
#endif
wxBEGIN_PROPERTIES_TABLE(wxListCtrl)
wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent )
wxPROPERTY_FLAGS( WindowStyle, wxListCtrlStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxListCtrl)
wxCONSTRUCTOR_5( wxListCtrl, wxWindow*, Parent, wxWindowID, Id, \
wxPoint, Position, wxSize, Size, long, WindowStyle )
/*
TODO : Expose more information of a list's layout etc. via appropriate objects
(see NotebookPageInfo)
*/
IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl)
IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
#endif // wxUSE_LISTCTRL

View File

@@ -48,6 +48,161 @@ WX_DEFINE_LIST(wxMenuItemList)
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// XTI for wxMenu(Bar)
// ----------------------------------------------------------------------------
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_LIST( wxMenuInfoList )
wxDEFINE_FLAGS( wxMenuStyle )
wxBEGIN_FLAGS( wxMenuStyle )
wxFLAGS_MEMBER(wxMENU_TEAROFF)
wxEND_FLAGS( wxMenuStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxMenu, wxEvtHandler, "wx/menu.h")
wxCOLLECTION_TYPE_INFO( wxMenuItem *, wxMenuItemList ) ;
template<> void wxCollectionToVariantArray( wxMenuItemList const &theList,
wxVariantBaseArray &value)
{
wxListCollectionToVariantArray<wxMenuItemList::compatibility_iterator>( theList, value ) ;
}
wxBEGIN_PROPERTIES_TABLE(wxMenu)
wxEVENT_PROPERTY( Select, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent)
wxPROPERTY( Title, wxString, SetTitle, GetTitle, wxString(), \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxREADONLY_PROPERTY_FLAGS( MenuStyle, wxMenuStyle, long, GetStyle, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \
wxT("group")) // style
wxPROPERTY_COLLECTION( MenuItems, wxMenuItemList, wxMenuItem*, Append, \
GetMenuItems, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxMenu)
wxDIRECT_CONSTRUCTOR_2( wxMenu, wxString, Title, long, MenuStyle )
wxDEFINE_FLAGS( wxMenuBarStyle )
wxBEGIN_FLAGS( wxMenuBarStyle )
wxFLAGS_MEMBER(wxMB_DOCKABLE)
wxEND_FLAGS( wxMenuBarStyle )
// the negative id would lead the window (its superclass !) to
// vetoe streaming out otherwise
bool wxMenuBarStreamingCallback( const wxObject *WXUNUSED(object), wxObjectWriter *,
wxObjectReaderCallback *, wxVariantBaseArray & )
{
return true;
}
wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuBar, wxWindow, "wx/menu.h", \
wxMenuBarStreamingCallback)
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxMenuInfo, wxObject, "wx/menu.h")
wxBEGIN_PROPERTIES_TABLE(wxMenuInfo)
wxREADONLY_PROPERTY( Menu, wxMenu*, GetMenu, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxREADONLY_PROPERTY( Title, wxString, GetTitle, wxString(), \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxMenuInfo)
wxCONSTRUCTOR_2( wxMenuInfo, wxMenu*, Menu, wxString, Title )
wxCOLLECTION_TYPE_INFO( wxMenuInfo *, wxMenuInfoList ) ;
template<> void wxCollectionToVariantArray( wxMenuInfoList const &theList,
wxVariantBaseArray &value)
{
wxListCollectionToVariantArray<wxMenuInfoList::compatibility_iterator>( theList, value ) ;
}
wxBEGIN_PROPERTIES_TABLE(wxMenuBar)
wxPROPERTY_COLLECTION( MenuInfos, wxMenuInfoList, wxMenuInfo*, AppendMenuInfo, \
GetMenuInfos, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxMenuBar)
wxCONSTRUCTOR_DUMMY( wxMenuBar )
#else
// IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
// IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow)
// IMPLEMENT_DYNAMIC_CLASS(wxMenuInfo, wxObject)
#endif
// ----------------------------------------------------------------------------
// XTI for wxMenuItem
// ----------------------------------------------------------------------------
#if wxUSE_EXTENDED_RTTI
bool wxMenuItemStreamingCallback( const wxObject *object, wxObjectWriter *,
wxObjectReaderCallback *, wxVariantBaseArray & )
{
const wxMenuItem * mitem = wx_dynamic_cast(const wxMenuItem*, object);
if ( mitem->GetMenu() && !mitem->GetMenu()->GetTitle().empty() )
{
// we don't stream out the first two items for menus with a title,
// they will be reconstructed
if ( mitem->GetMenu()->FindItemByPosition(0) == mitem ||
mitem->GetMenu()->FindItemByPosition(1) == mitem )
return false;
}
return true;
}
wxBEGIN_ENUM( wxItemKind )
wxENUM_MEMBER( wxITEM_SEPARATOR )
wxENUM_MEMBER( wxITEM_NORMAL )
wxENUM_MEMBER( wxITEM_CHECK )
wxENUM_MEMBER( wxITEM_RADIO )
wxEND_ENUM( wxItemKind )
wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuItem, wxObject, "wx/menuitem.h", \
wxMenuItemStreamingCallback)
wxBEGIN_PROPERTIES_TABLE(wxMenuItem)
wxPROPERTY( Parent, wxMenu*, SetMenu, GetMenu, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Id, int, SetId, GetId, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Text, wxString, SetText, GetText, wxString(), \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Help, wxString, SetHelp, GetHelp, wxString(), \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxREADONLY_PROPERTY( Kind, wxItemKind, GetKind, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( SubMenu, wxMenu*, SetSubMenu, GetSubMenu, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Enabled, bool, Enable, IsEnabled, wxVariantBase((bool)true), \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Checked, bool, Check, IsChecked, wxVariantBase((bool)false), \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Checkable, bool, SetCheckable, IsCheckable, wxVariantBase((bool)false), \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxMenuItem)
wxDIRECT_CONSTRUCTOR_6( wxMenuItem, wxMenu*, Parent, int, Id, wxString, \
Text, wxString, Help, wxItemKind, Kind, wxMenu*, SubMenu )
#else
//IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
#endif
// ----------------------------------------------------------------------------
// wxMenuItemBase
// ----------------------------------------------------------------------------

View File

@@ -38,6 +38,123 @@
wxDEFINE_EVENT( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent );
wxDEFINE_EVENT( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent );
#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
#include "wx/listimpl.cpp"
WX_DEFINE_LIST( wxNotebookPageInfoList )
wxDEFINE_FLAGS( wxNotebookStyle )
wxBEGIN_FLAGS( wxNotebookStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxNB_FIXEDWIDTH)
wxFLAGS_MEMBER(wxBK_DEFAULT)
wxFLAGS_MEMBER(wxBK_TOP)
wxFLAGS_MEMBER(wxBK_LEFT)
wxFLAGS_MEMBER(wxBK_RIGHT)
wxFLAGS_MEMBER(wxBK_BOTTOM)
wxFLAGS_MEMBER(wxNB_NOPAGETHEME)
wxFLAGS_MEMBER(wxNB_FLAT)
wxEND_FLAGS( wxNotebookStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxControl, "wx/notebook.h")
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject, "wx/notebook.h" )
wxCOLLECTION_TYPE_INFO( wxNotebookPageInfo *, wxNotebookPageInfoList );
#if wxUSE_EXTENDED_RTTI
template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theList,
wxVariantBaseArray &value)
{
wxListCollectionToVariantArray<wxNotebookPageInfoList::compatibility_iterator>( theList, value );
}
#endif
wxBEGIN_PROPERTIES_TABLE(wxNotebook)
wxEVENT_PROPERTY( PageChanging, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEvent )
wxEVENT_PROPERTY( PageChanged, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEvent )
wxPROPERTY_COLLECTION( PageInfos, wxNotebookPageInfoList, wxNotebookPageInfo*, \
AddPageInfo, GetPageInfos, 0 /*flags*/, wxT("Helpstring"), \
wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxNotebookStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxNotebook)
wxCONSTRUCTOR_5( wxNotebook, wxWindow*, Parent, wxWindowID, Id, \
wxPoint, Position, wxSize, Size, long, WindowStyle)
wxBEGIN_PROPERTIES_TABLE(wxNotebookPageInfo)
wxREADONLY_PROPERTY( Page, wxNotebookPage*, GetPage, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxREADONLY_PROPERTY( Text, wxString, GetText, wxString(), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxREADONLY_PROPERTY( Selected, bool, GetSelected, false, 0 /*flags*/, \
wxT("Helpstring"), wxT("group") )
wxREADONLY_PROPERTY( ImageId, int, GetImageId, -1, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxNotebookPageInfo)
wxCONSTRUCTOR_4( wxNotebookPageInfo, wxNotebookPage*, Page, \
wxString, Text, bool, Selected, int, ImageId )
// XTI accessors:
void wxNotebookBase::AddPageInfo( wxNotebookPageInfo* info )
{
AddPage( info->GetPage(), info->GetText(), info->GetSelected(), info->GetImageId() );
}
const wxNotebookPageInfoList& wxNotebookBase::GetPageInfos() const
{
wxNotebookPageInfoList* list = const_cast< wxNotebookPageInfoList* >( &m_pageInfos );
WX_CLEAR_LIST( wxNotebookPageInfoList, *list );
for( size_t i = 0; i < GetPageCount(); ++i )
{
wxNotebookPageInfo *info = new wxNotebookPageInfo();
info->Create( const_cast<wxNotebookBase*>(this)->GetPage(i), GetPageText(i),
GetSelection() == int(i), GetPageImage(i) );
list->Append( info );
}
return m_pageInfos;
}
#endif
// ----------------------------------------------------------------------------
// geometry
// ----------------------------------------------------------------------------

View File

@@ -42,6 +42,71 @@
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
// TODO: wxCONSTRUCTOR
#if 0 // wxUSE_EXTENDED_RTTI
wxDEFINE_FLAGS( wxRadioBoxStyle )
wxBEGIN_FLAGS( wxRadioBoxStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxRA_SPECIFY_COLS)
wxFLAGS_MEMBER(wxRA_HORIZONTAL)
wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS)
wxFLAGS_MEMBER(wxRA_VERTICAL)
wxEND_FLAGS( wxRadioBoxStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h")
wxBEGIN_PROPERTIES_TABLE(wxRadioBox)
wxEVENT_PROPERTY( Select , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent )
wxPROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
/*
selection
content
label
dimension
item
*/
#endif
// ----------------------------------------------------------------------------
// wxRadioBoxBase
// ----------------------------------------------------------------------------
void wxRadioBoxBase::SetMajorDim(unsigned int majorDim, long style)
{
wxCHECK_RET( majorDim != 0, wxT("major radiobox dimension can't be 0") );

View File

@@ -31,4 +31,76 @@
wxDEFINE_EVENT(wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEvent);
wxDEFINE_EVENT(wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, wxSpinDoubleEvent);
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxSpinCtrlStyle )
wxBEGIN_FLAGS( wxSpinCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxSP_HORIZONTAL)
wxFLAGS_MEMBER(wxSP_VERTICAL)
wxFLAGS_MEMBER(wxSP_ARROW_KEYS)
wxFLAGS_MEMBER(wxSP_WRAP)
wxEND_FLAGS( wxSpinCtrlStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinCtrl, wxControl, "wx/spinbut.h")
wxBEGIN_PROPERTIES_TABLE(wxSpinCtrl)
wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent )
wxEVENT_PROPERTY( Updated, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEvent )
wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent )
wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent )
wxPROPERTY( ValueString, wxString, SetValue, GetValue, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) ;
wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
/*
wxPROPERTY( Min, int, SetMin, GetMin, 0, 0 /*flags, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Max, int, SetMax, GetMax, 0, 0 /*flags, wxT("Helpstring"), wxT("group"))
*/
wxPROPERTY_FLAGS( WindowStyle, wxSpinCtrlStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
/*
TODO PROPERTIES
style wxSP_ARROW_KEYS
*/
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxSpinCtrl)
wxCONSTRUCTOR_6( wxSpinCtrl, wxWindow*, Parent, wxWindowID, Id, \
wxString, ValueString, wxPoint, Position, \
wxSize, Size, long, WindowStyle )
#endif // wxUSE_SPINCTRL

View File

@@ -48,6 +48,61 @@ const wxChar *wxMarkupEntities[][wxMARKUP_ENTITY_MAX] =
#if wxUSE_STATTEXT
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxStaticTextStyle )
wxBEGIN_FLAGS( wxStaticTextStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxST_NO_AUTORESIZE)
wxFLAGS_MEMBER(wxALIGN_LEFT)
wxFLAGS_MEMBER(wxALIGN_RIGHT)
wxFLAGS_MEMBER(wxALIGN_CENTRE)
wxEND_FLAGS( wxStaticTextStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticText, wxControl, "wx/stattext.h")
wxBEGIN_PROPERTIES_TABLE(wxStaticText)
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxStaticTextStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxStaticText)
wxCONSTRUCTOR_6( wxStaticText, wxWindow*, Parent, wxWindowID, Id, \
wxString, Label, wxPoint, Position, wxSize, Size, long, WindowStyle )
// ----------------------------------------------------------------------------
// wxTextWrapper
// ----------------------------------------------------------------------------

View File

@@ -47,6 +47,80 @@
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxTextCtrlStyle )
wxBEGIN_FLAGS( wxTextCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxTE_PROCESS_ENTER)
wxFLAGS_MEMBER(wxTE_PROCESS_TAB)
wxFLAGS_MEMBER(wxTE_MULTILINE)
wxFLAGS_MEMBER(wxTE_PASSWORD)
wxFLAGS_MEMBER(wxTE_READONLY)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxTE_RICH)
wxFLAGS_MEMBER(wxTE_RICH2)
wxFLAGS_MEMBER(wxTE_AUTO_URL)
wxFLAGS_MEMBER(wxTE_NOHIDESEL)
wxFLAGS_MEMBER(wxTE_LEFT)
wxFLAGS_MEMBER(wxTE_CENTRE)
wxFLAGS_MEMBER(wxTE_RIGHT)
wxFLAGS_MEMBER(wxTE_DONTWRAP)
wxFLAGS_MEMBER(wxTE_CHARWRAP)
wxFLAGS_MEMBER(wxTE_WORDWRAP)
wxEND_FLAGS( wxTextCtrlStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl, "wx/textctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxTextCtrl)
wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent )
wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent )
wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group") )
wxPROPERTY( Value, wxString, SetValue, GetValue, wxString(), \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxTextCtrlStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxTextCtrl)
wxCONSTRUCTOR_6( wxTextCtrl, wxWindow*, Parent, wxWindowID, Id, \
wxString, Value, wxPoint, Position, wxSize, Size, \
long, WindowStyle)
IMPLEMENT_DYNAMIC_CLASS(wxTextUrlEvent, wxCommandEvent)
wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent );

View File

@@ -55,6 +55,74 @@ wxDEFINE_EVENT( wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, wxTreeEvent );
wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, wxTreeEvent );
wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEvent );
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
wxDEFINE_FLAGS( wxTreeCtrlStyle )
wxBEGIN_FLAGS( wxTreeCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxTR_EDIT_LABELS)
wxFLAGS_MEMBER(wxTR_NO_BUTTONS)
wxFLAGS_MEMBER(wxTR_HAS_BUTTONS)
wxFLAGS_MEMBER(wxTR_TWIST_BUTTONS)
wxFLAGS_MEMBER(wxTR_NO_LINES)
wxFLAGS_MEMBER(wxTR_FULL_ROW_HIGHLIGHT)
wxFLAGS_MEMBER(wxTR_LINES_AT_ROOT)
wxFLAGS_MEMBER(wxTR_HIDE_ROOT)
wxFLAGS_MEMBER(wxTR_ROW_LINES)
wxFLAGS_MEMBER(wxTR_HAS_VARIABLE_ROW_HEIGHT)
wxFLAGS_MEMBER(wxTR_SINGLE)
wxFLAGS_MEMBER(wxTR_MULTIPLE)
#if WXWIN_COMPATIBILITY_2_8
wxFLAGS_MEMBER(wxTR_EXTENDED)
#endif
wxFLAGS_MEMBER(wxTR_DEFAULT_STYLE)
wxEND_FLAGS( wxTreeCtrlStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxTreeCtrl, wxControl, "wx/treectrl.h")
wxBEGIN_PROPERTIES_TABLE(wxTreeCtrl)
wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent )
wxEVENT_RANGE_PROPERTY( TreeEvent, wxEVT_COMMAND_TREE_BEGIN_DRAG, \
wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, wxTreeEvent )
wxPROPERTY_FLAGS( WindowStyle, wxTreeCtrlStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxTreeCtrl)
wxCONSTRUCTOR_5( wxTreeCtrl, wxWindow*, Parent, wxWindowID, Id, \
wxPoint, Position, wxSize, Size, long, WindowStyle )
// ----------------------------------------------------------------------------
// Tree event
// ----------------------------------------------------------------------------

View File

@@ -114,6 +114,137 @@ END_EVENT_TABLE()
// implementation of the common functionality of the wxWindow class
// ============================================================================
// ----------------------------------------------------------------------------
// XTI
// ----------------------------------------------------------------------------
#if wxUSE_EXTENDED_RTTI
// windows that are created from a parent window during its Create method,
// eg. spin controls in a calendar controls must never been streamed out
// separately otherwise chaos occurs. Right now easiest is to test for negative ids,
// as windows with negative ids never can be recreated anyway
bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *,
wxObjectReaderCallback *, wxVariantBaseArray & )
{
const wxWindow * win = wx_dynamic_cast(const wxWindow*, object);
if ( win && win->GetId() < 0 )
return false;
return true;
}
wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxWindow, wxWindowBase, "wx/window.h", \
wxWindowStreamingCallback)
// make wxWindowList known before the property is used
wxCOLLECTION_TYPE_INFO( wxWindow*, wxWindowList );
template<> void wxCollectionToVariantArray( wxWindowList const &theList,
wxVariantBaseArray &value)
{
wxListCollectionToVariantArray<wxWindowList::compatibility_iterator>( theList, value );
}
wxDEFINE_FLAGS( wxWindowStyle )
wxBEGIN_FLAGS( wxWindowStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxEND_FLAGS( wxWindowStyle )
wxBEGIN_PROPERTIES_TABLE(wxWindow)
wxEVENT_PROPERTY( Close, wxEVT_CLOSE_WINDOW, wxCloseEvent)
wxEVENT_PROPERTY( Create, wxEVT_CREATE, wxWindowCreateEvent )
wxEVENT_PROPERTY( Destroy, wxEVT_DESTROY, wxWindowDestroyEvent )
// Always constructor Properties first
wxREADONLY_PROPERTY( Parent,wxWindow*, GetParent, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( Id,wxWindowID, SetId, GetId, -1 /*wxID_ANY*/, 0 /*flags*/, \
wxT("Helpstring"), wxT("group") )
wxPROPERTY( Position,wxPoint, SetPosition, GetPosition, wxDefaultPosition, \
0 /*flags*/, wxT("Helpstring"), wxT("group")) // pos
wxPROPERTY( Size,wxSize, SetSize, GetSize, wxDefaultSize, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) // size
wxPROPERTY( WindowStyle, long, SetWindowStyleFlag, GetWindowStyleFlag, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // style
wxPROPERTY( Name,wxString, SetName, GetName, wxEmptyString, 0 /*flags*/, \
wxT("Helpstring"), wxT("group") )
// Then all relations of the object graph
wxREADONLY_PROPERTY_COLLECTION( Children, wxWindowList, wxWindowBase*, \
GetWindowChildren, wxPROP_OBJECT_GRAPH /*flags*/, \
wxT("Helpstring"), wxT("group"))
// and finally all other properties
wxPROPERTY( ExtraStyle, long, SetExtraStyle, GetExtraStyle, wxEMPTY_PARAMETER_VALUE, \
0 /*flags*/, wxT("Helpstring"), wxT("group")) // extstyle
wxPROPERTY( BackgroundColour, wxColour, SetBackgroundColour, GetBackgroundColour, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // bg
wxPROPERTY( ForegroundColour, wxColour, SetForegroundColour, GetForegroundColour, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // fg
wxPROPERTY( Enabled, bool, Enable, IsEnabled, wxVariantBase((bool)true), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
wxPROPERTY( Shown, bool, Show, IsShown, wxVariantBase((bool)true), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
#if 0
// possible property candidates (not in xrc) or not valid in all subclasses
wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxEmptyString )
wxPROPERTY( Font, wxFont, SetFont, GetWindowFont , )
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString )
// MaxHeight, Width, MinHeight, Width
// TODO switch label to control and title to toplevels
wxPROPERTY( ThemeEnabled, bool, SetThemeEnabled, GetThemeEnabled, )
//wxPROPERTY( Cursor, wxCursor, SetCursor, GetCursor, )
// wxPROPERTY( ToolTip, wxString, SetToolTip, GetToolTipText, )
wxPROPERTY( AutoLayout, bool, SetAutoLayout, GetAutoLayout, )
#endif
wxEND_PROPERTIES_TABLE()
wxEMPTY_HANDLERS_TABLE(wxWindow)
wxCONSTRUCTOR_DUMMY(wxWindow)
#else
#ifndef __WXUNIVERSAL__
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
#endif
#endif
// ----------------------------------------------------------------------------
// initialization
// ----------------------------------------------------------------------------

View File

@@ -58,65 +58,6 @@ BEGIN_EVENT_TABLE(wxGenericCalendarCtrl, wxControl)
EVT_SYS_COLOUR_CHANGED(wxGenericCalendarCtrl::OnSysColourChanged)
END_EVENT_TABLE()
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxCalendarCtrlStyle )
wxBEGIN_FLAGS( wxCalendarCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxCAL_SUNDAY_FIRST)
wxFLAGS_MEMBER(wxCAL_MONDAY_FIRST)
wxFLAGS_MEMBER(wxCAL_SHOW_HOLIDAYS)
wxFLAGS_MEMBER(wxCAL_NO_YEAR_CHANGE)
wxFLAGS_MEMBER(wxCAL_NO_MONTH_CHANGE)
wxFLAGS_MEMBER(wxCAL_SEQUENTIAL_MONTH_SELECTION)
wxFLAGS_MEMBER(wxCAL_SHOW_SURROUNDING_WEEKS)
wxFLAGS_MEMBER(wxCAL_SHOW_WEEK_NUMBERS)
wxEND_FLAGS( wxCalendarCtrlStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericCalendarCtrl, wxControl,"wx/calctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxGenericCalendarCtrl)
wxEVENT_RANGE_PROPERTY( Updated , wxEVT_CALENDAR_SEL_CHANGED , wxEVT_CALENDAR_WEEK_CLICKED , wxCalendarEvent )
wxHIDE_PROPERTY( Children )
wxPROPERTY( Date,wxDateTime, SetDate , GetDate, , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY_FLAGS( WindowStyle , wxCalendarCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxGenericCalendarCtrl)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_6( wxGenericCalendarCtrl , wxWindow* , Parent , wxWindowID , Id , wxDateTime , Date , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxGenericCalendarCtrl, wxControl)
#endif
// ============================================================================
// implementation
// ============================================================================

View File

@@ -22,8 +22,6 @@
#include "wx/gdicmn.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
// Colour
void wxColour::Init()

View File

@@ -24,11 +24,7 @@
#include "wx/commandlinkbutton.h"
#include "wx/artprov.h"
#if wxUSE_EXTENDED_RTTI
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCommandLinkButton, wxButton, "wx/commandlinkbutton.h")
#else
wxIMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButton, wxButton)
#endif // wxUSE_EXTENDED_RTTI
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCommandLinkButton, wxButton, "wx/commandlinkbutton.h")
// ----------------------------------------------------------------------------
// Generic command link button

View File

@@ -437,64 +437,6 @@ bool wxDirItemData::HasFiles(const wxString& WXUNUSED(spec)) const
// wxGenericDirCtrl
//-----------------------------------------------------------------------------
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxGenericDirCtrlStyle )
wxBEGIN_FLAGS( wxGenericDirCtrlStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxDIRCTRL_DIR_ONLY)
wxFLAGS_MEMBER(wxDIRCTRL_3D_INTERNAL)
wxFLAGS_MEMBER(wxDIRCTRL_SELECT_FIRST)
wxFLAGS_MEMBER(wxDIRCTRL_MULTIPLE)
wxEND_FLAGS( wxGenericDirCtrlStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericDirCtrl, wxControl,"wx/dirctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxGenericDirCtrl)
wxHIDE_PROPERTY( Children )
wxPROPERTY( DefaultPath , wxString , SetDefaultPath , GetDefaultPath , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Filter , wxString , SetFilter , GetFilter , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
wxPROPERTY( DefaultFilter , int , SetFilterIndex, GetFilterIndex, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
wxPROPERTY_FLAGS( WindowStyle, wxGenericDirCtrlStyle, long, SetWindowStyleFlag, GetWindowStyleFlag, EMPTY_MACROVALUE , 0, wxT("Helpstring"), wxT("group") )
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxGenericDirCtrl)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_8( wxGenericDirCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , DefaultPath ,
wxPoint , Position , wxSize , Size , long , WindowStyle , wxString , Filter , int , DefaultFilter )
#else
IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrl, wxControl)
#endif
BEGIN_EVENT_TABLE(wxGenericDirCtrl, wxControl)
EVT_TREE_ITEM_EXPANDING (wxID_TREECTRL, wxGenericDirCtrl::OnExpandItem)
EVT_TREE_ITEM_COLLAPSED (wxID_TREECTRL, wxGenericDirCtrl::OnCollapseItem)

View File

@@ -1839,58 +1839,6 @@ void wxGridWindow::OnFocus(wxFocusEvent& event)
/////////////////////////////////////////////////////////////////////
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxGridStyle )
wxBEGIN_FLAGS( wxGridStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB)
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxEND_FLAGS( wxGridStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGrid, wxScrolledWindow,"wx/grid.h")
wxBEGIN_PROPERTIES_TABLE(wxGrid)
wxHIDE_PROPERTY( Children )
wxPROPERTY_FLAGS( WindowStyle , wxGridStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxGrid)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_5( wxGrid , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
/*
TODO : Expose more information of a list's layout, etc. via appropriate objects (e.g., NotebookPageInfo)
*/
#else
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
#endif
BEGIN_EVENT_TABLE( wxGrid, wxScrolledWindow )
EVT_PAINT( wxGrid::OnPaint )
EVT_SIZE( wxGrid::OnSize )

View File

@@ -25,15 +25,6 @@
#include "wx/listctrl.h"
#if ((!defined(__WXMSW__) && !(defined(__WXMAC__) && wxOSX_USE_CARBON)) || defined(__WXUNIVERSAL__))
// if we have a native version, its implementation file does all this
IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl)
IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxGenericListCtrl)
#endif
#ifndef WX_PRECOMP
#include "wx/scrolwin.h"
#include "wx/timer.h"

View File

@@ -877,21 +877,6 @@ void wxVListBoxComboPopup::Populate( const wxArrayString& choices )
BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl)
END_EVENT_TABLE()
#if wxUSE_EXTENDED_RTTI
IMPLEMENT_DYNAMIC_CLASS2_XTI(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems, "wx/odcombo.h")
wxBEGIN_PROPERTIES_TABLE(wxOwnerDrawnComboBox)
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxOwnerDrawnComboBox)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_5( wxOwnerDrawnComboBox , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size )
#else
IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems)
#endif
void wxOwnerDrawnComboBox::Init()
{
}

View File

@@ -38,55 +38,6 @@
// wxWin macros
// ----------------------------------------------------------------------------
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxPanelStyle )
wxBEGIN_FLAGS( wxPanelStyle )
// new style border flags, we put them first to
// use them for streaming out
wxFLAGS_MEMBER(wxBORDER_SIMPLE)
wxFLAGS_MEMBER(wxBORDER_SUNKEN)
wxFLAGS_MEMBER(wxBORDER_DOUBLE)
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxBORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxEND_FLAGS( wxPanelStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxPanel, wxWindow,"wx/panel.h")
wxBEGIN_PROPERTIES_TABLE(wxPanel)
wxPROPERTY_FLAGS( WindowStyle , wxPanelStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
// style wxTAB_TRAVERSAL
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxPanel)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_5( wxPanel , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow)
#endif
BEGIN_EVENT_TABLE(wxPanel, wxWindow)
WX_EVENT_TABLE_CONTROL_CONTAINER(wxPanel)
END_EVENT_TABLE()

View File

@@ -539,8 +539,6 @@ void wxSpinCtrlGenericBase::SetSelection(long from, long to)
// wxSpinCtrl
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxSpinCtrlGenericBase)
void wxSpinCtrl::DoSendEvent()
{
wxSpinEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, GetId());

View File

@@ -18,8 +18,6 @@
#include "wx/generic/statbmpg.h"
IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase)
bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id,
const wxBitmap& bitmap,
const wxPoint& pos, const wxSize& size,

View File

@@ -36,8 +36,6 @@
// implementation
// ============================================================================
IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
// ----------------------------------------------------------------------------
// wxStaticLine
// ----------------------------------------------------------------------------

View File

@@ -909,15 +909,6 @@ BEGIN_EVENT_TABLE(wxGenericTreeCtrl, wxTreeCtrlBase)
EVT_TREE_ITEM_GETTOOLTIP(wxID_ANY, wxGenericTreeCtrl::OnGetToolTip)
END_EVENT_TABLE()
#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
/*
* wxTreeCtrl has to be a real class or we have problems with
* the run-time information.
*/
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxGenericTreeCtrl)
#endif
// -----------------------------------------------------------------------------
// construction/destruction
// -----------------------------------------------------------------------------

View File

@@ -14,8 +14,6 @@
#include "wx/bmpbuttn.h"
IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxButton)
bool wxBitmapButton::Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& bitmap,

View File

@@ -90,8 +90,6 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
// wxCheckBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl)
wxCheckBox::wxCheckBox()
{
}

View File

@@ -38,8 +38,6 @@ gtk_choice_changed_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
// wxChoice
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems)
void wxChoice::Init()
{
m_strings = NULL;

View File

@@ -88,8 +88,6 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
// GDK's values are in 0..65535 range, ours are in 0..255
#define SHIFT 8
IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)
wxColour::wxColour(const GdkColor& gdkColor)
{
m_refData = new wxColourRefData(gdkColor.red, gdkColor.green, gdkColor.blue);

View File

@@ -64,8 +64,6 @@ gtkcombobox_popupshown_callback(GObject *WXUNUSED(gobject),
// wxComboBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxChoice)
BEGIN_EVENT_TABLE(wxComboBox, wxChoice)
EVT_CHAR(wxComboBox::OnChar)

View File

@@ -32,8 +32,6 @@
// event tables
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
// ============================================================================
// implementation
// ============================================================================

View File

@@ -20,8 +20,6 @@
// wxGauge
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
bool wxGauge::Create( wxWindow *parent,
wxWindowID id,
int range,

View File

@@ -237,8 +237,6 @@ static gboolean gtk_listbox_searchequal_callback(GtkTreeModel * WXUNUSED(model),
// wxListBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
// ----------------------------------------------------------------------------
// construction
// ----------------------------------------------------------------------------

View File

@@ -47,8 +47,6 @@ void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r
// wxRadioButton
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton,wxControl)
bool wxRadioButton::Create( wxWindow *parent,
wxWindowID id,
const wxString& label,

View File

@@ -118,8 +118,6 @@ gtk_button_release_event(GtkRange* range, GdkEventButton*, wxScrollBar* win)
// wxScrollBar
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl)
wxScrollBar::wxScrollBar()
{
}

View File

@@ -272,8 +272,6 @@ static gchar* gtk_format_value(GtkScale*, double value, void*)
// wxSlider
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
wxSlider::wxSlider()
{
m_pos = 0;

View File

@@ -72,9 +72,6 @@ gtk_value_changed(GtkSpinButton* spinbutton, wxSpinButton* win)
// wxSpinButton
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton,wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
BEGIN_EVENT_TABLE(wxSpinButton, wxControl)
EVT_SIZE(wxSpinButton::OnSize)
END_EVENT_TABLE()

View File

@@ -352,8 +352,6 @@ wxSpinCtrlGTKBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
// wxSpinCtrl
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxSpinCtrlGTKBase)
//-----------------------------------------------------------------------------
// wxSpinCtrlDouble
//-----------------------------------------------------------------------------

View File

@@ -20,8 +20,6 @@
// wxStaticBitmap
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap,wxControl)
wxStaticBitmap::wxStaticBitmap(void)
{
}

View File

@@ -48,8 +48,6 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc, void*)
// wxStaticBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
wxStaticBox::wxStaticBox()
{
}

View File

@@ -21,8 +21,6 @@
// wxStaticLine
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
wxStaticLine::wxStaticLine()
{
}

View File

@@ -19,8 +19,6 @@
// wxStaticText
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxStaticText,wxControl)
wxStaticText::wxStaticText()
{
}

View File

@@ -583,8 +583,6 @@ gtk_paste_clipboard_callback( GtkWidget *widget, wxTextCtrl *win )
// wxTextCtrl
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
EVT_CHAR(wxTextCtrl::OnChar)

View File

@@ -2048,9 +2048,7 @@ wxMouseState wxGetMouseState()
// method
#ifdef __WXUNIVERSAL__
IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase)
#else // __WXGTK__
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
#endif // __WXUNIVERSAL__/__WXGTK__
#endif // __WXUNIVERSAL__
void wxWindowGTK::Init()
{

View File

@@ -114,8 +114,6 @@ static void gtk_bmpbutton_release_callback( GtkWidget *WXUNUSED(widget), wxBitma
// wxBitmapButton
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxButton)
void wxBitmapButton::Init()
{
m_hasFocus =

View File

@@ -94,8 +94,6 @@ gtk_button_style_set_callback( GtkWidget *m_widget, GtkStyle *WXUNUSED(style), w
// wxButton
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxButton,wxControl)
wxButton::wxButton()
{
}

View File

@@ -58,8 +58,6 @@ static void gtk_checkbox_toggled_callback(GtkWidget *WXUNUSED(widget),
// wxCheckBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl)
wxCheckBox::wxCheckBox()
{
}

View File

@@ -86,8 +86,6 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *
// wxChoice
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems)
wxChoice::wxChoice()
{
m_strings = NULL;

View File

@@ -137,8 +137,6 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
// GDK's values are in 0..65535 range, our are in 0..255
#define SHIFT 8
IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)
wxColour::~wxColour()
{
}

View File

@@ -170,8 +170,6 @@ gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(wi
// wxComboBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxComboBox,wxControl)
BEGIN_EVENT_TABLE(wxComboBox, wxControl)
EVT_SIZE(wxComboBox::OnSize)
EVT_CHAR(wxComboBox::OnChar)

View File

@@ -43,8 +43,6 @@ BEGIN_EVENT_TABLE(wxDialog,wxDialogBase)
EVT_CLOSE (wxDialog::OnCloseWindow)
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxTopLevelWindow)
void wxDialog::Init()
{
m_returnCode = 0;

View File

@@ -56,8 +56,6 @@ extern bool g_isIdle;
// event tables
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
// ============================================================================
// implementation
// ============================================================================

View File

@@ -20,8 +20,6 @@
// wxGauge
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
bool wxGauge::Create( wxWindow *parent,
wxWindowID id,
int range,

View File

@@ -452,8 +452,6 @@ gtk_listbox_realized_callback( GtkWidget *WXUNUSED(widget), wxListBox *win )
// wxListBox
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
// ----------------------------------------------------------------------------
// construction
// ----------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More