xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
save_file_dialog.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/io/file.h>
6 #include "file_dialog.h"
7 
9 namespace xtd {
11  namespace forms {
21  class forms_export_ save_file_dialog final : public file_dialog {
22  public:
24 
27  save_file_dialog() = default;
29 
31 
35  std::fstream open_file() const {return io::file::open(xtd::ustring(file_name_), std::ios::binary | std::ios::in | std::ios::out);}
37 
38  private:
39  bool run_file_dialog(intptr_t hwnd_owner) override;
40  void run_file_sheet(intptr_t owner) override;
41  };
42  }
43 }
Displays a dialog box from which the user can select a file.
Definition: file_dialog.h:41
std::fstream open_file() const
Opens the file with read/write permission selected by the user.
Definition: save_file_dialog.h:35
Contains xtd::forms::file_dialog dialog.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::io::file class.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Prompts the user to select a location for saving a file. This class cannot be inherited.
Definition: save_file_dialog.h:21
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
static std::fstream open(const xtd::ustring &path, std::ios::openmode mode)
Opens a FileStream on the specified path.