rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvManagerMakeTextInteractor Class Reference

Manager view interactor class. More...

#include <ilviews/gadmgr/txtinter.h>

Inheritance diagram for IlvManagerMakeTextInteractor:
IlvManagerMakeListLabelInteractor

List of all members.

Public Member Functions

 IlvManagerMakeTextInteractor (IlvManager *manager, IlvView *view)
 Constructor.
virtual IlBoolean accept (IlvPoint &p)
 Called to start the interaction with the text object.
virtual void doIt (const char *const *s, IlUShort count)=0
 Finalizes the interaction.
const char *const * getLines (IlUShort &count) const
 Returns the array of character strings being edited.
void reDraw ()
 Redraws the text object.
void setLines (const char *const *s, IlUShort count, IlBoolean redraw=IlTrue)
 Sets the contents of the text object to the specified array of strings.

Detailed Description

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.

See also:
IlvLabel, IlvListLabel, IlvManagerMakeListLabelInteractor, IlvManagerMakeStringInteractor, IlvStringList, IlvText.

Constructor & Destructor Documentation

IlvManagerMakeTextInteractor::IlvManagerMakeTextInteractor ( IlvManager *  manager,
IlvView view 
)

Constructor.

Calls the constructor of the superclass and performs internal initializations.

Parameters:
manager The manager.
view The manager view.

Member Function Documentation

virtual IlBoolean IlvManagerMakeTextInteractor::accept ( IlvPoint p  )  [virtual]

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.

Parameters:
p The position of the event that initiated the interaction.
Returns:
IlTrue if the interactor accepts the point as a valid position to start the interaction.

Reimplemented in IlvManagerMakeListLabelInteractor.

virtual void IlvManagerMakeTextInteractor::doIt ( const char *const *  s,
IlUShort  count 
) [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.

Parameters:
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.

Returns:
The array of strings that are currently being edited.
Parameters:
count Used to return the number of strings in the array. You should never modify or delete this array.
void IlvManagerMakeTextInteractor::setLines ( const char *const *  s,
IlUShort  count,
IlBoolean  redraw = IlTrue 
)

Sets the contents of the text object to the specified array of strings.

Parameters:
lines The array of strings.
count The number of strings in the array.
redraw If set to IlTrue, the text object is redrawn.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.