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

VCF::TableItemEditor Class Reference

The TableItemEditor class is used to provide editing capabilities for individual cell items in a TableControl. More...

#include <vcf/ApplicationKit/TableItemEditor.h>

Inheritance diagram for VCF::TableItemEditor:

VCF::ObjectWithEvents VCF::Object VCF::BasicTableItemEditor List of all members.

Public Member Functions

 TableItemEditor ()
virtual ~TableItemEditor ()
virtual TableCellItemgetItemToEdit ()=0
 Returns an instance to the item current associated with this editor.
virtual void updateItem ()=0
 Updates the item to change to whatever new value has been set in the editor.
virtual ControlgetEditingControl ()=0
 Returns a control instance that belongs to this editor.

Public Attributes

VCF::Delegate CellItemChanged
VCF::Delegate CellItemValidateChange

Detailed Description

The TableItemEditor class is used to provide editing capabilities for individual cell items in a TableControl.

When the TableControl detects that an event has occurred to start an edit, it calls the respective TableCellItem's createItemEditor() method. This will create a new instance of a TableItemEditor, as appropriate for that cell. A simple implementation of this interface can be found in the BasicTableItemEditor class.

The editor allows you to retrieve the item that is currently being edited. It also allows access to the control that is used to edit the item. This control is managed by the underlying TableControl, all you need to do is create the control instance once. One approach might be to create the control in your custom class's constructor. Another approach, which the BasicTableItemEditor takes, is to set a member variable to NULL in the constructor, and then in the implementation of getEditingControl, check the member variable, if it's NULL, then create the control at that point and set the member variable, and then return the member variable.

See also:
TableCellItem::createItemEditor

BasicTableItemEditor


Constructor & Destructor Documentation

VCF::TableItemEditor::TableItemEditor  )  [inline]
 

virtual VCF::TableItemEditor::~TableItemEditor  )  [inline, virtual]
 


Member Function Documentation

virtual Control* VCF::TableItemEditor::getEditingControl  )  [pure virtual]
 

Returns a control instance that belongs to this editor.

This control instance is managed by the table control, and it has the same life time as the editor that created it.

Implemented in VCF::BasicTableItemEditor.

virtual TableCellItem* VCF::TableItemEditor::getItemToEdit  )  [pure virtual]
 

Returns an instance to the item current associated with this editor.

Implemented in VCF::BasicTableItemEditor.

virtual void VCF::TableItemEditor::updateItem  )  [pure virtual]
 

Updates the item to change to whatever new value has been set in the editor.

Implemented in VCF::BasicTableItemEditor.


Member Data Documentation

VCF::Delegate VCF::TableItemEditor::CellItemChanged
 

Event Delegate:
CellItemChanged
event class: ItemEditorEvent

VCF::Delegate VCF::TableItemEditor::CellItemValidateChange
 

Event Delegate:
CellItemValidateChange
event class: ItemEditorEvent
event type: ITEMEDITOR_CHANGED


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