#include <propgrid.h>
Public Member Functions | |
void | AddChoices (wxPGChoicesId choicesId, const wxArrayString &choiceLabels, const wxArrayInt &choiceValues=(*((wxArrayInt *) NULL))) |
wxPGId | AppendByClass (const wxString &classname, const wxString &label, const wxString &name=(*((wxString *) NULL)), const wxString &value=wxEmptyString, const wxString &attributes=wxEmptyString, wxPGChoicesId choicesId=(wxPGChoicesId) 0, const wxArrayString &choiceLabels=(*((wxArrayString *) NULL)), const wxArrayInt &choiceValues=(*((wxArrayInt *) NULL))) |
wxPGId | AppendByType (const wxString &valuetype, const wxString &label, const wxString &name=(*((wxString *) NULL)), const wxString &value=wxEmptyString, const wxString &attributes=wxEmptyString, wxPGChoicesId choicesId=(wxPGChoicesId) 0, const wxArrayString &choiceLabels=(*((wxArrayString *) NULL)), const wxArrayInt &choiceValues=(*((wxArrayInt *) NULL))) |
bool | BeginChildren () |
void | EndChildren () |
wxPGId | GetCurrentParent () const |
bool | HasChoices (wxPGChoicesId id) const |
void | SetGrid (wxPropertyGrid *pg) |
wxPropertyGridPopulator (wxPropertyGrid *pg=(wxPropertyGrid *) NULL, wxPGId popRoot=wxPGId(NULL)) | |
~wxPropertyGridPopulator () | |
Protected Member Functions | |
wxPGId | DoAppend (wxPGProperty *p, const wxString &value, const wxString &attributes, wxPGChoicesId choicesId, const wxArrayString &choiceLabels, const wxArrayInt &choiceValues) |
void | Init (wxPropertyGrid *pg, wxPGId popRoot) |
Protected Attributes | |
wxPGId | m_curParent |
wxPGHashMapP2P | m_dictIdChoices |
wxPGId | m_lastProperty |
wxPGId | m_popRoot |
wxPropertyGrid * | m_propGrid |
wxPropertyGridPopulator::wxPropertyGridPopulator | ( | wxPropertyGrid * | pg = (wxPropertyGrid*) NULL , |
|
wxPGId | popRoot = wxPGId(NULL) | |||
) | [inline] |
Constructor.
pg | Property grid to populate. | |
popRoot | Base parent property. Default is root. |
wxPropertyGridPopulator::~wxPropertyGridPopulator | ( | ) |
Destructor.
void wxPropertyGridPopulator::AddChoices | ( | wxPGChoicesId | choicesId, | |
const wxArrayString & | choiceLabels, | |||
const wxArrayInt & | choiceValues = (*((wxArrayInt *) NULL)) | |||
) |
Adds a new set of choices with given id, labels and optional values.
wxPGId wxPropertyGridPopulator::AppendByClass | ( | const wxString & | classname, | |
const wxString & | label, | |||
const wxString & | name = (*((wxString *) NULL)) , |
|||
const wxString & | value = wxEmptyString , |
|||
const wxString & | attributes = wxEmptyString , |
|||
wxPGChoicesId | choicesId = (wxPGChoicesId) 0 , |
|||
const wxArrayString & | choiceLabels = (*((wxArrayString *) NULL)) , |
|||
const wxArrayInt & | choiceValues = (*((wxArrayInt *) NULL)) | |||
) |
Appends a property under current parent.
classname | Class name of a property. Understands both wxXXXProperty and XXX style names. Thus, for example, wxStringProperty could be created with class names "wxStringProperty", and "String". Short class name of wxPropertyCategory is "Category". | |
label | Label for property. Use as in constructor functions. | |
name | Name for property. Use as in constructor functions. | |
value | Value for property is interpreted from this string. | |
attributes | Attributes of a property (both pseudo-attributes like "Disabled" and "Modified" in addition to real ones like "Precision") are read from this string. Is intended for string like one generated by GetPropertyAttributes. | |
choicesId | If non-zero: Id for set of choices unique in source. Pass either id previously given to AddChoices or a new one. If new is given, then choiceLabels and choiceValues are loaded as the contents for the newly created set of choices. | |
choiceLabels | List of choice labels. | |
choiceValues | List of choice values. |
wxPGId wxPropertyGridPopulator::AppendByType | ( | const wxString & | valuetype, | |
const wxString & | label, | |||
const wxString & | name = (*((wxString *) NULL)) , |
|||
const wxString & | value = wxEmptyString , |
|||
const wxString & | attributes = wxEmptyString , |
|||
wxPGChoicesId | choicesId = (wxPGChoicesId) 0 , |
|||
const wxArrayString & | choiceLabels = (*((wxArrayString *) NULL)) , |
|||
const wxArrayInt & | choiceValues = (*((wxArrayInt *) NULL)) | |||
) |
Appends a property under current parent.
Works just as AppendByClass, except accepts value type name instead of class name (value type name of a property can be queried using wxPropertyGrid::GetPropertyValueType(property)->GetType()).
bool wxPropertyGridPopulator::BeginChildren | ( | ) |
If possible, sets the property last added as current parent.
void wxPropertyGridPopulator::EndChildren | ( | ) | [inline] |
Terminates current parent - sets its parent as the new current parent.
wxPGId wxPropertyGridPopulator::GetCurrentParent | ( | ) | const [inline] |
Returns id of parent property for which children can currently be added.
bool wxPropertyGridPopulator::HasChoices | ( | wxPGChoicesId | id | ) | const |
Returns true if set of choices with given id has already been added.
void wxPropertyGridPopulator::SetGrid | ( | wxPropertyGrid * | pg | ) | [inline] |
Sets the property grid to be populated.
wxPGId wxPropertyGridPopulator::m_curParent [protected] |
Parent of currently added properties.
wxPGHashMapP2P wxPropertyGridPopulator::m_dictIdChoices [protected] |
Hashmap for source-choices-id to wxPGChoicesData mapping.
wxPGId wxPropertyGridPopulator::m_lastProperty [protected] |
Id of property last added.
wxPGId wxPropertyGridPopulator::m_popRoot [protected] |
Population root.
wxPropertyGrid* wxPropertyGridPopulator::m_propGrid [protected] |
Used property grid.