data->IncRef();
variant.SetData(data);
variant.SetName(it->first);
- it++;
+ ++it;
return true;
}
#ifndef SWIG
void operator= (const wxPGChoices& a)
{
- AssignData(a.m_data);
+ if (this != &a)
+ AssignData(a.m_data);
}
wxPGChoiceEntry& operator[](unsigned int i)
*/
virtual wxPGEditorDialogAdapter* GetEditorDialog() const;
+ /**
+ Called whenever validation has failed with given pending value.
+
+ @remarks If you implement this in your custom property class, please
+ remember to call the baser implementation as well, since they
+ may use it to revert property into pre-change state.
+ */
+ virtual void OnValidationFailure( wxVariant& pendingValue );
+
/** Append a new choice to property's list of choices.
*/
int AddChoice( const wxString& label, int value = wxPG_INVALID_VALUE )
return false;
}
+ /**
+ Deletes children of the property.
+ */
+ void DeleteChildren();
+
/**
Removes entry from property's wxPGChoices and editor control (if it is
active).
*/
wxDEPRECATED( wxString GetValueString( int argFlags = 0 ) const );
- void UpdateControl( wxWindow* primary );
-
/**
Returns wxPGCell of given column.
*/
/** Returns index of given child property. */
int Index( const wxPGProperty* p ) const;
- /** Deletes all sub-properties. */
- void Empty();
-
// Puts correct indexes to children
void FixIndicesOfChildren( unsigned int starthere = 0 );
void DoSetName(const wxString& str) { m_name = str; }
+ /** Deletes all sub-properties. */
+ void Empty();
+
void InitAfterAdded( wxPropertyGridPageState* pageState,
wxPropertyGrid* propgrid );
int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
-protected:
virtual wxString ValueToString( wxVariant& value, int argFlags ) const;
+protected:
void SetTextColIndex( unsigned int colInd )
{ m_capFgColIndex = (wxByte) colInd; }
unsigned int GetTextColIndex() const