1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
\r
6 #define __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
\r
8 #include "IGUIElement.h"
\r
16 //! Standard file chooser dialog.
\r
17 /** \warning When the user selects a folder this does change the current working directory
\r
19 \par This element can create the following events of type EGUI_EVENT_TYPE:
\r
20 \li EGET_DIRECTORY_SELECTED
\r
21 \li EGET_FILE_SELECTED
\r
22 \li EGET_FILE_CHOOSE_DIALOG_CANCELLED
\r
24 class IGUIFileOpenDialog : public IGUIElement
\r
29 IGUIFileOpenDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
\r
30 : IGUIElement(EGUIET_FILE_OPEN_DIALOG, environment, parent, id, rectangle) {}
\r
32 //! Returns the filename of the selected file converted to wide characters. Returns NULL if no file was selected.
\r
33 virtual const wchar_t* getFileName() const = 0;
\r
35 //! Returns the filename of the selected file. Is empty if no file was selected.
\r
36 virtual const io::path& getFileNameP() const = 0;
\r
38 //! Returns the directory of the selected file. Empty if no directory was selected.
\r
39 virtual const io::path& getDirectoryName() const = 0;
\r
41 //! Returns the directory of the selected file converted to wide characters. Returns NULL if no directory was selected.
\r
42 virtual const wchar_t* getDirectoryNameW() const = 0;
\r
46 } // end namespace gui
\r
47 } // end namespace irr
\r