00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _MGUIPP_H
00014 #define _MGUIPP_H
00015
00016 #include "mgui.h"
00017
00025 class CmMGUI {
00026 protected:
00037 virtual inline void beep(void);
00048 int getKeyboardState(void);
00059 const char *getSysDir(void);
00067 const char *getApplicationName(void);
00077 int paletteMode(void);
00083 int getScreenWidth(void);
00089 int getScreenHeight(void);
00098 int getNPlanes(void);
00107 long getNColors(void);
00116 MTColor getBlackColor(void);
00125 MTColor getWhiteColor(void);
00126
00142 void enableCustomizing(void);
00166 char *getStringOption(const char *obj_name, const char *opt_name);
00181 char *getTextOption(const char *obj_name);
00208 int getIntOption(const char *obj_name, const char *opt_name, int *ret);
00240 int getFontOption(const char *obj_name, MTFont *ret);
00264 int getBGColorOption(const char *obj_name, int *pr, int *pg, int *pb);
00288 int getFGColorOption(const char *obj_name, int *pr, int *pg, int *pb);
00313 int getShadowOption(const char *obj_name, int *shadow, int *i_t, int *o_t);
00336 void setStringOption(const char *obj_name, const char *opt_name, const char *text);
00354 void setTextOption(const char *obj_name, const char *text);
00376 void setIntOption(const char *obj_name, const char *opt_name, int val);
00403 void setFontOption(const char *obj_name, MTFont font);
00424 void setBGColorOption(const char *obj_name, int r, int g, int b);
00445 void setFGColorOption(const char *obj_name, int r, int g, int b);
00467 void setShadowOption(const char *obj_name, int shadow, int in_t, int out_t);
00485 void saveOptions(void);
00486
00515 void logInit(int level, int nr, int nvr, int nc, int nvc, const char *fname);
00530 void log(int level, const char *fmt, ...);
00552 void maskedLog(int level, CARD32 mask, const char *fmt, ...);
00563 void logSetLevel(int level);
00575 void logSetMask(CARD32 mask);
00583 CARD32 logGetMask(void);
00597 void logSetMaskBits(CARD32 mask);
00612 void logResetMaskBits(CARD32 mask);
00623 void setTraceFileName(const char *fname);
00625 void logSetTimeFormat(const char *strftime_format);
00627 void traceSetTimeFormat(const char *strftime_format);
00644 void trace(const char *fmt,...);
00663 void getDefaultBackgroundRGB(int *pr, int *pg, int *pb);
00682 void setDefaultBackgroundRGB(int r, int g, int b);
00701 void getDefaultForegroundRGB(int *pr, int *pg, int *pb);
00720 void setDefaultForegroundRGB(int r, int g, int b);
00732 int textCharX(const char *text, MTFont font, int i);
00740 int textHeight(const char *text, MTFont font);
00748 int charHeight(char ch, MTFont font);
00756 int textWidth(const char *text, MTFont font);
00764 int textNWidth(const char *text, MTFont font, int n);
00772 int charWidth(char ch, MTFont font);
00793 int spoolFile(const char *fname);
00815 int spoolTempFile(const char *fname);
00831 void mainLoop(void);
00849 void loopWhileFlag(int *pflag, int value);
00865 void loopWhileEvents(int discard);
00879 void nextEvent(MEvent *pe, int wait);
00889 void processEvent(MEvent *pe);
00913 int messageDialog(const char *title, const char *msg, const char *btn1,
00914 const char *btn2, ...);
00939 int inputPrompt(const char *title, const char *msg, char *text, int len,
00940 const char *ok_btn, const char *canc_btn);
00969 char *textPrompt(const char *title, const char *msg, const char *text,
00970 int w, int h, const char *ok_btn, const char *canc_btn);
00998 int fileSelection(const char *title, char *filter, char *fname,
00999 char *dname, int change_cur_dir);
01027 int fileBrowse(const char *title, char *filter, char *fname,
01028 char *dname, int change_cur_dir);
01041 inline const char *getCurrentDirectory(void);
01056 void setInputPromptRGB(int r, int g, int b);
01058 inline void setInputPromptFgRGB(int r, int g, int b);
01060 inline void setInputPromptFonts(MTFont text_font, MTFont edit_font, MTFont buttons_font);
01075 void setMessageDialogRGB(int r, int g, int b);
01090 void setFileSelectionRGB(int r, int g, int b);
01092 inline void setMessageDialogFgRGB(int r, int g, int b);
01094 inline void setMessageDialogFonts(MTFont text_font, MTFont buttons_font);
01109 void getInputPromptRGB(int *pr, int *pg, int *pb);
01111 inline void getInputPromptFgRGB(int *pr, int *pg, int *pb);
01113 inline void getInputPromptFonts(MTFont *text_font, MTFont *edit_font, MTFont *buttons_font);
01128 void getMessageDialogRGB(int *pr, int *pg, int *pb);
01130 inline void getMessageDialogFgRGB(int *pr, int *pg, int *pb);
01132 inline void getMessageDialogFonts(MTFont *text_font, MTFont *buttons_font);
01147 void getFileSelectionRGB(int *pr, int *pg, int *pb);
01174 void setFileSelectionTextStrings(
01175 char *file_list, char *dir_list, char *drive_list, char *filter,
01176 char *filename, char *curr_dir, char *ok_button, char *close_button);
01177 };
01178
01179
01180 class CmMenuItem;
01181 class CmTreeNode;
01182 class CmTimeout;
01183 class CmSocketHandler;
01184
01194 typedef class CmMGUI CmCallback;
01195
01199
01201 typedef void (CmCallback::*VOID_CB)(void);
01203 typedef void (CmCallback::*EVENT_CB)(MEvent *);
01205 typedef void (CmCallback::*LONG_CB)(long);
01207 typedef void (CmCallback::*INT_CB)(int);
01209 typedef void (CmCallback::*MENUITEM_CB)(int);
01211 typedef void (CmCallback::*ITEMSEL_CB)(CmMenuItem *);
01213 typedef void (CmCallback::*STRING_CB)(char *);
01215 typedef void (CmCallback::*NEWBLOCK_CB)(SBL_NEW_BLOCK *);
01217 typedef void (CmCallback::*ITEMSEEK_CB)(SBL_ITEM_SEEK *);
01219 typedef void (CmCallback::*EDITVAL_CB)(EDIT_VAL *);
01221 typedef void (CmCallback::*EDITCURS_CB)(EDIT_CURS *);
01223 typedef void (CmCallback::*EDITCHANGE_CB)(EDIT_CHANGE *);
01225 typedef void (CmCallback::*LISTACT_CB)(LIST_ACT *);
01227 typedef void (CmCallback::*LISTSEL_CB)(LIST_SEL *);
01229 typedef void (CmCallback::*DRAWAREAPREF_CB)(DRAWAREA_PREF *);
01231 typedef void (CmCallback::*SOCKETPP_CB)(unsigned);
01233 typedef void (CmCallback::*SOCKETPP2_CB)(CmSocketHandler *, unsigned);
01235 typedef void (CmCallback::*TIMEOUTPP2_CB)(CmTimeout *);
01237 typedef void (CmCallback::*MTREENODE_CB)(CmTreeNode *);
01239
01250 class CmAppl : public CmMGUI {
01251 friend void MGUIMain(int argc, char **argv);
01252 static CmAppl *app_inst;
01253 protected:
01254 CmAppl(void);
01255 public:
01260 virtual void start(int argc, char **argv)=0;
01268 static void end(int code);
01269 };
01270
01286 class CmTimeout : public CmMGUI {
01287 friend void _TimeoutCB_(TIMEOUT_ID id, void *ud);
01288 TIMEOUT_ID tid;
01289 CARD32 msec;
01290 int continuous;
01291 int stopped;
01292 VOID_CB callback;
01293 CmCallback *owner;
01294
01295 public:
01296 virtual ~CmTimeout(void);
01310 CmTimeout(CmCallback *owner, VOID_CB cb, CARD32 msec, int continuous=False);
01316 void start(CARD32 msec);
01323 void start(void);
01327 void stop(void);
01328 };
01329
01334 class CmSocketHandler : public CmMGUI {
01335 friend void _SocketCB_(int s, unsigned events, void *ud);
01336 int sid;
01337 SOCKETPP_CB callback;
01338 SOCKETPP2_CB callback2;
01339 CmCallback *owner;
01340
01341 public:
01342 CmSocketHandler(int s, CmCallback *own, SOCKETPP_CB cb, unsigned events);
01343 CmSocketHandler(int s, CmCallback *own, SOCKETPP2_CB cb, unsigned events);
01344 virtual ~CmSocketHandler(void);
01345 void setEventsMask(unsigned events);
01346 unsigned getEventsMask(void);
01347 int getSocketId(void) { return sid; }
01348 };
01349
01350
01355 class CmColor {
01356 protected:
01357 MTColor id;
01358 public:
01360 CmColor(MTColor cc=0) { id = cc;}
01362 operator MTColor() { return id; }
01364 void getRGB(int *r, int *g, int *b);
01365 };
01366
01371 class CmSharedColor : public CmColor {
01372 public:
01373 virtual ~CmSharedColor(void);
01375 CmSharedColor(unsigned r, unsigned g, unsigned b);
01380 CmSharedColor(CmColor *c, int shift=100);
01381 };
01382
01387 class CmRWColor : public CmColor {
01388 public:
01389 virtual ~CmRWColor(void);
01391 CmRWColor(unsigned r, unsigned g, unsigned b);
01393 void setRGB(int r, int g, int b);
01394 };
01395
01413 class CmImage : public MIMAGE_DESCR {
01414 protected:
01415 void allocImage(int imgw, int imgh, int np);
01416 public:
01417 virtual ~CmImage(void);
01423 static inline void addDefaultTypeGIF(void);
01430 static inline void addDefaultTypeTIFF(void);
01437 static inline void addDefaultTypeJPEG(void);
01444 static inline void addDefaultTypePNG(void);
01469 static inline void addPath(const char *path);
01477 static inline void removePath(const char *path);
01494 CmImage(const char *fname);
01506 CmImage(int imgw, int imgh, int np);
01507
01512 void install(void);
01518 void uninstall(void);
01520 int getWidth(void) { return img_w; }
01522 int getHeight(void) { return img_h; }
01527 int getNColors(void) { return ncolors; }
01529 int getNPlanes(void) { return nplanes; }
01547 void getPixelRGB(int x, int y, int *pr, int *pg, int *pb);
01564 void setPixelRGB(int x, int y, int r, int g, int b);
01571 int getPixelIndex(int x, int y);
01577 void setPixelIndex(int x, int y, int i);
01593 void getCMapEntry(int i, int *pr, int *pg, int *pb);
01606 void setCMapEntry(int i, int r, int g, int b);
01614 void merge(CmImage *src, int xo, int yo, int transparent);
01621 void setMask(CmImage *mask);
01623 inline void setMaskByCMapIndex(int id);
01625 inline void setMaskByPixel(int x, int y);
01627 inline void setMaskByRGB(int r, int g, int b);
01629 inline void addAlphaChannel(void);
01631 inline int getPixelAlpha(int x, int y);
01633 inline void setPixelAlpha(int x, int y, CARD8 alpha);
01635 CmImage *clone(void);
01646 CmImage *createImageMaskByCMapIndex(int index);
01658 CmImage *createImageMaskByRGB(int r, int g, int b);
01661 CmImage *createImageMaskByPixel(int x, int y);
01664 void computeBackgroundRGB(int *pr, int *pg, int *pb);
01665 };
01666
01670 class CmCursor {
01671 MTCursor cur;
01672 public:
01673 operator MTCursor() { return cur;}
01675 CmCursor(CmImage *bits, int xs, int ys) {cur=MCreateCursor(bits,xs,ys);}
01676 };
01677
01681 class CmFont {
01682 MTFont font;
01683 int loaded;
01684 public:
01685 operator MTFont() { return font;}
01687 CmFont(int ff=DEFAULT_FONT)
01688 { font = ff; loaded=0;}
01690 CmFont(const char *family, int h, int bold=0, int italic=0);
01691 ~CmFont();
01693 static const char *getFirstFamily(void);
01695 static const char *getNextFamily(void);
01696 };
01697
01698 class CmShell;
01699 class CmForm;
01700 class CmContainer;
01701 class CmObject;
01702
01707 class CmObject : public CmMGUI {
01708
01709 friend class CmOptionEdit;
01710 friend void _ObjectDestroyCB_(MOBJECT p, void *a, void *ud);
01711 friend void _EventPreProcessCB_(MOBJECT p, MEvent *pe, void *ud);
01712
01713 void *user_data;
01714
01715 protected:
01716 MOBJECT obj;
01717 EVENT_CB eventCB;
01718
01719 void reserved(void);
01720 virtual ~CmObject(void);
01721 public:
01722 operator MOBJECT() {return obj; };
01723
01725 inline void drawText(int x, int y, int w, int h, const char *text,
01726 MTFont font, CmColor *fgc, int alignment);
01728 inline void drawNText(int x, int y, int w, int h, const char *text,
01729 MTFont font, CmColor *fgc, int alignment, int n);
01731 inline void drawBGText(int x, int y, int w, int h, const char *text,
01732 MTFont font, CmColor *bgc, CmColor *fgc, int alignment);
01734 inline void drawBGNText(int x, int y, int w, int h, const char *text,
01735 MTFont font, CmColor *bgc, CmColor *fgc, int alignment, int n);
01737 inline void drawShadowedText(int x, int y, int w, int h, const char *text,
01738 MTFont font, int sh, CmColor *fg1, CmColor *fg2, int alignment);
01740 inline void drawShadowedNText(int x, int y, int w, int h, const char *text,
01741 MTFont font, int sh, CmColor *fg1, CmColor *fg2, int alignment, int n);
01743 inline void drawPoint(int x, int y, CmColor *col);
01745 inline void drawLine(int x1, int y1, int x2, int y2, CmColor *col);
01747 inline void drawPolyline(MPOINT *points, int n, CmColor *col);
01749 inline void drawFilledPolyline(MPOINT *points, int n, CmColor *col);
01751 inline void drawBox(int x, int y, int w, int h, CmColor *bgc);
01753 inline void drawFilledBox(int x, int y, int w, int h, CmColor *bgc);
01755 inline void drawCircle(int x, int y, int r, CmColor *col);
01757 inline void drawFilledCircle(int x, int y, int r, CmColor *col);
01759 inline void drawArc(int x, int y, int r, int a1, int a2, CmColor *col);
01761 inline void drawFilledArc(int x, int y, int r, int a1, int a2, CmColor *c);
01763 inline void drawImage(CmImage *gi, int img_x, int img_y, int w, int h,
01764 int x, int y);
01766 inline void drawWindow(void);
01768 inline void drawShadow(void);
01770 inline void drawSubShadow(int x, int y, int w, int h, CmColor *tsc, CmColor *bsc, int thick);
01772 inline void drawBorder(int x, int y, int w, int h, CmColor *col, int thick);
01773
01775 inline void drawXorLine(int x1, int y1, int x2, int y2);
01777 inline void drawXorBox(int x, int y, int w, int h);
01778
01780 inline void setSensitive(void);
01782 inline void setUnsensitive(void);
01784 inline void setSensitivity(int true_false);
01786 inline void setSelectable(void);
01788 inline void setUnselectable(void);
01790 inline void setAutoScrollWhenSelected(int TrueFalse);
01808 inline void setBackgroundColor(CmColor *bgc);
01809
01819 inline void setForegroundColor(CmColor *fgc);
01820
01841 inline void setColor(CmColor *bgc, CmColor *fgc);
01842
01861 inline void setBGColorFromParent(int true_false, int percentage);
01862
01876 inline void setFGColorFromParent(int true_false);
01878 inline void setBackgroundRGB(unsigned r, unsigned g, unsigned b);
01880 inline void setForegroundRGB(unsigned r, unsigned g, unsigned b);
01882 inline void setText(const char *text);
01884 inline void setName(const char *name);
01886 inline void setFont(MTFont font, int resize_obj=0);
01888 inline void setShadow(int type, int in=0, int out=0);
01890 inline void setResize(int resize_w, int resize_h);
01908 inline void setSize(int width, int height);
01914 inline void setMinSize(int width, int height);
01931 inline void setWidth(int width);
01948 inline void setHeight(int height);
01968 inline void setCompositeSize(int width, int height);
01986 inline void setCompositeWidth(int width);
02004 inline void setCompositeHeight(int height);
02020 inline void setPosition(int x, int y);
02032 inline void setX(int x);
02044 inline void setY(int y);
02046 inline void setBackgroundImage(CmImage *gi, int mode);
02048 inline void setBackgroundImageFile(const char *fname, int mode);
02050 inline void setColorFromBackgroundImage(void);
02052 inline void setBGImageMaskByCMapIndex(int id);
02054 inline void setBGImageMaskByPixel(int x, int y);
02056 inline void setBGImageMaskByRGB(int r, int g, int b);
02058 inline void setSolid(void);
02060 inline void setTransparent(void);
02062 inline void setTransparency(CARD8 level);
02064 inline CARD8 getTransparency(void);
02066 inline void setAttachment(int top, int bottom, int left, int right);
02068 inline void setOffset(int t_off, int b_off, int l_off, int r_off);
02070 inline void setCursor(MTCursor cursor);
02072 inline void setPopupHelp(const char *str, int delay, int duration);
02074 inline void setLabelHelp(const char *str, CmObject *label);
02076 inline void setUserData(void *ud) { user_data = ud; };
02078 inline void changePopupHelpText(const char *str);
02080 inline void changeLabelHelpText(const char *str);
02082 inline void topAttach(int att_type, int off, CmObject *obj);
02084 inline void bottomAttach(int att_type, int off, CmObject *obj);
02086 inline void leftAttach(int att_type, int off, CmObject *obj);
02088 inline void rightAttach(int att_type, int off, CmObject *obj);
02090 inline void align(int h_align, int v_align);
02091
02093 inline void getText(char *text);
02095 inline const char *getName(void);
02097 inline void *getUserData(void) { return user_data; };
02099 inline MTFont getFont(void);
02101 inline void getShadow(int *type, int *in, int *out);
02103 inline int isSensitive(void);
02105 inline int isSelectable(void);
02107 inline int isMapped(void);
02109 inline int getWidth(void);
02111 inline int getHeight(void);
02113 inline int getCompositeWidth(void);
02115 inline int getCompositeHeight(void);
02117 inline int getX(void);
02119 inline int getY(void);
02121 inline int usesFGColorFromParent(void);
02123 inline int usesBGColorFromParent(int *percentage_ret);
02130 CmColor *getBackgroundColor(void);
02131
02133 CmColor *getForegroundColor(void);
02134
02136 CmContainer *getParent(void);
02138 CmShell *getShell(void);
02140 inline CmImage *getBackgroundImage(void);
02141
02143 inline void resize(int w, int h);
02145 inline void redraw(void);
02147 inline void select(void);
02149 inline void map(void);
02151 inline void unmap(void);
02153 inline void enableOptions(const char *name, CARD32 mask);
02155 inline void saveOptions(void);
02157 inline void unlink(int resize_obj);
02159 inline void focusLink(CmObject *obj_to_link);
02161 void reparent(CmContainer *new_parent, CmObject *where);
02163 void link(CmContainer *parent, CmObject *where, int resize_parent);
02165 inline void sendEvent(MEvent *pe);
02167 void setEventCallback(CmCallback *pp, EVENT_CB ff, CARD32 mask);
02168 #ifdef WIN_MGUI
02169
02170 inline void print(DOC_ID, MPRINT_OPTIONS *);
02171 #endif
02172 };
02173
02178 class CmContainer : public CmObject {
02179 public:
02181 virtual void addChild(CmObject *child)=0;
02182
02184 CmObject *getSelectedObject(void);
02186 CmObject *getFirstChild(void);
02188 CmObject *getNextChild(void);
02190 int getNChildren(void);
02199 inline void enableSmartDrawing(void);
02206 inline void disableSmartDrawing(void);
02208 void addKeyCallback(CmCallback *, int, MVALUE_CB);
02209 };
02210
02215 class CmShell : public CmContainer {
02216 friend void _WMCloseCB_(MOBJECT p, void *a, void *ud);
02217 VOID_CB closeCB;
02218 public:
02219 ~CmShell(void);
02221 CmShell(const char *text=0, int flags=0);
02222
02224 inline Window getWindow(void);
02225
02227 inline void realize(void);
02229 inline void realize(int x, int y);
02231 inline void realize(int x, int y, int w, int h);
02233 inline void unrealize(void);
02235 inline void raise(void);
02237 void addChild(CmObject *child);
02238
02240 void setWMCloseCallback(CmCallback *pp, VOID_CB ff);
02241 };
02242
02247 class CmForm : public CmContainer {
02248 protected:
02249 CmForm(void){};
02250 public:
02252 inline void setSpacing(int offset);
02254 inline void setFocusWrap(int true_false);
02256 inline void setFocusHighlight(int true_false);
02258 inline void selectFirstChild(void);
02260 inline void selectLastChild(void);
02262 void addChild(CmObject *object);
02264 void setChildSelectCallback(CmCallback *, INT_CB);
02265 };
02266
02271 class CmPosForm : public CmForm {
02272 public:
02274 CmPosForm(CmContainer *parent);
02275 };
02276
02281 class CmRowForm : public CmForm {
02282 public:
02284 CmRowForm(CmContainer *parent);
02285 };
02286
02290 class CmColForm : public CmForm {
02291 public:
02293 CmColForm(CmContainer *parent);
02294 };
02295
02299 class CmAbsTableForm : public CmForm {
02300 public:
02302 inline void showGrid(void);
02304 inline void hideGrid(void);
02306 inline void setRowHeight(int row, int height);
02308 inline void setColWidth(int col, int width);
02310 inline void setColFont(int col, MTFont f);
02312 inline void setColAlign(int col, int al);
02314 inline void setRowAlign(int row, int al);
02316 inline void setColBackgroundRGB(int col, int r, int g, int b);
02318 inline void setColForegroundRGB(int col, int r, int g, int b);
02320 inline void setCellText(int x, int y, const char *text);
02322 inline void getCellText(int x, int y, char *text);
02324 inline void setCellFont(int x, int y, MTFont f);
02326 inline void setCellAlign(int x, int y, int h_al, int v_al);
02328 inline void setCellBackgroundRGB(int x, int y, int r, int g, int b);
02330 inline void setCellForegroundRGB(int x, int y, int r, int g, int b);
02332 CmObject *getCellObject(int x, int y);
02334 inline void deleteRow(int row);
02336 inline void deleteDataRows(void);
02337 };
02338
02342 class CmTableForm : public CmAbsTableForm {
02343 public:
02344 CmTableForm(CmContainer *parent, int n_columns);
02345 };
02346
02347
02351 class CmScrolledTableForm : public CmAbsTableForm {
02352 public:
02354 CmScrolledTableForm(CmContainer *parent, int n_columns,
02355 int clip_w, int clip_h, int head_rows=0, int head_cols=0);
02356 };
02357
02361 class CmAbsPagedForm : public CmForm {
02362 friend void _NewPageCB_(MOBJECT p, MVALUE a, void *ud);
02363 INT_CB newPageCB;
02364 public:
02366 inline void setActivePage(int page);
02368 inline int getActivePage(void);
02370 inline void setNPages(int npages);
02372 inline void disablePageKeys(void);
02374 inline void enablePageKeys(void);
02376 void setActivePageCallback(CmCallback *, INT_CB);
02377 };
02378
02382 class CmAbsTabbedForm : public CmAbsPagedForm {
02383 public:
02384 inline void setTabText(int page, const char *text);
02385 inline void getTabText(int page, char *text);
02386 };
02387
02391 class CmPagedPosForm : public CmAbsPagedForm {
02392 public:
02394 CmPagedPosForm(CmContainer *parent, int n_pages);
02395 };
02396
02400 class CmPagedRowForm : public CmAbsPagedForm {
02401 public:
02403 CmPagedRowForm(CmContainer *parent, int n_pages);
02404 };
02405
02409 class CmPagedColForm : public CmAbsPagedForm {
02410 public:
02412 CmPagedColForm(CmContainer *parent, int n_pages);
02413 };
02414
02418 class CmPagedPosFormExt : public CmAbsPagedForm {
02419 public:
02421 CmPagedPosFormExt(CmContainer *parent, int n_pages);
02422 };
02423
02427 class CmPagedRowFormExt : public CmAbsPagedForm {
02428 public:
02430 CmPagedRowFormExt(CmContainer *parent, int n_pages);
02431 };
02432
02436 class CmPagedColFormExt : public CmAbsPagedForm {
02437 public:
02439 CmPagedColFormExt(CmContainer *parent, int n_pages);
02440 };
02441
02445 class CmTabbedPosForm : public CmAbsTabbedForm {
02446 public:
02448 CmTabbedPosForm(CmContainer *parent, int n_pages, MTFont f=HELV_SMALL);
02449 };
02450
02454 class CmTabbedRowForm : public CmAbsTabbedForm {
02455 public:
02457 CmTabbedRowForm(CmContainer *parent, int n_pages, MTFont f=HELV_SMALL);
02458 };
02459
02463 class CmTabbedColForm : public CmAbsTabbedForm {
02464 public:
02466 CmTabbedColForm(CmContainer *parent, int n_pages, MTFont f=HELV_SMALL);
02467 };
02468
02472 class CmAbsCForm : public CmForm {
02473 public:
02475 inline void setClipX(int clip_x);
02477 inline void setClipY(int clip_y);
02479 inline int getClipX(void);
02481 inline int getClipY(void);
02483 inline void setSliderColor(CmColor *cc);
02485 inline void setSliderColorShift(int perc);
02486 };
02487
02491 class CmAbsScrolledForm : public CmAbsCForm {
02492 public:
02494 inline void setIncr(int h_inc, int v_inc);
02496 inline void setSliderColor(CmColor *cc);
02498 inline void setSliderColorShift(int perc);
02499 };
02500
02504 class CmScrolledPosForm : public CmAbsScrolledForm {
02505 public:
02507 CmScrolledPosForm(CmContainer *parent, int w, int h);
02508 };
02509
02513 class CmScrolledRowForm : public CmAbsScrolledForm {
02514 public:
02516 CmScrolledRowForm(CmContainer *parent, int w, int h);
02517 };
02518
02522 class CmScrolledColForm : public CmAbsScrolledForm {
02523 public:
02525 CmScrolledColForm(CmContainer *parent, int w, int h);
02526 };
02527
02531 class CmClippedPosForm : public CmAbsCForm {
02532 public:
02534 CmClippedPosForm(CmContainer *parent, int w, int h);
02535 };
02536
02540 class CmClippedRowForm : public CmAbsCForm {
02541 public:
02543 CmClippedRowForm(CmContainer *parent, int w, int h);
02544 };
02545
02549 class CmClippedColForm : public CmAbsCForm {
02550 public:
02552 CmClippedColForm(CmContainer *parent, int w, int h);
02553 };
02554
02559 class CmLabel : public CmObject {
02560 public:
02562 CmLabel(CmContainer *parent, const char *text=0, MTFont font=DEFAULT_FONT);
02564 void setMargin(int wm, int hm);
02566 void setHSpacing(int hs);
02568 void setAlignment(int alignment);
02569 };
02570
02575 class CmAbsEdit : public CmObject {
02576 friend void _EditNewValueCB_(MOBJECT p, char *text, void *ud);
02577 friend void _EditValueChangeCB_(MOBJECT p, EDIT_CHANGE *ec, void *ud);
02578 STRING_CB newValueCB;
02579 EDITCHANGE_CB valueChangeCB;
02580 protected:
02581 CmAbsEdit(void){};
02582 public:
02584 void changeText(int off, int len, const char *new_t, int chg_len);
02586 void getSubString(int start, int end, char *str);
02588 int findSubStringForward(int off, const char *str, int icase);
02590 int findSubStringBackward(int off, const char *str, int icase);
02592 void setSelection(int start, int end);
02594 void getSelection(int *pstart, int *pend);
02596 char *getAllocatedText(void);
02598 void setCursorPos(int pos);
02600 int getCursorPos(void);
02601
02603 void setNewValueCallback(CmCallback *, STRING_CB);
02605 void setValueChangeCallback(CmCallback *, EDITCHANGE_CB);
02606 };
02607
02612 class CmAbsEditField : public CmAbsEdit {
02613 friend void _EditActCB_(MOBJECT p, char *text, void *ud);
02614 friend void _EditValCB_(MOBJECT p, EDIT_VAL *ev, void *ud);
02615 friend void _EditHotKeyCB_(MOBJECT p, void *a, void *ud);
02616 STRING_CB activateCB;
02617 EDITVAL_CB validateCB;
02618 VOID_CB hotKeyCB;
02619 protected:
02620 CmAbsEditField(void){};
02621 public:
02623 inline void setMargin(int w_margin, int h_margin);
02625 void setFilter(int filter, const char *extra_chars);
02627 void setTextExt(const char *text, int validated, int notify);
02629 void setValidatedColors(CmColor *bgc, CmColor *fgc);
02631 void setInvalidatedColors(CmColor *bgc, CmColor *fgc);
02633 void setValidationStatus(int validated);
02635 void selectForReplace(void);
02637 inline void disableEditing(void);
02639 inline void enableEditing(void);
02641 const char *text(void);
02643 int getFilter(void);
02645 int isValidated(void);
02646
02648 void setActivateCallback(CmCallback *, STRING_CB);
02650 void setHotKeyCallback(CmCallback *, VOID_CB, int);
02652 void setValidateCallback(CmCallback *, EDITVAL_CB);
02653 };
02654
02659 class CmEditField : public CmAbsEditField {
02660 public:
02662 CmEditField(CmContainer *parent, const char *text, int len,
02663 int clip_len=-1, MTFont font=DEFAULT_FONT);
02664 };
02665
02669 class CmHiddenEditField : public CmAbsEditField {
02670 public:
02672 CmHiddenEditField(CmContainer *parent, const char *text, int len,
02673 int clip_len=-1, MTFont font=DEFAULT_FONT, char shown='*');
02674 };
02675
02679 class CmSpinEditField : public CmAbsEditField {
02680 friend void _SpinCB_(MOBJECT p, MVALUE a, void *ud);
02681 INT_CB spinCB;
02682 public:
02684 CmSpinEditField(CmContainer *parent, const char *text, int len,
02685 int clip_len, MTFont font,
02686 CmCallback *owner, INT_CB cb);
02687 };
02688
02692 class CmAbsEditWindow : public CmAbsEdit {
02693 friend void _EditCursorCB_(MOBJECT p, EDIT_CURS *ec, void *ud);
02694 EDITCURS_CB cursCB;
02695 public:
02697 void setCursorXY(int x, int y);
02699 void getCursorXY(int *px, int *py);
02701 void setAutoIndent(int on_off);
02703 void setTabSize(int size);
02705 void setClipWindow(int clip_w, int clip_h);
02707 void setCursorCallback(CmCallback *, EDITCURS_CB);
02708 };
02709
02714 class CmEditWindow : public CmAbsEditWindow {
02715 public:
02717 CmEditWindow(CmContainer *parent, const char *text, int width, int height,
02718 MTFont font=DEFAULT_FONT);
02719 };
02720
02724 class CmScrolledEditWindow : public CmAbsEditWindow {
02725 public:
02727 CmScrolledEditWindow(CmContainer *parent, const char *text, int width, int height,
02728 MTFont font=DEFAULT_FONT);
02730 inline void setSliderColor(CmColor *cc);
02732 inline void setSliderColorShift(int perc);
02733 };
02734
02739 class CmAbsButton : public CmObject {
02740 public:
02742 void setImages(const char *normal, const char *arm=0, const char *unsens=0);
02744 void changeImageFiles(const char *normal, const char *arm, const char *unsens,
02745 const char *norm_on, const char *arm_on, const char *uns_on);
02747 inline CmImage *changeNormalImage(CmImage *new_normal);
02749 inline CmImage *changeArmedImage(CmImage *new_armed);
02751 inline CmImage *changeUnsensitiveImage(CmImage *new_unsens);
02753 inline CmImage *changeNormalOnImage(CmImage *new_normal_on);
02755 inline CmImage *changeArmedOnImage(CmImage *new_armed_on);
02757 inline CmImage *changeUnsensitiveOnImage(CmImage *new_unsens_on);
02759 inline void setTextVsImageAlignment(CARD8 align);
02761 inline void setOnMouseOverForegroundColor(CmColor *fgc);
02763 inline void setOnMouseOverForegroundRGB(int r, int g, int b);
02765 inline void setShadowOnMouseOver(int thick);
02767 inline void setAccelerator(int key);
02769 inline void setImageMaskByCMapIndex(int id);
02771 inline void setImageMaskByPixel(int x, int y);
02773 inline void setImageMaskByRGB(int r, int g, int b);
02775 inline void unsetOnMouseOverForeground(void);
02777 inline void unShadowOnMouseOver(void);
02778 };
02779
02784 class CmPushButton : public CmAbsButton {
02785 friend void _PushButtonActivateCB_(MOBJECT p, void *a, void *ud);
02786 VOID_CB activateCB;
02787 public:
02789 CmPushButton(CmContainer *p, const char *text, MTFont font=DEFAULT_FONT);
02791 CmPushButton(CmContainer *p, CmImage *norm, CmImage *arm=0, CmImage *uns=0);
02793 CmPushButton(CmContainer *p, const char *norm, const char *arm, const char *uns=0);
02795 CmPushButton(CmContainer *p,
02796 CmImage *norm, CmImage *arm, CmImage *uns,
02797 CmImage *norm_on, CmImage *arm_on, CmImage *uns_on);
02799 CmPushButton(CmContainer *p,
02800 const char *norm, const char *arm, const char *uns,
02801 const char *norm_on, const char *arm_on, const char *uns_on);
02803 CmPushButton(CmContainer *p, const char *text, MTFont font,
02804 CmImage *norm, CmImage *arm, CmImage *uns,
02805 CmImage *norm_on, CmImage *arm_on, CmImage *uns_on);
02807 CmPushButton(CmContainer *p, const char *text, MTFont font,
02808 const char *norm, const char *arm, const char *uns,
02809 const char *norm_on, const char *arm_on, const char *uns_on);
02811 void setRepeatDelay(int first, int repeat);
02813 void setMargin(int wm, int hm);
02815 void setHSpacing(int hs);
02817 void setAlignment(int alignment);
02819 void setAccelerator(int key);
02821 void setCallback(CmCallback *owner, VOID_CB cb);
02822 };
02823
02828 class CmToggleButton : public CmAbsButton {
02829 friend void _ToggleButtonActivateCB_(MOBJECT p, MVALUE a, void *ud);
02830 INT_CB activateCB;
02831 public:
02833 CmToggleButton(CmContainer *par, const char *text, MTFont font=DEFAULT_FONT);
02835 CmToggleButton(CmContainer *p, CmImage *n, CmImage *arm=0, CmImage *uns=0);
02837 CmToggleButton(CmContainer *par, const char *normal, const char *on_arm, const char *uns=0);
02839 CmToggleButton(CmContainer *p,
02840 CmImage *norm, CmImage *arm, CmImage *uns,
02841 CmImage *norm_on, CmImage *arm_on, CmImage *uns_on);
02843 CmToggleButton(CmContainer *p,
02844 const char *norm, const char *arm, const char *uns,
02845 const char *norm_on, const char *arm_on, const char *uns_on);
02847 CmToggleButton(CmContainer *p, const char *text, MTFont font,
02848 CmImage *norm, CmImage *arm, CmImage *uns,
02849 CmImage *norm_on, CmImage *arm_on, CmImage *uns_on);
02851 CmToggleButton(CmContainer *p, const char *text, MTFont font,
02852 const char *norm, const char *arm, const char *uns,
02853 const char *norm_on, const char *arm_on, const char *uns_on);
02855 void arm(void);
02857 void disarm(void);
02858
02860 int isArmed(void);
02861
02863 void setCallback(CmCallback *owner, INT_CB cb);
02864 };
02865
02870 class CmRadioButton : public CmAbsButton {
02871 friend void _RadioButtonActivateCB_(MOBJECT p, MVALUE a, void *ud);
02872 INT_CB activateCB;
02873 public:
02875 CmRadioButton(CmContainer *par, const char *text, MTFont font=DEFAULT_FONT);
02877 CmRadioButton(CmContainer *p, CmImage *norm, CmImage *arm=0, CmImage *uns=0);
02879 CmRadioButton(CmContainer *par, const char *normal, const char *on_arm, const char *when_unsens=0);
02881 CmRadioButton(CmContainer *p,
02882 CmImage *norm, CmImage *arm, CmImage *uns,
02883 CmImage *norm_on, CmImage *arm_on, CmImage *uns_on);
02885 CmRadioButton(CmContainer *p,
02886 const char *norm, const char *arm, const char *uns,
02887 const char *norm_on, const char *arm_on, const char *uns_on);
02889 CmRadioButton(CmContainer *p, const char *text, MTFont font,
02890 CmImage *norm, CmImage *arm, CmImage *uns,
02891 CmImage *norm_on, CmImage *arm_on, CmImage *uns_on);
02893 CmRadioButton(CmContainer *p, const char *text, MTFont font,
02894 const char *norm, const char *arm, const char *uns,
02895 const char *norm_on, const char *arm_on, const char *uns_on);
02897 void arm(void);
02899 void disarm(void);
02900
02902 int isArmed(void);
02903
02905 void setCallback(CmCallback *owner, INT_CB cb);
02906 };
02907
02912 class CmPixmap : public CmObject {
02913 public:
02915 CmPixmap(CmContainer *par, CmImage *normal);
02917 CmPixmap(CmContainer *par, const char *fname);
02918
02920 void setImage(CmImage *normal);
02922 void setImage(const char *fname);
02923 };
02924
02928 class CmDrawArea : public CmObject {
02929 friend void _DrawAreaExposeCB_(MOBJECT, MEvent *, void *);
02930 friend void _DrawAreaInputCB_(MOBJECT, MEvent *, void *);
02931 friend void _DrawAreaResizeCB_(MOBJECT, DRAWAREA_PREF *, void *);
02932 EVENT_CB exposeCB;
02933 EVENT_CB inputCB;
02934 DRAWAREAPREF_CB resizeCB;
02935 public:
02937 CmDrawArea(CmContainer *parent, int w, int h);
02938
02940 void setExposeCallback(CmCallback *, EVENT_CB);
02942 void setInputCallback(CmCallback *, EVENT_CB);
02944 void setResizeCallback(CmCallback *, DRAWAREAPREF_CB);
02945 };
02946
02951 class CmStatusBar : public CmObject {
02952 public:
02954 CmStatusBar(CmContainer *parent, const char *text=0, int max=10, MTFont font=DEFAULT_FONT);
02955
02957 void setMax(int max);
02959 void setWidth(int width);
02961 void setPos(int pos);
02963 inline void setSliderColor(CmColor *col);
02965 inline void setSliderColorShift(int perc);
02967 inline void setSliderRGB(int r, int g, int b);
02968 };
02969
02984 class CmSplitter : public CmObject {
02985 public:
02986 CmSplitter(CmContainer *parent);
02987 };
02988
02993 class CmScrollBar : public CmObject {
02994 friend void _ScrollBarValueCB_(MOBJECT p, MVALUE a, void *ud);
02995 LONG_CB changeCB;
02996 public:
02998 CmScrollBar(CmContainer *parent, int type, long n, long max);
02999
03001 void setMax(long max);
03003 void setPos(long pos);
03005 void setN(long n);
03007 void setIncr(int incr);
03009 inline void setSliderColor(CmColor *cc);
03011 void setValues(long max, long n, long pos);
03013 long getMax(void);
03015 long getPos(void);
03017 long getN(void);
03018
03020 void setCallback(CmCallback *, LONG_CB);
03021 };
03022
03027 class CmSFile : public CmObject {
03028 public:
03030 CmSFile(CmContainer *parent, const char *fname, MTFont font=DEFAULT_FONT,
03031 int nrow=10, int ncol=20);
03032
03034 void setFile(const char *fname);
03036 void CmSFile::setHMargin(int hm);
03037 };
03038
03043 class CmAbsList : public CmObject {
03044 friend class CmOptionEdit;
03045 friend void _ListActivateCB_(MOBJECT p, LIST_ACT *la, void *ud);
03046 friend void _ListPickCB_(MOBJECT p, LIST_ACT *la, void *ud);
03047 friend void _ListSelectionCB_(MOBJECT p, LIST_SEL *la, void *ud);
03048 LISTACT_CB activateCB;
03049 LISTACT_CB pickCB;
03050 LISTSEL_CB selectionCB;
03051 protected:
03052 CmAbsList(void){};
03053 public:
03055 void setSortCallback(STRCMP_CB cb);
03057 void setHead(const char *text);
03059 void setHeadColor(CmColor *bgc, CmColor *fgc);
03061 void setHMargin(int hm);
03063 void setItemCheckStatus(const char *item, int status);
03065 void setHighLightColors(CmColor *bgc, CmColor *fgc);
03067 inline void setHighLightFGColor(CmColor *fgc);
03069 inline void setSliderColor(CmColor *cc);
03071 inline void setSliderColorShift(int perc);
03072
03074 LIST_ACT *getFirstItem(void);
03076 LIST_ACT *getFirstSelectedItem(void);
03078 LIST_ACT *getNextItem(void);
03080 LIST_ACT *getNextSelectedItem(void);
03082 LIST_ACT *getFirstUnselectedItem(void);
03084 LIST_ACT *getNextUnselectedItem(void);
03086 long getNItem(void);
03088 LIST_ACT *getItem(const char *item);
03090 LIST_ACT *getElement(long n);
03092 LIST_ACT *getSelected(void);
03094 int getItemCheckStatus(const char *item);
03096 void getHead(char *buff);
03097
03099 void selectItem(const char *item);
03101 void deselectItem(const char *item);
03103 void selectElement(long n);
03105 void deselectElement(long n);
03107 void freeze(void);
03109 void thaw(void);
03111 void reset(void);
03113 void clear(void);
03115 int addItem(const char *item, void *data);
03117 int delItem(const char *item);
03119 int addElement(long n, const char *item, void *data);
03121 int delElement(long n);
03123 void changeItem(const char *old, const char *new_item, void *u_data);
03125 void changeElement(long n, const char *new_item, void *u_data);
03127 void enableMultiSelection(void);
03129 inline void disableMultiSelection(void);
03131 inline void disableItemMotion(void);
03133 inline void enableItemMotion(void);
03135 void setCallback(CmCallback *, LISTACT_CB);
03137 void setPickCallback(CmCallback *, LISTACT_CB);
03139 void setSelectionCallback(CmCallback *, LISTSEL_CB);
03140 };
03141
03145 class CmSList : public CmAbsList {
03146 public:
03148 CmSList(CmContainer *parent, MTFont font, int row_len,
03149 int nrow, int ncol);
03150 };
03151
03155 class CmEditList : public CmAbsList {
03156 public:
03158 CmEditList(CmContainer *parent, MTFont font, EL_TEMPLATE *elt,
03159 int ne, int nrow, int ncol);
03161 int addItem(char **argv, void *u_data);
03163 int addItemFromEdits(void *u_data);
03165 void changeElement(long n, char **new_ele, void *data);
03167 void delElement(long n);
03169 void seekItem(char **argv, long *pos, void **u_data);
03171 void getItemField(const char *item, int ii, char *buff);
03173 void getEditText(int ii, char *buff);
03175 void setEditText(int ii, const char *buff);
03176 };
03177
03181 class CmClippedSList : public CmAbsList {
03182 friend void _ClippedListNewBlockCB_(MOBJECT, SBL_NEW_BLOCK *, void *);
03183 friend void _ClippedListItemSeekCB_(MOBJECT, SBL_ITEM_SEEK *, void *);
03184 NEWBLOCK_CB newBlockCB;
03185 ITEMSEEK_CB itemSeekCB;
03186 public:
03188 CmClippedSList(CmContainer *parent,
03189 CmCallback *owner, NEWBLOCK_CB nb, ITEMSEEK_CB is,
03190 MTFont font, int nrow, int ncol, int xc, long xn=0);
03191 };
03192
03197 class CmOptionEdit : public CmAbsEditField {
03198 CmAbsList *slist;
03199 public:
03200 ~CmOptionEdit(void);
03202 CmOptionEdit(CmContainer *parent, const char *text, int len, int clip_len=-1,
03203 int nrow=10, MTFont font=DEFAULT_FONT);
03205 CmAbsList *getSList(void) { return slist; };
03207 void setListCallback(CmCallback *pp, LISTACT_CB cb);
03208 };
03209
03214 class CmMenuBar : public CmObject {
03215 public:
03217 CmMenuBar(CmContainer *parent, MTFont font);
03219 void setAcceleratorKey(int key);
03221 void setHighLightColors(CmColor *bgc, CmColor *fgc);
03223 void setHighLightFGColor(CmColor *fgc);
03224
03225 };
03226
03227 class CmMenu;
03228
03232 class CmMenuLine : public CmMGUI {
03233 protected:
03234 friend class CmMenu;
03235 MENU_ITEM id;
03236 MOBJECT pdobj;
03237 CmMenuLine *next;
03238 virtual ~CmMenuLine(void) {}
03239 };
03240
03244 class CmMenuSeparator : public CmMenuLine {
03245 public:
03247 CmMenuSeparator(CmMenu *pd);
03248 };
03249
03253 class CmAbsMenuItem : public CmMenuLine {
03254 friend class CmMenu;
03255 friend void _MenuItemActivateCB_(MENU_ITEM item, MVALUE status, void *ud);
03256 MENUITEM_CB itemCB;
03257 CmCallback *owner;
03258 protected:
03259 CmAbsMenuItem(CmMenu *pd, CmCallback *ff, MENUITEM_CB cb);
03260 public:
03262 void setText(const char *text);
03264 void setSensitive(void);
03266 void setUnsensitive(void);
03268 void setAcceleratorKey(int key, const char *a_text=0);
03270 int setCheckStatus(int true_false);
03272 int getCheckStatus(void);
03274 const char *getText(void);
03276 CmMenu *getMenu(void);
03278 int toggleCheckStatus(void);
03279 };
03280
03284 class CmMenuItem : public CmAbsMenuItem {
03285 public:
03287 CmMenuItem(CmMenu *pd, const char *text, CmCallback *ff=0, MENUITEM_CB cb=0, int acc=0, const char *at=0);
03288 };
03289
03293 class CmMenuRadioItem : public CmAbsMenuItem {
03294 public:
03296 CmMenuRadioItem(CmMenu *pd, const char *text, CmCallback *ff=0, MENUITEM_CB cb=0, int acc=0, const char *at=0);
03297 };
03298
03302 class CmMenuToggleItem : public CmAbsMenuItem {
03303 public:
03305 CmMenuToggleItem(CmMenu *pd, const char *text, CmCallback *ff=0, MENUITEM_CB cb=0, int acc=0, const char *at=0);
03306 };
03307
03313 class CmMenu : public CmObject {
03314 friend class CmMenuSeparator;
03315 friend class CmAbsMenuItem;
03316 CmMenuLine *list;
03317 ITEMSEL_CB itemSelCB;
03318 public:
03319 virtual ~CmMenu(void);
03321 CmMenu(CmMenuBar *menu, const char *title);
03323 CmMenu(CmMenuItem *it);
03325 CmMenu(MTFont font=HELV_MEDIUM);
03327 void setText(const char *text);
03329 const char *getText(void);
03331 void popup(int x, int y);
03333 void setHighLightColors(CmColor *bgc, CmColor *fgc);
03335 void setHighLightFGColor(CmColor *fgc);
03337 void setItemSelectionCallback(CmCallback *, ITEMSEL_CB);
03338 };
03339
03340 class CmTreeNode;
03341
03348 class CmTree : public CmObject {
03349 MTREENODE_CB openCB;
03350 MTREENODE_CB closeCB;
03351 MTREENODE_CB selectCB;
03352 public:
03368 CmTree(CmContainer *parent, MTFont font, int width, int height, int n_types);
03369
03386 inline void setImages(int type, const char *norm, const char *open, const char *sel);
03387
03404 inline void setImages(int type, CmImage *norm, CmImage *open, CmImage *sel);
03405
03415 inline void setHighLightColors(CmColor *bgc, CmColor *fgc);
03416
03423 inline void setHighLightFGColor(CmColor *fgc);
03424
03431 inline void setLineColor(CmColor *color);
03432
03439 inline void setSliderColor(CmColor *color);
03440
03448 inline void setSliderColorShift(int percentage);
03449
03453 CmTreeNode *getSelectedNode(void);
03454
03458 CmTreeNode *getFirstNode(void);
03459
03468 void setOpenCallback(CmCallback *owner, MTREENODE_CB cb);
03477 void setCloseCallback(CmCallback *owner, MTREENODE_CB cb);
03486 void setSelectCallback(CmCallback *owner, MTREENODE_CB cb);
03487 };
03488
03493 class CmTreeNode : public CmMGUI {
03494 MTNODE node;
03495 MTREENODE_CB openCB;
03496 MTREENODE_CB closeCB;
03497 MTREENODE_CB selectCB;
03498 public:
03514 CmTreeNode(CmTree *tree, CmTreeNode *parent, CARD16 type, CARD16 flags,
03515 const char *text);
03516
03523 inline void destroyContainee(int notify);
03524
03530 inline void open(int notify);
03531
03537 inline void close(int notify);
03538
03545 inline void select(int notify);
03546
03548 CmTreeNode *getNext(void);
03550 CmTreeNode *getFirstChild(void);
03552 CmTreeNode *getParent(void);
03553
03565 inline char *getPath(char separator, char *buff);
03566
03581 inline void setImages(CmImage *norm, CmImage *open, CmImage *sel);
03582
03589 inline void setText(const char *text);
03590
03601 inline char *getText(char *text);
03602
03604 inline CARD16 getType(void);
03605
03614 void setOpenCallback(CmCallback *owner, MTREENODE_CB cb);
03615
03624 void setCloseCallback(CmCallback *owner, MTREENODE_CB cb);
03625
03634 void setSelectCallback(CmCallback *owner, MTREENODE_CB cb);
03635 };
03636
03637
03638 #endif