Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ConfigurationEditor Class Reference

#include <ConfigurationEditor.h>

Inheritance diagram for ConfigurationEditor:

List of all members.


Detailed Description

Provides interactive editing and loading/saving of a plist::Collection.

Definition at line 10 of file ConfigurationEditor.h.


Public Member Functions

 ConfigurationEditor (plist::Collection *rootCollection=NULL)
 default constructor
 ConfigurationEditor (const std::string &n, plist::Collection *rootCollection=NULL)
 constructor which allows a custom name
 ConfigurationEditor (const std::string &n, const std::string &d, plist::Collection *rootCollection=NULL)
 constructor which allows a custom name and tooltip
virtual ~ConfigurationEditor ()
 destructor, have to do our custom clearSlots before the superclass tries to
virtual void refresh ()
 called when a child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
virtual void clearSlots ()
 need to override clearing so we don't delete load and save
virtual void setRootCollection (plist::Collection *rootCollection)
 sets the root of the collection being managed
virtual void setPath (const std::string &p)
 sets the path to the sub-collection being managed

Static Public Member Functions

static plist::DictionarygetObjectTemplates ()
 returns a dictionary of plist objects which may be added as new entries to collections being edited

Protected Member Functions

virtual void init ()
 common initialization regardless of constructor

Protected Attributes

plist::Collectionroot
 the root of collection being edited (i.e. may be the parent or other ancestor of the collection this editor is targeting, see path)
std::string path
 the names of the sub-collections from root to get to the collection this instance is actually targeting
LoadSettings load
 reuse the same load instance instead of regenerating a new one each refresh (saves user's "working directory")
SaveSettings save
 reuse the same save instance instead of regenerating a new one each refresh (saves user's "working directory")

Private Member Functions

 ConfigurationEditor (const ConfigurationEditor &)
 you can override, but don't call this...
ConfigurationEditoroperator= (const ConfigurationEditor &)
 you can override, but don't call this...

Classes

class  AddCollectionEntry
 displays a list of template objects (see ConfigurationEditor::getObjectTemplates()) which can be added to a target collection More...
class  LoadSettings
 provides a file browser to load a plist from the file system More...
class  NamedEnumerationEditor
 based on a string input control for easier mixing with other primitives (which just use a basic string input control as an editor) More...
class  NewCollectionEntry
 provides interface to set up a new collection entry before inserting it More...
class  SaveSettings
 provides a file browser to save a plist from the file system More...

Constructor & Destructor Documentation

ConfigurationEditor::ConfigurationEditor ( plist::Collection rootCollection = NULL  )  [inline]

default constructor

Definition at line 17 of file ConfigurationEditor.h.

Referenced by ConfigurationEditor::NewCollectionEntry::refresh(), and refresh().

ConfigurationEditor::ConfigurationEditor ( const std::string &  n,
plist::Collection rootCollection = NULL 
) [inline]

constructor which allows a custom name

Definition at line 22 of file ConfigurationEditor.h.

ConfigurationEditor::ConfigurationEditor ( const std::string &  n,
const std::string &  d,
plist::Collection rootCollection = NULL 
) [inline]

constructor which allows a custom name and tooltip

Definition at line 27 of file ConfigurationEditor.h.

virtual ConfigurationEditor::~ConfigurationEditor (  )  [inline, virtual]

destructor, have to do our custom clearSlots before the superclass tries to

Definition at line 32 of file ConfigurationEditor.h.

ConfigurationEditor::ConfigurationEditor ( const ConfigurationEditor  )  [private]

you can override, but don't call this...


Member Function Documentation

void ConfigurationEditor::init (  )  [protected, virtual]

common initialization regardless of constructor

Definition at line 11 of file ConfigurationEditor.cc.

Referenced by ConfigurationEditor().

void ConfigurationEditor::refresh (  )  [virtual]

called when a child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed

Reimplemented from ControlBase.

Definition at line 17 of file ConfigurationEditor.cc.

void ConfigurationEditor::clearSlots (  )  [virtual]

need to override clearing so we don't delete load and save

Reimplemented from ControlBase.

Definition at line 94 of file ConfigurationEditor.cc.

Referenced by refresh(), and ~ConfigurationEditor().

void ConfigurationEditor::setRootCollection ( plist::Collection rootCollection  )  [virtual]

sets the root of the collection being managed

Definition at line 102 of file ConfigurationEditor.cc.

Referenced by init().

void ConfigurationEditor::setPath ( const std::string &  p  )  [virtual]

sets the path to the sub-collection being managed

Definition at line 113 of file ConfigurationEditor.cc.

Referenced by refresh().

plist::Dictionary & ConfigurationEditor::getObjectTemplates (  )  [static]

returns a dictionary of plist objects which may be added as new entries to collections being edited

Definition at line 117 of file ConfigurationEditor.cc.

Referenced by ConfigurationEditor::AddCollectionEntry::refresh().

ConfigurationEditor& ConfigurationEditor::operator= ( const ConfigurationEditor  )  [private]

you can override, but don't call this...


Member Data Documentation

the root of collection being edited (i.e. may be the parent or other ancestor of the collection this editor is targeting, see path)

Definition at line 64 of file ConfigurationEditor.h.

Referenced by init(), refresh(), and setRootCollection().

std::string ConfigurationEditor::path [protected]

the names of the sub-collections from root to get to the collection this instance is actually targeting

Definition at line 65 of file ConfigurationEditor.h.

Referenced by refresh(), and setPath().

reuse the same load instance instead of regenerating a new one each refresh (saves user's "working directory")

Definition at line 81 of file ConfigurationEditor.h.

Referenced by clearSlots(), refresh(), and setRootCollection().

reuse the same save instance instead of regenerating a new one each refresh (saves user's "working directory")

Definition at line 97 of file ConfigurationEditor.h.

Referenced by clearSlots(), refresh(), and setRootCollection().


The documentation for this class was generated from the following files:

Tekkotsu v4.0
Generated Thu Nov 22 00:58:15 2007 by Doxygen 1.5.4