rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvTimeIterator Class Reference

Iterator class. More...

#include <ilviews/graphics/timescalerow.h>

List of all members.

Public Member Functions

 IlvTimeIterator (IlvTimeScaleRow *parent)
 Constructor.
void clearDateTextCache ()
 Clears the cache of date text that the iterator has accumulated so far.
IlString getText ()
 Returns the text displayed for the iterator current time.
IlDate getTime ()
 Returns the iterator current time.
IlInt getXLocation (const IlvTimeScalePaintContext &paintCtx)
 Returns the position of the iterator in a given paint context.
IlInt getXLocation ()
 Returns the current position of the iterator.
void next ()
 Increments the iterator to the next time unit.
void start (IlDate scaleStart)
 Initializes the iterator to start at the specified date.

Detailed Description

Iterator class.

Library: views

IlvTimeIterator traverses the integral time units for this time scale row. At each increment, the time, the formatted date text, and the corresponding x location can be obtained. First the method start must be called. Then, subsequent calls to next() will cause the iterator to increment.

This class is only needed when creating a new scale row subclass.


Constructor & Destructor Documentation

IlvTimeIterator::IlvTimeIterator ( IlvTimeScaleRow parent  ) 

Constructor.

Creates a new IlvTimeIterator for an IlvTimeScaleRow.

Parameters:
parent The IlvTimeScaleRow the object will iterate on.

Member Function Documentation

IlInt IlvTimeIterator::getXLocation ( const IlvTimeScalePaintContext paintCtx  ) 

Returns the position of the iterator in a given paint context.

Returns:
the x position corresponding to the iterator's current time in the specified paint context.
Parameters:
paintCtx The paint context.
IlInt IlvTimeIterator::getXLocation (  ) 

Returns the current position of the iterator.

Returns:
The x position corresponding to the iterator current time.
void IlvTimeIterator::start ( IlDate  scaleStart  ) 

Initializes the iterator to start at the specified date.

The date is truncated upwards to the next whole increment for this time scale row. In other words, the first call to getTime() will return the next time unit that is greater than or equal to scaleStart.

Parameters:
scaleStart The date at which the iterator should start.
 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.