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

DirBrowser object


Functions

MOBJECT MCreateDirBrowser (MOBJECT parent, const char *dir, MTFont font, int width, int height, CARD16 flags)
 Creates a Directory Browser object.

void MDirBrowserSetDirectory (MOBJECT obj, const char *dir, int notify)
 Changes the object's current directory.

const char * MDirBrowserGetDirectory (MOBJECT db)
 Returns the object's current directory.

void MDirBrowserSetDirChangeCallback (MOBJECT obj, DB_DIR_CHANGE_CB cb, void *ud)
 Sets the callback receiving directory change events.


Function Documentation

MOBJECT MCreateDirBrowser MOBJECT    parent,
const char *    dir,
MTFont    font,
int    width,
int    height,
CARD16    flags
 

Creates a Directory Browser object.

This object uses an MTree object to display the file system in a graphic form. It's used by file/directory browsing utility functions. The object is capable of notifying the file system navigation to the application via a dedicated callback.

Parameters:
parent Parent MGui object.
dir Initial object directory.
font Font to be used to display directory names.
width Desired initial width.
height Desired initial height.
flags Options in bitwise or (DBF_ALLOW_CREATE, DBF_ALLOW_RENAME, DBF_ALLOW_DELETE) to enable the object's capability to create/rename/delete directories.
See also:
MFileBrowse, MFileBrowseExt, MDirBrowse, MDirBrowseExt

const char* MDirBrowserGetDirectory MOBJECT    db
 

Returns the object's current directory.

void MDirBrowserSetDirChangeCallback MOBJECT    obj,
DB_DIR_CHANGE_CB    cb,
void *    ud
 

Sets the callback receiving directory change events.

Parameters:
obj DirBrowser object.
cb The user callback.
ud User data associated to the user callback.

void MDirBrowserSetDirectory MOBJECT    obj,
const char *    dir,
int    notify
 

Changes the object's current directory.

Parameters:
obj DirBrowser object.
dir Desired new directory.
notify Boolean value to specify whether or not the object has to call the DirChangeCallback.
See also:
MDirBrowserSetDirChangeCallback


Generated on Sun Aug 17 17:29:28 2003 for MGui API by doxygen1.3-rc2