Latest MGui Release Notes (since 3.5.4)
Release 4.1.2
Fixed a bug (new in release 4.1.1) in computing the initial width of a
multi line Edit object.
Release 4.1.1
Fixed a bug in focus handling occurring when objects are destroyed.
Fixed a bug occuring when destroying a container MTree node which contains the
selected node.
Changing shadow to Edit now allowed.
New Utility function to change the buffer size for a single line Edit object
void MEditSetBufferSize(MOBJECT edit, int clip_size, int size);
Release 4.1.0
New MTree functions:
void MTreeNodeEdit (MTNODE node);
void MTreeSetPopupCallback(MOBJECT tree, MTREE_POPUP_CB cb, void *ud);
void MTreeSetRenameCallback(MOBJECT tree, MTREE_NODE_RENAME_CB cb, void *ud);
void MTreeSetDeleteCallback(MOBJECT tree, MTREE_NODE_DELETE_CB cb, void *ud);
void MTreeNodeSetPopupCallback(MTNODE node, MTREE_POPUP_CB cb, void *ud);
void MTreeNodeSetRenameCallback(MTNODE node, MTREE_NODE_RENAME_CB cb, void *ud);
void MTreeNodeSetDeleteCallback(MTNODE node, MTREE_NODE_DELETE_CB cb, void *ud);
New MGui Object: Directory Browser providing the following API:
MOBJECT MCreateDirBrowser (MOBJECT parent, const char *dir,
MTFont font, int width, int height, CARD16 flags);
void MDirBrowserSetDirChangeCallback (MOBJECT obj, DB_DIR_CHANGE_CB cb, void *ud);
void MDirBrowserSetDirectory (MOBJECT db, const char *dir, int notify);
const char *MDirBrowserGetDirectory (MOBJECT db);
File Browser Utility extended version:
int MFileBrowseExt (const char *t, const char *ext, char *fname, char *dname,
FB_PREFS *prefs);
New Utility functions to select a directory:
int MDirSelection(const char *title, const char *filter, char *dname,
int change_cur_dir);
int MDirBrowse(const char *title, const char *filter, char *dname,
int change_cur_dir);
int MDirBrowseExt (const char *t, const char *ext, char *dname, FB_PREFS *prefs);
Release 4.0.5
Buttons and scrollbar color in Edit objects now default to gray again.
New functions to set automatically the control buttons and scrollbar
background color based on the color of the main object:
void MEditEnableAutoControlColor(MOBJECT edit);
void MEditDisableAutoControlColor(MOBJECT edit);
void MScrolledFormEnableAutoSliderColor(MOBJECT obj);
void MScrolledFormDisableAutoSliderColor(MOBJECT obj);
void MSBLEnableAutoSliderColor(MOBJECT obj);
void MSBLDisableAutoSliderColor(MOBJECT obj);
void MTreeEnableAutoSliderColor(MOBJECT obj);
void MTreeDisableAutoSliderColor(MOBJECT obj);
Fixed a bug causing the program to crash under DOS when Alt+F10 is pressed to
maximize an untitled shell (created with a NULL title).
Further fixes in Selecting objects inside a paged/tabbed form.
Fixed a drawing problem in the focus highlighting border in Radio button.
Fixed an unwanted window move problem occurring when resizing a SHELL under Linux.
Release 4.0.4
Fixed a bug in handling the background image as a resource option.
MSelectObject() now forces a page switch if the
object to be selected is located in an unmapped page of a Paged or
Tabbed Form.
Release 4.0.3
Bug fixes
Removed obsolete C++ classes: CmBMPImage, CmGIFImage, CmTIFFImage
Changed return type for functions MGetSysDir() and MGetCurrentDirectory(),
now "const char *"
Release 4.0.2
New Utility functions:
void MAddImagePath(const char *path);
void MRemoveImagePath(const char *path);
const char *MGetApplicationName(void);
Release 4.0.1
Several bug fixes
Release 4.0.0
Fixed a bug in drawing the ScrollBar object
Transparency support added to Edit objects (including OptionEdit and SpinEdit)
Transparency support added for TabbedForm object.
Improved Run-time object customization dialog
Sensitivity now works on ScrollBar objects
New Object MTree, featuring the following API:
typedef void (*MTREE_NODE_CB)(MTNODE, void *);
MOBJECT MCreateTree(MOBJECT parent, MTFont font, int width, int height, int n_types);
MTNODE MTreeCreateNode(MOBJECT tree, MTNODE parent, CARD16 type, CARD16 flags,
const char *text, void *ud);
void MTreeDestroyNode(MTNODE node, int notify);
void MTreeDestroyNodeContainee(MTNODE node, int notify);
void MTreeOpenNode(MTNODE node, int notify);
void MTreeCloseNode(MTNODE node, int notify);
void MTreeSelectNode(MTNODE node, int notify);
void MTreeSetOpenCallback(MOBJECT tree, MTREE_NODE_CB cb);
void MTreeSetCloseCallback(MOBJECT tree, MTREE_NODE_CB cb);
void MTreeSetSelectCallback(MOBJECT tree, MTREE_NODE_CB cb);
void MTreeSetDestroyCallback(MOBJECT tree, MTREE_NODE_CB cb);
void MTreeSetImagesByName(MOBJECT tree, int type, const char *norm, const char *open, const char *sel);
void MTreeSetImagesByData(MOBJECT tree, int type, MIMAGE norm, MIMAGE open, MIMAGE sel);
void MTreeSetHighLightColors(MOBJECT obj, MTColor bgc, MTColor fgc);
void MTreeSetHighLightFGColor(MOBJECT obj, MTColor fgc);
void MTreeSetLineColor(MOBJECT obj, MTColor col);
MOBJECT MTreeGetVScrollBar(MOBJECT p);
MOBJECT MTreeGetHScrollBar(MOBJECT p);
void MTreeSetSliderColor(MOBJECT p, MTColor color);
void MTreeSetSliderColorShift(MOBJECT p, int percentage);
MTNODE MTreeGetSelectedNode(MOBJECT tree);
MTNODE MTreeGetFirstNode(MOBJECT tree);
MTNODE MTreeNodeGetNext(MTNODE node);
MTNODE MTreeNodeGetFirstChild(MTNODE node);
MTNODE MTreeNodeGetParent(MTNODE node);
void MTreeNodeSetImages(MTNODE node, MIMAGE norm, MIMAGE open, MIMAGE sel);
void MTreeNodeSetText(MTNODE node, const char *text);
void MTreeNodeSetUserData(MTNODE node, void *ud);
void *MTreeNodeGetUserData(MTNODE node);
void MTreeNodeGetText(MTNODE node, char *text);
CARD16 MTreeNodeGetType(MTNODE node);
void MTreeNodeSetOpenCallback(MTNODE node, MTREE_NODE_CB cb);
void MTreeNodeSetCloseCallback(MTNODE node, MTREE_NODE_CB cb);
void MTreeNodeSetSelectCallback(MTNODE node, MTREE_NODE_CB cb);
void MTreeNodeSetDestroyCallback(MTNODE node, MTREE_NODE_CB cb);
New Utility functions:
void MObjectSetSolid(MOBJECT obj);
void MObjectSetTransparent(MOBJECT obj);
void MObjectSetBackgroundColor(MOBJECT obj, MTColor bgc);
void MObjectSetForegroundColor(MOBJECT obj, MTColor fgc);
void MObjectSetBGColorFromParent(MOBJECT obj, int true_false, int percentage);
void MObjectSetFGColorFromParent(MOBJECT obj, int true_false);
int MObjectUsesFGColorFromParent(MOBJECT obj);
int MObjectUsesBGColorFromParent(MOBJECT obj, int *percentage_ret);
void MScrollBarSetSliderColorShift(MOBJECT p, int percentage);
MOBJECT MScrolledEditGetVScrollBar(MOBJECT p);
MOBJECT MScrolledEditGetHScrollBar(MOBJECT p);
MOBJECT MScrolledFormGetVScrollBar(MOBJECT obj);
MOBJECT MScrolledFormGetHScrollBar(MOBJECT obj);
void MSListSetSliderColor(MOBJECT p, MTColor color);
void MSListSetSliderColorShift(MOBJECT p, int percentage);
void MScrolledEditSetSliderColor(MOBJECT p, MTColor color);
void MScrolledEditSetSliderColorShift(MOBJECT p, int percentage);
void MScrolledFormSetSliderColor(MOBJECT p, MTColor color);
void MScrolledFormSetSliderColorShift(MOBJECT p, int percentage);
void MSListSetHighLightFGColor(MOBJECT obj, MTColor fgc);
void MMenuBarSetHighLightFGColor(MOBJECT obj, MTColor fgc);
void MMenuSetHighLightFGColor(MOBJECT obj, MTColor fgc);
MTColor MReAllocColor(MTColor color);
MTColor MAllocHighlightBGColor(MTColor bgc, MTColor fgc);
New Object Splitter:
MOBJECT MCreateSplitter(MOBJECT parent);
Image Improvement
MIMAGE MReadImageFile(const char *fname);
MIMAGE MReadPNGFile(const char *fname);
void MImageAddDefaultTypeGIF(void);
void MImageAddDefaultTypeTIFF(void);
void MImageAddDefaultTypeJPEG(void);
void MImageAddDefaultTypePNG(void);
void MImageAddAlphaChannel(MIMAGE img);
int MImageGetPixelAlpha(MIMAGE img, int x, int y);
void MImageSetPixelAlpha(MIMAGE img, int x, int y, CARD8 alpha);
Object Drawing Improvement via smart drawing
void MObjectEnableSmartDrawing(MOBJECT form);
void MObjectDisableSmartDrawing(MOBJECT form);
New function to control minimum object size
void MObjectSetMinSize(MOBJECT obj, int w, int h);
New SHELL flags:
- SF_NO_W_RESIZE
- SF_NO_H_RESIZE
See Full
MGui Release History