Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::PropertyEditorManager Class Reference

This is the class for managing the current list of property editors available for use in editing a property. More...

#include <vcf/ApplicationKit/PropertyEditorManager.h>

Inheritance diagram for VCF::PropertyEditorManager:

VCF::Object List of all members.

Static Public Member Functions

static PropertyEditorManagercreate ()
 Called by the UIToolkit to create the singleton instance for the framework.
static void initPropertyEditorManager ()
 initializes the Property editor for use - must be called at start up
static void closePropertyEditorManager ()
 Frees any memory used by initPropertyEditorManager().
static PropertyEditorcreateEditor (const String &className)
 create a suitable property editor for a given classname.
static bool registerPropertyEditor (Class *editorClass, const String &className)
 Registers a property editor for a given class name.
static bool registerPropertyEditor (const String &editorClassName, const String &className)
 Registers a property editor for a given class/type name.
static void removePropertyEditor (const String &editorClassName, const String &className)
 Removes a PropertyEditor with a given class/type name from the list of registered propertyEditors.

Detailed Description

This is the class for managing the current list of property editors available for use in editing a property.

Some of the default editors are provided by the framework itself, while other will be added by 3rd parties.

This is a singleton class, and it's lifetime is managed by the UIToolkit, not by any other direct means or by developers using the framework.

The class allows the registration of property editor's at run time. The usage is something like this:

//define you cool PropertyEditor derived class
class MyCoolEditor : public PropertyEditor {
//rest of code ommitted
};

//in some initialization function:
PropertyEditorManager::registerPropertyEditor( new MyCoolEditor(), "Foo" );
This will register an instance of the MyCoolEditor class with any object that is of type "Foo". Type names for a given property are usually retrieved by calling the property's getTypeClassName() method.
See also:
UIToolkit::init()

PropertyEditor

Property::getTypeClassName


Member Function Documentation

static void VCF::PropertyEditorManager::closePropertyEditorManager  )  [static]
 

Frees any memory used by initPropertyEditorManager().

Must be called before the runtime shuts down.

static PropertyEditorManager* VCF::PropertyEditorManager::create  )  [static]
 

Called by the UIToolkit to create the singleton instance for the framework.

static PropertyEditor* VCF::PropertyEditorManager::createEditor const String className  )  [static]
 

create a suitable property editor for a given classname.

Parameters:
String the class name of the property type - this is the same name that should have been used in the call to registerPropertyEditor() to register the property editor Class with the PropertyEditorManager.
Returns:
PropertyEditor returns a new intance of a property editor. If no match is found with the className parameter, then the return value is NULL.

static void VCF::PropertyEditorManager::initPropertyEditorManager  )  [static]
 

initializes the Property editor for use - must be called at start up

static bool VCF::PropertyEditorManager::registerPropertyEditor const String editorClassName,
const String className
[static]
 

Registers a property editor for a given class/type name.

If an existing property editor already exists with the same name type name, then the function returns false.

Parameters:
String the class name that represents the property editor
String the name of the type associated with this property editor
Returns:
bool

static bool VCF::PropertyEditorManager::registerPropertyEditor Class editorClass,
const String className
[static]
 

Registers a property editor for a given class name.

If an existing property editor already exists with the same name type name, then the function returns false.

Parameters:
Class the class instance that represents the property editor
String the name of the type associated with this property editor
Returns:
bool

static void VCF::PropertyEditorManager::removePropertyEditor const String editorClassName,
const String className
[static]
 

Removes a PropertyEditor with a given class/type name from the list of registered propertyEditors.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information