Allows populating wxPropertyGrid from arbitrary text source. More...
#include <propgrid.h>
Public Member Functions | |
wxPGProperty * | Add (const wxString &propClass, const wxString &propLabel, const wxString &propName, const wxString *propValue, wxPGChoices *pChoices=NULL) |
bool | AddAttribute (const wxString &name, const wxString &type, const wxString &value) |
void | AddChildren (wxPGProperty *property) |
virtual void | DoScanForChildren ()=0 |
wxPGProperty * | GetCurParent () const |
const wxPropertyGridState * | GetState () const |
wxPropertyGridState * | GetState () |
wxPGChoices | ParseChoices (const wxString &choicesString, const wxString &idString) |
virtual void | ProcessError (const wxString &msg) |
void | SetGrid (wxPropertyGrid *pg) |
void | SetState (wxPropertyGridState *state) |
wxPropertyGridPopulator () | |
virtual | ~wxPropertyGridPopulator () |
Static Public Member Functions | |
static bool | ToLongPCT (const wxString &s, long *pval, long max) |
Protected Attributes | |
wxPGHashMapS2P | m_dictIdChoices |
wxPropertyGrid * | m_pg |
wxArrayPGProperty | m_propHierarchy |
wxPropertyGridState * | m_state |
Allows populating wxPropertyGrid from arbitrary text source.
Definition at line 8385 of file propgrid.h.
wxPropertyGridPopulator::wxPropertyGridPopulator | ( | ) |
Default constructor.
virtual wxPropertyGridPopulator::~wxPropertyGridPopulator | ( | ) | [virtual] |
Destructor.
wxPGProperty* wxPropertyGridPopulator::Add | ( | const wxString & | propClass, | |
const wxString & | propLabel, | |||
const wxString & | propName, | |||
const wxString * | propValue, | |||
wxPGChoices * | pChoices = NULL | |||
) |
Appends a new property under bottommost parent.
propClass | Property class as string. |
bool wxPropertyGridPopulator::AddAttribute | ( | const wxString & | name, | |
const wxString & | type, | |||
const wxString & | value | |||
) |
Adds attribute to the bottommost property.
type | Allowed values: "string", (same as string), "int", "bool". Empty string mean autodetect. |
void wxPropertyGridPopulator::AddChildren | ( | wxPGProperty * | property | ) |
Pushes property to the back of parent array (ie. it becomes bottommost parent), and starts scanning/adding children for it. When finished, parent array is returned to the original state.
virtual void wxPropertyGridPopulator::DoScanForChildren | ( | ) | [pure virtual] |
Called once in AddChildren.
wxPGProperty* wxPropertyGridPopulator::GetCurParent | ( | ) | const [inline] |
Returns id of parent property for which children can currently be added.
Definition at line 8429 of file propgrid.h.
const wxPropertyGridState* wxPropertyGridPopulator::GetState | ( | ) | const [inline] |
Definition at line 8435 of file propgrid.h.
wxPropertyGridState* wxPropertyGridPopulator::GetState | ( | ) | [inline] |
Definition at line 8434 of file propgrid.h.
wxPGChoices wxPropertyGridPopulator::ParseChoices | ( | const wxString & | choicesString, | |
const wxString & | idString | |||
) |
Parses strings of format "choice1"[=value1] ... "choiceN"[=valueN] into wxPGChoices. Registers parsed result using idString (if not empty). Also, if choices with given id already registered, then don't parse but return those choices instead.
virtual void wxPropertyGridPopulator::ProcessError | ( | const wxString & | msg | ) | [virtual] |
Implement in derived class to do custom process when an error occurs. Default implementation uses wxLogError.
void wxPropertyGridPopulator::SetGrid | ( | wxPropertyGrid * | pg | ) |
void wxPropertyGridPopulator::SetState | ( | wxPropertyGridState * | state | ) |
static bool wxPropertyGridPopulator::ToLongPCT | ( | const wxString & | s, | |
long * | pval, | |||
long | max | |||
) | [static] |
Like wxString::ToLong, except allows N% in addition of N.
wxPGHashMapS2P wxPropertyGridPopulator::m_dictIdChoices [protected] |
Hashmap for string-id to wxPGChoicesData mapping.
Definition at line 8466 of file propgrid.h.
wxPropertyGrid* wxPropertyGridPopulator::m_pg [protected] |
Used property grid.
Definition at line 8457 of file propgrid.h.
wxArrayPGProperty wxPropertyGridPopulator::m_propHierarchy [protected] |
Tree-hierarchy of added properties (that can have children).
Definition at line 8463 of file propgrid.h.
wxPropertyGridState* wxPropertyGridPopulator::m_state [protected] |
Used property grid state.
Definition at line 8460 of file propgrid.h.