#ifndef _WX_PROPGRID_PROPGRID_H_
#define _WX_PROPGRID_PROPGRID_H_
+#if wxUSE_PROPGRID
+
#include "wx/dcclient.h"
#include "wx/scrolwin.h"
#include "wx/tooltip.h"
// Replace with your own to affect all properties using default renderer.
wxPGCellRenderer* m_defaultRenderer;
- // These are for fast variant type comparison
- wxPGVariantDataClassInfo wxVariantClassInfo_long;
- wxPGVariantDataClassInfo wxVariantClassInfo_string;
- wxPGVariantDataClassInfo wxVariantClassInfo_double;
- wxPGVariantDataClassInfo wxVariantClassInfo_bool;
- wxPGVariantDataClassInfo wxVariantClassInfo_arrstring;
- wxPGVariantDataClassInfo wxVariantClassInfo_wxobject;
- wxPGVariantDataClassInfo wxVariantClassInfo_list;
- wxPGVariantDataClassInfo wxVariantClassInfo_wxColour;
-#if wxUSE_DATETIME
- wxPGVariantDataClassInfo wxVariantClassInfo_datetime;
-#endif
-
wxPGChoices m_boolChoices;
wxVariant m_vEmptyString;
wxVariant m_vFalse;
// Cached constant strings
+ wxPGCachedString m_strstring;
+ wxPGCachedString m_strlong;
+ wxPGCachedString m_strbool;
+ wxPGCachedString m_strlist;
+
wxPGCachedString m_strMin;
wxPGCachedString m_strMax;
wxPGCachedString m_strUnits;
extern WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass* wxPGGlobalVars;
-#define wxPGIsVariantType(VARIANT, T) \
- ((VARIANT).GetData() && \
- typeid(*(VARIANT).GetData()) == *wxPGGlobalVars->wxVariantClassInfo_##T)
-
-#define wxPGIsVariantClassInfo(CLASSINFO, T) \
- (*CLASSINFO == *wxPGGlobalVars->wxVariantClassInfo_##T)
-
#define wxPGVariant_EmptyString (wxPGGlobalVars->m_vEmptyString)
#define wxPGVariant_Zero (wxPGGlobalVars->m_vZero)
#define wxPGVariant_MinusOne (wxPGGlobalVars->m_vMinusOne)
#define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False)
-#define wxPGVariantAssign(A, B) A = B
-
#endif // !SWIG
// -----------------------------------------------------------------------
void SetCurrentCategory( wxPGPropArg id )
{
wxPG_PROP_ARG_CALL_PROLOG()
- wxPropertyCategory* pc = (wxPropertyCategory*)p;
-#ifdef __WXDEBUG__
- if ( pc ) wxASSERT( pc->IsCategory() );
-#endif
+ wxPropertyCategory* pc = wxDynamicCast(p, wxPropertyCategory);
+ wxASSERT(pc);
m_pState->m_currentCategory = pc;
}
/** Sets background colour of margin. */
void SetMarginColour(const wxColour& col);
- /** Sets property attribute for all applicapple properties.
- Be sure to use this method only after all properties have been
- added to the grid.
- */
- void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
-
/** Sets background colour of property and all its children. Colours of
captions are not affected. Background brush cache is optimized for often
set colours to be set last.
// background colour for empty space below the grid
wxColour m_colEmptySpace;
- // temp property array used in DoDrawItems
- wxArrayPtrVoid m_visPropArray;
-
// NB: These *cannot* be moved to globals.
// Array of background colour brushes.
wxVariant* pValue = NULL,
unsigned int selFlags = 0 );
+ void SetFocusOnCanvas()
+ {
+ m_canvas->SetFocusIgnoringChildren();
+ m_editorFocused = 0;
+ }
+
bool DoHideProperty( wxPGProperty* p, bool hide, int flags );
private:
// -----------------------------------------------------------------------
+#endif
+
#endif // _WX_PROPGRID_PROPGRID_H_