class CmObject : public CmMGUI

Abstract Object Class

Inheritance:

CmObject < CmMGUI


Public Methods

inline void drawText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *fgc, int alignment)
inline void drawNText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *fgc, int alignment, int n)
inline void drawBGText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *bgc, CmColor *fgc, int alignment)
inline void drawBGNText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *bgc, CmColor *fgc, int alignment, int n)
inline void drawShadowedText(int x, int y, int w, int h, const char *text, MTFont font, int sh, CmColor *fg1, CmColor *fg2, int alignment)
inline void drawShadowedNText(int x, int y, int w, int h, const char *text, MTFont font, int sh, CmColor *fg1, CmColor *fg2, int alignment, int n)
inline void drawPoint(int x, int y, CmColor *col)
inline void drawLine(int x1, int y1, int x2, int y2, CmColor *col)
inline void drawPolyline(MPOINT *points, int n, CmColor *col)
inline void drawFilledPolyline(MPOINT *points, int n, CmColor *col)
inline void drawBox(int x, int y, int w, int h, CmColor *bgc)
inline void drawFilledBox(int x, int y, int w, int h, CmColor *bgc)
inline void drawCircle(int x, int y, int r, CmColor *col)
inline void drawFilledCircle(int x, int y, int r, CmColor *col)
inline void drawArc(int x, int y, int r, int a1, int a2, CmColor *col)
inline void drawFilledArc(int x, int y, int r, int a1, int a2, CmColor *c)
inline void drawImage(CmImage *gi, int img_x, int img_y, int w, int h, int x, int y)
inline void drawWindow(void)
inline void drawShadow(void)
inline void drawSubShadow(int x, int y, int w, int h, CmColor *tsc, CmColor *bsc, int thick)
inline void drawBorder(int x, int y, int w, int h, CmColor *col, int thick)
inline void drawXorLine(int x1, int y1, int x2, int y2)
inline void drawXorBox(int x, int y, int w, int h)
inline void setSensitive(void)
inline void setUnsensitive(void)
inline void setSensitivity(int true_false)
inline void setSelectable(void)
inline void setUnselectable(void)
inline void setColor(CmColor *bgc, CmColor *fgc)
inline void setBackgroundRGB(unsigned r, unsigned g, unsigned b)
inline void setForegroundRGB(unsigned r, unsigned g, unsigned b)
inline void setText(const char *text)
inline void setName(const char *name)
inline void setFont(MTFont font, int resize_obj=0)
inline void setShadow(int type, int in=0, int out=0)
inline void setResize(int resize_w, int resize_h)
inline void setSize(int width, int height)
Sets the object's width and height
inline void setWidth(int width)
Sets the object's width
inline void setHeight(int height)
Sets the object's height
inline void setCompositeSize(int width, int height)
Sets the width and height of a composite object
inline void setCompositeWidth(int width)
Sets the width of a composite object
inline void setCompositeHeight(int height)
Sets the height of a composite object
inline void setPosition(int x, int y)
Sets the (x,y) position of object relative to parent's cohordinates
inline void setX(int x)
Sets the X cohordinate of object relative to parent's cohordinates
inline void setY(int y)
Sets the Y cohordinate of object relative to parent's cohordinates
inline void setBackgroundImage(CmImage *gi, int mode)
inline void setBackgroundImageFile(const char *fname, int mode)
inline void setColorFromBackgroundImage(void)
inline void setTransparency(CARD8 level)
inline CARD8 getTransparency(void)
inline void setAttachment(int top, int bottom, int left, int right)
inline void setOffset(int t_off, int b_off, int l_off, int r_off)
inline void setCursor(MTCursor cursor)
inline void setPopupHelp(const char *str, int delay, int duration)
inline void setLabelHelp(const char *str, CmObject *label)
inline void setUserData(void *ud)
inline void changePopupHelpText(const char *str)
inline void changeLabelHelpText(const char *str)
inline void topAttach(int att_type, int off, CmObject *obj)
inline void bottomAttach(int att_type, int off, CmObject *obj)
inline void leftAttach(int att_type, int off, CmObject *obj)
inline void rightAttach(int att_type, int off, CmObject *obj)
inline void align(int h_align, int v_align)
inline void getText(char *text)
inline const char* getName(void)
inline void* getUserData(void)
inline MTFont getFont(void)
inline void getShadow(int *type, int *in, int *out)
inline int isSensitive(void)
inline int isSelectable(void)
inline int isMapped(void)
inline int getWidth(void)
inline int getHeight(void)
inline int getCompositeWidth(void)
inline int getCompositeHeight(void)
inline int getX(void)
inline int getY(void)
CmColor* getBackgroundColor(void)
CmColor* getForegroundColor(void)
CmContainer* getParent(void)
CmShell* getShell(void)
inline CmImage* getBackgroundImage(void)
inline void resize(int w, int h)
inline void redraw(void)
inline void select(void)
inline void map(void)
inline void unmap(void)
inline void enableOptions(const char *name, CARD32 mask)
inline void saveOptions(void)
inline void unlink(int resize_obj)
inline void focusLink(CmObject *obj_to_link)
void reparent(CmContainer *new_parent, CmObject *where)
void link(CmContainer *parent, CmObject *where, int resize_parent)
void setEventCallback(CmCallback *pp, EVENT_CB ff, CARD32 mask)
inline void print(DOC_ID, MPRINT_OPTIONS *)

Inherited from CmMGUI:

Protected Methods

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

Documentation

Abstract Object Class
inline void drawText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *fgc, int alignment)

inline void drawNText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *fgc, int alignment, int n)

inline void drawBGText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *bgc, CmColor *fgc, int alignment)

inline void drawBGNText(int x, int y, int w, int h, const char *text, MTFont font, CmColor *bgc, CmColor *fgc, int alignment, int n)

inline void drawShadowedText(int x, int y, int w, int h, const char *text, MTFont font, int sh, CmColor *fg1, CmColor *fg2, int alignment)

inline void drawShadowedNText(int x, int y, int w, int h, const char *text, MTFont font, int sh, CmColor *fg1, CmColor *fg2, int alignment, int n)

inline void drawPoint(int x, int y, CmColor *col)

inline void drawLine(int x1, int y1, int x2, int y2, CmColor *col)

inline void drawPolyline(MPOINT *points, int n, CmColor *col)

inline void drawFilledPolyline(MPOINT *points, int n, CmColor *col)

inline void drawBox(int x, int y, int w, int h, CmColor *bgc)

inline void drawFilledBox(int x, int y, int w, int h, CmColor *bgc)

inline void drawCircle(int x, int y, int r, CmColor *col)

inline void drawFilledCircle(int x, int y, int r, CmColor *col)

inline void drawArc(int x, int y, int r, int a1, int a2, CmColor *col)

inline void drawFilledArc(int x, int y, int r, int a1, int a2, CmColor *c)

inline void drawImage(CmImage *gi, int img_x, int img_y, int w, int h, int x, int y)

inline void drawWindow(void)

inline void drawShadow(void)

inline void drawSubShadow(int x, int y, int w, int h, CmColor *tsc, CmColor *bsc, int thick)

inline void drawBorder(int x, int y, int w, int h, CmColor *col, int thick)

inline void drawXorLine(int x1, int y1, int x2, int y2)

inline void drawXorBox(int x, int y, int w, int h)

inline void setSensitive(void)

inline void setUnsensitive(void)

inline void setSensitivity(int true_false)

inline void setSelectable(void)

inline void setUnselectable(void)

inline void setColor(CmColor *bgc, CmColor *fgc)

inline void setBackgroundRGB(unsigned r, unsigned g, unsigned b)

inline void setForegroundRGB(unsigned r, unsigned g, unsigned b)

inline void setText(const char *text)

inline void setName(const char *name)

inline void setFont(MTFont font, int resize_obj=0)

inline void setShadow(int type, int in=0, int out=0)

inline void setResize(int resize_w, int resize_h)

inline void setSize(int width, int height)
Sets the object's width and height. The object's size is locked so it cannot be resized due to window resizing or forced attachments.

By applying this method to a composite object, you actually lock the size of the 'terminal' object. For example, if you setSize() an OptionEdit object you lock the size of the Edit object inside. If you need to setSize() the entire OptionEdit object then you should use setCompositeSize instead.

Parameters:
width - New desired width.
height - New desired height.
See Also:
setWidth, setHeight, getWidth, getHeight, setCompositeSize, setCompositeWidth, setCompositeHeight

inline void setWidth(int width)
Sets the object's width. The object's width is locked so it cannot be resized horizontally due to window resizing or forced attachments.

By applying this method to a composite object, you actually lock the width of the 'terminal' object. For example, if you setWidth() an OptionEdit object you lock the size of the Edit object inside. If you need to setWidth() the entire OptionEdit object then you should use setCompositeWidth instead.

Parameters:
width - New desired width.
See Also:
setSize, setHeight, getWidth, getHeight, setCompositeSize, setCompositeWidth, setCompositeHeight, getCompositeWidth, getCompositeHeight

inline void setHeight(int height)
Sets the object's height. The object's height is locked so it cannot be resized vertically due to window resizing or forced attachments.

By applying this method to a composite object, you actually lock the height of the 'terminal' object. For example, if you setWidth() an OptionEdit object you lock the height of the Edit object inside. If you need to setHeight() the entire OptionEdit object then you should use setCompositeHeight instead.

Parameters:
height - New desired height.
See Also:
setSize, setWidth, getWidth, getHeight, setCompositeSize, setCompositeWidth, setCompositeHeight, getCompositeWidth, getCompositeHeight

inline void setCompositeSize(int width, int height)
Sets the width and height of a composite object. The object's size is locked so it cannot be resized due to window resizing or forced attachments. The new size is applied to the main container that contitutes the composite object. For example, an OptionEdit object is constituted by a ColForm that contains an Edit and a PushButton (a SList is also part of the object but it's contained in a separate private Shell).

By applying this method to a non-composite object, you get the same behaviour as calling setSize().

Parameters:
width - New desired width.
height - New desired height.
See Also:
setSize, setWidth, setHeight, setPosition, getWidth, getHeight, setCompositeWidth, setCompositeHeight, getCompositeWidth, getCompositeHeight

inline void setCompositeWidth(int width)
Sets the width of a composite object. The object's width is locked so it cannot be resized due to window resizing or forced attachments. The new width is applied to the main container that contitutes the composite object. For example, an OptionEdit object is constituted by a ColForm that contains an Edit and a PushButton (a SList is also part of the object but it's contained in a separate private Shell).

By applying this method to a non-composite object, you get the same behaviour as calling setWidth().

Parameters:
width - New desired width.
See Also:
setSize, setWidth, setHeight, getWidth, getHeight, setCompositeSize, setCompositeHeight, getCompositeWidth, getCompositeHeight

inline void setCompositeHeight(int height)
Sets the height of a composite object. The object height is locked so it cannot be resized due to window resizing or forced attachments. The new height is applied to the main container that contitutes the composite object. For example, an OptionEdit object is constituted by a ColForm that contains an Edit and a PushButton (a SList is also part of the object but it's contained in a separate private Shell).

By applying this method to a non-composite object, you get the same behaviour as calling setHeight().

Parameters:
height - New desired height.
See Also:
setSize, setWidth, setHeight, getWidth, getHeight, setCompositeSize, setCompositeWidth, getCompositeWidth, getCompositeHeight

inline void setPosition(int x, int y)
Sets the (x,y) position of object relative to parent's cohordinates. This method should be applied to objects created as children of the PosForm container. Object's Top and Left attachments are set to the container with appropriate offsets so the desired position is obtained. If the object is contained in a PosForm, then Right and Bottom attachments are set to None so the object's size will never change due to window resizing.

Parameters:
x - New desired X cohordinate.
y - New desired Y cohordinate.
See Also:
setX, setY, getX, getY

inline void setX(int x)
Sets the X cohordinate of object relative to parent's cohordinates. This method should be applied to objects created as children of the PosForm container. Object's Left attachment is set to the container with an appropriate offset so the desired X position is obtained.

Parameters:
x - New desired X cohordinate.
See Also:
setPosition, setY, getX, getY

inline void setY(int y)
Sets the Y cohordinate of object relative to parent's cohordinates. This method should be applied to objects created as children of the PosForm container. Object's Top attachment is set to the container with an appropriate offset so the desired Y position is obtained.

Parameters:
y - New desired Y cohordinate.
See Also:
setX, setY, getX, getY

inline void setBackgroundImage(CmImage *gi, int mode)

inline void setBackgroundImageFile(const char *fname, int mode)

inline void setColorFromBackgroundImage(void)

inline void setTransparency(CARD8 level)

inline CARD8 getTransparency(void)

inline void setAttachment(int top, int bottom, int left, int right)

inline void setOffset(int t_off, int b_off, int l_off, int r_off)

inline void setCursor(MTCursor cursor)

inline void setPopupHelp(const char *str, int delay, int duration)

inline void setLabelHelp(const char *str, CmObject *label)

inline void setUserData(void *ud)

inline void changePopupHelpText(const char *str)

inline void changeLabelHelpText(const char *str)

inline void topAttach(int att_type, int off, CmObject *obj)

inline void bottomAttach(int att_type, int off, CmObject *obj)

inline void leftAttach(int att_type, int off, CmObject *obj)

inline void rightAttach(int att_type, int off, CmObject *obj)

inline void align(int h_align, int v_align)

inline void getText(char *text)

inline const char* getName(void)

inline void* getUserData(void)

inline MTFont getFont(void)

inline void getShadow(int *type, int *in, int *out)

inline int isSensitive(void)

inline int isSelectable(void)

inline int isMapped(void)

inline int getWidth(void)

inline int getHeight(void)

inline int getCompositeWidth(void)

inline int getCompositeHeight(void)

inline int getX(void)

inline int getY(void)

CmColor* getBackgroundColor(void)

CmColor* getForegroundColor(void)

CmContainer* getParent(void)

CmShell* getShell(void)

inline CmImage* getBackgroundImage(void)

inline void resize(int w, int h)

inline void redraw(void)

inline void select(void)

inline void map(void)

inline void unmap(void)

inline void enableOptions(const char *name, CARD32 mask)

inline void saveOptions(void)

inline void unlink(int resize_obj)

inline void focusLink(CmObject *obj_to_link)

void reparent(CmContainer *new_parent, CmObject *where)

void link(CmContainer *parent, CmObject *where, int resize_parent)

void setEventCallback(CmCallback *pp, EVENT_CB ff, CARD32 mask)

inline void print(DOC_ID, MPRINT_OPTIONS *)


Direct child classes:
CmStatusBar
CmScrollBar
CmSFile
CmPixmap
CmMenuBar
CmMenu
CmLabel
CmDrawArea
CmContainer
CmAbsList
CmAbsEdit
CmAbsButton

alphabetic index hierarchy of classes


MGUI Copyright 1996-2000 Vincenzo Morello

generated by doc++