gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
FileDialog Class Reference

#include <FileDialog.H>

Inheritance diagram for FileDialog:
[legend]
Collaboration diagram for FileDialog:
[legend]

Public Member Functions

 FileDialog ()
 Constructor. More...
 
 FileDialog (const std::string title, GtkWindow *parent, GtkFileChooserAction action, const char *stockImageName)
 
virtual ~FileDialog ()
 Destructor. More...
 
void setDirectory (const std::string name)
 
void setFileName (const std::string name)
 
std::string getName ()
 
gint run ()
 
- Public Member Functions inherited from Container
void setBorder (unsigned int size)
 
unsigned int getBorder (void)
 
Containeroperator<< (Container &c)
 
Containeroperator<< (Container *c)
 
Containeroperator<< (Widget &w)
 
Containeroperator<< (Widget *w)
 
virtual Containeroperator<< (GtkWidget *w)
 
Containeroperator<< (LinkList< GtkWidget *> &ll)
 
Containeroperator>> (GtkWidget *w)
 
Containeroperator>> (Container *c)
 
Containeroperator>> (Container &c)
 
Containeroperator>> (LinkList< GtkWidget *> &ll)
 
void setChildrensSensitivity (bool sens)
 
bool areAnyChildrensSensitive (void)
 
unsigned int size ()
 
- Public Member Functions inherited from Widget
 Widget ()
 Construcotr. More...
 
 Widget (GtkWidget *w)
 
virtual ~Widget ()
 Destructor. More...
 
GtkWidget * ref (void)
 
void unref (void)
 
GtkWidget * show (void)
 
GtkWidget * hide (void)
 
bool getVisible (void)
 
GtkWidget * getWidget (void)
 
bool getSensitive (void)
 
void setSensitive (bool sens)
 
void getSize (int &width, int &height)
 
virtual void setSize (int width, int height)
 
void getLocationSize (int &x, int &y, int &width, int &height)
 
void queueDraw ()
 
GdkWindow * getWindow ()
 
void connect (const char *event, GCallback callback, gpointer data)
 
void connectAfter (const char *event, GCallback callback, gpointer data)
 
void connectExposeEventCallback (GCallback callback, void *data)
 
void connectExposeEventCallback (GtkWidget *w, GCallback callback, void *data)
 
void connectConfigureEventCallback (GCallback callback, void *data)
 
void connectConfigureEventCallback (GtkWidget *w, GCallback callback, void *data)
 
Widgetoperator<< (DragNDrop &dnd)
 
Widgetoperator>> (DragNDrop &dnd)
 

Additional Inherited Members

- Protected Member Functions inherited from Container
virtual void pack (GtkWidget *obj)
 
- Protected Member Functions inherited from Widget
virtual bool checkDropValidity (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData)
 
virtual bool dragDataReceived (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData, int length)
 
virtual void dragLeave (GtkWidget *w, GtkWidget *sourceWidget)
 
virtual bool dragMotion (GtkWidget *w, GtkWidget *sourceWidget, int x, int y)
 
virtual int chooseTheTargetToUse (GtkWidget *w, GtkWidget *sourceWidget, DragNDrop &dnd)
 
virtual void dragDataGet (GtkWidget *w, GtkSelectionData *selectionData, guint info)
 
virtual void dragDataDelete (GtkWidget *w)
 
virtual void dragBegin (GtkWidget *w)
 
virtual void dragEnd (GtkWidget *w)
 
- Protected Attributes inherited from Widget
GtkWidget * widget
 The container based widget. More...
 

Detailed Description

A file dialog for choosing a file name.

Definition at line 24 of file FileDialog.H.

Constructor & Destructor Documentation

◆ FileDialog() [1/2]

FileDialog::FileDialog ( )
inline

Constructor.

Definition at line 27 of file FileDialog.H.

◆ FileDialog() [2/2]

FileDialog::FileDialog ( const std::string  title,
GtkWindow *  parent,
GtkFileChooserAction  action,
const char *  stockImageName 
)
inline

Constructor

Definition at line 33 of file FileDialog.H.

◆ ~FileDialog()

virtual FileDialog::~FileDialog ( )
inlinevirtual

Destructor.

Definition at line 38 of file FileDialog.H.

Member Function Documentation

◆ getName()

std::string FileDialog::getName ( )
inline

Get the name set in the file chooser dialog.

Returns
The name

Definition at line 58 of file FileDialog.H.

◆ run()

gint FileDialog::run ( void  )
inline

run the dialog and return the response.

Returns
The response {GTK_RESPONSE_NONE, GTK_RESPONSE_REJECT, GTK_RESPONSE_ACCEPT, GTK_RESPONSE_DELETE_EVENT, GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, GTK_RESPONSE_CLOSE, GTK_RESPONSE_YES, GTK_RESPONSE_NO, GTK_RESPONSE_APPLY, GTK_RESPONSE_HELP}

Definition at line 89 of file FileDialog.H.

◆ setDirectory()

void FileDialog::setDirectory ( const std::string  name)
inline

Set the directory.

Parameters
nameThe directory name

Definition at line 43 of file FileDialog.H.

◆ setFileName()

void FileDialog::setFileName ( const std::string  name)
inline

Set the file name. If this file name doesn't exist, then the text field is left empty, and the directory is reset to the current path.

Parameters
nameThe name to set including the path to the file name.

Definition at line 51 of file FileDialog.H.


The documentation for this class was generated from the following file:
gtkIOStream: FileDialog Class Reference
GTK+ IOStream  Beta