gtk.FileSelection.FileSelection Class Reference

Inheritance diagram for gtk.FileSelection.FileSelection:

gtk.Dialog.Dialog gdk.Window.Window gdk.Drawable.Drawable gobject.ObjectG.ObjectG List of all members.

Public Member Functions

GtkFileSelectiongetFileSelectionStruct ()
 this (GtkFileSelection *gtkFileSelection)
 Sets our main struct and passes it to the parent class.
 this (char[] title)
 Creates a new file selection dialog box.
void setFilename (char[] filename)
 Sets a default path for the file requestor.
char[] getFilename ()
 This function returns the selected filename in the GLib file name encoding.
void complete (char[] pattern)
 Will attempt to match pattern to a valid filenames or subdirectories in the current directory.
void showFileopButtons ()
 Shows the file operation buttons, if they have previously been hidden.
void hideFileopButtons ()
 Hides the file operation buttons that normally appear at the top of the dialog.
char ** getSelections ()
 Retrieves the list of file selections the user has made in the dialog box.
void setSelectMultiple (int selectMultiple)
 Sets whether the user is allowed to select multiple files in the file list.
int getSelectMultiple ()
 Determines whether or not the user is allowed to select multiple files in the file list.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GtkFileSelectiongtkFileSelection
 the main Gtk struct

Constructor & Destructor Documentation

gtk.FileSelection.FileSelection.this ( GtkFileSelection gtkFileSelection  ) 

Sets our main struct and passes it to the parent class.

gtk.FileSelection.FileSelection.this ( char[]  title  ) 

Creates a new file selection dialog box.

By default it will contain a GtkTreeView of the application's current working directory, and a file listing. Operation buttons that allow the user to create a directory, delete files and rename files, are also present. title: a message that will be placed in the file requestor's titlebar. Returns: the new file selection.


Member Function Documentation

void gtk.FileSelection.FileSelection.complete ( char[]  pattern  ) 

Will attempt to match pattern to a valid filenames or subdirectories in the current directory.

If a match can be made, the matched filename will appear in the text entry field of the file selection dialog. If a partial match can be made, the "Files" list will contain those file names which have been partially matched, and the "Folders" list those directories which have been partially matched. filesel: a GtkFileSelection. pattern: a string of characters which may or may not match any filenames in the current directory.

char [] gtk.FileSelection.FileSelection.getFilename (  ) 

This function returns the selected filename in the GLib file name encoding.

To convert to UTF-8, call g_filename_to_utf8(). The returned string points to a statically allocated buffer and should be copied if you plan to keep it around. If no file is selected then the selected directory path is returned. filesel: a GtkFileSelection Returns: currently-selected filename in the on-disk encoding.

GtkFileSelection* gtk.FileSelection.FileSelection.getFileSelectionStruct (  ) 

char** gtk.FileSelection.FileSelection.getSelections (  ) 

Retrieves the list of file selections the user has made in the dialog box.

This function is intended for use when the user can select multiple files in the file list. The filenames are in the GLib file name encoding. To convert to UTF-8, call g_filename_to_utf8() on each string. filesel: a GtkFileSelection Returns: a newly-allocated NULL-terminated array of strings. Use g_strfreev() to free it.

int gtk.FileSelection.FileSelection.getSelectMultiple (  ) 

Determines whether or not the user is allowed to select multiple files in the file list.

See gtk_file_selection_set_select_multiple(). filesel: a GtkFileSelection Returns: TRUE if the user is allowed to select multiple files in the file list Property Details The "filename" property "filename" gchararray : Read / Write The currently selected filename. Default value: NULL

void* gtk.FileSelection.FileSelection.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gtk.Dialog.Dialog.

void gtk.FileSelection.FileSelection.hideFileopButtons (  ) 

Hides the file operation buttons that normally appear at the top of the dialog.

Useful if you wish to create a custom file selector, based on GtkFileSelection. filesel: a GtkFileSelection.

void gtk.FileSelection.FileSelection.setFilename ( char[]  filename  ) 

Sets a default path for the file requestor.

If filename includes a directory path, then the requestor will open with that path as its current working directory. This has the consequence that in order to open the requestor with a working directory and an empty filename, filename must have a trailing directory separator. The encoding of filename is preferred GLib file name encoding, which may not be UTF-8. See g_filename_from_utf8(). filesel: a GtkFileSelection. filename: a string to set as the default file name.

void gtk.FileSelection.FileSelection.setSelectMultiple ( int  selectMultiple  ) 

Sets whether the user is allowed to select multiple files in the file list.

Use gtk_file_selection_get_selections() to get the list of selected files. filesel: a GtkFileSelection select_multiple: whether or not the user is allowed to select multiple files in the file list.

void gtk.FileSelection.FileSelection.showFileopButtons (  ) 

Shows the file operation buttons, if they have previously been hidden.

The rest of the widgets in the dialog will be resized accordingly. filesel: a GtkFileSelection.


Member Data Documentation

GtkFileSelection* gtk.FileSelection.FileSelection.gtkFileSelection [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo