#include <Fireworks/Core/interface/CmsShowHelpPopup.h>
Public Member Functions | |
virtual void | CloseWindow () |
CmsShowHelpPopup (const std::string &filename, const std::string &windowname, const TGWindow *p=0, UInt_t w=1, UInt_t h=1) | |
virtual | ~CmsShowHelpPopup () |
Static Public Member Functions | |
static std::string | helpFileName (const std::string &) |
Protected Attributes | |
TGHtml * | m_helpHtml |
Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 30 of file CmsShowHelpPopup.h.
CmsShowHelpPopup::CmsShowHelpPopup | ( | const std::string & | filename, |
const std::string & | windowname, | ||
const TGWindow * | p = 0 , |
||
UInt_t | w = 1 , |
||
UInt_t | h = 1 |
||
) |
Definition at line 9 of file CmsShowHelpPopup.cc.
References helpFileName(), m_helpHtml, path(), and runonSM::text.
: TGTransientFrame(gClient->GetDefaultRoot(), p, w, h), m_helpHtml(new TGHtml(this, w, h)) { AddFrame(m_helpHtml, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY)); SetWindowName(windowname.c_str()); TGText text; text.Load(helpFileName(filename).c_str()); static TString path = Form("%s/src/Fireworks/Core/data/",gSystem->Getenv("CMSSW_BASE")); if ( gSystem->AccessPathName(path.Data()) ){ // cannot find directory assert(gSystem->Getenv("CMSSW_RELEASE_BASE")); path = Form("%s/src/Fireworks/Core/data/",gSystem->Getenv("CMSSW_RELEASE_BASE")); } m_helpHtml->SetBaseUri(path.Data()); // printf("%s ... \n", m_helpHtml->GetBaseUri()); m_helpHtml->ParseText((char *)text.AsString().Data()); MapSubwindows(); m_helpHtml->Layout(); }
CmsShowHelpPopup::~CmsShowHelpPopup | ( | ) | [virtual] |
virtual void CmsShowHelpPopup::CloseWindow | ( | ) | [inline, virtual] |
Definition at line 36 of file CmsShowHelpPopup.h.
{ UnmapWindow(); }
std::string CmsShowHelpPopup::helpFileName | ( | const std::string & | filename | ) | [static] |
Definition at line 40 of file CmsShowHelpPopup.cc.
References lut2db_cfg::filename.
Referenced by CmsShowHelpPopup().
{ const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } return std::string(cmspath) + "/src/Fireworks/Core/data/" + filename; }
TGHtml* CmsShowHelpPopup::m_helpHtml [protected] |
Definition at line 41 of file CmsShowHelpPopup.h.
Referenced by CmsShowHelpPopup(), and ~CmsShowHelpPopup().