#ifndef __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
#define __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_GUI_
#include "IGUIFileOpenDialog.h"
#include "IGUIButton.h"
#include "IGUIListBox.h"
#include "IGUIEditBox.h"
#include "IFileSystem.h"
namespace irr
{
namespace gui
{
class CGUIFileOpenDialog : public IGUIFileOpenDialog
{
public:
CGUIFileOpenDialog(const wchar_t* title, IGUIEnvironment* environment, IGUIElement* parent, s32 id);
virtual ~CGUIFileOpenDialog();
virtual const wchar_t* getFileName() const;
virtual const io::path& getDirectoryName();
virtual bool OnEvent(const SEvent& event);
virtual void draw();
protected:
void fillListBox();
void sendSelectedEvent( EGUI_EVENT_TYPE type );
void sendCancelEvent();
core::position2d<s32> DragStart;
core::stringw FileName;
io::path FileDirectory;
IGUIButton* CloseButton;
IGUIButton* OKButton;
IGUIButton* CancelButton;
IGUIListBox* FileBox;
IGUIEditBox* FileNameText;
IGUIElement* EventParent;
io::IFileSystem* FileSystem;
io::IFileList* FileList;
bool Dragging;
};
}
}
#endif
#endif