Rogue Wave Views Manager Package API Reference Guide |
Rogue Wave Views Documentation Home |
Manager view interactor class. More...
#include <ilviews/gadmgr/txtinter.h>
Public Member Functions | |
IlvManagerMakeTextInteractor (IlvManager *manager, IlvView *view) | |
Constructor. More... | |
virtual void | abort () |
Aborts the interaction. More... | |
virtual IlBoolean | accept (IlvPoint &p) |
Called to start the interaction with the text object. More... | |
virtual void | doIt (const char *const *lines, IlUShort count)=0 |
Finalizes the interaction. More... | |
const char *const * | getLines (IlUShort &count) const |
Returns the array of character strings being edited. More... | |
IlBoolean | handleEvent (IlvEvent &event) |
Handles events for the manager view. More... | |
void | handleExpose (IlvRegion *clip) |
Called when the manager view receives an expose event. More... | |
void | reDraw () |
Redraws the text object. | |
void | setLines (const char *const *lines, IlUShort count, IlBoolean redraw=IlTrue) |
Sets the contents of the text object to the specified array of strings. More... | |
Public Member Functions inherited from IlvManagerViewInteractor | |
IlvManagerViewInteractor (IlvManager *manager, IlvView *view) | |
Initializes a new IlvManagerViewInteractor . More... | |
virtual void | drawGhost () |
Visual feedback during the interaction. More... | |
virtual void | ensureVisible (const IlvPoint &point) |
Ensures the visibility of a given location. More... | |
IlvDisplay * | getDisplay () const |
Returns the display of the manager view. More... | |
IlvManager * | getManager () const |
Returns the manager. More... | |
IlvTransformer * | getTransformer () const |
Returns the transformer used with the manager view. More... | |
IlvView * | getView () const |
Returns the manager view. More... | |
virtual void | init () |
Initialization, when the interactor is attached to a view. More... | |
Manager view interactor class.
Library: ilvadvgadmgr
The IlvManagerMakeTextInteractor
abstract class lets you edit multiline text objects or create new ones. When the user presses the left mouse button in the view to which this interactor is connected, a temporary text object (IlvText
) is created. This lets the user enter some text. The validation is made by double-clicking in the working area; the virtual member function doIt()
is then called.
IlvLabel
, IlvListLabel
, IlvManagerMakeListLabelInteractor
, IlvManagerMakeStringInteractor
, IlvStringList
, IlvText
. IlvManagerMakeTextInteractor::IlvManagerMakeTextInteractor | ( | IlvManager * | manager, |
IlvView * | view | ||
) |
Constructor.
Calls the constructor of the superclass and performs internal initializations.
manager | The manager. |
view | The manager view. |
|
virtual |
Aborts the interaction.
Called by the manager when the user changes the current interactor. It resets the interactor to a state in which it appears to have never been launched. A common implementation is to erase the ghost image. Call this member function to inhibit the interactor action in particular circumstances.
Reimplemented from IlvManagerViewInteractor.
Called to start the interaction with the text object.
Is called when the user presses the left mouse button in the working view. The default implementation creates the text object at position p and returns IlTrue
. If you create subtypes of this class, always call this function to create the text object.
p | The position of the event that initiated the interaction. |
IlTrue
if the interactor accepts the point as a valid position to start the interaction. Reimplemented in IlvManagerMakeListLabelInteractor.
|
pure virtual |
Finalizes the interaction.
This virtual member function is called when the user validates the text entry. The text contents is passed to this function. Note that this function declaration makes this class a pure abstract class.
lines | The array of strings contained in the text object. |
count | The number of strings in the array. |
Implemented in IlvManagerMakeListLabelInteractor.
const char* const* IlvManagerMakeTextInteractor::getLines | ( | IlUShort & | count | ) | const |
Returns the array of character strings being edited.
count | Used to return the number of strings in the array. |
Handles events for the manager view.
Called by the manager for which the interactor was created with every event it receives in the interactor view.
IlTrue
if the event is consumed, IlFalse
otherwise. Implements IlvManagerViewInteractor.
|
virtual |
Called when the manager view receives an expose event.
Called by the manager when an exposure request occurs in the interactor view to redraw shapes handled by the interactor, such as a ghost image. The basic implementation calls the member function IlvManagerViewInteractor::drawGhost()
after the clipping region has been set to the exposed area.
clip | Specifies the exposed area. |
Reimplemented from IlvManagerViewInteractor.
void IlvManagerMakeTextInteractor::setLines | ( | const char *const * | lines, |
IlUShort | count, | ||
IlBoolean | redraw = IlTrue |
||
) |
Sets the contents of the text object to the specified array of strings.
lines | The array of strings. |
count | The number of strings in the array. |
redraw | If set to IlTrue , the text object is redrawn. |
© Copyright 2016, 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.