/** Base class to derive new viterators.
*/
-class WXDLLIMPEXP_PROPGRID wxPGVIteratorBase
+class WXDLLIMPEXP_PROPGRID wxPGVIteratorBase : public wxObjectRefData
{
friend class wxPGVIterator;
public:
- wxPGVIteratorBase() { m_refCount = 1; }
+ wxPGVIteratorBase() { }
virtual void Next() = 0;
- void IncRef()
- {
- m_refCount++;
- }
- void DecRef()
- {
- m_refCount--;
- if ( m_refCount <= 0 )
- delete this;
- }
protected:
virtual ~wxPGVIteratorBase() { }
wxPropertyGridIterator m_it;
-private:
- int m_refCount;
};
/** @class wxPGVIterator
Override this member function to add custom behavior on property
deletion.
*/
- virtual void DoDelete( wxPGProperty* item );
+ virtual void DoDelete( wxPGProperty* item, bool doDelete = true );
wxSize DoFitColumns( bool allowGridResize = false );
unsigned int col,
bool subProps) const;
- /** Returns information about arbitrary position in the grid.
-
- wxPropertyGridHitTestResult definition:
- @code
- struct wxPropertyGridHitTestResult
- {
- wxPGProperty* GetProperty() const;
-
- // column. -1 for margin
- int column;
-
- // Index of splitter hit, -1 for none.
- int splitter;
+ /**
+ Returns information about arbitrary position in the grid.
- // If splitter hit, then offset to that.
- int splitterHitOffset;
- };
- @endcode
+ @param pt
+ Logical coordinates in the virtual grid space. Use
+ wxScrolledWindow::CalcUnscrolledPosition() if you need to
+ translate a scrolled position into a logical one.
*/
wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const;
bool IsInNonCatMode() const { return (bool)(m_properties == m_abcArray); }
- /** Only inits arrays, doesn't migrate things or such. */
- void InitNonCatMode ();
-
void DoLimitPropertyEditing( wxPGProperty* p, bool limit = true )
{
p->SetFlagRecursively(wxPG_PROP_NOEDITOR, limit);
void DoSetPropertyValues( const wxVariantList& list,
wxPGProperty* default_category );
- void DoSetPropertyValueUnspecified( wxPGProperty* p );
-
void SetSplitterLeft( bool subProps = false );
/** Set virtual width for this particular page. */
void SetVirtualWidth( int width );
- void SortChildren( wxPGProperty* p );
- void Sort();
+ void DoSortChildren( wxPGProperty* p, int flags = 0 );
+ void DoSort( int flags = 0 );
+
+ bool PrepareAfterItemsAdded();
void SetSelection( wxPGProperty* p ) { m_selected = p; }
unsigned char m_anyModified;
unsigned char m_vhCalcPending;
+
+private:
+ /** Only inits arrays, doesn't migrate things or such. */
+ void InitNonCatMode();
};
#endif // #ifndef SWIG