wxPropertyGridPopulator Class Reference

Allows populating wxPropertyGrid from arbitrary text source. More...

#include <propgrid.h>

List of all members.

Public Member Functions

wxPGPropertyAdd (const wxString &propClass, const wxString &propLabel, const wxString &propName, const wxString *propValue, wxPGChoices *pChoices=NULL)
 Appends a new property under bottommost parent.
bool AddAttribute (const wxString &name, const wxString &type, const wxString &value)
 Adds attribute to the bottommost property.
void AddChildren (wxPGProperty *property)
 Pushes property to the back of parent array (ie.
virtual void DoScanForChildren ()=0
 Called once in AddChildren.
wxPGPropertyGetCurParent () const
 Returns id of parent property for which children can currently be added.
const wxPropertyGridStateGetState () const
wxPropertyGridStateGetState ()
wxPGChoices ParseChoices (const wxString &choicesString, const wxString &idString)
 Parses strings of format "choice1"[=value1] .
virtual void ProcessError (const wxString &msg)
 Implement in derived class to do custom process when an error occurs.
void SetGrid (wxPropertyGrid *pg)
void SetState (wxPropertyGridState *state)
 wxPropertyGridPopulator ()
 Default constructor.
virtual ~wxPropertyGridPopulator ()
 Destructor.

Static Public Member Functions

static bool ToLongPCT (const wxString &s, long *pval, long max)
 Like wxString::ToLong, except allows N% in addition of N.

Protected Attributes

wxPGHashMapS2P m_dictIdChoices
 Hashmap for string-id to wxPGChoicesData mapping.
wxPropertyGridm_pg
 Used property grid.
wxArrayPGProperty m_propHierarchy
 Tree-hierarchy of added properties (that can have children).
wxPropertyGridStatem_state
 Used property grid state.

Detailed Description

Allows populating wxPropertyGrid from arbitrary text source.


Constructor & Destructor Documentation

virtual wxPropertyGridPopulator::~wxPropertyGridPopulator (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
propClass Property class as string.
bool wxPropertyGridPopulator::AddAttribute ( const wxString &  name,
const wxString &  type,
const wxString &  value 
)

Adds attribute to the bottommost property.

Parameters:
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.

wxPGProperty* wxPropertyGridPopulator::GetCurParent (  )  const

Returns id of parent property for which children can currently be added.

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.


Member Data Documentation

wxPGHashMapS2P wxPropertyGridPopulator::m_dictIdChoices [protected]

Hashmap for string-id to wxPGChoicesData mapping.

Used property grid.

wxArrayPGProperty wxPropertyGridPopulator::m_propHierarchy [protected]

Tree-hierarchy of added properties (that can have children).

Used property grid state.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator
Generated on Sun Aug 22 12:42:15 2010 for wxPropertyGrid by  doxygen 1.6.3