51 const std::string&
title()
const
89 std::string
path()
const;
333 void push_fileview_row(
class listbox& filelist,
const std::string& name,
const std::string& icon,
bool check_selection =
true);
file_dialog & set_extension(const std::string &value)
Sets allowed file extensions for file names in save mode.
file_dialog & set_ok_label(const std::string &value)
Sets the OK button label.
void sync_bookmarks_bar()
Updates the bookmarks bar state to reflect the internal state.
bool process_submit_common(const std::string &name)
file_dialog & set_path(const std::string &value)
Sets the initial file selection.
const std::string & title() const
Gets the current dialog title text.
void on_bookmark_add_cmd()
Handles Add Bookmark button press events.
file_dialog & set_title(const std::string &value)
Sets the current dialog title text.
file_dialog & set_read_only(bool value)
Whether to provide user interface elements for manipulating existing objects.
std::vector< std::string > bookmark_paths_
file_dialog & set_save_mode(bool value)
Sets the dialog's behavior on non-existent file name inputs.
void check_filename()
Check if the filename is valid and disable save button if invalid.
SELECTION_TYPE register_new_selection(const std::string &name)
Updates the internal state and returns the type of the selection.
void set_input_text(class text_box &t, const std::string &value)
void on_file_delete_cmd()
Handles Delete button press events.
std::string path() const
Gets the current file selection.
@ SELECTION_PARENT_NOT_FOUND
file_dialog & set_filename(const std::string &value)
Sets the initial file name input but not the path.
file_dialog & set_message(const std::string &value)
Sets the current dialog instructions/message text.
std::vector< std::string > dir_files_
void on_bookmark_selected()
Handles selection or deselection of bookmarks.
const std::string & message() const
Gets the current dialog instructions/message text.
void clear_input_text(class text_box &t)
std::string current_entry_
bool is_selection_type_acceptable(SELECTION_TYPE stype) const
Returns whether the given selection type is acceptable for closing the dialog.
bool save_mode() const
Returns whether save mode is enabled.
bool process_fileview_submit()
Processes file view selection in reaction to row double-click events.
bool process_textbox_submit()
Processes textbox input in reaction to OK button/Enter key events.
virtual void pre_show() override
Actions to be taken before showing the window.
void on_dir_create_cmd()
Handles New Folder button press events.
int user_bookmarks_begin_
virtual const std::string & window_id() const override
The ID of the window to build.
std::set< desktop::GAME_PATH_TYPES > extra_paths_
void on_row_selected()
Handles file/directory selection on single-click.
void push_fileview_row(class listbox &filelist, const std::string &name, const std::string &icon, bool check_selection=true)
Row building helper for refresh_fileview().
bool confirm_overwrite(SELECTION_TYPE stype)
Prompts the user before overwriting an existing file.
void refresh_fileview()
Updates the dialog contents to match the internal state.
std::string get_filelist_selection(class listbox &filelist)
file_dialog & add_extra_path(desktop::GAME_PATH_TYPES path)
bool on_exit(window &window)
Handles dialog exit events and decides whether to proceed or not.
std::vector< std::string > dir_subdirs_
bool read_only() const
Whether user interface elements for manipulating existing objects are provided.
void on_bookmark_del_cmd()
Handles Remove Bookmark button press events.
std::vector< std::string > extensions_
Abstract base class for all modal dialogs.
A widget that allows the user to input text in single line.
base class of top level items, the only item which needs to store the final canvases to draw on.
Various uncategorised dialogs.
Desktop paths, storage media and bookmark functions.