wxArrayStringProperty Class Reference

Property that manages a list of strings. More...

#include <props.h>

Inheritance diagram for wxArrayStringProperty:
wxPGProperty

List of all members.

Public Member Functions

virtual wxArrayEditorDialogCreateEditorDialog ()
 DECLARE_DYNAMIC_CLASS (wxArrayStringProperty) virtual const wxPGEditor *DoGetEditorClass() const
virtual void GenerateValueAsString ()
virtual wxString GetValueAsString (int argFlags=0) const
 Returns text representation of property's value.
virtual bool OnButtonClick (wxPropertyGrid *propgrid, wxWindow *primary, const wxChar *cbt)
virtual bool OnCustomStringEdit (wxWindow *parent, wxString &value)
virtual bool OnEvent (wxPropertyGrid *propgrid, wxWindow *primary, wxEvent &event)
 Events received by editor widgets are processed here.
virtual void OnSetValue ()
 This virtual function is called after m_value has been set.
virtual bool StringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const
 Converts 'text' into proper value 'variant'.
 wxArrayStringProperty (const wxString &label=(*((wxString *) NULL)), const wxString &name=(*((wxString *) NULL)), const wxArrayString &value=wxArrayString())

Protected Attributes

wxString m_display

Detailed Description

Property that manages a list of strings.


Member Function Documentation

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

Returns text representation of property's value.

Generally this function should not be called from the application code. Instead, call GetValueString().

Parameters:
argFlags If wxPG_FULL_VALUE is set, returns complete, storable string value instead of displayable. If wxPG_EDITABLE_VALUE is set, returns string value that must be editable in textctrl. If wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to display as a part of composite property string value.
Remarks:
  • Default implementation returns string composed from text representations of child properties.
  • Implementations are never called with m_value being null variant (ie. unspecified value), so you don't need to check for that. Naturally this means that unspecified value is always displayed as an empty string.
See also:
GetValueString()

Reimplemented from wxPGProperty.

virtual bool wxArrayStringProperty::OnEvent ( wxPropertyGrid propgrid,
wxWindow *  wnd_primary,
wxEvent &  event 
) [virtual]

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.

Reimplemented from wxPGProperty.

virtual void wxArrayStringProperty::OnSetValue (  )  [virtual]

This virtual function is called after m_value has been set.

Remarks:
  • If m_value was set to Null variant (ie. unspecified value), OnSetValue() will not be called.
  • m_value may be of any variant type. Typically properties internally support only one variant type, and as such OnSetValue() provides a good opportunity to convert supported values into internal type.
  • Default implementation does nothing.

Reimplemented from wxPGProperty.

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

Converts 'text' into proper value 'variant'.

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

Parameters:
argFlags If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable one (they may be different). If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of composite property string value (as generated by GetValueAsString() called with this same flag).
Remarks:
  • Default implementation converts semicolon delimited tokens into child values. Only works for properties with children.
  • You might want to take into account that m_value is Null variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behavior).

Reimplemented from wxPGProperty.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator

Generated on 28 Jan 2012 for wxPropertyGrid by  doxygen 1.6.1