Base MGUI Class
Base MGUI Class. This is an abstract class, with no data and no public methods. It contains all global MGUI functions as protected methods, so they can be called by any derived class.
The global "C" function MBeep() is available for use from outside CmMGUI derived classes.
The global "C" function MGetKeyboardState() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetSysDir() is available for use from outside
CmMGUI derived classes.
The global "C" function MPaletteMode() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetNPlanes() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetNColors() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetBlackColor() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetWhiteColor() is available for use from outside
CmMGUI derived classes.
The global "C" function MEnableCustomizing() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetStringOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetTextOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetIntOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetFontOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetBGColorOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetFGColorOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetShadowOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetStringOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetTextOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetIntOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetBGColorOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetFGColorOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetShadowOption() is available for use from outside
CmMGUI derived classes.
The global "C" function MLogInit() is available for use from outside
CmMGUI derived classes.
The global "C" function MLog() is available for use from outside
CmMGUI derived classes.
The global "C" function MMaskedLog() is available for use from outside
CmMGUI derived classes.
The global "C" function MLogSetLevel() is available for use from outside
CmMGUI derived classes.
The global "C" function MLogSetMask() is available for use from outside
CmMGUI derived classes.
The global "C" function MLogSetMaskBits() is available for use from outside
CmMGUI derived classes.
The global "C" function MLogResetMaskBits() is available for use from outside
CmMGUI derived classes.
The global "C" function Trace() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetTraceFileName() is available for use from outside
CmMGUI derived classes.
The global "C" function MSpoolFile() is available for use from outside
CmMGUI derived classes.
The global "C" function MSpoolFile() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetDefaultBackgroundRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetDefaultBackgroundRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetDefaultForegroundRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetDefaultForegroundRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MTextCharX() is available for use from outside
CmMGUI derived classes.
The global "C" function MLoopWhileFlag() is available for use from outside
CmMGUI derived classes.
The global "C" function MLoopWhileEvents() is available for use from outside
CmMGUI derived classes.
The global "C" function MNextEvent() is available for use from outside
CmMGUI derived classes.
The global "C" function MProcessEvent() is available for use from outside
CmMGUI derived classes.
The global "C" function MMessageDialog() is available for use from outside
CmMGUI derived classes.
The global "C" function MInputPrompt() is available for use from outside
CmMGUI derived classes.
The global "C" function MTextPrompt() is available for use from outside
CmMGUI derived classes.
The global "C" function MFileSelection() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetCurrentDirectory() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetInputPromptRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetMessageDialogRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetFileSelectionRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetInputPromptRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetMessageDialogRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MGetFileSelectionRGB() is available for use from outside
CmMGUI derived classes.
The global "C" function MSetFileSelectionTextStrings() is available for use from outside
CmMGUI derived classes.
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)
opt_name -
Specifies the name of the option. Option names in the DOS and
Windows resource file appear after an object definition. The option
is followed by the '=' character and the option value.
char* getTextOption(const char *obj_name)
int getIntOption(const char *obj_name, const char *opt_name, int *ret)
opt_name -
Specifies the name of the option. Option names in the DOS and
Windows resource file appear after an object definition. The option
is followed by the '=' character and the option value.
ret -
Points to an integer variable that will contain the return value.
int getFontOption(const char *obj_name, MTFont *ret)
ret -
Points to an integer variable that will contain the return value.
int getBGColorOption(const char *obj_name, int *pr, int *pg, int *pb)
pr -
Points to an integer variable which to store the return red value to.
pg -
Points to an integer variable which to store the return green value to.
pb -
Points to an integer variable which to store the return blue value to.
int getFGColorOption(const char *obj_name, int *pr, int *pg, int *pb)
pr -
Points to an integer variable which to store the return red value to.
pg -
Points to an integer variable which to store the return green value to.
pb -
Points to an integer variable which to store the return blue value to.
int getShadowOption(const char *obj_name, int *shadow, int *i_t, int *o_t)
shadow -
Points to a variable that will contain the shadow type on return.
i_t -
Points to a variable that will contain the internal thickness on return.
o_t -
Points to a variable that will contain the out thickness on return.
void setStringOption(const char *obj_name, const char *opt_name, const char *text)
opt_name -
Specifies the name of the option. Option names in the DOS and
Windows resource file appear after an object definition. The option
is followed by the '=' character and the option value.
text -
The text value to be stored.
void setTextOption(const char *obj_name, const char *text)
text -
The text value to be stored.
void setIntOption(const char *obj_name, const char *opt_name, int val)
opt_name -
Specifies the name of the option. Option names in the DOS and
Windows resource file appear after an object definition. The option
is followed by the '=' character and the option value.
val -
The integer value to be stored.
void setFontOption(const char *obj_name, MTFont font)
The global "C" function MSetFontOption() is available for use from outside
CmMGUI derived classes.
font -
The MTFont value to be stored.
void setBGColorOption(const char *obj_name, int r, int g, int b)
r -
The red component of the color to store.
g -
The green component of the color to store.
b -
The blue component of the color to store.
void setFGColorOption(const char *obj_name, int r, int g, int b)
r -
The red component of the color to store.
g -
The green component of the color to store.
b -
The blue component of the color to store.
void setShadowOption(const char *obj_name, int shadow, int in_t, int out_t)
shadow -
The shadow type (WS_NONE, WS_SHADOW_IN, WS_SHADOW_OUT, WS_ETCHED_IN, WS_ETCHED_OUT).
in_t -
The internal thickness.
out_t -
The out thickness.
void saveOptions(void)
The global "C" function MSaveOptions() is available for use from outside
CmMGUI derived classes.
void logInit(int level, int nr, int nvr, int nc, int nvc, const char *fname)
nr -
Desired number of rows you want to be saved in the log window.
nvr -
Desired number of visible rows (this value should be lower
or equal to nr).
nc -
Desired number of columns you want to use in the log window.
nvc -
Desired number of visible columns (this value should be lower
than or equal to nc).
fname -
Specifies the name of the file which you want to write log messages to.
If you don't want to log to file, simply pass a NULL pointer.
void log(int level, const char *fmt, ...)
fmt -
A format string with sprintf syntax.
void maskedLog(int level, CARD32 mask, const char *fmt, ...)
mask -
Context mask associated with the call. You can specify up to 32
different contexts for log masking. For the string to be printed
this value must contain at least one bit of the current log-mask.
fmt -
A format string with sprintf syntax.
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)
pg -
Points to an integer variable which to store the return red value to.
pb -
Points to an integer variable which to store the return red value to.
void setDefaultBackgroundRGB(int r, int g, int b)
g -
The green component of the color.
b -
The blue component of the color.
void getDefaultForegroundRGB(int *pr, int *pg, int *pb)
pg -
Points to an integer variable which to store the return red value to.
pb -
Points to an integer variable which to store the return red value to.
void setDefaultForegroundRGB(int r, int g, int b)
g -
The green component of the color.
b -
The blue component of the color.
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)
The global "C" function MMainLoop() is available for use from outside
CmMGUI derived classes. 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, ...)
msg -
A multi line text string that will be displayed centered in the window.
btn1 -
The text displayed in the first button (mandatory, not NULL)
btn2 -
The text displayed in the second button (mandatory, may be NULL to
terminate a one-button list)
int inputPrompt(const char *title, const char *msg, char *text, int len, const char *ok_btn, const char *canc_btn)
msg -
A multi line text string that will be displayed centered in the window.
text -
The intial text value displayed in the edit field. It will contain the input
text on return.
len -
The text buffer len.
ok_btn -
The text to be displayed in the Ok-button.
canc_btn -
The text to be displayed in the Cnacel-button.
char* textPrompt(const char *title, const char *msg, const char *text, int w, int h, const char *ok_btn, const char *canc_btn)
msg -
A multi line text string that will be displayed centered in the window.
text -
The intial text value displayed.
w -
The edit window width in character units.
h -
The edit window height in character units.
ok_btn -
Text to be displayed in the Ok-button.
canc_btn -
Text to be displayed in the Cnacel-button.
int fileSelection(const char *title, char *filter, char *fname, char *dname, int change_cur_dir)
filter -
Specifies the initial file filter value (may be defaulted to the
empty string). On return it contains the last used value.
fname -
Specifies the initial file name (may be defaulted to the
empty string). On return it contains the selected file name.
dname -
Specifies the initial directory name (may be defaulted to the
empty string). On return it contains the selected directory name
(including drive letter under DOS/Windows).
change_cur_dir -
Specifies whether the program's current directory should be changed
according to the user's selection or not.
char* getCurrentDirectory(void)
void setInputPromptRGB(int r, int g, int b)
g -
The green component of the color.
b -
The blue component of the color.
void setMessageDialogRGB(int r, int g, int b)
g -
The green component of the color.
b -
The blue component of the color.
void setFileSelectionRGB(int r, int g, int b)
g -
The green component of the color.
b -
The blue component of the color.
void getInputPromptRGB(int *pr, int *pg, int *pb)
pg -
Points to an integer variable which to store the return red value to.
pb -
Points to an integer variable which to store the return red value to.
void getMessageDialogRGB(int *pr, int *pg, int *pb)
pg -
Points to an integer variable which to store the return red value to.
pb -
Points to an integer variable which to store the return red value to.
void getFileSelectionRGB(int *pr, int *pg, int *pb)
pg -
Points to an integer variable which to store the return red value to.
pb -
Points to an integer variable which to store the return red value to.
void setFileSelectionTextStrings( char *file_list, char *dir_list, char *drive_list, char *filter, char *filename, char *curr_dir, char *ok_button, char *close_button)
dir_list -
Text for the directory list (default: "Directory").
drive_list -
Text for the drive list (default: "Drive") DOS/Windows only.
filter -
Text for the file filter edit (default: "Filter").
filename -
Text for the file name (default: "File").
curr_dir -
Text for the current directory (default: "Current directory").
ok_button -
Text for the Ok button (default: " &Ok ").
close_button -
Text for the Close button (default: " &Close ").
alphabetic index hierarchy of classes
generated by doc++