openldev/openldev-widgets/openldev-file-browser.h File Reference

FileBrowser. More...

#include "../openldev-settings/openldev-project.h"
#include <gtk/gtk.h>
#include <vector>
#include <iostream>
#include <dirent.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomeui/gnome-icon-lookup.h>
#include <glib-object.h>
#include <glib.h>

Data Structures

struct  FileBrowser
 Project file browser located in the SideBar GtkNotebook. More...

Functions

GtkWidget * file_browser_new ()
const char * file_browser_get_selected_file (FileBrowser *browser)
void file_browser_populate (FileBrowser *browser, string base_directory)
void file_browser_move_up (FileBrowser *browser)
void file_browser_move (FileBrowser *browser, const char *directory)
void file_browser_refresh (FileBrowser *browser)


Detailed Description


Function Documentation

const char* file_browser_get_selected_file FileBrowser browser  ) 
 

Retrive the full file path and name of the currently selected file. If there is no file currently selected, the string "NONE" will be returned.

Parameters:
browser A FileBrowser widget object.
Returns:
The full file path and name of the selected file or "NONE" if no file is selected.

void file_browser_move FileBrowser browser,
const char *  directory
 

Move in to a directory under base_directory. This will be appended to the back of the current directory. You do not need to include any backslash characters in the directory name.

Parameters:
browser A FileBrowser widget object.
directory The name of the directory to move to.

void file_browser_move_up FileBrowser browser  ) 
 

Move up one directory level in the file browser. If it is currently at the base_directory, the file browser will just be refreshed.

Parameters:
browser A FileBrowser widget object.

GtkWidget* file_browser_new  ) 
 

Create a new FileBrowser widget. This will allow you to include the file browser in other places of the OpenLDev application. It will not initially display the contents of any folder.

Returns:
A new FileBrowser widget.

void file_browser_populate FileBrowser browser,
string  base_directory
 

The FileBrowser widget will be reset, and base_directory will define the highest directory it will browse up to.

Parameters:
browser A FileBrowser widget object.
base_directory The full path of the directory to open.

void file_browser_refresh FileBrowser browser  ) 
 

Refresh the current directory of the file browser. This does not happen when files are added or removed, so you must do this manually.

Parameters:
browser A FileBrowser widget object.


Generated on Sun May 14 14:57:41 2006 for OpenLDev by  doxygen 1.4.6