6#ifndef EGT_FILEDIALOG_H
7#define EGT_FILEDIALOG_H
14#include <egt/button.h>
15#include <egt/detail/meta.h>
16#include <egt/dialog.h>
21#include <egt/signal.h>
73 explicit FileDialog(
const std::string& filepath,
const Rect& rect = {})
noexcept;
120 virtual void selected(
const std::string& fselect) = 0;
191 void selected(
const std::string& fselect)
override;
271 void selected(
const std::string& fselect)
override;
A dialog is a widget that allows user to make a decision.
Definition dialog.h:38
A FileDialog is a widget that allows user to:
Definition filedialog.h:42
std::string m_filepath
File path of a directory.
Definition filedialog.h:107
void show_centered() override
Show the window centered.
std::shared_ptr< ListBox > m_flist
List Box for file listing.
Definition filedialog.h:104
void list_item_selected(int index)
Get the List Item selected index.
FileDialog(const std::string &filepath, const Rect &rect={}) noexcept
Create a file dialog window.
void serialize(Serializer &serializer) const override
FileDialog(Serializer::Properties &props, bool is_derived) noexcept
void show() override
Show the Widget.
FileDialog(Serializer::Properties &props) noexcept
Create a file dialog window.
Definition filedialog.h:80
FileDialog(const Rect &rect={}) noexcept
Create a file open dialog window and list the contents of current directory.
bool list_files(const std::string &filepath)
List the contents of file path directory.
virtual void selected(const std::string &fselect)=0
File selected.
Signal on_selected
Event signal.
Definition filedialog.h:52
A FileOpenDialog is a widget which inherits from FileDialog and that allows user to:
Definition filedialog.h:138
FileOpenDialog(const Rect &rect={}) noexcept
Create a file open dialog window and list the contents of current directory.
FileOpenDialog(Serializer::Properties &props, bool is_derived) noexcept
void selected(const std::string &fselect) override
File selected.
FileOpenDialog(const std::string &filepath, const Rect &rect={}) noexcept
Create a file open dialog window.
FileOpenDialog(Serializer::Properties &props) noexcept
Create a file open dialog window.
Definition filedialog.h:164
EGT_NODISCARD std::string selected() const
Return file selected in file open dialog window.
std::string m_fselected
File path of a selected file.
Definition filedialog.h:184
A FileSaveDialog is a widget which inherits from FileDialog and that allows user to:
Definition filedialog.h:205
void selected(const std::string &fselect) override
File selected.
FileSaveDialog(const std::string &filepath, const Rect &rect={}) noexcept
Create a file save dialog window.
std::string m_fsave
File path of a file save location.
Definition filedialog.h:264
void show_centered() override
Show the window centered.
FileSaveDialog(Serializer::Properties &props) noexcept
Create a file save dialog window.
Definition filedialog.h:231
void show() override
Show the Widget.
EGT_NODISCARD std::string selected() const
Selected a location for saving a file.
FileSaveDialog(const Rect &rect={}) noexcept
Create a file save dialog window and list the contents of current directory.
FileSaveDialog(Serializer::Properties &props, bool is_derived) noexcept
TextBox m_fsave_box
Input a filename or file path.
Definition filedialog.h:261
Abstract base serializer class.
Definition serialize.h:34
std::list< std::tuple< std::string, std::string, Serializer::Attributes > > Properties
Definition serialize.h:47
Signal class used for defining a signal and dispatching events.
Definition signal.h:30
Input text box.
Definition text.h:134
EGT framework namespace.
Definition animation.h:24