VCF::PropertyEditor Class Reference
This is the common base class for any editor that is specific of any property. More...
#include <vcf/ApplicationKit/PropertyEditor.h>
Inheritance diagram for VCF::PropertyEditor:

Public Types | |
| enum | PropertyAttributes { paHasValues = 0x01, paSortValues = 0x0100, paHasSubProperties = 0x02, paAllowsMultiSelect = 0x04, paReadOnly = 0x08, paNeedsCustomPaint = 0x010, paUsesModalDialogForEditing = 0x020, paValueNeedsDuplicating = 0x040, paEditorRequestsProperty = 0x080, paCompositeValue = 0x0100, paOverridePropertyDescription = 0x010000, paOverridePropertyName = 0x020000 } |
| Defines a set of different attributes that the getAttributes() can return. More... | |
Public Member Functions | |
| virtual | ~PropertyEditor () |
| virtual void | setProperty (Property *property)=0 |
| This sets the current property instance for the property editor. | |
| virtual bool | equalTo (PropertyEditor *editor)=0 |
| This method needs to be oveeriden so to specify when two PropertyEditor(s) can be considered equal. | |
| virtual int | getAttributes ()=0 |
| This method returns a mask of potential attributes. | |
| virtual void | internal_setPropertyType (const String &type)=0 |
| Don't call this - this is used strictly by the framework. | |
| virtual String | getPropertyType ()=0 |
| Returns the property type that this editor instance is associated with. | |
| virtual Component * | getRootDesignerComponent ()=0 |
| returns the root component that is being edited in a form designer. | |
| virtual void | setRootDesignerComponent (Component *rootDesigner)=0 |
| Sets the root component that is being edited in a form designer. | |
| virtual Control * | createEditingControl ()=0 |
| Returns a control instance that belongs to this editor. | |
| virtual void | edit ()=0 |
| This method is used to edit the property value. | |
| virtual void | paintValue (VariantData *value, GraphicsContext *context, const Rect &bounds, const DrawUIState &state)=0 |
| Paints a representation of the editor. | |
| virtual VariantData * | getValue ()=0 |
| Returns the value for the property. | |
| virtual void | setValue (VariantData *value)=0 |
| Set's the value on the property editor. | |
| virtual String | getValueAsText ()=0 |
| Like getValue(), but this returns the value in text format. | |
| virtual void | setValueAsText (const String &textValue)=0 |
| Like setValue() but allows the value to be a string. | |
| virtual std::vector< String > | getStringValues ()=0 |
| Returns an array of potential values for the property. | |
| virtual std::vector< PropertyEditor * > | getSubProperties ()=0 |
| Returns a array of proeprty editors from the current value of this editor. | |
| virtual bool | sort (const String &strVal1, const String &strVal2)=0 |
| only implement this if sortValues() returns true. | |
| virtual String | getPropertyDescription ()=0 |
| This returns a string that describes the property. | |
| virtual String | getPropertyName ()=0 |
| This returns a string that describes the property. | |
| bool | hasValues () |
| bool | sortValues () |
| bool | hasSubProperties () |
| bool | allowsMultiSelect () |
| bool | isReadOnly () |
| bool | needsCustomPaint () |
| bool | usesModalDialogForEditing () |
| bool | valueNeedsDuplicating () |
| bool | overridesPropertyDescription () |
| bool | overridesPropertyName () |
| bool | editorRequestsProperty () |
| bool | isCompositeValue () |
Detailed Description
This is the common base class for any editor that is specific of any property.
- See also:
- VCF::Property
the editor is used by the host in order to display the property content, retrieve possible values, and to provide a possible UI for performing the editing. The steps are something like this:
- the host selects a source object
- the host retrieves a list of all properties for the source objects
- for each property the
- See also:
- Object::getClass
Member Enumeration Documentation
|
|
Defines a set of different attributes that the getAttributes() can return.
|
Constructor & Destructor Documentation
|
|
|
Member Function Documentation
|
|
|
|
|
Returns a control instance that belongs to this editor. This control instance is managed by the tool using this property editor so you just need to create it. This may be called multiple times, it is the callers responsibility to delete the control, the editor implementor does not need to worry about this. For simple editors this may return null which will mean the implementation of the UI conntrol is up to the host environment. Typically editors for things like numbers, text, etc, will by default use an edit control or, if the property editor support a list of values, a combo box.
Implemented in VCF::AbstractPropertyEditor. |
|
|
This method is used to edit the property value. This is an optional method to implement, and only needs to be done if createEditingControl() returns a non null value. If createEditingControl() is NULL then it's assumed that the actual editing process will be completely handled by the host of the property editor. If the implementor does edit this method, then it's up to the implemementor to properly transfer the contents of the propert value to the control. Implemented in VCF::AbstractPropertyEditor, VCF::ColorPropertyEditor, VCF::FontPropertyEditor, VCF::ImageFilenamePropertyEditor, and VCF::ImagePropertyEditor. |
|
|
|
|
|
This method needs to be oveeriden so to specify when two PropertyEditor(s) can be considered equal.
Implemented in VCF::AbstractPropertyEditor. |
|
|
This method returns a mask of potential attributes.
Implemented in VCF::AbstractPropertyEditor. |
|
|
This returns a string that describes the property. A host that displays a UI should first try and call the property's Property::getDescription() method. If this returns an empty string, then the host should call the property editor's getPropertyDescription(). Implemented in VCF::AbstractPropertyEditor. |
|
|
This returns a string that describes the property. A host that displays a UI should first try and call the property's Property::getName() method. If this returns an empty string, then the host should call the property editor's getPropertyName(). Implemented in VCF::AbstractPropertyEditor. |
|
|
Returns the property type that this editor instance is associated with.
Implemented in VCF::AbstractPropertyEditor. |
|
|
returns the root component that is being edited in a form designer. This may or may not be a control. Implemented in VCF::AbstractPropertyEditor. |
|
|
Returns an array of potential values for the property. Only usable if the PropertEditor::paHasValues bit is set.
Implemented in VCF::AbstractPropertyEditor, VCF::BoolPropertyEditor, VCF::EnumPropertyEditor, VCF::CursorPropertyEditor, and VCF::ColorPropertyEditor. |
|
|
Returns a array of proeprty editors from the current value of this editor. The requirement, of course, is that the variant data that is returned by getValue() is a pdObject. This is not meaningful to call unless PropertEditor::paHasSubProperties is set.
Implemented in VCF::AbstractPropertyEditor, VCF::EnumSetPropertyEditor, and VCF::FontPropertyEditor. |
|
|
Returns the value for the property. Note that this value is completely independant of the actual value that may be crurently stored in the source object's property. The assignment of this value to the source's property is up to the tool/IDE/etc that is using this interface. Implemented in VCF::AbstractPropertyEditor. |
|
|
Like getValue(), but this returns the value in text format. This value is used for display purposes if the editor doesn't support custom painting. Implemented in VCF::AbstractPropertyEditor, VCF::EnumSetPropertyEditor, and VCF::CursorPropertyEditor. |
|
|
|
|
|
|
|
|
Don't call this - this is used strictly by the framework.
Implemented in VCF::AbstractPropertyEditor. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
Paints a representation of the editor. This will only get called if needsCustomPaint() method returns true. This is for custom painting of the property editor when it is not being edited. Implemented in VCF::AbstractPropertyEditor, VCF::ColorPropertyEditor, and VCF::FontPropertyEditor. |
|
|
This sets the current property instance for the property editor. This should only get called if the property editor has the paEditorRequestsProperty attribute set. Implemented in VCF::AbstractPropertyEditor. |
|
|
Sets the root component that is being edited in a form designer. This may or may not be a control. This root component is then used by some property editor's to enumerator choices for assign values to properties. For example a component proeprty editor might try and find all sub components of the root component whose class name matches a certain criteria and disply these as possible choices to assign a value to the property editor. Implemented in VCF::AbstractPropertyEditor. |
|
|
Set's the value on the property editor.
Implemented in VCF::AbstractPropertyEditor. |
|
|
Like setValue() but allows the value to be a string.
Implemented in VCF::AbstractPropertyEditor, VCF::CursorPropertyEditor, and VCF::ColorPropertyEditor. |
|
||||||||||||
|
only implement this if sortValues() returns true. If this is the case, then return true if strVal1 is greater than strVal2. Implemented in VCF::AbstractPropertyEditor, and VCF::ColorPropertyEditor. |
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/PropertyEditor.h
