16 #include "TGFileDialog.h"
65 static TString
dir(
".");
66 const char* kImageExportTypes[] = {
"PNG",
74 "Encapsulated PostScript",
80 fi.fFileTypes = kImageExportTypes;
81 fi.fIniDir = StrDup(dir);
82 new TGFileDialog(gClient->GetDefaultRoot(), iParent, kFDSave, &fi);
84 if (fi.fFilename !=
nullptr) {
89 std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
90 if (name.find(ext) == name.npos)
94 }
catch (std::runtime_error&
e) {
const std::string & typeName() const
const std::string & name() const
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
virtual void saveImageTo(const std::string &iName) const =0
sigc::signal< void, const FWViewBase * > beingDestroyed_
void promptForSaveImageTo(TGFrame *) const
FWViewBase(FWViewType::EType, unsigned int iVersion=1)
FWViewType::EType typeId() const