17 #include "TGFileDialog.h"
77 static TString
dir(
".");
78 const char * kImageExportTypes[] = {
"PNG",
"*.png",
82 "Encapsulated PostScript",
"*.eps",
86 fi.fFileTypes = kImageExportTypes;
87 fi.fIniDir = StrDup(dir);
88 new TGFileDialog(gClient->GetDefaultRoot(), iParent,
91 if (fi.fFilename != 0) {
92 std::string
name = fi.fFilename;
96 std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
97 if (name.find(ext) == name.npos)
102 catch (std::runtime_error &e) {
std::cout << e.what() << std::endl; }
sigc::signal< void, const FWViewBase * > beingDestroyed_
const std::string & typeName() const
const std::string & name() const
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
virtual void saveImageTo(const std::string &iName) const =0
void promptForSaveImageTo(TGFrame *) const
FWViewBase(FWViewType::EType, unsigned int iVersion=1)