class CmTimeout : public CmMGUI

Timeout (timer) Class

Inheritance:

CmTimeout < CmMGUI


Public Methods

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

Inherited from CmMGUI:

Protected Methods

virtual inline void beep(void)
int getKeyboardState(void)
const char* getSysDir(void)
int paletteMode(void)
int getScreenWidth(void)
int getScreenHeight(void)
int getNPlanes(void)
long getNColors(void)
MTColor getBlackColor(void)
MTColor getWhiteColor(void)
void enableCustomizing(void)
char* getStringOption(const char *obj_name, const char *opt_name)
char* getTextOption(const char *obj_name)
int getIntOption(const char *obj_name, const char *opt_name, int *ret)
int getFontOption(const char *obj_name, MTFont *ret)
int getBGColorOption(const char *obj_name, int *pr, int *pg, int *pb)
int getFGColorOption(const char *obj_name, int *pr, int *pg, int *pb)
int getShadowOption(const char *obj_name, int *shadow, int *i_t, int *o_t)
void setStringOption(const char *obj_name, const char *opt_name, const char *text)
void setTextOption(const char *obj_name, const char *text)
void setIntOption(const char *obj_name, const char *opt_name, int val)
void setFontOption(const char *obj_name, MTFont font)
void setBGColorOption(const char *obj_name, int r, int g, int b)
void setFGColorOption(const char *obj_name, int r, int g, int b)
void setShadowOption(const char *obj_name, int shadow, int in_t, int out_t)
void saveOptions(void)
void logInit(int level, int nr, int nvr, int nc, int nvc, const char *fname)
void log(int level, const char *fmt, ...)
void maskedLog(int level, CARD32 mask, const char *fmt, ...)
void logSetLevel(int level)
void logSetMask(CARD32 mask)
CARD32 logGetMask(void)
void logSetMaskBits(CARD32 mask)
void logResetMaskBits(CARD32 mask)
void trace(const char *fmt, ...)
void setTraceFileName(const char *fname)
int spoolFile(const char *fname)
int spoolTempFile(const char *fname)
void getDefaultBackgroundRGB(int *pr, int *pg, int *pb)
void setDefaultBackgroundRGB(int r, int g, int b)
void getDefaultForegroundRGB(int *pr, int *pg, int *pb)
void setDefaultForegroundRGB(int r, int g, int b)
int textCharX(const char *text, MTFont font, int i)
int textHeight(const char *text, MTFont font)
int charHeight(char ch, MTFont font)
int textWidth(const char *text, MTFont font)
int textNWidth(const char *text, MTFont font, int n)
int charWidth(char ch, MTFont font)
void mainLoop(void)
void loopWhileFlag(int *pflag, int value)
void loopWhileEvents(int discard)
void nextEvent(MEvent *pe, int wait)
void processEvent(MEvent *pe)
int messageDialog(const char *title, const char *msg, const char *btn1, const char *btn2, ...)
int inputPrompt(const char *title, const char *msg, char *text, int len, const char *ok_btn, const char *canc_btn)
char* textPrompt(const char *title, const char *msg, const char *text, int w, int h, const char *ok_btn, const char *canc_btn)
int fileSelection(const char *title, char *filter, char *fname, char *dname, int change_cur_dir)
char* getCurrentDirectory(void)
void setInputPromptRGB(int r, int g, int b)
void setMessageDialogRGB(int r, int g, int b)
void setFileSelectionRGB(int r, int g, int b)
void getInputPromptRGB(int *pr, int *pg, int *pb)
void getMessageDialogRGB(int *pr, int *pg, int *pb)
void getFileSelectionRGB(int *pr, int *pg, int *pb)
void setFileSelectionTextStrings( char *file_list, char *dir_list, char *drive_list, char *filter, char *filename, char *curr_dir, char *ok_button, char *close_button)

Documentation

Timeout (timer) Class. 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

CmTimeout(CmCallback *owner, VOID_CB cb, CARD32 msec, int continuous=False)
Timeout constructor.

Parameters:
owner - Pointer to the object providing the callback method.
cb - Pointer to the callback provided the owner object.
msec - Timeout value in millisecs.
continuous - Boolean value to specify whether the timer must be restarted automatically on expiration or not.

void start(CARD32 msec)
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.

void start(void)
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.

void stop(void)
Stops the timer disabling the callback call


This class has no child classes.

alphabetic index hierarchy of classes


MGUI Copyright 1996-2000 Vincenzo Morello

generated by doc++