Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/dataccess/gadgets/dbtimer.h>
Public Member Functions | |
IliDbTimer (IlvDisplay *display, const IlvPoint &at, IlInt unitPeriod=20, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
This constructor creates a timer with a default period of one second. | |
virtual IlvBitmap * | getBitmap () const |
Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access. | |
IlInt | getPeriod () const |
Returns the period of the timer. | |
void | setPeriod (IlInt units) |
Sets the period of the timer. |
Gadget class.
Library: dbgadget
The IliDbTimer
class defines the timer like a gadget. The purpose of a timer is to call a function repeatedly, once every defined time period. All timers share the same hardware timer (you can create several timers without running into a system limit problem). The smallest period is 50 ms and periods increment by units of 50 ms. For example, if you want a one-second timer, you should indicate 20 units. If you indicate 0 units, the timer does not work. To associate a callback to the timer in Rogue Wave Views Studio:
IlvGraphic
::addCallback
functionThis gadget is visible only under Rogue Wave Views Studio. In the final application, the gadget is there but not visible.
IliDbTimer::IliDbTimer | ( | IlvDisplay * | display, | |
const IlvPoint & | at, | |||
IlInt | unitPeriod = 20 , |
|||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
This constructor creates a timer with a default period of one second.
display | The display. | |
at | The position. | |
unitPeriod | The period. It is a multiple of 50 ms. For example, 1 is 50 ms, 20 is one second. | |
thickness | The border thickness. | |
palette | The palette. |
virtual IlvBitmap* IliDbTimer::getBitmap | ( | ) | const [virtual] |
Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access.
Reimplemented from IliDataGem.
IlInt IliDbTimer::getPeriod | ( | ) | const |
Returns the period of the timer.
void IliDbTimer::setPeriod | ( | IlInt | units | ) |
Sets the period of the timer.
A period is measured in units of 50ms. The smallest period is 50ms (one unit). For one second, you must indicate 20 units. If you indicate 0 units the timer is stopped.
units | The period. |
© 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.