#include <ROOT/RFileDialog.hxx>
{
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());
});
}
#define R__LOAD_LIBRARY(LIBRARY)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 experimental API, which might change in the future. Feedback is welcome!
- Author
- Sergey Linev S.Lin.nosp@m.ev@g.nosp@m.si.de
Definition in file filedialog.cxx.