Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

mgui.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the MGUI (MORELLO Graphic User Interface)
00003  * development tool.
00004  * Cointains all MGUI C function prototypes
00005  *
00006  * MGUI Version 4.0.3
00007  *
00008  * DOC Version 0.2  Jun 21, 2003
00009  */
00010 
00011 #ifndef _MGUI_H
00012 #define _MGUI_H
00013 
00014 #include <stdarg.h>
00015 
00016 #include "mguidefs.h"
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00049 
00058 void    MGUIMain(int argc, char **argv);
00059 
00066 void    MGUITerm(void);
00067 
00081 void    MMainLoop(void);
00082 
00097 void    MLoopWhileFlag(int *pflag, int value);
00098 
00110 void    MLoopWhileEvents(int discard);
00111 
00121 void    MNextEvent(MEvent *pe, int wait);
00122 
00129 void    MProcessEvent(MEvent *pe);
00130 
00132 
00133 
00134 /****************************************************************************/
00135 
00140 
00148 int     MGetKeyboardState(void);
00149 
00157 void    MBeep(void);
00158 
00166 const char *MGetSysDir(void);
00169 const char *MGetApplicationName(void);
00170 
00175 void MEnableCharBrowser(void);
00176 
00183 int     MPaletteMode(void);
00184 
00188 int     MGetScreenWidth(void);
00189 
00193 int     MGetScreenHeight(void);
00194 
00200 int     MGetNPlanes(void);
00201 
00207 long    MGetNColors(void);
00208 
00217 int     MTextCharX(const char *text, MTFont font, int x);
00218 
00223 int     MTextHeight(const char *text, MTFont font);
00224 
00230 int     MCharHeight(unsigned int ch, MTFont font);
00231 
00237 int     MTextWidth(const char *text, MTFont font);
00238 
00244 int     MTextNWidth(const char *text, MTFont font, int len);
00245 
00251 int     MCharWidth(unsigned int ch, MTFont font);
00252 
00274 int MMessageDialog(const char *title, const char *msg, const char *btn1, const char *btn2, ...);
00275 
00298 int MInputPrompt(const char *title, const char *msg, char *text, int len, const char *ok_btn,
00299         const char *canc_btn);
00300 
00327 char *MTextPrompt(const char *title, const char *msg, const char *text,
00328         int w, int h, const char *ok_btn, const char *canc_btn);
00329 
00355 int     MFileSelection(const char *title, const char *filter, char *fname, char *dname,
00356                 int change_cur_dir);
00357 
00383 int     MFileBrowse(const char *title, const char *filter, char *fname, char *dname,
00384                 int change_cur_dir);
00385 
00395 const char *MGetCurrentDirectory(void);
00396 
00408 void    MSetInputPromptRGB(int r, int g, int b);
00409 
00421 void    MSetMessageDialogRGB(int r, int g, int b);
00422 
00434 void    MSetFileSelectionRGB(int r, int g, int b);
00435 
00447 void MSetInputPromptFgRGB(int r, int g, int b);
00448 
00460 void MSetMessageDialogFgRGB(int r, int g, int b);
00461 
00474 void MSetInputPromptFonts(MTFont text_font, MTFont edit_font, MTFont buttons_font);
00475 
00485 void MSetMessageDialogFonts(MTFont text_font, MTFont buttons_font);
00486 
00498 void    MGetInputPromptRGB(int *pr, int *pg, int *pb);
00499 
00511 void    MGetMessageDialogRGB(int *pr, int *pg, int *pb);
00512 
00524 void    MGetFileSelectionRGB(int *pr, int *pg, int *pb);
00525 
00537 void MGetMessageDialogFgRGB(int *pr, int *pg, int *pb);
00538 
00550 void MGetInputPromptFgRGB(int *pr, int *pg, int *pb);
00551 
00561 void MGetMessageDialogFonts(MTFont *text_font, MTFont *buttons_font);
00562 
00575 void MGetInputPromptFonts(MTFont *text_font, MTFont *edit_font, MTFont *buttons_font);
00576 
00600 void    MSetFileSelectionTextStrings(
00601         const char *file_list, const char *dir_list,
00602         const char *drive_list, const char *filter,
00603         const char *filename, const char *curr_dir,
00604         const char *ok_button, const char *close_button);
00605 
00623 int     MSpoolFile(const char *fname);
00624 
00643 int     MSpoolTempFile(const char *fname);
00644 
00645 /* File values read/write */
00646 //
00647 void MWriteCARD8(FILE *fp, CARD8 val);
00648 //
00649 void MWriteCARD16(FILE *fp, CARD16 val);
00650 //
00651 void MWriteCARD32(FILE *fp, CARD32 val);
00652 //
00653 CARD8 MReadCARD8(FILE *fp);
00654 //
00655 CARD16 MReadCARD16(FILE *fp);
00656 //
00657 CARD32 MReadCARD32(FILE *fp);
00658 
00660 
00661 
00662 /****************************************************************************/
00663 
00681 void    MEnableCustomizing(void);
00682 
00704 char    *MGetStringOption(const char *obj_name, const char *opt_name);
00705 
00717 char    *MGetTextOption(const char *obj_name);
00718 
00741 int     MGetIntOption(const char *obj_name, const char *opt_name, int *ret);
00742 
00772 int     MGetFontOption(const char *obj_name, MTFont *ret);
00773 
00794 int     MGetBGColorOption(const char *obj_name, int *pr, int *pg, int *pb);
00795 
00816 int     MGetFGColorOption(const char *obj_name, int *pr, int *pg, int *pb);
00817 
00839 int     MGetShadowOption(const char *obj_name, int *shadow, int *i_t, int *o_t);
00840 
00861 void    MSetStringOption(const char *obj_name, const char *opt_name, const char *text);
00862 
00877 void    MSetTextOption(const char *obj_name, const char *text);
00878 
00898 void    MSetIntOption(const char *obj_name, const char *opt_name, int val);
00899 
00924 void    MSetFontOption(const char *obj_name, MTFont font);
00925 
00944 void    MSetBGColorOption(const char *obj_name, int r, int g, int b);
00945 
00964 void    MSetFGColorOption(const char *obj_name, int r, int g, int b);
00965 
00985 void    MSetShadowOption(const char *obj_name, int shadow, int in_t, int out_t);
00986 
01002 void    MSaveOptions(void);
01003 
01004 /****************************************************************************/
01005 
01016 
01040 void    MLogInit(int level, int nr, int nvr, int nc, int nvc, const char *fname);
01041 
01054 void    MLog(int level, const char *fmt, ...);
01055 
01074 void    MMaskedLog(int level, CARD32 mask, const char *fmt, ...);
01075 
01083 void    MLogSetLevel(int level);
01084 
01093 void    MLogSetMask(CARD32 mask);
01094 
01100 CARD32  MLogGetMask(void);
01101 
01112 void    MLogSetMaskBits(CARD32 mask);
01113 
01125 void    MLogResetMaskBits(CARD32 mask);
01126 
01140 void    Trace(const char *fmt,...);
01141 
01149 void MSetTraceFileName(const char *fname);
01150 
01159 void MLogSetTimeFormat(const char *strftime_format);
01160 
01169 void MTraceSetTimeFormat(const char *strftime_format);
01170 
01172 
01179 
01196 void MGetDefaultBackgroundRGB(int *pr, int *pg, int *pb);
01197 
01213 void MSetDefaultBackgroundRGB(int r, int g, int b);
01214 
01230 void MGetDefaultForegroundRGB(int *pr, int *pg, int *pb);
01231 
01247 void MSetDefaultForegroundRGB(int r, int g, int b);
01248 
01255 MTColor  MAllocDefaultBackgroundColor(void);
01256 
01260 MTColor MAllocColor(int r, int g, int b);
01261 
01266 MTColor MAllocShiftColor(MTColor col, int percentage);
01267 
01269 void    MFreeColor(MTColor col);
01270 
01272 MTColor MAllocCell(int r, int g, int b);
01273 
01275 void    MSetCellColor(MTColor c, int r, int g, int b);
01276 
01278 void    MFreeCell(MTColor c);
01279 
01281 void    MQueryColor(MTColor col, int *pr, int *pg, int *pb);
01282 
01288 MTColor MBlackColor(void);
01289 
01295 MTColor MWhiteColor(void);
01296 
01301 MTColor MReAllocColor(MTColor color);
01302 
01307 MTColor MAllocHighlightBGColor(MTColor bgc, MTColor fgc);
01308 
01310 
01311 MTCursor MCreateCursor(MIMAGE bits, int xs, int ys);
01312 
01350 
01352 MTFont  MLoadFont(const char *family, int h, int bold, int italic);
01354 void    MUnloadFont(MTFont font);
01356 const char *MGetFirstFontFamily(void);
01358 const char *MGetNextFontFamily(void);
01360 
01361 
01376 
01389 MIMAGE MAllocImage(int imgw, int imgh, int np);
01390 
01408 MIMAGE MReadImageFile(const char *fname);
01417 MIMAGE MReadPNGFile(const char *fname);
01425 MIMAGE MReadBMPFile(const char *fname);
01427 MIMAGE MReadTIFFFile(const char *fname);
01429 MIMAGE MReadJPEGFile(const char *fname);
01431 MIMAGE MReadGIFFile(const char *fname);
01433 MIMAGE MImageClone(MIMAGE img);
01434 
01441 void MImageAddDefaultTypeGIF(void);
01449 void MImageAddDefaultTypeTIFF(void);
01457 void MImageAddDefaultTypeJPEG(void);
01465 void MImageAddDefaultTypePNG(void);
01491 void MAddImagePath(const char *path);
01499 void MRemoveImagePath(const char *path);
01501 void MImageAddAlphaChannel(MIMAGE_DESCR *img);
01503 int  MImageGetPixelAlpha(MIMAGE img, int x, int y);
01505 void MImageSetPixelAlpha(MIMAGE img, int x, int y, CARD8 alpha);
01506 
01517 MIMAGE MCreateImageMaskByCMapIndex(MIMAGE img, int index);
01518 
01523 MIMAGE MCreateImageMaskByPixel(MIMAGE img, int x, int y);
01524 
01536 MIMAGE MCreateImageMaskByRGB(MIMAGE img, int r, int g, int b);
01537 
01539 int MWriteTIFFFile(MIMAGE img, const char *name, int compression);
01541 int MWriteBMPFile(MIMAGE img, const char *fname);
01543 int MWriteJPEGFile(MIMAGE img, const char *name, int quality);
01544 
01546 void    MFreeImage(MIMAGE img);
01547 
01552 void    MInstallImage(MIMAGE img);
01553 
01559 void    MUninstallImage(MIMAGE img);
01560 
01562 void    MImageGetInfo(MIMAGE img, int *pw, int *ph, int *pnplanes);
01563 
01583 void    MImageGetPixelRGB(MIMAGE img, int x, int y, int *pr, int *pg, int *pb);
01584 
01603 void    MImageSetPixelRGB(MIMAGE img, int x, int y, int r, int g, int b);
01604 
01611 int     MImageGetPixelIndex(MIMAGE img, int x, int y);
01612 
01618 void    MImageSetPixelIndex(MIMAGE img, int x, int y, int i);
01619 
01637 void    MImageGetCMapEntry(MIMAGE img, int i, int *pr, int *pg, int *pb);
01638 
01653 void    MImageSetCMapEntry(MIMAGE img, int i, int r, int g, int b);
01654 
01661 void    MImageSetMask(MIMAGE dst, MIMAGE mask);
01662 
01669 void    MImageMerge(MIMAGE dst, MIMAGE src, int xo, int yo, int transparent);
01671 void    MImageComputeBackgroundRGB(MIMAGE img, int *pr, int *pg, int *pb);
01673 void    MImageSetMaskByCMapIndex(MIMAGE img, int id);
01675 void    MImageSetMaskByPixel(MIMAGE img, int x, int y);
01677 void    MImageSetMaskByRGB(MIMAGE img, int r, int g, int b);
01679 
01685 
01687 void MDrawText(MOBJECT p, int x, int y, int w, int h, const char *text,
01688                 MTFont font, MTColor fgc, int align);
01690 void MDrawNText(MOBJECT p, int x, int y, int w, int h, const char *text,
01691                 MTFont font, MTColor fgc, int align, int n);
01693 void MDrawBGText(MOBJECT p, int x, int y, int w, int h, const char *text,
01694                 MTFont font, MTColor bgc, MTColor fgc, int align);
01696 void MDrawBGNText(MOBJECT p, int x, int y, int w, int h, const char *text,
01697                 MTFont font, MTColor bgc, MTColor fgc, int align, int n);
01699 void MDrawShadowedText(MOBJECT p, int x, int y, int w, int h, const char *text,
01700                 MTFont font, int sh, MTColor fgc1, MTColor fgc2, int align);
01702 void MDrawShadowedNText(MOBJECT p, int x, int y, int w, int h, const char *text,
01703                 MTFont font, int sh, MTColor fgc1, MTColor fgc2, int align, int n);
01704 
01706 void MDrawPoint(MOBJECT p, int x, int y, MTColor col);
01708 void MDrawLine(MOBJECT p, int x1, int y1, int x2, int y2, MTColor col);
01710 void MDrawPolyline(MOBJECT p, MPOINT *points, int n, MTColor col);
01712 void MDrawFilledPolyline(MOBJECT p, MPOINT *points, int n, MTColor col);
01714 void MDrawBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc);
01716 void MDrawFilledBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc);
01718 void MDrawCircle(MOBJECT p, int x, int y, int r, MTColor col);
01720 void MDrawFilledCircle(MOBJECT p, int x, int y, int r, MTColor col);
01722 void MDrawArc(MOBJECT p, int x, int y, int r, int a1, int a2, MTColor col);
01724 void MDrawFilledArc(MOBJECT p, int x, int y, int r, int a1, int a2, MTColor c);
01726 void MDrawImage(MOBJECT p, MIMAGE gi, int pm_x, int pm_y, int w, int h,
01727                 int x, int y);
01729 void MDrawWindow(MOBJECT o);
01731 void MDrawShadow(MOBJECT o);
01733 void MDrawSubShadow(MOBJECT o, int x, int y, int w, int h, MTColor tsc, MTColor bsc, int thick);
01735 void MDrawBorder(MOBJECT o, int x, int y, int w, int h, MTColor col, int thick);
01737 void MDrawXorLine(MOBJECT p, int x1, int y1, int x2, int y2);
01739 void MDrawXorBox(MOBJECT p, int x, int y, int w, int h);
01740 
01742 
01743 
01748 
01750 char *MObjectGetText(MOBJECT obj, char *text);
01752 void MObjectSetText(MOBJECT obj, const char *text);
01754 char *MObjectGetName(MOBJECT obj);
01756 void MObjectSetName(MOBJECT obj, const char *name);
01758 void *MObjectGetUserData(MOBJECT obj);
01760 void MObjectSetUserData(MOBJECT obj, void *ud);
01762 int  MObjectType(MOBJECT obj);
01764 MOBJECT MObjectParent(MOBJECT obj);
01766 void MObjectEnableOptions(MOBJECT obj, const char *name, CARD32 mask);
01768 void MObjectSaveOptions(MOBJECT obj);
01770 CARD32 MObjectGetEnabledOptions(MOBJECT obj);
01772 void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration);
01774 void MObjectSetLabelHelp(MOBJECT obj, const char *str, MOBJECT label);
01776 void MObjectChangePopupHelpText(MOBJECT obj, const char *str);
01778 void MObjectChangeLabelHelpText(MOBJECT obj, const char *str);
01779 
01783 MOBJECT MObjectGetVScrollBar(MOBJECT obj);
01784 
01788 MOBJECT MObjectGetHScrollBar(MOBJECT obj);
01789 
01791 
01796 
01817 void MObjectSetColor(MOBJECT obj, MTColor bgc, MTColor fgc);
01824 MTColor MObjectBackgroundColor(MOBJECT obj);
01826 MTColor MObjectForegroundColor(MOBJECT obj);
01828 void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b);
01830 void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b);
01848 void MObjectSetBackgroundColor(MOBJECT obj, MTColor bgc);
01849 
01859 void MObjectSetForegroundColor(MOBJECT obj, MTColor fgc);
01860 
01879 void MObjectSetBGColorFromParent(MOBJECT obj, int true_false, int percentage);
01880 
01894 void MObjectSetFGColorFromParent(MOBJECT obj, int true_false);
01896 MTFont  MObjectGetFont(MOBJECT obj);
01898 void MObjectSetFont(MOBJECT obj, MTFont font, int resize);
01900 void MObjectGetShadow(MOBJECT obj, int *type, int *in, int *out);
01902 void MObjectSetShadow(MOBJECT obj, int type, int in, int out);
01904 void MObjectSetTransparency(MOBJECT obj, CARD8 level);
01906 CARD8 MObjectGetTransparency(MOBJECT obj);
01908 void MObjectSetSolid(MOBJECT obj);
01910 void MObjectSetTransparent(MOBJECT obj);
01912 void MObjectSetBackgroundImage(MOBJECT obj, MIMAGE img, int mode);
01914 void MObjectSetBackgroundImageFile(MOBJECT obj, const char *fname, int mode);
01916 MIMAGE MObjectGetBackgroundImage(MOBJECT obj);
01918 void MObjectSetColorFromBackgroundImage(MOBJECT obj);
01920 void MObjectSetBGImageMaskByCMapIndex(MOBJECT obj, int id);
01922 void MObjectSetBGImageMaskByPixel(MOBJECT obj, int x, int y);
01924 void MObjectSetBGImageMaskByRGB(MOBJECT obj, int r, int g, int b);
01926 int MObjectUsesFGColorFromParent(MOBJECT obj);
01928 int MObjectUsesBGColorFromParent(MOBJECT obj, int *percentage_ret);
01929 
01931 
01936 
01938 int  MObjectGetWidth(MOBJECT obj);
01940 int  MObjectGetHeight(MOBJECT obj);
01942 int  MObjectGetCompositeWidth(MOBJECT obj);
01944 int  MObjectGetCompositeHeight(MOBJECT obj);
01946 int  MObjectGetX(MOBJECT obj);
01948 int  MObjectGetY(MOBJECT obj);
01950 void MObjectSetSize(MOBJECT obj, int w, int h);
01957 void MObjectSetMinSize(MOBJECT obj, int w, int h);
01959 void MObjectSetWidth(MOBJECT obj, int w);
01961 void MObjectSetHeight(MOBJECT obj, int h);
01963 void MObjectSetCompositeSize(MOBJECT obj, int w, int h);
01965 void MObjectSetCompositeWidth(MOBJECT obj, int w);
01967 void MObjectSetCompositeHeight(MOBJECT obj, int h);
01969 void MObjectSetPosition(MOBJECT obj, int x, int y);
01971 void MObjectSetX(MOBJECT obj, int x);
01973 void MObjectSetY(MOBJECT obj, int y);
01975 void MObjectSetAttachment(MOBJECT obj, int top, int bot, int left, int rig);
01977 void MObjectSetOffset(MOBJECT obj, int t_o, int b_o, int l_o, int r_o);
01979 void MObjectAlign(MOBJECT obj, int h_align, int v_align);
01980 
01982 
01987 
01989 void MObjectSetUnsensitive(MOBJECT obj);
01991 void MObjectSetSensitive(MOBJECT obj);
01993 void MObjectSetSensitivity(MOBJECT obj, int status);
01995 int MObjectGetSensitivity(MOBJECT obj);
01997 void MObjectSetUnselectable(MOBJECT obj);
01999 void MObjectSetSelectable(MOBJECT obj);
02001 void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h);
02003 void MObjectSetCursor(MOBJECT obj, MTCursor cursor);
02004 
02010 void MObjectSetAutoScrollWhenSelected(MOBJECT obj, int TrueFalse);
02011 
02013 
02018 
02020 void MObjectRedraw(MOBJECT obj);
02022 void MObjectMap(MOBJECT obj);
02024 void MObjectUnmap(MOBJECT obj);
02026 void MObjectResize(MOBJECT obj, int w, int h);
02028 void MObjectDestroy(MOBJECT obj);
02030 void MDispatchObjEvent(MOBJECT p, MEvent *pe);
02032 void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data);
02034 void MObjectAddDestroyCallback(MOBJECT obj, MGUI_CB cb, void *a_data);
02036 void MObjectRemoveEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *a_data);
02038 void MObjectRemoveDestroyCallback(MOBJECT obj, MGUI_CB cb, void *a_data);
02040 void MInsertObject(MOBJECT parent, MOBJECT obj, MOBJECT where, int resize);
02042 void MDeleteObject(MOBJECT obj, int resize);
02044 void MReparentObject(MOBJECT parent, MOBJECT obj, MOBJECT where);
02046 void MSelectObject(MOBJECT f);
02048 void MSelectNextBrother(MOBJECT f);
02050 void MSelectPreviousBrother(MOBJECT f);
02052 void MSelectNextCousin(MOBJECT p);
02054 void MSelectPreviousCousin(MOBJECT p);
02056 void MTopAttach(MOBJECT child, int att_type, int off, MOBJECT obj);
02058 void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj);
02060 void MRightAttach(MOBJECT child, int att_type, int off, MOBJECT obj);
02062 void MLeftAttach(MOBJECT child, int att_type, int off, MOBJECT obj);
02064 
02065 
02071 
02073 MOBJECT MCreatePixmapFromData(MOBJECT parent, MIMAGE data);
02075 MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname);
02077 void    MPixmapSetImage(MOBJECT pixmap, MIMAGE gi);
02079 void    MPixmapSetImageFile(MOBJECT pixmap, const char *fname);
02081 MIMAGE  MPixmapGetImage(MOBJECT pixmap);
02082 
02083 
02085 
02089 
02091 MOBJECT MCreateShell(const char *title, int flags);
02093 MOBJECT MObjectShell(MOBJECT obj);
02095 Window  MShellGetWindow(MOBJECT s);
02097 void    MShellDestroy(MOBJECT obj);
02099 void MShellSetTitle(MOBJECT obj, const char *title);
02101 void MShellGetTitle(MOBJECT obj, char *title);
02103 void MShellRealize(MOBJECT obj);
02105 void MShellRealizeXY(MOBJECT obj, int x, int y);
02107 void MShellRealizeXYWH(MOBJECT obj, int x, int y, int w, int h);
02109 void MShellUnrealize(MOBJECT obj);
02111 void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data);
02113 void MShellRaise(MOBJECT obj);
02115 void MShellConfigure(MOBJECT obj, int x, int y, int w, int h);
02116 
02118 
02119 
02123 
02125 MOBJECT MCreatePosForm(MOBJECT parent);
02127 MOBJECT MCreateRowForm(MOBJECT parent);
02129 MOBJECT MCreateColForm(MOBJECT parent);
02131 MOBJECT MCreatePagedPosForm(MOBJECT parent, int npage);
02133 MOBJECT MCreatePagedRowForm(MOBJECT parent, int npage);
02135 MOBJECT MCreatePagedColForm(MOBJECT parent, int npage);
02137 MOBJECT MCreatePagedPosFormExt(MOBJECT parent, int npage);
02139 MOBJECT MCreatePagedRowFormExt(MOBJECT parent, int npage);
02141 MOBJECT MCreatePagedColFormExt(MOBJECT parent, int npage);
02143 MOBJECT MCreateTabbedPosForm(MOBJECT parent, int npage, MTFont f);
02145 MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f);
02147 MOBJECT MCreateTabbedColForm(MOBJECT parent, int npage, MTFont f);
02149 MOBJECT MCreateScrolledPosForm(MOBJECT parent, int clip_w, int clip_h);
02151 MOBJECT MCreateScrolledRowForm(MOBJECT parent, int clip_w, int clip_h);
02153 MOBJECT MCreateScrolledColForm(MOBJECT parent, int clip_w, int clip_h);
02155 MOBJECT MCreateClippedPosForm(MOBJECT parent, int clip_w, int clip_h);
02157 MOBJECT MCreateClippedRowForm(MOBJECT parent, int clip_w, int clip_h);
02159 MOBJECT MCreateClippedColForm(MOBJECT parent, int clip_w, int clip_h);
02160 
02162 void    MFormSetSpacing(MOBJECT p, int offset);
02164 void    MFormSetChildSelectCallback(MOBJECT p, OBJ_VALUE_CB cb, void *data);
02166 void    MScrolledFormSetIncr(MOBJECT obj, int h_inc, int v_inc);
02168 MOBJECT MScrolledFormGetVScrollBar(MOBJECT obj);
02170 MOBJECT MScrolledFormGetHScrollBar(MOBJECT obj);
02172 void MScrolledFormSetSliderColor(MOBJECT p, MTColor color);
02174 void MScrolledFormSetSliderColorShift(MOBJECT p, int percentage);
02176 MOBJECT MGetSelectedObject(MOBJECT f);
02178 int     MSelectFirstChild(MOBJECT f);
02180 int     MSelectLastChild(MOBJECT f);
02182 MOBJECT MGetSelectedObject(MOBJECT f);
02184 void    MFormSetPrefAtt(MOBJECT p, int pref_att);
02186 void    MFormSetFocusWrap(MOBJECT f, int true_false);
02188 void    MFormSetFocusHighlight(MOBJECT f, int true_false);
02190 void    MFormFocusLink(MOBJECT obj1, MOBJECT obj2);
02192 void    MPagedFormSetActivePage(MOBJECT form, int page);
02194 int     MPagedFormGetActivePage(MOBJECT form);
02196 void    MPagedFormDisablePageKeys(MOBJECT form);
02198 void    MPagedFormEnablePageKeys(MOBJECT form);
02200 void    MPagedFormSetNPages(MOBJECT form, int n_pages);
02202 void    MPagedFormSetActivePageCallback(MOBJECT p, OBJ_VALUE_CB cb, void *data);
02204 void    MFormSetClipX(MOBJECT obj, int clip_x);
02206 void    MFormSetClipY(MOBJECT obj, int clip_y);
02208 int     MFormGetClipX(MOBJECT obj);
02210 int     MFormGetClipY(MOBJECT obj);
02212 void    MFormAddKeyCallback(MOBJECT shell, int key, OBJ_VALUE_CB cb, void *ad);
02214 MOBJECT MFormGetFirstChild(MOBJECT form);
02216 MOBJECT MFormGetNextChild(MOBJECT form);
02218 int     MFormGetNChildren(MOBJECT form);
02227 void MFormEnableSmartDrawing(MOBJECT form);
02234 void MFormDisableSmartDrawing(MOBJECT form);
02235 
02237 MOBJECT MCreateTableForm(MOBJECT parent, int n_cols);
02239 MOBJECT MCreateScrolledTableForm(MOBJECT parent, int n_cols,
02240         int clip_w, int clip_h, int head_rows, int head_cols);
02242 void MTableFormShowGrid(MOBJECT form);
02244 void MTableFormHideGrid(MOBJECT form);
02246 void MTableFormSetRowHeight(MOBJECT form, int row, int h);
02248 void MTableFormSetColWidth(MOBJECT form, int col, int w);
02250 void MTableFormSetColFont(MOBJECT form, int col, MTFont f);
02252 void MTableFormSetColAlign(MOBJECT form, int col, int al);
02254 void MTableFormSetRowAlign(MOBJECT form, int row, int al);
02256 void MTableFormSetColBackgroundRGB(MOBJECT form, int col, int r, int g, int b);
02258 void MTableFormSetColForegroundRGB(MOBJECT form, int col, int r, int g, int b);
02260 void MTableFormSetCellText(MOBJECT form, int x, int y, const char *text);
02262 void MTableFormGetCellText(MOBJECT form, int x, int y, char *text);
02264 void MTableFormSetCellFont(MOBJECT form, int x, int y, MTFont f);
02266 void MTableFormSetCellAlign(MOBJECT form, int x, int y, int h_al, int v_al);
02268 void MTableFormSetCellBackgroundRGB(MOBJECT form, int x, int y, int r, int g, int b);
02270 void MTableFormSetCellForegroundRGB(MOBJECT form, int x, int y, int r, int g, int b);
02272 MOBJECT MTableFormGetCellObject(MOBJECT form, int x, int y);
02274 void MTableFormSetNCol(MOBJECT form, int nc);
02276 int  MTableFormGetNCol(MOBJECT form);
02278 void MTableFormDeleteRow(MOBJECT form, int row);
02280 void MTableFormDeleteDataRows(MOBJECT form);
02282 void MTabbedFormSetTabText(MOBJECT form, int page, const char *buff);
02284 void MTabbedFormGetTabText(MOBJECT form, int page, char *buff);
02286 
02287 
02291 
02293 MOBJECT MCreateDrawArea(MOBJECT parent, int width, int height);
02295 void    MDrawAreaSetExposeCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad);
02297 void    MDrawAreaSetInputCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad);
02299 void    MDrawAreaSetResizeCallback(MOBJECT obj, DRAWAREA_PREF_CB cb, void *ad);
02300 
02302 
02306 
02308 MOBJECT MCreateFormattedText(MOBJECT par, const char *text, int clip_w, MTFont f);
02310 MOBJECT MCreateScrolledFormattedText(MOBJECT par, const char *text,
02311                                          int clip_w, int clip_h, MTFont f);
02313 void MFormattedTextSetMargin(MOBJECT obj, int w_m, int h_m);
02315 void MFormattedTextSetHSpacing(MOBJECT obj, int h_s);
02317 void MFormattedTextSetTabSize(MOBJECT obj, int ts);
02318 
02320 
02321 
02325 
02327 MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font);
02329 void    MLabelSetMargin(MOBJECT p, int wm, int hm);
02331 void    MLabelSetHSpacing(MOBJECT p, int hs);
02333 void    MLabelSetAlignment(MOBJECT p, int align);
02335 const char *MLabelValue(MOBJECT label);
02336 
02337 
02339 
02340 /* Generic Drawn BUTTON functions (work on Push/Toggle/Radio) */
02341 
02345 
02347 void MButtonSetTextVsImageAlignment(MOBJECT button, CARD8 align);
02349 void MButtonSetOnMouseOverForegroundColor(MOBJECT button, MTColor cc);
02351 void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b);
02353 MIMAGE  MDrawnButtonChangeNormalImage(MOBJECT button, MIMAGE new_img);
02355 MIMAGE  MDrawnButtonChangeArmedImage(MOBJECT button, MIMAGE new_img);
02357 MIMAGE  MDrawnButtonChangeUnsensitiveImage(MOBJECT button, MIMAGE new_img);
02359 MIMAGE  MDrawnButtonChangeNormalOnImage(MOBJECT button, MIMAGE new_img);
02361 MIMAGE  MDrawnButtonChangeArmedOnImage(MOBJECT button, MIMAGE new_img);
02363 MIMAGE  MDrawnButtonChangeUnsensitiveOnImage(MOBJECT button, MIMAGE new_img);
02365 void MButtonChangeImageFiles(MOBJECT obj, 
02366                                 const char *npf, const char *apf, const char *upf,
02367                                 const char *npfo, const char *apfo, const char *upfo);
02369 void MButtonSetShadowOnMouseOver(MOBJECT obj, int thick);
02371 void MButtonSetImageMaskByCMapIndex(MOBJECT obj, int id);
02373 void MButtonSetImageMaskByPixel(MOBJECT obj, int x, int y);
02375 void MButtonSetImageMaskByRGB(MOBJECT obj, int r, int g, int b);
02377 void MButtonUnsetOnMouseOverForeground(MOBJECT obj);
02379 void MButtonUnsetShadowOnMouseOver(MOBJECT obj);
02381 void MButtonSetAccelerator(MOBJECT button, int key);
02383 
02384 
02388 
02389 
02391 MOBJECT MCreateDrawnPButton(MOBJECT parent, MIMAGE pn, MIMAGE pa, MIMAGE pu);
02393 MOBJECT MCreateDrawnPButtonExt(MOBJECT parent,
02394                                    MIMAGE pn, MIMAGE pa, MIMAGE pu,
02395                                    MIMAGE pn_on, MIMAGE pa_on, MIMAGE pu_on);
02397 MOBJECT MCreateImagePButton(MOBJECT parent, const char *npf, const char *apf,
02398                                                         const char *upf);
02400 MOBJECT MCreateImagePButtonExt(MOBJECT parent,
02401                                 const char *npf, const char *apf, const char *upf,
02402                                 const char *non, const char *aon, const char *uon);
02404 MOBJECT MCreateDrawnTextPButton(MOBJECT parent, const char *text, MTFont font,
02405                                 MIMAGE pn, MIMAGE pa, MIMAGE pu);
02407 MOBJECT MCreateDrawnTextPButtonExt(MOBJECT parent, const char *text, MTFont font,
02408                                    MIMAGE pn, MIMAGE pa, MIMAGE pu,
02409                                    MIMAGE pn_on, MIMAGE pa_on, MIMAGE pu_on);
02411 MOBJECT MCreateImageTextPButton(MOBJECT parent, const char *text, MTFont font,
02412                                 const char *npf, const char *apf, const char *upf);
02414 MOBJECT MCreateImageTextPButtonExt(MOBJECT parent, const char *text, MTFont font,
02415                                 const char *npf, const char *apf, const char *upf,
02416                                 const char *non, const char *aon, const char *uon);
02418 MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font);
02420 void    MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data);
02422 void    MPButtonSetRepeatDelay(MOBJECT button, int first, int repeat);
02424 void    MPButtonSetMargin(MOBJECT p, int wm, int hm);
02426 void    MPButtonSetHSpacing(MOBJECT p, int hs);
02428 void    MPButtonSetAlignment(MOBJECT p, int align);
02430 void    MPButtonSetImage(MOBJECT obj, const char *npf, const char *apf, const char *upf);
02431 
02433 
02434 
02438 
02440 MOBJECT MCreateDrawnRButton(MOBJECT parent, MIMAGE np, MIMAGE ap, MIMAGE up);
02442 MOBJECT MCreateDrawnRButtonExt(MOBJECT parent,
02443                                    MIMAGE pn, MIMAGE pa, MIMAGE pu,
02444                                    MIMAGE pn_on, MIMAGE pa_on, MIMAGE pu_on);
02446 MOBJECT MCreateImageRButton(MOBJECT parent,
02447                                 const char *npf, const char *apf, const char *upf);
02449 MOBJECT MCreateImageRButtonExt(MOBJECT parent,
02450                                 const char *npf, const char *apf, const char *upf,
02451                                 const char *non, const char *aon, const char *uon);
02453 MOBJECT MCreateDrawnTextRButton(MOBJECT parent, const char *text, MTFont font,
02454                                 MIMAGE np, MIMAGE ap, MIMAGE up);
02456 MOBJECT MCreateDrawnTextRButtonExt(MOBJECT parent, const char *text, MTFont font,
02457                                    MIMAGE pn, MIMAGE pa, MIMAGE pu,
02458                                    MIMAGE pn_on, MIMAGE pa_on, MIMAGE pu_on);
02460 MOBJECT MCreateImageTextRButton(MOBJECT parent, const char *text, MTFont font,
02461                                 const char *npf, const char *apf, const char *upf);
02463 MOBJECT MCreateImageTextRButtonExt(MOBJECT parent, const char *text, MTFont font,
02464                                 const char *npf, const char *apf, const char *upf,
02465                                 const char *non, const char *aon, const char *uon);
02467 MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font);
02469 void    MRButtonActivate(MOBJECT o);
02471 void    MRButtonDeactivate(MOBJECT o);
02473 void    MRButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data);
02475 int     MRButtonGetActivationStatus(MOBJECT o);
02477 void    MRButtonSetImage(MOBJECT obj, const char *npf, const char *apf, const char *upf);
02478 
02480 
02481 
02485 
02487 MOBJECT MCreateDrawnTButton(MOBJECT parent, MIMAGE np, MIMAGE ap, MIMAGE up);
02489 MOBJECT MCreateDrawnTButtonExt(MOBJECT parent,
02490                                    MIMAGE pn, MIMAGE pa, MIMAGE pu,
02491                                    MIMAGE pn_on, MIMAGE pa_on, MIMAGE pu_on);
02493 MOBJECT MCreateImageTButton(MOBJECT parent,
02494                                 const char *npf, const char *apf, const char *upf);
02496 MOBJECT MCreateImageTButtonExt(MOBJECT parent,
02497                                 const char *npf, const char *apf, const char *upf,
02498                                 const char *non, const char *aon, const char *uon);
02500 MOBJECT MCreateDrawnTextTButton(MOBJECT parent, const char *text, MTFont font,
02501                                         MIMAGE np, MIMAGE ap, MIMAGE up);
02503 MOBJECT MCreateDrawnTextTButtonExt(MOBJECT parent, const char *text, MTFont font,
02504                                    MIMAGE pn, MIMAGE pa, MIMAGE pu,
02505                                    MIMAGE pn_on, MIMAGE pa_on, MIMAGE pu_on);
02507 MOBJECT MCreateImageTextTButton(MOBJECT parent, const char *text, MTFont font,
02508                                 const char *npf, const char *apf, const char *upf);
02510 MOBJECT MCreateImageTextTButtonExt(MOBJECT parent, const char *text, MTFont font,
02511                                 const char *npf, const char *apf, const char *upf,
02512                                 const char *non, const char *aon, const char *uon);
02514 MOBJECT MCreateTButton(MOBJECT parent, const char *text, MTFont font);
02516 void    MTButtonActivate(MOBJECT o);
02518 void    MTButtonDeactivate(MOBJECT o);
02520 void    MTButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data);
02522 void    MTButtonSetActivationStatus(MOBJECT o, int status);
02524 int     MTButtonGetActivationStatus(MOBJECT o);
02526 void    MTButtonSetImage(MOBJECT obj, const char *npf, const char *apf, const char *upf);
02527 
02529 
02530 
02534 
02536 MOBJECT MCreateStatusBar(MOBJECT parent, const char *text, int max, MTFont font);
02538 void    MStatusBarSetMax(MOBJECT p, int max);
02540 void    MStatusBarSetWidth(MOBJECT p, int width);
02542 void    MStatusBarSetPos(MOBJECT p, int pos);
02544 void    MStatusBarSetSliderColor(MOBJECT p, MTColor col);
02546 void    MStatusBarSetSliderRGB(MOBJECT p, int r, int g, int b);
02547 
02549 
02550 
02554 
02556 MOBJECT MCreateScrollBar(MOBJECT parent, int type, long n, long max);
02558 void    MScrollBarSetMax(MOBJECT p, long max);
02560 void    MScrollBarSetPos(MOBJECT p, long pos);
02562 void    MScrollBarSetN(MOBJECT p, long n);
02564 void    MScrollBarSetIncr(MOBJECT p, int incr);
02566 void    MScrollBarSetPosCallback(MOBJECT p, OBJ_VALUE_CB cb, void *data);
02568 void    MScrollBarSetValues(MOBJECT p, long max, long n, long pos);
02570 long    MScrollBarGetMax(MOBJECT p);
02572 long    MScrollBarGetPos(MOBJECT p);
02574 long    MScrollBarGetN(MOBJECT p);
02576 void MScrollBarSetSliderColor(MOBJECT p, MTColor color);
02578 void MScrollBarSetSliderColorShift(MOBJECT p, int percentage);
02579 
02581 
02582 
02586 
02588 MOBJECT MCreateSText(MOBJECT parent, const char *text, MTFont font,
02589                 int nrow, int ncol);
02591 MOBJECT MCreateSTextClip(MOBJECT parent, NEW_BLOCK_CB nb, void *nbd,
02592                 MTFont font, int nrow, int ncol, int xc, long xn);
02594 MOBJECT MCreateSFile(MOBJECT parent, const char *fname, MTFont font,
02595                 int nrow, int ncol);
02597 MOBJECT MCreateSList(MOBJECT parent, MTFont font, int row_len,
02598                 int nrow, int ncol);
02600 MOBJECT MCreateSListMultiSel(MOBJECT parent, MTFont font,
02601                 int row_len, int nrow, int ncol);
02603 MOBJECT MCreateSListClip(MOBJECT parent, NEW_BLOCK_CB nb, void *nbd,
02604                 ITEM_SEEK_CB is, void *isd, MTFont font,
02605                 int nrow, int ncol, int xc, long xn);
02607 MOBJECT MCreateSListSkip(MOBJECT parent, NEW_BLOCK_CB nb, void *nbd,
02608                 ITEM_SEEK_CB is, void *isd, MTFont font,
02609                 int nrow, int ncol, int xc);
02610 
02612 MOBJECT MCreateEditList(MOBJECT parent, MTFont font, EL_TEMPLATE *elt,
02613                 int ne, int nrow, int ncol);
02614 
02616 LIST_ACT *MSListGetFirstItem(MOBJECT p);
02618 LIST_ACT *MSListGetFirstSelectedItem(MOBJECT p);
02620 LIST_ACT *MSListGetNextItem(MOBJECT p);
02622 LIST_ACT *MSListGetNextSelectedItem(MOBJECT p);
02624 LIST_ACT *MSListGetFirstUnselectedItem(MOBJECT p);
02626 LIST_ACT *MSListGetNextUnselectedItem(MOBJECT p);
02628 long MSListGetNItem(MOBJECT p);
02630 void MSListSelectItem(MOBJECT p, const char *item);
02632 void MSListDeselectItem(MOBJECT p, const char *item);
02634 void MSListSelectElement(MOBJECT p, long n);
02636 void MSListDeselectElement(MOBJECT p, long n);
02638 void    MSListClear(MOBJECT p);
02640 int     MSListAddItem(MOBJECT p, const char *item, void *data);
02642 int     MSListDelItem(MOBJECT p, const char *item);
02644 int     MSListAddElement(MOBJECT p, long n, const char *item, void *data);
02646 int     MSListDelElement(MOBJECT p, long n);
02648 void    MSListChangeItem(MOBJECT p, const char *old, const char *new_item, void *u_data);
02650 void    MSListChangeElement(MOBJECT p, long n, const char *new_item, void *u_data);
02652 LIST_ACT *MSListGetItem(MOBJECT p, const char *item);
02654 LIST_ACT *MSListGetElement(MOBJECT p, long n);
02656 LIST_ACT *MSListGetSelected(MOBJECT p);
02658 void    MSListSetCallback(MOBJECT obj, LIST_ACT_CB cb, void *data);
02660 void    MSListSetPickCallback(MOBJECT obj, LIST_ACT_CB cb, void *value);
02662 void    MSListSetSelectionCallback(MOBJECT obj, LIST_SEL_CB cb, void *data);
02664 void    MSListSetSortCallback(MOBJECT obj, STRCMP_CB cb);
02666 void    MSListFreeze(MOBJECT obj);
02668 void    MSListThaw(MOBJECT obj);
02670 void    MSListEnableItemMotion(MOBJECT p);
02672 void    MSListDisableMultiSel(MOBJECT obj);
02674 void    MSListDisableItemMotion(MOBJECT obj);
02676 void    MSListSetHighLightColors(MOBJECT obj, MTColor bgc, MTColor fgc);
02677 
02679 int     MSListGetItemCheckStatus(MOBJECT p, const char *item);
02681 void    MSListSetItemCheckStatus(MOBJECT p, const char *item, int status);
02683 void    MSListReset(MOBJECT p);
02685 void    MSListEnableMultiSel(MOBJECT obj);
02687 MOBJECT MSListGetVScrollBar(MOBJECT p);
02689 MOBJECT MSListGetHScrollBar(MOBJECT p);
02691 void MSListSetHighLightFGColor(MOBJECT obj, MTColor fgc);
02693 void MSListSetSliderColorShift(MOBJECT p, int percentage);
02694 
02696 void    MSBLSetHead(MOBJECT obj, const char *text);
02698 void    MSBLGetHead(MOBJECT obj, char *buff);
02700 void    MSBLHeadSetColor(MOBJECT obj, MTColor bgc, MTColor fgc);
02702 void    MSBLHeadSetBackgroundImage(MOBJECT obj, MIMAGE img, int mode);
02703 
02705 void    MSTextSetString(MOBJECT p, const char *text);
02706 
02708 void    MSFileSetFile(MOBJECT obj, const char *fname);
02709 
02711 void    MSBLSetHMargin(MOBJECT p, int hm);
02712 
02714 int     MEditListAddItem(MOBJECT p, char **argv, void *u_data);
02716 void    MEditListChangeElement(MOBJECT p, long n, char **new_ele, void *data);
02718 void    MEditListDelElement(MOBJECT p, long n);
02720 void    MEditListSeekItem(MOBJECT p, char **argv, long *pos, void **u_data);
02722 void    MEditListGetItemField(MOBJECT el, const char *item, int ii, char *buff);
02724 int     MEditListAddItemFromEdits(MOBJECT p, void *u_data);
02726 void    MEditListGetEditText(MOBJECT p, int n, char *buff);
02728 void    MEditListSetEditText(MOBJECT p, int n, const char *buff);
02729 
02731 
02732 
02736 
02737 
02739 MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len,
02740                 MTFont font);
02742 MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font);
02744 MOBJECT MCreateClippedHiddenEdit(MOBJECT parent, const char *text, int len, int clip_len,
02745                 MTFont font, char shown_char);
02747 MOBJECT MCreateHiddenEdit(MOBJECT parent, const char *text, int len, MTFont font,
02748                 char shown_char);
02750 MOBJECT MCreateSpinEdit(MOBJECT parent, const char *text, short len, short clip_len, short font, OBJ_VALUE_CB cb, void *cd);
02752 void MEditSetMargin(MOBJECT edit, int w_margin, int h_margin);
02754 void MEditSetFilter(MOBJECT edit, int filter, const char *extra_chars);
02755 
02757 MOBJECT MCreateClippedMLEdit(MOBJECT parent, const char *text,
02758                 int width, int height, MTFont font);
02760 MOBJECT MCreateScrolledMLEdit(MOBJECT parent, const char *text,
02761                 int width, int height, MTFont font);
02762 
02764 void    MEditChangeText(MOBJECT edit, int off, int len, const char *new_t, int chg_len);
02766 void    MEditGetSubString(MOBJECT edit, int start, int end, char *str);
02768 int     MEditFindSubStringForward(MOBJECT edit, int off, const char *str, int icase);
02770 int     MEditFindSubStringBackward(MOBJECT edit, int off, const char *str, int icase);
02772 void    MEditSetSelection(MOBJECT edit, int start, int end);
02774 void    MEditGetSelection(MOBJECT edit, int *pstart, int *pend);
02776 void    MEditSetCursorPos(MOBJECT edit, int pos);
02778 int     MEditGetCursorPos(MOBJECT edit);
02780 void    MEditSetCursorXY(MOBJECT edit, int x, int y);
02782 void    MEditGetCursorXY(MOBJECT edit, int *px, int *py);
02784 void    MEditSetAutoIndent(MOBJECT edit, int on_off);
02786 void    MEditSetTabSize(MOBJECT edit, int size);
02788 void    MEditSetClipWindow(MOBJECT edit, int clip_w, int clip_h);
02790 void    MEditSetCursorPosCallback(MOBJECT edit, EDIT_CURS_CB cb, void *data);
02791 
02793 void MEditSetTextExt(MOBJECT edit, const char *text, int validated, int notify);
02795 void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data);
02797 void MEditSetValCallback(MOBJECT edit, EDIT_VAL_CB cb, void *data);
02799 void MEditSetValueChangeCallback(MOBJECT edit, EDIT_CHANGE_CB cb, void *data);
02801 void MEditSetNewValueCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data);
02803 void MEditSetHotKeyCallback(MOBJECT edit, int key, MGUI_CB cb, void *data);
02805 void MEditSetValidatedColors(MOBJECT edit, MTColor bg_color, MTColor fg_color);
02807 void MEditSetNotValidatedColors(MOBJECT edit, MTColor bgc, MTColor fgc);
02809 void MEditSetValidationStatus(MOBJECT edit, int validated);
02811 void MEditSetReplace(MOBJECT edit);
02813 int MIsEditValidated(MOBJECT p);
02815 int MEditGetFilter(MOBJECT p);
02817 const char *MEditValue(MOBJECT edit);
02819 void MEditHide(MOBJECT edit, char shown_char);
02821 void MEditUnhide(MOBJECT edit);
02823 void MSpinEditSetCallback(MOBJECT spinedit, OBJ_VALUE_CB cb, void *data);
02825 void MSpinEditSetSpinRange(MOBJECT edit, int smin, int smax);
02827 void    MEditDisableEditing(MOBJECT edit);
02829 void    MEditEnableEditing(MOBJECT edit);
02831 MOBJECT MScrolledEditGetVScrollBar(MOBJECT p);
02833 MOBJECT MScrolledEditGetHScrollBar(MOBJECT p);
02835 void MScrolledEditSetSliderColor(MOBJECT p, MTColor color);
02837 void MScrolledEditSetSliderColorShift(MOBJECT p, int percentage);
02838 
02840 
02841 
02845 
02846 
02848 MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len,
02849                 int nrow, MTFont font);
02851 MOBJECT MOptionEditGetList(MOBJECT ce);
02853 void    MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data);
02854 
02856 
02857 
02861 
02863 MOBJECT MCreateMenuBar(MOBJECT parent, MTFont font);
02865 MOBJECT MCreateMenu(MOBJECT menu, const char *text);
02867 MOBJECT MCreateSubMenu(MENU_ITEM item);
02869 MOBJECT MCreatePopupMenu(MTFont font);
02871 void MDestroyMenu(MOBJECT menu);
02873 MENU_ITEM MMenuAddItemObsolete(MOBJECT pd, const char *item, MGUI_CB cb, void *ad);
02875 MENU_ITEM MMenuAddItem(MOBJECT pd, const char *item, MENU_ITEM_CB cb, void *ad);
02877 MENU_ITEM MMenuAddRadioItem(MOBJECT pd, const char *item, MENU_ITEM_CB cb, void *ad);
02879 MENU_ITEM MMenuAddToggleItem(MOBJECT pd, const char *item, MENU_ITEM_CB cb, void *ad);
02881 MENU_ITEM MMenuAddSeparator(MOBJECT pd);
02883 void MPopupMenu(MOBJECT pm, int x, int y);
02885 void MMenuSetTitleText(MOBJECT pd, const char *text);
02887 void MMenuItemSetText(MENU_ITEM item, const char *text);
02889 void MMenuItemSetAccel(MENU_ITEM item, int acc, const char *at);
02891 void MMenuItemSetSensitive(MENU_ITEM item);
02893 void MMenuItemSetUnsensitive(MENU_ITEM item);
02895 void MMenuItemSetSelectCB(MOBJECT p, MGUI_CB cb, void *ad);
02897 void MMenuBarSetAcc(MOBJECT menu, int acc);
02899 const char *MMenuItemGetText(MENU_ITEM item);
02901 const char *MMenuGetTitleText(MOBJECT obj);
02903 int     MMenuItemSetCheckStatus(MENU_ITEM item, int TrueFalse);
02905 int     MMenuItemGetCheckStatus(MENU_ITEM item);
02907 int     MMenuItemToggleCheckStatus(MENU_ITEM item);
02909 MOBJECT MMenuItemGetMenu(MENU_ITEM item);
02911 void MMenuSetHighLightColors(MOBJECT obj, MTColor bgc, MTColor fgc);
02913 void    MMenuBarSetHighLightColors(MOBJECT obj, MTColor bgc, MTColor fgc);
02915 void MMenuBarSetHighLightFGColor(MOBJECT obj, MTColor fgc);
02917 void MMenuSetHighLightFGColor(MOBJECT obj, MTColor fgc);
02918 
02920 
02921 /* MTREE */
02922 
02930 
02931 
02947 MOBJECT MCreateTree(MOBJECT parent, MTFont font, int width, int height, int n_types);
02948 
02967 MTNODE MTreeCreateNode(MOBJECT tree, MTNODE parent, CARD16 type, CARD16 flags,
02968                                            const char *text, void *ud);
02969 
02980 void MTreeDestroyNode(MTNODE node, int notify);
02981 
02992 void MTreeDestroyNodeContainee(MTNODE node, int notify);
02993 
03002 void MTreeOpenNode(MTNODE node, int notify);
03003 
03012 void MTreeCloseNode(MTNODE node, int notify);
03013 
03022 void MTreeSelectNode(MTNODE node, int notify);
03023 
03035 void MTreeSetOpenCallback(MOBJECT tree, MTREE_NODE_CB cb, void *ud);
03036 
03048 void MTreeSetCloseCallback(MOBJECT tree, MTREE_NODE_CB cb, void *ud);
03049 
03061 void MTreeSetSelectCallback(MOBJECT tree, MTREE_NODE_CB cb, void *ud);
03062 
03074 void MTreeSetDestroyCallback(MOBJECT tree, MTREE_NODE_CB cb, void *ud);
03075 
03094 void MTreeSetImagesByName(MOBJECT tree, int type, const char *norm, const char *open, const char *sel);
03095 
03114 void MTreeSetImagesByData(MOBJECT tree, int type, MIMAGE norm, MIMAGE open, MIMAGE sel);
03115 
03116 
03127 void MTreeSetHighLightColors(MOBJECT tree, MTColor bgc, MTColor fgc);
03128 
03137 void MTreeSetHighLightFGColor(MOBJECT tree, MTColor fgc);
03138 
03147 void MTreeSetLineColor(MOBJECT tree, MTColor color);
03148 
03156 MOBJECT MTreeGetVScrollBar(MOBJECT tree);
03157 
03165 MOBJECT MTreeGetHScrollBar(MOBJECT tree);
03166 
03176 void MTreeSetSliderColor(MOBJECT tree, MTColor color);
03177 
03188 void MTreeSetSliderColorShift(MOBJECT tree, int percentage);
03189 
03190 
03198 MTNODE MTreeGetSelectedNode(MOBJECT tree);
03199 
03207 MTNODE MTreeGetFirstNode(MOBJECT tree);
03208 
03209 
03217 MTNODE MTreeNodeGetNext(MTNODE node);
03218 
03226 MTNODE MTreeNodeGetFirstChild(MTNODE node);
03227 
03234 MTNODE MTreeNodeGetParent(MTNODE node);
03235 
03249 char *MTreeNodeGetPath(MTNODE node, char separator, char *buff);
03250 
03267 void MTreeNodeSetImages(MTNODE node, MIMAGE norm, MIMAGE open, MIMAGE sel);
03268 
03278 void MTreeNodeSetText(MTNODE node, const char *text);
03279 
03291 char *MTreeNodeGetText(MTNODE node, char *text);
03292 
03305 void MTreeNodeSetUserData(MTNODE node, void *ud);
03306 
03314 void *MTreeNodeGetUserData(MTNODE node);
03315 
03322 MOBJECT MTreeNodeGetMTree(MTNODE node);
03323 
03330 CARD16 MTreeNodeGetType(MTNODE node);
03331 
03344 void MTreeNodeSetOpenCallback(MTNODE node, MTREE_NODE_CB cb, void *ud);
03345 
03358 void MTreeNodeSetCloseCallback(MTNODE node, MTREE_NODE_CB cb, void *ud);
03359 
03372 void MTreeNodeSetSelectCallback(MTNODE node, MTREE_NODE_CB cb, void *ud);
03373 
03386 void MTreeNodeSetDestroyCallback(MTNODE node, MTREE_NODE_CB cb, void *ud);
03387 
03389 
03393 
03406 MOBJECT MCreateSplitter(MOBJECT parent);
03407 
03409 
03410 
03414 
03415 
03417 TIMEOUT_ID MAddTimeout(CARD32 tmout, TIMEOUT_CB cb, void *ud);
03419 void MRemoveTimeout(TIMEOUT_ID id);
03421 void MCallAllTimeoutCallbacks(void);
03423 void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud);
03425 void MClearTimeout(TIMEOUT_ID *pid);
03427 void MCallExpiredTimeoutCallbacks(void);
03428 
03430 
03431 /*
03432  *  Graphic printing currently works only under Windows
03433  */
03434 
03435 #ifdef WIN_MGUI
03436 
03440 
03442 DOC_ID MOpenPrintDoc(char *doc_name, int open_dialog, int orientation, MPAGE_OPTIONS *pages);
03444 void MClosePrintDoc(DOC_ID id);
03446 void MPrintDocNextPage(DOC_ID id);
03448 void MPrintObject(MOBJECT obj, DOC_ID id, MPRINT_OPTIONS *po);
03450 void MPrintImage(MIMAGE mpm, int full);
03452 int MPrintSetup(int orientation, int *xres, int *yres, int *pwidth, int *pheight, int *nplanes);
03453 
03455 
03456 #endif /* WIN_MGUI */
03457 
03458 #ifdef __cplusplus
03459 }
03460 #endif
03461 
03462 #endif

Generated on Sun Jun 29 13:03:06 2003 for MGui API by doxygen1.3-rc2