+#ifndef SWIG
+
+ // Returns various display-related information for given column
+ void GetDisplayInfo( unsigned int column,
+ int choiceIndex,
+ int flags,
+ wxString* pString,
+ const wxPGCell** pCell );
+
+ static wxString* sm_wxPG_LABEL;
+
+ /** This member is public so scripting language bindings
+ wrapper code can access it freely.
+ */
+ void* m_clientData;
+
+protected:
+
+ /**
+ Sets property cell in fashion that reduces number of exclusive
+ copies of cell data. Used when setting, for instance, same
+ background colour for a number of properties.
+
+ @param firstCol
+ First column to affect.
+
+ @param lastCol
+ Last column to affect.
+
+ @param preparedCell
+ Pre-prepared cell that is used for those which cell data
+ before this matched unmodCellData.
+
+ @param srcData
+ If unmodCellData did not match, valid cell data from this
+ is merged into cell (usually generating new exclusive copy
+ of cell's data).
+
+ @param unmodCellData
+ If cell's cell data matches this, its cell is now set to
+ preparedCell.
+
+ @param ignoreWithFlags
+ Properties with any one of these flags are skipped.
+
+ @param recursively
+ If @true, apply this operation recursively in child properties.
+ */
+ void AdaptiveSetCell( unsigned int firstCol,
+ unsigned int lastCol,
+ const wxPGCell& preparedCell,
+ const wxPGCell& srcData,
+ wxPGCellData* unmodCellData,
+ FlagType ignoreWithFlags,
+ bool recursively );
+
+ /**
+ Makes sure m_cells has size of column+1 (or more).
+ */
+ void EnsureCells( unsigned int column );
+
+ /** Returns (direct) child property with given name (or NULL if not found),
+ with hint index.
+
+ @param hintIndex
+ Start looking for the child at this index.
+
+ @remarks
+ Does not support scope (ie. Parent.Child notation).
+ */
+ wxPGProperty* GetPropertyByNameWH( const wxString& name,
+ unsigned int hintIndex ) const;
+
+ /** This is used by Insert etc. */
+ void DoAddChild( wxPGProperty* prop,
+ int index = -1,
+ bool correct_mode = true );
+
+ void DoGenerateComposedValue( wxString& text,
+ int argFlags = wxPG_VALUE_IS_CURRENT,
+ const wxVariantList* valueOverrides = NULL,
+ wxPGHashMapS2S* childResults = NULL ) const;
+
+ void DoSetName(const wxString& str) { m_name = str; }
+
+ /** Deletes all sub-properties. */
+ void Empty();
+
+ void InitAfterAdded( wxPropertyGridPageState* pageState,
+ wxPropertyGrid* propgrid );
+
+ // Removes child property with given pointer. Does not delete it.
+ void RemoveChild( wxPGProperty* p );
+
+ void DoPreAddChild( int index, wxPGProperty* prop );
+
+ void SetParentState( wxPropertyGridPageState* pstate )
+ { m_parentState = pstate; }
+
+ // Call after fixed sub-properties added/removed after creation.
+ // if oldSelInd >= 0 and < new max items, then selection is
+ // moved to it.
+ void SubPropsChanged( int oldSelInd = -1 );
+
+ int GetY2( int lh ) const;
+
+ wxString m_label;
+ wxString m_name;
+ wxPGProperty* m_parent;
+ wxPropertyGridPageState* m_parentState;
+
+ wxClientData* m_clientObject;
+
+ // Overrides editor returned by property class
+ const wxPGEditor* m_customEditor;
+#if wxUSE_VALIDATORS
+ // Editor is going to get this validator
+ wxValidator* m_validator;
+#endif
+ // Show this in front of the value
+ //
+ // TODO: Can bitmap be implemented with wxPGCell?
+ wxBitmap* m_valueBitmap;
+
+ wxVariant m_value;
+ wxPGAttributeStorage m_attributes;
+ wxArrayPGProperty m_children;
+
+ // Extended cell information
+ wxVector<wxPGCell> m_cells;
+
+ // Choices shown in drop-down list of editor control.
+ wxPGChoices m_choices;
+
+ // Help shown in statusbar or help box.
+ wxString m_helpString;
+
+ // Index in parent's property array.
+ unsigned int m_arrIndex;
+
+ // If not -1, then overrides m_value
+ int m_commonValue;
+
+ FlagType m_flags;
+
+ // Maximum length (mainly for string properties). Could be in some sort of
+ // wxBaseStringProperty, but currently, for maximum flexibility and
+ // compatibility, we'll stick it here. Anyway, we had 3 excess bytes to use
+ // so short int will fit in just fine.
+ short m_maxLen;
+
+ // Root has 0, categories etc. at that level 1, etc.
+ unsigned char m_depth;
+
+ // m_depthBgCol indicates width of background colour between margin and item
+ // (essentially this is category's depth, if none then equals m_depth).
+ unsigned char m_depthBgCol;
+
+private:
+ // Called in constructors.
+ void Init();
+ void Init( const wxString& label, const wxString& name );
+#endif // #ifndef SWIG
+};
+
+// -----------------------------------------------------------------------
+
+//
+// Property class declaration helper macros
+// (wxPGRootPropertyClass and wxPropertyCategory require this).
+//
+
+#define WX_PG_DECLARE_DOGETEDITORCLASS \
+ virtual const wxPGEditor* DoGetEditorClass() const;
+
+#ifndef SWIG
+ #define WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \
+ public: \
+ DECLARE_DYNAMIC_CLASS(CLASSNAME) \
+ WX_PG_DECLARE_DOGETEDITORCLASS \
+ private:
+#else
+ #define WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME)
+#endif
+
+// Implements sans constructor function. Also, first arg is class name, not
+// property name.
+#define WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME,T,EDITOR) \
+const wxPGEditor* PROPNAME::DoGetEditorClass() const \
+{ \
+ return wxPGEditor_##EDITOR; \
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SWIG
+
+/** @class wxPGRootProperty
+ @ingroup classes
+ Root parent property.
+*/
+class WXDLLIMPEXP_PROPGRID wxPGRootProperty : public wxPGProperty
+{
+public:
+ WX_PG_DECLARE_PROPERTY_CLASS(wxPGRootProperty)
+public:
+
+ /** Constructor. */
+ wxPGRootProperty( const wxString& name = wxS("<Root>") );
+ virtual ~wxPGRootProperty();
+
+ virtual bool StringToValue( wxVariant&, const wxString&, int ) const