#include <Fireworks/Core/interface/FWViewBase.h>
Public Member Functions | |
virtual FWViewContextMenuHandlerBase * | contextMenuHandler () const |
void | destroy () |
FWViewBase (FWViewType::EType, unsigned int iVersion=1) | |
virtual void | populateController (ViewerParameterGUI &) const |
void | promptForSaveImageTo (TGFrame *) const |
virtual void | saveImageTo (const std::string &iName) const =0 |
FWViewType::EType | typeId () const |
const std::string & | typeName () const |
Public Attributes | |
sigc::signal< void, const FWViewBase * > | beingDestroyed_ |
sigc::signal< void, Int_t, Int_t > | openSelectedModelContextMenu_ |
Protected Member Functions | |
virtual | ~FWViewBase () |
Protected Attributes | |
FWViewType | m_type |
Private Member Functions | |
FWViewBase (const FWViewBase &) | |
const FWViewBase & | operator= (const FWViewBase &) |
Description: Base class for all View instances
Usage: <usage>
Definition at line 35 of file FWViewBase.h.
FWViewBase::FWViewBase | ( | FWViewType::EType | type, |
unsigned int | iVersion = 1 |
||
) |
Definition at line 34 of file FWViewBase.cc.
: FWConfigurableParameterizable(iVersion), m_type(type) { }
FWViewBase::~FWViewBase | ( | ) | [protected, virtual] |
Definition at line 45 of file FWViewBase.cc.
{ }
FWViewBase::FWViewBase | ( | const FWViewBase & | ) | [private] |
FWViewContextMenuHandlerBase * FWViewBase::contextMenuHandler | ( | ) | const [virtual] |
Reimplemented in FWEveView.
Definition at line 106 of file FWViewBase.cc.
Referenced by FWGUIManager::createView().
{
return 0;
}
void FWViewBase::destroy | ( | ) |
Definition at line 65 of file FWViewBase.cc.
References beingDestroyed_.
Referenced by FWGUIManager::subviewDestroy().
{ beingDestroyed_(this); }
const FWViewBase& FWViewBase::operator= | ( | const FWViewBase & | ) | [private] |
virtual void FWViewBase::populateController | ( | ViewerParameterGUI & | ) | const [inline, virtual] |
Reimplemented in FW3DViewBase, FWEveView, FWGeometryTableViewBase, FWLegoViewBase, FWRPZView, FWTriggerTableView, FWGeometryTableView, and FWOverlapTableView.
Definition at line 49 of file FWViewBase.h.
Referenced by CmsShowViewPopup::reset().
{}
void FWViewBase::promptForSaveImageTo | ( | TGFrame * | iParent | ) | const |
Definition at line 74 of file FWViewBase.cc.
References gather_cfg::cout, dir, alignCSCRings::e, mergeVDriftHistosByStation::name, and saveImageTo().
Referenced by CmsShowViewPopup::saveImage().
{ try { static TString dir("."); const char * kImageExportTypes[] = {"PNG", "*.png", "GIF", "*.gif", "JPEG", "*.jpg", "PDF", "*.pdf", "Encapsulated PostScript", "*.eps", 0, 0}; TGFileInfo fi; fi.fFileTypes = kImageExportTypes; fi.fIniDir = StrDup(dir); new TGFileDialog(gClient->GetDefaultRoot(), iParent, kFDSave,&fi); dir = fi.fIniDir; if (fi.fFilename != 0) { std::string name = fi.fFilename; // fi.fFileTypeIdx points to the name of the file type // selected in the drop-down menu, so fi.fFileTypeIdx gives us // the extension std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1; if (name.find(ext) == name.npos) name += ext; saveImageTo(name); } } catch (std::runtime_error &e) { std::cout << e.what() << std::endl; } }
virtual void FWViewBase::saveImageTo | ( | const std::string & | iName | ) | const [pure virtual] |
Implemented in FWEveView, FWGeometryTableViewBase, FWTableView, and FWTriggerTableView.
Referenced by promptForSaveImageTo().
FWViewType::EType FWViewBase::typeId | ( | ) | const [inline] |
Definition at line 42 of file FWViewBase.h.
References FWViewType::id(), and m_type.
Referenced by FWEveViewManager::beingDestroyed(), FWRPZView::doPreScaleDistortion(), FWRPZView::eventBegin(), FWViewContextMenuHandlerGL::init(), FWEveView::populateController(), FWTriggerTableView::populateController(), FWRPZView::populateController(), FWViewContextMenuHandlerGL::select(), FWRPZView::setContext(), FWLegoViewBase::setContext(), FWRPZView::setEtaRng(), FWTriggerTableView::setFrom(), and FWEveView::setupEnergyScale().
const std::string & FWViewBase::typeName | ( | ) | const |
Definition at line 114 of file FWViewBase.cc.
References m_type, and FWViewType::name().
Referenced by FWLegoViewBase::addTo(), FWGlimpseView::addTo(), FWGUIManager::addTo(), FWTableViewManager::addToImpl(), FWEveView::addToOrthoCamera(), FWRPZView::eventBegin(), FWEveView::FWEveView(), FWGlimpseView::FWGlimpseView(), CmsShowViewPopup::reset(), FWLegoViewBase::setFrom(), FWGlimpseView::setFrom(), FWEveView::setFromOrthoCamera(), and FWEveView::setFromPerspectiveCamera().
sigc::signal<void,const FWViewBase*> FWViewBase::beingDestroyed_ |
Definition at line 56 of file FWViewBase.h.
Referenced by destroy().
FWViewType FWViewBase::m_type [protected] |
Definition at line 61 of file FWViewBase.h.
Referenced by typeId(), and typeName().
sigc::signal<void,Int_t,Int_t> FWViewBase::openSelectedModelContextMenu_ |
Definition at line 57 of file FWViewBase.h.
Referenced by FWGUIManager::createView(), FWEveView::FWEveView(), and FWTableView::modelSelected().