|
Data Structures |
struct | DRAWAREA_PREF |
| DrawArea Object's resize data. More...
|
struct | EDIT_CHANGE |
| Value Change for the Edit Object. More...
|
struct | EDIT_CURS |
| Cursor Position for the Edit Object. More...
|
struct | EDIT_VAL |
| Validation data for the EditField Object. More...
|
struct | EL_TEMPLATE |
| Template for EditList Object's creation. More...
|
struct | IMAGE_CMAP |
| Colormap entry. More...
|
struct | LIST_ACT |
| List Item Activation. More...
|
struct | LIST_SEL |
| List Item Selection. More...
|
struct | MAnyWindowEvent |
| Generic Event. More...
|
struct | MConfigureEvent |
| Window Configure Event. More...
|
union | MEvent |
| Union for MGui events. More...
|
struct | MExposeEvent |
| Window/Object Expose Event. More...
|
struct | MIMAGE_DESCR |
| Image description. More...
|
struct | MKeyEvent |
| Keyboard event. More...
|
struct | MMouseEvent |
| Mouse event. More...
|
struct | MMoveEvent |
| Window Move Event. More...
|
struct | MPOINT |
| Point structure. More...
|
struct | MRECT |
| Rectangle structure (for internal use). More...
|
struct | MResizeEvent |
| Window/Object Resize Event. More...
|
struct | MSetBGImageEvent |
| Object Set background image Event. More...
|
struct | MSetColorEvent |
| Object Set Color Event. More...
|
struct | MSetGetTextEvent |
| Object Set/Get Text Event. More...
|
struct | MSetSensitivity |
| Object Set Sensitivity Event. More...
|
struct | MSetShadowEvent |
| Object Set Shadow Event. More...
|
struct | MSetTransparencyEvent |
| Object Set Transparency Event. More...
|
struct | RLIST |
| Rectangle list structure (for internal use). More...
|
struct | SBL_ITEM_SEEK |
| Used by the ItemSeek callback for 'Clip' and 'Skip' lists. More...
|
struct | SBL_NEW_BLOCK |
| Data feed for Skip and Clip List objects. More...
|
struct | XL_ITEM |
| List Item. More...
|
Color Brightness percentages. |
These macros are internally used by the MGui library for brightness percentage levels.
Using predefined values for color shading is recommended especially when the program runs in Palette mode (up to 256 colors). These values can be used as the percentage parameter in functions like MAllocShiftColor(), MScrolledFormSetSliderColorShift(), MScrollBarSetSliderColorShift(), MSListSetSliderColorShift(), MScrolledEditSetSliderColorShift(), MTreeSetSliderColorShift(), MObjectSetBGColorFromParent()
|
#define | CS_LIGHTER 140 |
| for object border shadows
|
#define | CS_DARKER 60 |
| for object border shadows
|
#define | CS_DARK 85 |
| for armed button bg and default selection highlights
|
#define | CS_LIGHT 115 |
| for default selection highlights
|
MGUI Events |
Events generated by the MGui library have one of the following values in the type member of all structures in the MEvent union.
|
#define | E_NO_EVENT 0 |
#define | E_KEY_PRESS 1 |
#define | E_BUTTON_PRESS 2 |
#define | E_BUTTON_RELEASE 3 |
#define | E_MOTION 4 |
#define | E_WINDOW_ENTER 5 |
#define | E_WINDOW_EXIT 6 |
#define | E_EXPOSE 7 |
#define | E_DESTROY 8 |
#define | E_MAP 9 |
#define | E_UNMAP 10 |
#define | E_AUTOSIZE 11 |
#define | E_RESIZE 12 |
#define | E_MOVE 13 |
#define | E_SELECT 14 |
#define | E_DESELECT 15 |
#define | E_CONFIGURE 16 |
#define | E_PARENT_MAP 17 |
#define | E_PARENT_UNMAP 18 |
#define | E_SET_COLOR 19 |
#define | E_SET_SHADOW 20 |
#define | E_SET_TEXT 21 |
#define | E_GET_TEXT 22 |
#define | E_WM_CLOSE 23 |
#define | E_SET_SENS 24 |
#define | E_SET_PARENT_SENS 25 |
#define | E_GRAB_LOSE 26 |
#define | E_SET_BG_IMAGE 27 |
#define | E_MOUSE_WHEEL 28 |
#define | E_SET_TRANSPARENCY 29 |
#define | E_PARENT_CHANGED 30 |
Event Masks. |
Bitmask values to select a set of events in a single variable.
A bitmask of these values can be used to set the desired event types to be reported in callbacks set via MObjectAddEventNotifyCallback(), CmObject::setEventCallback.
|
#define | EM_NO_EVENT 0L |
#define | EM_KEY_PRESS 1L |
#define | EM_BUTTON_PRESS (1L<<1) |
#define | EM_BUTTON_RELEASE (1L<<2) |
#define | EM_MOTION (1L<<3) |
#define | EM_WINDOW_ENTER (1L<<4) |
#define | EM_WINDOW_EXIT (1L<<5) |
#define | EM_EXPOSE (1L<<6) |
#define | EM_DESTROY (1L<<7) |
#define | EM_MAP (1L<<8) |
#define | EM_UNMAP (1L<<9) |
#define | EM_AUTOSIZE (1L<<10) |
#define | EM_RESIZE (1L<<11) |
#define | EM_MOVE (1L<<12) |
#define | EM_SELECT (1L<<13) |
#define | EM_DESELECT (1L<<14) |
#define | EM_CONFIGURE (1L<<15) |
#define | EM_PARENT_MAP (1L<<16) |
#define | EM_PARENT_UNMAP (1L<<17) |
#define | EM_SET_COLOR (1L<<18) |
#define | EM_SET_SHADOW (1L<<19) |
#define | EM_SET_TEXT (1L<<20) |
#define | EM_GET_TEXT (1L<<21) |
#define | EM_WM_CLOSE (1L<<22) |
#define | EM_SET_SENS (1L<<23) |
#define | EM_SET_PARENT_SENS (1L<<24) |
#define | EM_GRAB_LOSE (1L<<25) |
#define | EM_SET_BG_IMAGE (1L<<26) |
#define | EM_MOUSE_WHEEL (1L<<27) |
#define | EM_SET_TRANSPARENCY (1L<<28) |
#define | EM_PARENT_CHANGED (1L<<29) |
Mouse button bitmask in mouse events. |
These values can be found in the state member of structure MMouseEvent.
By masking the state field with these macro values you can realize which mouse buttons were hold down when the event was generated.
|
#define | Button1Mask (1<<8) |
#define | Button2Mask (1<<9) |
#define | Button3Mask (1<<10) |
Mouse button bitmask in mouse events. |
Only one of these values can be found in the button field of the MMouseEvent structure.
Note that the given button can be pressed or released depending on the actual value of the type member in the same event (E_BUTTON_PRESS or E_BUTTON_RELEASE)
|
#define | Button1 1 |
#define | Button2 2 |
#define | Button3 3 |
Keyboard Modifier key masks. |
By masking the value o these macros with the state field in events MKeyEvent and MMouseEvent you can figure out the hold down status of such keys at the time the event was generated.
You can also mask them with the value returned by MGetKeyboardState to check the status of the modifier keys at any time.
|
#define | ShiftMask (1<<0) |
#define | LockMask (1<<1) |
#define | ControlMask (1<<2) |
#define | AltMask (1<<3) |
#define | AltMask (1<<3) |
Predefined Mouse Cursors. |
When setting a particular mouse cursor to be operative in a given MGui object via MObjectSetCursor or CmObject::setCursor, you can use either one of the predefined mouse cursors or an application created one (via MCreateCursor() or CmCursor::CmCursor)
|
#define | MC_NONE (MTCursor)0 |
#define | MC_UL_ARROW (MTCursor)1 |
#define | MC_CROSSHAIR (MTCursor)2 |
#define | MC_HOURGLASS (MTCursor)3 |
#define | MC_HSIZE (MTCursor)4 |
#define | MC_VSIZE (MTCursor)5 |
#define | MC_NWSIZE (MTCursor)6 |
#define | MC_NESIZE (MTCursor)7 |
Static fonts. |
These are predefined font identifiers to be used to set object font either at creation time or via MObjectSetFont() and CmObject::setFont.
Fonts can also be loaded via MLoadFont() and CmFont::CmFont.
|
#define | DEFAULT_FONT 0 |
#define | FIXED_SMALL 1 |
#define | FIXED_MEDIUM 2 |
#define | FIXED_LARGE 3 |
#define | HELV_SMALL 4 |
#define | HELV_MEDIUM 5 |
#define | TIMES_SMALL 6 |
#define | TIMES_MEDIUM 7 |
#define | HELV_LARGE 8 |
#define | TIMES_LARGE 9 |
Alignment options. |
The first 3 are used for text alignment in LABEL and text-only BUTTON objects and in Text drawing primitives (CmPushButton::setAlignment).
All are also used to align objects in the TableForm cell boundaries when a Form is enlarged (MObjectAlign(), MTableFormSetColAlign(), MTableFormSetRowAlign(), CmObject::align, CmAbsTableForm::setColAlign, CmAbsTableForm::setRowAlign). Moreover they all can be used to set the Text vs Image alignment in Buttons (Push/Toggle/Radio) having both image and text via MButtonSetTextVsImageAlignment() and CmAbsButton::setTextVsImageAlignment.
|
#define | LEFT_ALIGN 0 |
#define | RIGHT_ALIGN 1 |
#define | CENTER_ALIGN 2 |
#define | TOP_ALIGN 3 |
#define | BOTTOM_ALIGN 4 |
#define | UNDEF_ALIGN 0x3f |
Object Options. |
For use with MObjectEnableOptions() and MObjectSaveOptions().
|
#define | MO_FONT 0x1 |
#define | MO_FGCOLOR 0x2 |
#define | MO_BGCOLOR 0x4 |
#define | MO_SHADOW 0x8 |
#define | MO_TEXT 0x10 |
#define | MO_BG_IMAGE 0x20 |
#define | MO_TRANSPARENCY 0x40 |
#define | MO_COLOR (MO_FGCOLOR|MO_BGCOLOR) |
#define | MO_ALL 0x7f |
Object background Image drawing modes. |
To be used in MObjectSetBackgroundImage(), MObjectSetBackgroundImageFile() CmObject::setBackgroundImage(), CmObject::setBackgroundImageFile()
|
#define | BI_TILED 0 |
#define | BI_CENTERED 1 |
#define | BI_SIZE_FORCING 2 |
Object shadows. |
To be used in MObjectSetShadow(), CmObject::setShadow()
|
#define | WS_NONE 0 |
#define | WS_SHADOW_OUT 1 |
#define | WS_SHADOW_IN 2 |
#define | WS_ETCHED_IN 3 |
#define | WS_ETCHED_OUT 4 |
Object Types. |
Function MObjectType() and method CmObject::type return one these value as the object type.
Note that compound objects do not have specific values.
|
#define | OT_SHELL 1 |
#define | OT_FORM 2 |
#define | OT_LABEL 3 |
#define | OT_PBUTTON 4 |
#define | OT_TBUTTON 5 |
#define | OT_RBUTTON 6 |
#define | OT_SCROLLBAR 7 |
#define | OT_EDIT 8 |
#define | OT_STATUSBAR 9 |
#define | OT_TEXT 10 |
#define | OT_SBLIST 11 |
#define | OT_MENUBAR 12 |
#define | OT_MENU 13 |
#define | OT_DRAWAREA 14 |
#define | OT_SPLITTER 15 |
SHELL creation options. |
To be used as bitwise or-ed in the 'flags' parameter of MCreateShell(), CmShell::CmShell().
|
#define | SF_NO_FOCUS_CHANGE 0x1 |
| Internal use (MENU).
|
#define | SF_SAVEUNDER 0x2 |
| The area under the appearing SHELL window is stored for a fast redraw when the window is deleted.
|
#define | SF_MODAL 0x4 |
| Input focus is grabbed by the SHELL until it is removed.
|
#define | SF_POPUP 0x8 |
| Undecorated window look (MENU).
|
#define | SF_IGNORE_WM_CLOSE 0x10 |
| SHELL ignores the CLOSE message sent by the Window Manager.
|
#define | SF_UNMAP_ON_WM_CLOSE 0x20 |
| The SHELL only unmaps itself (not destroy) when receives the CLOSE message from the Window Manager.
|
#define | SF_NO_CLOSE 0x40 |
| No close button in the title bar.
|
#define | SF_NO_MAXIMIZE 0x80 |
| No maximize button in the title bar.
|
#define | SF_NO_MINIMIZE 0x100 |
| No minimize button in the title bar.
|
#define | SF_NO_RESIZE 0x200 |
| Resize disabled (both width and height).
|
#define | SF_NO_W_RESIZE 0x400 |
| Width Resize disabled.
|
#define | SF_NO_H_RESIZE 0x800 |
| Height Resize disabled.
|
Shell position/size defaults. |
To be used in MShellRealizeXY(), MShellRealizeXYWH(), CmShell::realize()
|
#define | DEF_POSITION -32768 |
| Default x/y position useable in MShellRealizeXY().
|
#define | DEF_SIZE -32768 |
MTNODE creation flags. |
To be used in MTreeCreateNode().
|
#define | NF_CONTAINER 0x1 |
#define | NF_TOGGLE 0x2 |
SPOOL return values for MSpoolFile() and MSpoolTempFile(). |
#define | MSPOOL_OK 0 |
#define | MSPOOL_FULL_QUEUE -1 |
#define | MSPOOL_NOT_READY -2 |
#define | MSPOOL_FILE_ERR -3 |
Child Attachment |
#define | F_ATT_NONE 0 |
#define | F_ATT_FORM 1 |
#define | F_ATT_OBJ 2 |
SCROLLBAR TYPE. |
For use in MCreateScrollBar(), CmScrollBar
|
#define | SBT_HOR 0 |
#define | SBT_VERT 1 |
EDIT filter values. |
Use in MEditSetFilter(), CmAbsEditField::setFilter
|
#define | NOCHAR 0 |
#define | ANYCHAR 0x1 |
#define | ALPHA 0x2 |
#define | DIGIT 0x4 |
#define | SPACE 0x8 |
#define | SIGNED 0x100 |
#define | DOT 0x200 |
#define | UPPER 0x400 |
#define | LOWER 0x800 |
#define | ALPHANUM (ALPHA|DIGIT) |
#define | UPALPHA (ALPHA|UPPER) |
#define | LOWALPHA (ALPHA|LOWER) |
#define | U_INT DIGIT |
#define | S_INT (DIGIT|SIGNED) |
#define | U_FLOAT (DIGIT|DOT) |
#define | S_FLOAT (DIGIT|DOT|SIGNED) |
Socket Events |
#define | SE_READ 0x1 |
#define | SE_WRITE 0x2 |
#define | SE_EXCP 0x4 |
Defines |
#define | MGUI_RELEASE 0x403 |
#define | X11_MGUI |
#define | UNIX |
#define | DIR_SEP '/' |
#define | NOCOLOR ((MTColor)~0) |
#define | True 1 |
#define | False 0 |
#define | SMALL_FONT FIXED_SMALL |
| Static fonts WARNING: OBSOLETE.
|
#define | MEDIUM_FONT FIXED_MEDIUM |
#define | LARGE_FONT FIXED_LARGE |
#define | TIMES_N_FONT TIMES_SMALL |
#define | TIMES_L_FONT TIMES_MEDIUM |
#define | HELV_N_FONT HELV_SMALL |
#define | HELV_L_FONT HELV_MEDIUM |
#define | WS_HATCHED_IN WS_ETCHED_IN |
#define | WS_HATCHED_OUT WS_ETCHED_OUT |
#define | F_PREF_ATT_POS 0 |
#define | F_PREF_ATT_ROW 1 |
#define | F_PREF_ATT_COL 2 |
#define | F_PREF_ATT_TABLE 3 |
#define | SBLT_TEXT 0 |
#define | SBLT_LIST 1 |
#define | SBLT_ELIST 2 |
#define | SBLT_FILE 3 |
#define | SBL_ITEM_SELECTED 0x1L |
#define | SBL_ITEM_CHECKED 0x2L |
#define | XLItemCheck(pxl) ((pxl)->misc |= SBL_ITEM_CHECKED) |
#define | XLItemUncheck(pxl) ((pxl)->misc &= ~SBL_ITEM_CHECKED) |
Typedefs |
typedef MPOINT | MPOINT |
typedef int | MTFont |
| Font identifier.
|
typedef int | MTCursor |
| Mouse cursor identifier.
|
typedef CARD32 | MTColor |
| Color identifier.
|
typedef void * | MOBJECT |
| Opaque MGui object identifier.
|
typedef MRECT | MRECT |
typedef RLIST | RLIST |
typedef unsigned char * | IMAGE_DATA |
| Pointer to the image raw pixel data.
|
typedef IMAGE_CMAP | IMAGE_CMAP |
typedef MIMAGE_DESCR | MIMAGE_DESCR |
typedef MIMAGE_DESCR * | MIMAGE |
typedef MAnyWindowEvent | MAnyWindowEvent |
typedef MKeyEvent | MKeyEvent |
typedef MAnyWindowEvent | MWMCloseEvent |
| Window Close Event.
|
typedef MAnyWindowEvent | MFocusEvent |
| Window/Object Focus Event.
|
typedef MAnyWindowEvent | MUnmapEvent |
| Window Unmap Event.
|
typedef MAnyWindowEvent | MMapEvent |
| Window/Object Map Event.
|
typedef MAnyWindowEvent | MSelectEvent |
typedef MAnyWindowEvent | MDeSelectEvent |
typedef MMouseEvent | MMouseEvent |
typedef MExposeEvent | MExposeEvent |
typedef MResizeEvent | MResizeEvent |
typedef MEvent | MEvent |
typedef void * | MTNODE |
| MNODE is the Node type identifier.
|
typedef DRAWAREA_PREF | DRAWAREA_PREF |
typedef XL_ITEM | XL_ITEM |
typedef LIST_ACT | LIST_ACT |
typedef LIST_SEL | LIST_SEL |
typedef EL_TEMPLATE | EL_TEMPLATE |
typedef SBL_NEW_BLOCK | SBL_NEW_BLOCK |
typedef SBL_ITEM_SEEK | SBL_ITEM_SEEK |
typedef EDIT_CURS | EDIT_CURS |
typedef EDIT_CHANGE | EDIT_CHANGE |
typedef EDIT_VAL | EDIT_VAL |
typedef void(* | SOCKET_CB )(int s, unsigned event, void *data) |
typedef void * | MENU_ITEM |
typedef CARD32 | TIMEOUT_ID |
typedef INT32 | MVALUE |
typedef void(* | TIMEOUT_CB )(TIMEOUT_ID id, void *data) |
typedef int(* | STRCMP_CB )(const char *, const char *) |
typedef void(* | MGUI_CB )(MOBJECT obj, void *od, void *ad) |
typedef void(* | OBJ_EVENT_CB )(MOBJECT obj, MEvent *e, void *ad) |
typedef void(* | OBJ_STRING_CB )(MOBJECT obj, char *str, void *ad) |
typedef void(* | OBJ_VALUE_CB )(MOBJECT obj, MVALUE value, void *ad) |
typedef void(* | WM_CLOSE_CB )(MOBJECT obj, void *odata, void *cdata) |
typedef void(* | NEW_BLOCK_CB )(MOBJECT obj, SBL_NEW_BLOCK *nbs, void *ad) |
typedef void(* | ITEM_SEEK_CB )(MOBJECT obj, SBL_ITEM_SEEK *iss, void *ad) |
typedef void(* | EDIT_VAL_CB )(MOBJECT edit, EDIT_VAL *ev, void *ad) |
typedef void(* | EDIT_CURS_CB )(MOBJECT edit, EDIT_CURS *ev, void *ad) |
typedef void(* | EDIT_CHANGE_CB )(MOBJECT edit, EDIT_CHANGE *ec, void *ad) |
typedef void(* | LIST_ACT_CB )(MOBJECT list, LIST_ACT *la, void *ad) |
typedef void(* | LIST_SEL_CB )(MOBJECT list, LIST_SEL *la, void *ad) |
typedef void(* | DRAWAREA_PREF_CB )(MOBJECT drawa, DRAWAREA_PREF *dp, void *ad) |
typedef void(* | MENU_ITEM_CB )(MENU_ITEM item, MVALUE status, void *ad) |
typedef void(* | MTREE_NODE_CB )(MTNODE node, void *ad) |