wxPGPropertyWithChildren Class Reference

wxPGPropertyWithChildren, alias wxParentPropertyClass, is a base class for new properties that have sub-properties. For example, wxFontProperty and wxFlagsProperty descend from this class. More...

#include <propgrid.h>

Inheritance diagram for wxPGPropertyWithChildren:

wxPGProperty wxPGRootProperty wxPropertyCategory List of all members.

Public Types

typedef void * ClientDataType
typedef unsigned short FlagType

Public Member Functions

bool ActualIntToValue (wxVariant &variant, int number, int argFlags=0) const
bool ActualStringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const
bool ActualValidateValue (wxVariant &value) const
void AdaptListToValue (wxVariant &list, wxVariant *value) const
void AddChild (wxPGProperty *prop)
void AddChild2 (wxPGProperty *prop, int index=-1, bool correct_mode=true)
int AppendChoice (const wxString &label, int value=INT_MAX)
bool CanHaveExtraChildren () const
virtual void ChildChanged (wxVariant &thisValue, int childIndex, wxVariant &childValue) const=0
void ClearFlag (FlagType flag)
void DeleteChoice (int index)
virtual wxVariant DoGetAttribute (const wxString &name) const
virtual const wxPGEditorDoGetEditorClass () const
virtual wxValidator * DoGetValidator () const
virtual wxVariant DoGetValue () const
virtual bool DoSetAttribute (const wxString &name, wxVariant &value)
void DoSetName (const wxString &str)
void Empty ()
bool EnsureDataExt ()
void FixIndexesOfChildren (size_t starthere=0)
unsigned int GetArrIndex () const
long GetAttribute (const wxString &name, long defVal)
wxString GetAttribute (const wxString &name, const wxString &defVal)
wxVariant GetAttribute (const wxString &name) const
const wxPGAttributeStorageGetAttributes () const
wxVariant GetAttributesAsList () const
const wxString & GetBaseName () const
wxPGCellGetCell (unsigned int column) const
virtual wxPGCellRendererGetCellRenderer (int column) const
size_t GetChildCount () const
int GetChildrenHeight (int lh, int iMax=-1) const
unsigned int GetChoiceCount () const
virtual int GetChoiceInfo (wxPGChoiceInfo *choiceinfo)
const wxPGChoicesGetChoices () const
wxPGChoicesGetChoices ()
wxString GetChoiceString (unsigned int index)
const wxChar * GetClassName () const
ClientDataType GetClientData () const
const wxPGEditorGetColumnEditor (int column) const
int GetCommonValue () const
size_t GetCount () const
const wxPGChoiceEntryGetCurrentChoice () const
wxPGPropertyDataExtGetDataExt ()
wxVariant GetDefaultValue () const
unsigned int GetDepth () const
int GetDisplayedCommonValueCount () const
wxString GetDisplayedString () const
const wxPGEditorGetEditorClass () const
virtual wxPGEditorDialogAdapterGetEditorDialog () const
unsigned int GetFlags () const
wxString GetFlagsAsString (FlagType flagsMask) const
wxString GetFullName () const
wxPropertyGridGetGrid () const
wxPropertyGridGetGridIfDisplayed () const
wxString GetHelpString () const
wxPGId GetId ()
virtual wxSize GetImageSize () const
unsigned int GetIndexInParent () const
wxPGPropertyGetItemAtY (unsigned int y, unsigned int lh, unsigned int *nextItemY) const
const wxString & GetLabel () const
const wxPGPropertyGetLastVisibleSubItem () const
wxPGPropertyGetMainParent () const
int GetMaxLength () const
const wxString & GetName () const
wxPGPropertyWithChildrenGetParent () const
signed char GetParentingType () const
wxPropertyGridStateGetParentState () const
wxPGPropertyGetPropertyByName (const wxString &name) const
wxString GetType () const
wxValidator * GetValidator () const
wxVariant GetValue () const
template<class T> T & GetValueAs () const
virtual wxString GetValueAsString (int argFlags=0) const
wxVariant GetValueAsVariant () const
wxBitmap * GetValueImage () const
const wxVariant & GetValueRef () const
wxVariant & GetValueRef ()
wxString GetValueString (int argFlags=0) const
int GetY () const
FlagType HasFlag (FlagType flag) const
bool Hide (bool hide)
int Index (const wxPGProperty *p) const
int InsertChoice (const wxString &label, int index, int value=INT_MAX)
virtual bool IntToValue (wxVariant &value, int number, int argFlags=0) const
bool IsCategory () const
bool IsEnabled () const
bool IsExpanded () const
bool IsFlagSet (FlagType flag) const
bool IsSomeParent (wxPGProperty *candidate_parent) const
bool IsSubProperty () const
bool IsValueType (const wxChar *str)
bool IsValueUnspecified () const
bool IsVisible () const
wxPGPropertyItem (size_t i) const
wxPGPropertyLast () const
virtual void OnCustomPaint (wxDC &dc, const wxRect &rect, wxPGPaintData &paintdata)
virtual bool OnEvent (wxPropertyGrid *propgrid, wxWindow *wnd_primary, wxEvent &event)
virtual wxSize OnMeasureImage (int item=-1) const
virtual void OnSetValue ()
void PrepareSubProperties ()
bool PrepareValueForDialogEditing (wxPropertyGrid *propgrid)
bool RecreateEditor ()
virtual void RefreshChildren ()
void RefreshEditor ()
void SetAttribute (const wxString &name, wxVariant value)
void SetAttributes (const wxPGAttributeStorage &attributes)
void SetCell (int column, wxPGCell *cellObj)
bool SetChoices (const wxArrayString &labels, const wxArrayInt &values=wxArrayInt())
bool SetChoices (wxPGChoices &choices)
void SetChoiceSelection (int newValue, const wxPGChoiceInfo &choiceInfo)
void SetChoicesExclusive ()
void SetClientData (ClientDataType clientData)
void SetCommonValue (int commonValue)
void SetEditor (const wxString &editorName)
void SetEditor (const wxPGEditor *editor)
void SetExpanded (bool expanded)
void SetFlag (FlagType flag)
void SetFlagsFromString (const wxString &str)
void SetHelpString (const wxString &helpString)
void SetLabel (const wxString &label)
bool SetMaxLength (int maxLen)
void SetParentState (wxPropertyGridState *pstate)
void SetValidator (const wxValidator &validator)
void SetValue (wxVariant value)
void SetValue0 (wxVariant &value, wxVariant *pList=NULL, bool refreshEditor=true)
virtual bool SetValueFromInt (long value, int flags=0)
virtual bool SetValueFromString (const wxString &text, int flags=0)
void SetValueImage (wxBitmap &bmp)
void SetValueToUnspecified ()
void SetWasModified (bool set=true)
void ShowError (const wxString &msg) const
virtual bool StringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const
void SubPropsChanged (int oldSelInd=-1)
void UpdateControl (wxWindow *primary)
bool UsesAutoUnspecified () const
virtual bool ValidateValue (wxVariant &value) const
 wxPGPropertyWithChildren (const wxString &label, const wxString &name)
 wxPGPropertyWithChildren ()
virtual ~wxPGPropertyWithChildren ()

Protected Member Functions

int GetY2 (int lh) const

Protected Attributes

unsigned int m_arrIndex
wxPGAttributeStorage m_attributes
unsigned char m_bgColIndex
wxArrayPtrVoid m_cells
wxArrayPtrVoid m_children
ClientDataType m_clientData
int m_commonValue
wxPGPropertyDataExtm_dataExt
unsigned char m_depth
unsigned char m_depthBgCol
unsigned char m_fgColIndex
FlagType m_flags
wxString m_label
short m_maxLen
wxString m_name
wxPGPropertyWithChildrenm_parent
signed char m_parentingType
wxPropertyGridStatem_parentState
wxVariant m_value

Detailed Description

wxPGPropertyWithChildren, alias wxParentPropertyClass, is a base class for new properties that have sub-properties. For example, wxFontProperty and wxFlagsProperty descend from this class.


Constructor & Destructor Documentation

wxPGPropertyWithChildren::wxPGPropertyWithChildren  ) 
 

Special constructor only used in special cases.

wxPGPropertyWithChildren::wxPGPropertyWithChildren const wxString &  label,
const wxString &  name
 

When new class is derived, call this constructor.

Parameters:
label Label for the property.

virtual wxPGPropertyWithChildren::~wxPGPropertyWithChildren  )  [virtual]
 

Destructor.


Member Function Documentation

void wxPGPropertyWithChildren::AdaptListToValue wxVariant &  list,
wxVariant *  value
const
 

Adapts list variant into proper value using consequtive ChildChanged-calls.

void wxPGPropertyWithChildren::AddChild wxPGProperty prop  ) 
 

This is used by properties that have fixed sub-properties.

void wxPGPropertyWithChildren::AddChild2 wxPGProperty prop,
int  index = -1,
bool  correct_mode = true
 

This is used by Insert etc.

int wxPGProperty::AppendChoice const wxString &  label,
int  value = INT_MAX
[inline, inherited]
 

Adds entry to property's wxPGChoices and editor control (if it is active).

Returns index of item added.

bool wxPGProperty::CanHaveExtraChildren  )  const [inline, inherited]
 

Returns true if extra children can be added for this property (i.e.

it is wxPropertyCategory or wxCustomProperty)

virtual void wxPGPropertyWithChildren::ChildChanged wxVariant &  thisValue,
int  childIndex,
wxVariant &  childValue
const [pure virtual]
 

Called after value of a child property has been altered.

Note that this function is usually called at the time that value of this property, or given child property, is still pending for change.

Sample pseudo-code implementation:

void MyProperty::ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const { // Acquire reference to actual type of data stored in variant // (TFromVariant only exists if wxPropertyGrid's wxVariant-macros were used to create // the variant class). T& data = TFromVariant(thisValue); // Copy childValue into data. switch ( childIndex ) { case 0: data.SetSubProp1( childvalue.GetLong() ); break; case 1: data.SetSubProp2( childvalue.GetString() ); break; ... } }

Parameters:
thisValue Value of this property, that should be altered.
childIndex Index of child changed (you can use Item(childIndex) to get).
childValue Value of the child property.

Implemented in wxPGRootProperty, and wxPropertyCategory.

void wxPGProperty::DeleteChoice int  index  )  [inherited]
 

Removes entry from property's wxPGChoices and editor control (if it is active).

If selected item is deleted, then the value is set to unspecified.

virtual wxVariant wxPGProperty::DoGetAttribute const wxString &  name  )  const [virtual, inherited]
 

Returns value of an attribute.

Override if custom habdling of attributes is needed.

Default implementation simply return NULL variant.

virtual const wxPGEditor* wxPGProperty::DoGetEditorClass  )  const [virtual, inherited]
 

Returns pointer to an instance of editor class.

virtual wxValidator* wxPGProperty::DoGetValidator  )  const [virtual, inherited]
 

Returns pointer to the wxValidator that should be used with the editor of this property (NULL for no validator).

Setting validator explicitly via SetPropertyValidator will override this.

In most situations, code like this should work well (macros are used to maintain one actual validator instance, so on the second call the function exits within the first macro):

wxValidator* wxMyPropertyClass::DoGetValidator () const { WX_PG_DOGETVALIDATOR_ENTRY() wxMyValidator* validator = new wxMyValidator(...); ... prepare validator... WX_PG_DOGETVALIDATOR_EXIT(validator) }

Remarks:
You can get common filename validator by returning wxFileProperty::GetClassValidator(). wxDirProperty, for example, uses it.

virtual wxVariant wxPGProperty::DoGetValue  )  const [inline, virtual, inherited]
 

Override this to return something else than m_value as the value.

virtual bool wxPGProperty::DoSetAttribute const wxString &  name,
wxVariant &  value
[virtual, inherited]
 

Special handling for attributes of this property.

If returns false, then the attribute will be automatically stored in m_attributes.

Default implementation simply returns false.

void wxPGPropertyWithChildren::Empty  ) 
 

Deletes all sub-properties.

bool wxPGProperty::EnsureDataExt  )  [inherited]
 

If property did not have data extension, one is created now (returns true in that case).

long wxPGProperty::GetAttribute const wxString &  name,
long  defVal
[inherited]
 

Returns named attribute, as long, if found.

Otherwise defVal is returned.

wxString wxPGProperty::GetAttribute const wxString &  name,
const wxString &  defVal
[inherited]
 

Returns named attribute, as string, if found.

Otherwise defVal is returned.

const wxPGAttributeStorage& wxPGProperty::GetAttributes  )  const [inline, inherited]
 

Returns comma-delimited string of property attributes.

wxVariant wxPGProperty::GetAttributesAsList  )  const [inherited]
 

Returns m_attributes as list wxVariant.

const wxString& wxPGProperty::GetBaseName  )  const [inline, inherited]
 

Returns property's base name (ie.

parent's name is not added in any case)

virtual wxPGCellRenderer* wxPGProperty::GetCellRenderer int  column  )  const [virtual, inherited]
 

Returns used wxPGCellRenderer instance for given property column (label=0, value=1).

Default implementation returns editor's renderer for all columns.

size_t wxPGProperty::GetChildCount  )  const [inherited]
 

Returns number of children (always 0 for normal properties).

int wxPGPropertyWithChildren::GetChildrenHeight int  lh,
int  iMax = -1
const
 

Returns height of children, recursively, and by taking expanded/collapsed status into account.

iMax is used when finding property y-positions.

virtual int wxPGProperty::GetChoiceInfo wxPGChoiceInfo *  choiceinfo  )  [virtual, inherited]
 

Returns current value's index to the choice control.

May also return, through pointer arguments, strings that should be inserted to that control. Irrelevant to classes which do not employ wxPG_EDITOR(Choice) or similar.

Remarks:
  • If returns NULL in choices, then this class must be derived from wxBaseEnumProperty.
  • Must not crash even if property's set of choices is uninitialized (i.e. it points to wxPGGlobalVars->m_emptyConstants).

const wxPGEditor* wxPGProperty::GetColumnEditor int  column  )  const [inline, inherited]
 

Returns editor used for given column.

NULL for no editor.

int wxPGProperty::GetCommonValue  )  const [inline, inherited]
 

Returns common value selected for this property.

-1 for none.

size_t wxPGPropertyWithChildren::GetCount  )  const [inline]
 

Returns number of sub-properties.

wxPGPropertyDataExt* wxPGProperty::GetDataExt  )  [inline, inherited]
 

Returns property's data extension (NULL if none).

int wxPGProperty::GetDisplayedCommonValueCount  )  const [inherited]
 

Return number of displayed common values for this property.

virtual wxPGEditorDialogAdapter* wxPGProperty::GetEditorDialog  )  const [virtual, inherited]
 

Returns instance of a new wxPGEditorDialogAdapter instance, which is used when user presses the (optional) button next to the editor control;.

Default implementation returns NULL (ie. no action is generated when button is pressed).

wxString wxPGProperty::GetFlagsAsString FlagType  flagsMask  )  const [inherited]
 

Gets flags as a'|' delimited string.

Note that flag names are not prepended with 'wxPG_PROP_'.

Parameters:
flagsMask String will only be made to include flags combined by this parameter.

wxString wxPGProperty::GetFullName  )  const [inherited]
 

Returns property's name with all parents.

wxPropertyGrid* wxPGProperty::GetGrid  )  const [inherited]
 

Returns property grid where property lies.

wxPropertyGrid* wxPGProperty::GetGridIfDisplayed  )  const [inherited]
 

Returns owner wxPropertyGrid, but only if one is currently on a page displaying this property.

wxPGId wxPGProperty::GetId  )  [inline, inherited]
 

Returns property id.

virtual wxSize wxPGProperty::GetImageSize  )  const [virtual, inherited]
 

Deprecated, overriding this will cause run-time assertion failure.

unsigned int wxPGProperty::GetIndexInParent  )  const [inline, inherited]
 

Returns position in parent's array.

const wxString& wxPGProperty::GetLabel  )  const [inline, inherited]
 

Returns property's label.

const wxPGProperty* wxPGProperty::GetLastVisibleSubItem  )  const [inherited]
 

Returns last visible sub-property, recursively.

wxPGProperty* wxPGProperty::GetMainParent  )  const [inherited]
 

Returns highest level non-category, non-root parent.

Useful when you have nested wxCustomProperties/wxParentProperties.

Remarks:
Thus, if immediate parent is root or category, this will return the property itself.

const wxString& wxPGProperty::GetName  )  const [inline, inherited]
 

Returns property's name.

wxPGPropertyWithChildren* wxPGProperty::GetParent  )  const [inline, inherited]
 

Return parent of property.

signed char wxPGProperty::GetParentingType  )  const [inline, inherited]
 

Returns 0 for normal items.

1 for categories, -1 for other properties with children, -2 for wxCustomProperty (mostly like -1 ones but with few expections).

Remarks:
Should not be overridden by new custom properties. Usually only used internally.

wxPropertyGridState* wxPGPropertyWithChildren::GetParentState  )  const [inline]
 

Returns wxPropertyGridState to which this property belongs.

Reimplemented from wxPGProperty.

wxPGProperty* wxPGPropertyWithChildren::GetPropertyByName const wxString &  name  )  const
 

Returns (direct) child property with given name (or NULL if not found).

wxString wxPGProperty::GetType  )  const [inline, inherited]
 

Returns type name of property that is compatible with CreatePropertyByType.

and wxVariant::GetType.

wxValidator* wxPGProperty::GetValidator  )  const [inline, inherited]
 

Gets assignable version of property's validator.

virtual wxString wxPGPropertyWithChildren::GetValueAsString int  argFlags = 0  )  const [virtual]
 

Advanced variant of GetValueAsString() that forms a string that contains sequence of text representations of sub-properties.

Reimplemented from wxPGProperty.

Reimplemented in wxPropertyCategory.

wxVariant wxPGProperty::GetValueAsVariant  )  const [inline, inherited]
 

Returns value as wxVariant.

DEPRECATED: Use GetValue() instead.

wxVariant& wxPGProperty::GetValueRef  )  [inline, inherited]
 

Returns reference to the internal stored value.

GetValue is preferred way to get the actual value, since GetValueRef ignores DoGetValue, which may override stored value.

wxString wxPGProperty::GetValueString int  argFlags = 0  )  const [inherited]
 

Same as GetValueAsString, except takes common value into account.

int wxPGProperty::GetY  )  const [inherited]
 

Returns coordinate to the top y of the property.

Note that the position of scrollbars is not taken into account.

bool wxPGProperty::Hide bool  hide  )  [inline, inherited]
 

Hides or reveals the property.

Parameters:
hide true for hide, false for reveal.

int wxPGPropertyWithChildren::Index const wxPGProperty p  )  const [inline]
 

Returns index of given sub-property.

int wxPGProperty::InsertChoice const wxString &  label,
int  index,
int  value = INT_MAX
[inherited]
 

Adds entry to property's wxPGChoices and editor control (if it is active).

Returns index of item added.

virtual bool wxPGProperty::IntToValue wxVariant &  value,
int  number,
int  argFlags = 0
const [virtual, inherited]
 

Converts 'number' (including choice selection) into proper value 'variant'.

Returns true if new (different than m_value) value could be interpreted from the integer.

Parameters:
argFlags If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable
Remarks:
  • Default implementation may work correctly if used value type is int.
  • If property is not supposed to use choice or spinctrl or other editor with int-based value, it is not necessary to implement this method.
  • If property uses choice control, and displays a dialog on some choice items, then it is preferred to display that dialog in IntToValue instead of OnEvent.

bool wxPGProperty::IsCategory  )  const [inline, inherited]
 

Returns true if this property is actually a wxPropertyCategory.

bool wxPGPropertyWithChildren::IsExpanded  )  const [inline]
 

Redefined here to reduce code size.

Reimplemented from wxPGProperty.

bool wxPGProperty::IsSubProperty  )  const [inline, inherited]
 

Returns true if this is a sub-property.

bool wxPGProperty::IsVisible  )  const [inherited]
 

Returns true if all parents expanded.

wxPGProperty* wxPGPropertyWithChildren::Item size_t  i  )  const [inline]
 

Returns sub-property at index i.

wxPGProperty* wxPGPropertyWithChildren::Last  )  const [inline]
 

Returns last sub-property.

virtual void wxPGProperty::OnCustomPaint wxDC &  dc,
const wxRect &  rect,
wxPGPaintData paintdata
[virtual, inherited]
 

Override to paint an image in front of the property value text or drop-down list item (but only if wxPGProperty::OnMeasureImage is overridden as well).

If property's OnMeasureImage() returns size that has height != 0 but less than row height ( < 0 has special meanings), wxPropertyGrid calls this method to draw a custom image in a limited area in front of the editor control or value text/graphics, and if control has drop-down list, then the image is drawn there as well (even in the case OnMeasureImage() returned higher height than row height).

NOTE: Following applies when OnMeasureImage() returns a "flexible" height ( using wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable height items: If rect.x is < 0, then this is a measure item call, which means that dc is invalid and only thing that should be done is to set paintdata.m_drawnHeight to the height of the image of item at index paintdata.m_choiceItem. This call may be done even as often as once every drop-down popup show.

Parameters:
dc wxDC to paint on.
rect Box reserved for custom graphics. Includes surrounding rectangle, if any. If x is < 0, then this is a measure item call (see above).
paintdata wxPGPaintData structure with much useful data.
Remarks:
  • You can actually exceed rect width, but if you do so then paintdata.m_drawnWidth must be set to the full width drawn in pixels.
  • Due to technical reasons, rect's height will be default even if custom height was reported during measure call.
  • Brush is guaranteed to be default background colour. It has been already used to clear the background of area being painted. It can be modified.
  • Pen is guaranteed to be 1-wide 'black' (or whatever is the proper colour) pen for drawing framing rectangle. It can be changed as well.
See also:

virtual bool wxPGProperty::OnEvent wxPropertyGrid propgrid,
wxWindow *  wnd_primary,
wxEvent &  event
[virtual, inherited]
 

Events received by editor widgets are processed here.

Note that editor class usually processes most events. Some, such as button press events of TextCtrlAndButton class, should be handled here. Also, if custom handling for regular events is desired, then that can also be done (for example, wxSystemColourProperty custom handles wxEVT_COMMAND_CHOICE_SELECTED).

If the event causes value to be changed, wxPropertyGrid::ValueChangeInEvent(value) should be used.

Parameters:
event Associated wxEvent.
Return values:
Should return true if any changes in value should be reported.
Remarks:
  • If property uses choice control, and displays a dialog on some choice items, then it is preferred to display that dialog in IntToValue instead of OnEvent.

virtual wxSize wxPGProperty::OnMeasureImage int  item = -1  )  const [virtual, inherited]
 

Returns size of the custom painted image in front of property.

This method must be overridden to return non-default value if OnCustomPaint is to be called.

Parameters:
item Normally -1, but can be an index to the property's list of items.
Remarks:
  • Default behaviour is to return wxSize(0,0), which means no image.
  • Default image width or height is indicated with dimension -1.
  • You can also return wxPG_DEFAULT_IMAGE_SIZE which equals wxSize(-1, -1).

virtual void wxPGProperty::OnSetValue  )  [virtual, inherited]
 

This virtual function is called after m_value has been validated and set.

Remarks:
  • If m_value was set to Null variant (ie. unspecified value), OnSetValue will not be called.
  • Default implementation does nothing.

bool wxPGProperty::PrepareValueForDialogEditing wxPropertyGrid propgrid  )  [inherited]
 

Updates property value in case there were last minute changes.

If value was unspecified, it will be set to default. Use only for properties that have TextCtrl-based editor.

Remarks:
If you have code similar to
// Update the value in case of last minute changes if ( primary && propgrid->IsEditorsValueModified() ) GetEditorClass()->CopyValueFromControl( this, primary );
in wxPGProperty::OnEvent wxEVT_COMMAND_BUTTON_CLICKED handler, then replace it with call to this method.
Return values:
True if value changed.

bool wxPGProperty::RecreateEditor  )  [inherited]
 

If property's editor is created this forces its recreation.

Useful in SetAttribute etc. Returns true if actually did anything.

virtual void wxPGProperty::RefreshChildren  )  [virtual, inherited]
 

Refresh values of child properties.

Automatically called after value is set.

void wxPGProperty::RefreshEditor  )  [inherited]
 

If property's editor is active, then update it's value.

void wxPGProperty::SetAttribute const wxString &  name,
wxVariant  value
[inherited]
 

Sets an attribute for this property.

There are both common attributes and property class specific ones. For list of common attributes, see wxPropertyContainerMethods::SetPropertyAttribute().

void wxPGProperty::SetAttributes const wxPGAttributeStorage attributes  )  [inherited]
 

Sets attributes from a comma-delimited string.

void wxPGProperty::SetCell int  column,
wxPGCell cellObj
[inherited]
 

Sets cell information for given column.

Note that the property takes ownership of given wxPGCell instance.

bool wxPGProperty::SetChoices const wxArrayString &  labels,
const wxArrayInt &  values = wxArrayInt()
[inline, inherited]
 

Sets new set of choices for property.

bool wxPGProperty::SetChoices wxPGChoices choices  )  [inherited]
 

Sets new set of choices for property.

void wxPGProperty::SetChoiceSelection int  newValue,
const wxPGChoiceInfo &  choiceInfo
[inherited]
 

Changes value of a property with choices, but only works if the value type is long or string.

void wxPGProperty::SetChoicesExclusive  )  [inherited]
 

If property has choices and they are not yet exclusive, new such copy of them will be created.

void wxPGProperty::SetClientData ClientDataType  clientData  )  [inline, inherited]
 

Sets client data (void*) of a property.

Remarks:
This untyped client data has to be deleted manually.

void wxPGProperty::SetCommonValue int  commonValue  )  [inline, inherited]
 

Sets common value selected for this property.

-1 for none.

void wxPGProperty::SetEditor const wxString &  editorName  )  [inline, inherited]
 

Sets editor for a property.

void wxPGProperty::SetEditor const wxPGEditor editor  )  [inline, inherited]
 

Sets editor for a property.

void wxPGProperty::SetFlagsFromString const wxString &  str  )  [inherited]
 

Sets flags from a '|' delimited string.

Note that flag names are not prepended with 'wxPG_PROP_'.

bool wxPGProperty::SetMaxLength int  maxLen  )  [inline, inherited]
 

Set max length of text editor.

void wxPGProperty::SetValidator const wxValidator &  validator  )  [inline, inherited]
 

Sets wxValidator for a property.

void wxPGProperty::SetValue wxVariant  value  )  [inherited]
 

Call this to set value of the property.

Unlike methods in wxPropertyGrid, this does not automatically update the display.

void wxPGProperty::SetValue0 wxVariant &  value,
wxVariant *  pList = NULL,
bool  refreshEditor = true
[inherited]
 

Like SetValue, but can accept value as list of child values (only if wxPG_PROP_AGGREGATE flag is set).

Parameters:
pList Pointer to list variant that contains child values. Used to indicate which children should be marked as modified.
refreshEditor If true, then editor control is refreshed (if active).

virtual bool wxPGProperty::SetValueFromInt long  value,
int  flags = 0
[virtual, inherited]
 

Converts integer to a value, and if succesfull, calls SetValue() on it.

Default behaviour is to do nothing.

Parameters:
value Int to get the value from.
flags If has wxPG_FULL_VALUE, then the value given is a actual value and not an index.
Return values:
true if value was changed.

virtual bool wxPGProperty::SetValueFromString const wxString &  text,
int  flags = 0
[virtual, inherited]
 

Converts string to a value, and if succesfull, calls SetValue() on it.

Default behaviour is to do nothing.

Parameters:
text String to get the value from.
report_error If true, invalid string will be reported (prefer to use wxLogError).
Return values:
true if value was changed.

void wxPGProperty::SetValueImage wxBitmap &  bmp  )  [inherited]
 

Set wxBitmap in front of the value.

This bitmap may be ignored by custom cell renderers.

void wxPGProperty::SetWasModified bool  set = true  )  [inline, inherited]
 

Call with 'false' in OnSetValue to cancel value changes after all (ie.

cancel 'true' returned by StringToValue() or IntToValue()).

virtual bool wxPGPropertyWithChildren::StringToValue wxVariant &  variant,
const wxString &  text,
int  argFlags = 0
const [virtual]
 

This overridden version converts comma or semicolon separated tokens into list variant of child values.

Implements wxPGProperty.

Reimplemented in wxPGRootProperty.

bool wxPGProperty::UsesAutoUnspecified  )  const [inherited]
 

Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES.

virtual bool wxPGProperty::ValidateValue wxVariant &  value  )  const [virtual, inherited]
 

Implement this function in derived class to check and/or convert the value.

Return true if it is ok.

Default implementation does nothing except returns true.


The documentation for this class was generated from the following file:
Generated on Sun Nov 25 16:42:38 2007 for wxPropertyGrid by doxygen 1.3.6