00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef _WX_PROPGRID_PROPDEV_H_
00013 #define _WX_PROPGRID_PROPDEV_H_
00014
00015
00016
00017
00018 class WXDLLIMPEXP_PG wxArrayEditorDialog;
00019
00020
00021
00022
00023 typedef wxPGProperty wxBasePropertyClass;
00024 typedef wxPGProperty wxBaseParentPropertyClass;
00025
00026
00027
00028 #ifndef SWIG
00029
00030
00031
00032 class WXDLLIMPEXP_PG wxPGGlobalVarsClass
00033 {
00034 public:
00035
00036 wxPGGlobalVarsClass();
00037 ~wxPGGlobalVarsClass();
00038
00039 wxString m_pDefaultImageWildcard;
00040
00041
00042 wxPGHashMapS2P m_mapEditorClasses;
00043
00044 #if wxUSE_VALIDATORS
00045 wxArrayPtrVoid m_arrValidators;
00046 #endif
00047
00048
00049
00050
00051
00052
00053
00054 wxPGHashMapS2P m_dictPropertyClassInfo;
00055
00056 wxPGChoices* m_fontFamilyChoices;
00057
00058 wxPGCellRenderer* m_defaultRenderer;
00059
00060
00061 wxPGVariantDataClassInfo wxVariantClassInfo_long;
00062 wxPGVariantDataClassInfo wxVariantClassInfo_string;
00063 wxPGVariantDataClassInfo wxVariantClassInfo_double;
00064 wxPGVariantDataClassInfo wxVariantClassInfo_bool;
00065 wxPGVariantDataClassInfo wxVariantClassInfo_arrstring;
00066 wxPGVariantDataClassInfo wxVariantClassInfo_wxobject;
00067 wxPGVariantDataClassInfo wxVariantClassInfo_list;
00068 #if wxCHECK_VERSION(2,8,0)
00069 wxPGVariantDataClassInfo wxVariantClassInfo_wxColour;
00070 #endif
00071 #if wxUSE_DATETIME
00072 wxPGVariantDataClassInfo wxVariantClassInfo_datetime;
00073 #endif
00074
00075 wxPGChoices m_boolChoices;
00076
00077 #if wxVARIANT_REFCOUNTED
00078 wxVariant m_vEmptyString;
00079 wxVariant m_vZero;
00080 wxVariant m_vMinusOne;
00081 wxVariant m_vTrue;
00082 wxVariant m_vFalse;
00083 #endif
00084
00085
00086 wxPGCachedString m_strDefaultValue;
00087 wxPGCachedString m_strMin;
00088 wxPGCachedString m_strMax;
00089 wxPGCachedString m_strUnits;
00090 wxPGCachedString m_strInlineHelp;
00091
00092 bool m_autoGetTranslation;
00093
00094 int m_offline;
00095
00096 int m_extraStyle;
00097
00098 #ifdef __WXDEBUG__
00099 int m_warnings;
00100 #endif
00101
00102 int HasExtraStyle( int style ) const { return (m_extraStyle & style); }
00103
00104
00105
00106
00107 };
00108
00109 #if wxCHECK_VERSION(2,9,0)
00110
00111 #define wxPGIsVariantType(VARIANT, T) \
00112 ((VARIANT).GetData() && typeid(*(VARIANT).GetData()) == *wxPGGlobalVars->wxVariantClassInfo_##T)
00113
00114 #define wxPGIsVariantClassInfo(CLASSINFO, T) \
00115 (*CLASSINFO == *wxPGGlobalVars->wxVariantClassInfo_##T)
00116
00117 #else
00118
00119 #define wxPGIsVariantType(VARIANT, T) \
00120 ((VARIANT).GetData() && wxPGVariantDataGetClassInfo((VARIANT).GetData()) == wxPGGlobalVars->wxVariantClassInfo_##T)
00121
00122 #define wxPGIsVariantClassInfo(CLASSINFO, T) \
00123 (CLASSINFO == wxPGGlobalVars->wxVariantClassInfo_##T)
00124
00125 #endif
00126
00127 #if wxVARIANT_REFCOUNTED
00128 #define wxPGVariant_EmptyString (wxPGGlobalVars->m_vEmptyString)
00129 #define wxPGVariant_Zero (wxPGGlobalVars->m_vZero)
00130 #define wxPGVariant_MinusOne (wxPGGlobalVars->m_vMinusOne)
00131 #define wxPGVariant_True (wxPGGlobalVars->m_vTrue)
00132 #define wxPGVariant_False (wxPGGlobalVars->m_vFalse)
00133 #else
00134 #define wxPGVariant_EmptyString wxEmptyString
00135 #define wxPGVariant_Zero ((long)0)
00136 #define wxPGVariant_MinusOne ((long)-1)
00137 #define wxPGVariant_True true
00138 #define wxPGVariant_False false
00139 #endif
00140
00141 #define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False)
00142
00143
00144 #if wxVARIANT_REFCOUNTED
00145 #define wxPGVariantAssign(A, B) A = B
00146 #else
00147
00148
00149
00150
00151 #define wxPGVariantAssign(A, B) \
00152 { \
00153 A.MakeNull(); \
00154 A = B; \
00155 }
00156
00157 #endif
00158
00159
00160 extern WXDLLIMPEXP_PG wxPGGlobalVarsClass* wxPGGlobalVars;
00161
00162 #endif
00163
00164
00165
00166
00167 #ifndef SWIG
00168
00169
00170
00171
00172
00173
00174
00175
00176 #include <wx/tokenzr.h>
00177
00178
00179 #define WX_PG_TOKENIZER1_BEGIN(WXSTRING,DELIMITER) \
00180 wxStringTokenizer tkz(WXSTRING,DELIMITER,wxTOKEN_RET_EMPTY); \
00181 while ( tkz.HasMoreTokens() ) \
00182 { \
00183 wxString token = tkz.GetNextToken(); \
00184 token.Trim(true); \
00185 token.Trim(false);
00186
00187 #define WX_PG_TOKENIZER1_END() \
00188 }
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 class WXDLLIMPEXP_PG wxPGStringTokenizer
00200 {
00201 public:
00202 wxPGStringTokenizer( const wxString& str, wxChar delimeter );
00203 ~wxPGStringTokenizer();
00204
00205 bool HasMoreTokens();
00206 wxString GetNextToken();
00207
00208 protected:
00209 #ifndef SWIG
00210
00211 const wxString* m_str;
00212 wxString::const_iterator m_curPos;
00213 wxString m_readyToken;
00214 wxUniChar m_delimeter;
00215 #endif
00216 };
00217
00218 #define WX_PG_TOKENIZER2_BEGIN(WXSTRING,DELIMITER) \
00219 wxPGStringTokenizer tkz(WXSTRING,DELIMITER); \
00220 while ( tkz.HasMoreTokens() ) \
00221 { \
00222 wxString token = tkz.GetNextToken();
00223
00224 #define WX_PG_TOKENIZER2_END() \
00225 }
00226
00227 #endif
00228
00229 #ifndef __wxPG_SOURCE_FILE__
00230
00231 #include "props.h"
00232 #endif
00233
00234
00235
00236 #if !wxCHECK_VERSION(2,8,0)
00237
00238
00239 bool wxPG_String_EndsWith(const wxString& str, const wxChar *suffix, wxString *rest = NULL);
00240
00241 #else
00242
00243 inline bool wxPG_String_EndsWith(const wxString& str, const wxChar *suffix, wxString *rest = NULL)
00244 {
00245 return str.EndsWith(suffix, rest);
00246 }
00247
00248 #endif
00249
00250
00251
00252 #endif // _WX_PROPGRID_PROPDEV_H_