rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Manager Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvManagerMakeStringInteractor Class Reference

Manager view interactor class. More...

#include <ilviews/gadmgr/strinter.h>

Inheritance diagram for IlvManagerMakeStringInteractor:
IlvManagerViewInteractor IlvManagerMakeLabelInteractor

List of all members.

Public Member Functions

 IlvManagerMakeStringInteractor (IlvManager *manager, IlvView *view)
 Constructor.
virtual void abort ()
 Aborts the interaction.
virtual IlBoolean accept (IlvPoint &p)
 Called to start the interaction with the text field object.
virtual void doIt (const char *)=0
 Finalizes the interaction.
const char * getLabel ()
 Returns the string being edited.
void handleEvent (IlvEvent &event)
 Handles events for the manager view.
void handleExpose (IlvRegion *clip)
 Called when the manager view receives an expose event.
void reDraw ()
 Redraws the text field.
void setLabel (const char *s, IlBoolean redraw=IlTrue)
 Sets the contents of the text field to the specified string.

Detailed Description

Manager view interactor class.

Library: ilvgadmgr

The IlvManagerMakeStringInteractor abstract class creates new single-line text entities, or edits single-line text objects. A text field object is created when the user presses the left mouse button in the view to which this interactor is connected. This lets the user enter a new text value, which is validated after the field is entered.

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

Constructor & Destructor Documentation

IlvManagerMakeStringInteractor::IlvManagerMakeStringInteractor ( IlvManager manager,
IlvView view 
)

Constructor.

Calls the constructor of the superclass and initializes the interactor.

Parameters:
manager The manager.
view The manager view.

Member Function Documentation

virtual void IlvManagerMakeStringInteractor::abort (  )  [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.

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

Called to start the interaction with the text field object.

Called when the user presses the left mouse button in the working view. The default implementation creates the text field and returns IlTrue. If you create subtypes of this class, always call this function to create the text field.

Returns:
IlTrue if the interactor accepts the point as a valid position to start the interaction.

Reimplemented in IlvManagerMakeLabelInteractor.

virtual void IlvManagerMakeStringInteractor::doIt ( const char *   )  [pure virtual]

Finalizes the interaction.

Called when the user validates the text field. This function declaration makes this class a pure abstract class.

Parameters:
label The string contained in the text field.

Implemented in IlvManagerMakeLabelInteractor.

const char* IlvManagerMakeStringInteractor::getLabel (  ) 

Returns the string being edited.

Returns:
The current edited label.
void IlvManagerMakeStringInteractor::handleEvent ( IlvEvent event  )  [virtual]

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.

Implements IlvManagerViewInteractor.

void IlvManagerMakeStringInteractor::handleExpose ( IlvRegion clip  )  [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.

Parameters:
clip Specifies the exposed area.

Reimplemented from IlvManagerViewInteractor.

void IlvManagerMakeStringInteractor::setLabel ( const char *  s,
IlBoolean  redraw = IlTrue 
)

Sets the contents of the text field to the specified string.

Parameters:
label The new string.
redraw If set to IlTrue, the text field 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.