Inheritance diagram for CmTimeout:
Public Methods | |
virtual | ~CmTimeout (void) |
CmTimeout (CmCallback *owner, VOID_CB cb, CARD32 msec, int continuous=False) | |
Timeout constructor. | |
void | start (CARD32 msec) |
Resets the timer to a delay of 'msec' millisecs. | |
void | start (void) |
Resets the timer to the delay specified at creation time. | |
void | stop (void) |
Stops the timer disabling the callback call. | |
Friends | |
void | _TimeoutCB_ (TIMEOUT_ID id, void *ud) |
MGUI provides this class to allow the program handle timers. Each timer is handled by a callback method that is specified, along with the object owner, in the construct. The object 'owner' is a c++ object belonging to a class derived from CmCallback. The callback 'cb' must be a public method of the class which 'owner' belongs to. When the timeout expires, the CmTimeout object invokes the 'cb' method for the object 'owner'.
For the callback to be called, the application must ensure the event loop is reached periodically by calling one of the standard loop functions: mainLoop , loopWhileFlag , loopWhileEvents
|
|
|
Timeout constructor.
|
|
Resets the timer to the delay specified at creation time. If the timer was already started, the expiring time is recomputed so the callback will be called after the number of millisecs specified at creation time. |
|
Resets the timer to a delay of 'msec' millisecs. If the timer was already started, the expiring time is recomputed so the callback will be called after 'msec' millisecs. |
|
Stops the timer disabling the callback call.
|
|
|