#include <ROOT/RFileDialog.hxx>
void filedialog(int kind = 0)
{
std::string fileName;
switch (kind) {
}
if (kind > 0) {
printf("Selected file: %s\n", fileName.c_str());
return;
}
dialog->SetNameFilters({ "C++ files (*.cxx *.cpp *.c *.C)", "ROOT files (*.root)", "Image files (*.png *.jpg *.jpeg)", "Text files (*.txt)", "Any files (*)" });
dialog->SetSelectedFilter("ROOT files");
dialog->SetCallback([dialog](const std::string &res) mutable {
printf("Selected file: %s\n", res.c_str());
});
dialog->Show();
}
#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.
- Date
- 2019-11-01
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Sergey Linev S.Lin.nosp@m.ev@g.nosp@m.si.de
Definition in file filedialog.cxx.