28#include <ROOT/RFileDialog.hxx>
31void filedialog(
int kind = 0)
43 printf(
"Selected file: %s\n", fileName.c_str());
49 dialog->SetNameFilters({
"C++ files (*.cxx *.cpp *.c *.C)",
"ROOT files (*.root)",
"Image files (*.png *.jpg *.jpeg)",
"Text files (*.txt)",
"Any files (*)" });
51 dialog->SetSelectedFilter(
"ROOT files");
54 dialog->SetCallback([dialog](
const std::string &res)
mutable {
55 printf(
"Selected file: %s\n", res.c_str());
#define R__LOAD_LIBRARY(LIBRARY)
static std::string SaveAs(const std::string &title="", const std::string &fname="")
Start SaveAs dialog.
static std::string OpenFile(const std::string &title="", const std::string &fname="")
Start OpenFile dialog.
static std::string NewFile(const std::string &title="", const std::string &fname="")
Start NewFile dialog.