Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Matrix Item Editor class. More...
#include <ilviews/gadgets/matrix.h>
Public Member Functions | |
IlvMatrixItemEditor (IlvMatrix *matrix, IlUShort col, IlUShort row) | |
Constructor. More... | |
virtual void | applyTo () const =0 |
Is called to apply the editor value into the matrix. More... | |
virtual void | cancel () |
Cancels the editing. More... | |
IlUShort | getColumn () const |
Returns the edited column. More... | |
IlvGraphic * | getEditorField () const |
Returns the graphic object used to edit. More... | |
IlvMatrix * | getMatrix () const |
Returns the matrix being edited. More... | |
IlUShort | getRow () const |
Returns the edited row. More... | |
virtual IlBoolean | handleEvent (IlvEvent &event) |
Is called by the matrix when an event occurs while editing. More... | |
virtual void | initFrom () const =0 |
Is called to initialize the editor. More... | |
virtual void | validate () |
Validates the editing. More... | |
Protected Member Functions | |
void | setEditorField (IlvGraphic *g) |
Sets the graphic object used to edit the item. More... | |
Matrix Item Editor class.
Library: ilvadvgdt
The base class for the editors of IlvAbstractMatrixItem
objects. A matrix item editor is created through a factory of the class IlvMatrixItemEditorFactory
. The editor must call setEditorField
from its constructor to set the graphic object that will be used for editing. In most cases, an interactor must be set on this graphic object to call the validate
method when the editing is to be finished.
IlvMatrixItemEditorFactory
. Constructor.
matrix | The matrix where the editor will be used for editing. |
col | The column of the matrix where the editor will be used for editing. |
row | The row of the matrix where the editor will be used for editing. |
|
pure virtual |
Is called to apply the editor value into the matrix.
The implementation must change the edited matrix item using the editor field.
Implemented in IlvDefaultMatrixItemEditor.
|
virtual |
Cancels the editing.
This method should be called by the interactor of the graphic object used for the editing to cancel the editing.
IlUShort IlvMatrixItemEditor::getColumn | ( | ) | const |
Returns the edited column.
IlvGraphic* IlvMatrixItemEditor::getEditorField | ( | ) | const |
Returns the graphic object used to edit.
IlvMatrix* IlvMatrixItemEditor::getMatrix | ( | ) | const |
Returns the matrix being edited.
IlUShort IlvMatrixItemEditor::getRow | ( | ) | const |
Returns the edited row.
Is called by the matrix when an event occurs while editing.
The default implementation handles the IlvEscape
to cancel an editing, the IlvReturn
key to validate an editing, and some special keys like arrows keys to validate an editing and move the selection in the matrix. Any other event is sent to the interactor of the editor field.
event | The event. |
IlTrue
if the event was consumed, IlFalse
otherwise. getEditorField
|
pure virtual |
Is called to initialize the editor.
The implementation must initialize the editor field using the data located in the matrix.
Implemented in IlvDefaultMatrixItemEditor.
|
protected |
Sets the graphic object used to edit the item.
The previous graphic object, if any, is deleted.
g | The new graphic object. |
|
virtual |
Validates the editing.
This method should be called by the interactor of the graphic object used for the editing to validate the editing.
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.