clan::SaveFileDialog Class Reference - ClanLib SDK
Description: clan::SaveFileDialog Class Reference

Public Member Functions | List of all members
clan::SaveFileDialog Class Reference

Displays the system save file dialog. More...

`#include <save_file_dialog.h>`

## Public Member Functions
| SaveFileDialog (View *owner)
| Constructs a save file dialog.
void | add_filter (const std::string &filter_description, const std::string &filter_extension, bool is_default=false)
| Add a filter that determines what types of files are displayed.
void | clear_filters ()
| Clears all filters.
std::string | filename () const
| Get the full path of the file selected.
void | set_filename (const std::string &filename)
| Sets a string containing the full path of the file selected.
void | set_filter_index (int filter_index)
| Sets a default filter, on a 0-based index.
void | set_initial_directory (const std::string &path)
| Sets the initial directory that is displayed.
void | set_title (const std::string &title)
| Sets the text that appears in the title bar.
bool | show ()
| Shows the file dialog.

## Detailed Description

Displays the system save file dialog.

## Constructor & Destructor Documentation

## ◆ SaveFileDialog()

clan::SaveFileDialog::SaveFileDialog | ( | View * | owner | ) |

Constructs a save file dialog.

## Member Function Documentation

## ◆ add_filter()

void clan::SaveFileDialog::add_filter | ( | const std::string & | filter_description,
|  | const std::string & | filter_extension,
|  | bool | is_default = false )

Add a filter that determines what types of files are displayed.

## ◆ clear_filters()

void clan::SaveFileDialog::clear_filters | ( |  | ) |

Clears all filters.

## ◆ filename()

std::string clan::SaveFileDialog::filename | ( |  | ) | const

Get the full path of the file selected.

## ◆ set_filename()

void clan::SaveFileDialog::set_filename | ( | const std::string & | filename | ) |

Sets a string containing the full path of the file selected.

## ◆ set_filter_index()

void clan::SaveFileDialog::set_filter_index | ( | int | filter_index | ) |

Sets a default filter, on a 0-based index.

## ◆ set_initial_directory()

void clan::SaveFileDialog::set_initial_directory | ( | const std::string & | path | ) |

Sets the initial directory that is displayed.

## ◆ set_title()

void clan::SaveFileDialog::set_title | ( | const std::string & | title | ) |

Sets the text that appears in the title bar.

## ◆ show()

bool clan::SaveFileDialog::show | ( |  | ) |

Shows the file dialog.

Returns
  true if the user clicks the OK button of the dialog that is displayed, false otherwise.

The documentation for this class was generated from the following file:

- save_file_dialog.h