rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members | Public Member Functions
IlvTimeIterator Class Reference

Iterator class. More...

#include <ilviews/graphics/timescalerow.h>

Public Member Functions

 IlvTimeIterator (IlvTimeScaleRow *parent)
 Constructor. More...
 
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 ()
 Returns the current position of the iterator. More...
 
IlInt getXLocation (const IlvTimeScalePaintContext &paintCtx)
 Returns the position of the iterator in a given paint context. More...
 
void next ()
 Increments the iterator to the next time unit.
 
void start (IlDate scaleStart)
 Initializes the iterator to start at the specified date. More...
 

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
parentThe IlvTimeScaleRow the object will iterate on.

Member Function Documentation

IlInt IlvTimeIterator::getXLocation ( )

Returns the current position of the iterator.

Returns
The x position corresponding to the iterator current time.
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
paintCtxThe paint context.
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
scaleStartThe date at which the iterator should start.

© Copyright 2015, 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.