Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/karma/lib/Filewin.html
Дата изменения: Unknown
Дата индексирования: Tue Dec 25 09:15:25 2007
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п
Widget: Filewin

The "Filewin" Widget

This widget provides a file selector (browser).

Library: karmawidgets
Link With: -lkarmawidgets

Tables

Filewin_ResourceNamesList of resource names for Filewin widget
Filewin_ResourcesList of resources for Filewin widget

Functions

XkwFilewinRescanForce a directory rescan in a Filewin widget.
XkwFilewinCurrentDirectoryGet the current directory in a Filewin widget.
XkwFilewinRegisterDirCbkRegister a callback to capture directory selection events.
XkwFilewinStandardFileTester_nDStandard file tester.
XkwFilewinStandardFileTester_3DStandard file tester for cube files.
XkwFilewinChangeDirectoryChange the current directory for a Filewin widget.

Prototype Functions

Filewin_PROTO_dir_cbkCallback for directory selection.


Tables


Filewin_ResourceNames List of resource names for Filewin widget

Name Purpose
XkwNfileSelectCallback Callbacks for file selection
XkwNfilenameTester Callbacks to test filenames
XtNforeground The foreground pixel
XkwNforwardSyntheticEvents Forward synthetic events
XkwNtrapDirectoryDatasets Trap directories which are known dataset types


Filewin_Resources List of resources for Filewin widget

Name Class Rep. Type Default
XkwNfileSelectCallback XtCCallback XtRCallback NULL
XkwNdirectoryChangeCallback XtCCallback XtRCallback NULL
XkwNfilenameTester XtCCallback XtRPointer NULL
XtNforeground XtCForeground XtRPixel XtDefaultForeground
XkwNnumLines XkwCNumLines XtRInt 0
XkwNforwardSyntheticEvents XkwCForwardSyntheticEvents XtRBool False
XkwNtrapDirectoryDatasets XkwCTrapDirectoryDatasets XtRBool False
XkwNshowDotsToggleWidget XkwCShowDotsToggleWidget XtRWidget NULL


Functions


EXPERIMENTAL FUNCTION: subject to change without notice

void XkwFilewinRescan (Widget W)

Force a directory rescan in a Filewin widget.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

char * XkwFilewinCurrentDirectory (Widget W)

Get the current directory in a Filewin widget.

Parameters:

Returns: A pointer to a dynamically allocated string containing the current directory for the widget. This must be freed with m_free.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc XkwFilewinRegisterDirCbk (Widget w, flag (*callback) (Widget w, void *info, CONST char *dirname), void *info)

This routine will register a callback to capture directory selection events prior to the Filewin widget changing directory.

Parameters:

Returns: A KCallbackFunc object.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag XkwFilewinStandardFileTester_nD (KFileInfo finfo)

This routine may be passed as the value for the XkwNfilenameTester resource on a FilewinWidget or FilepopupWidget. The routine will accept all known filetypes.

Parameters:

Returns: TRUE if the file is to be displayed, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag XkwFilewinStandardFileTester_3D (KFileInfo finfo)

This routine may be passed as the value for the XkwNfilenameTester resource on a FilewinWidget or FilepopupWidget. The routine will accept all known filetypes which are capable of containing a 3-dimensional array of data.

Parameters:

Returns: TRUE if the file is to be displayed, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag XkwFilewinChangeDirectory (Widget W, CONST char *dirname)

Change the current directory for a Filewin widget.

Parameters:

Returns: TRUE on success, else FALSE. On error the directory is unchanged.
Multithreading Level: Unsafe


Prototype Functions


flag Filewin_PROTO_dir_cbk (Widget w, void *info, CONST char *dirname)

This routine is called when the user selects a directory in the file selector. Normally the directory is descended and another group of files is visible. This callback makes it to possible to "capture" a directory if required. This can be useful when a conceptual "data file" is in fact implemented as a directory or files, such as with Miriad.

Parameters:

Returns: TRUE if the selection event is to be consumed, else FALSE (meaning the event should be passed on to other callbacks, or, if none consume the event, the widget will change it's active directory).
Multithreading Level: Unsafe


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services