#include <Fireworks/Core/interface/CSGActionSupervisor.h>
Public Member Functions | |
Bool_t | activateMenuEntry (int entry) |
Bool_t | activateToolBarEntry (int entry) |
void | addToActionMap (CSGAction *action) |
CSGActionSupervisor () | |
virtual void | defaultAction () |
virtual void | enableActions (bool enable=true) |
CSGAction * | getAction (const std::string &name) |
const std::vector< CSGAction * > & | getListOfActions () const |
Long_t | getToolTipDelay () const |
virtual void | HandleMenu (Int_t id) |
void | resizeMenu (TGPopupMenu *menu) |
virtual | ~CSGActionSupervisor () |
Protected Attributes | |
std::vector< CSGAction * > | m_actionList |
Private Member Functions | |
CSGActionSupervisor (const CSGActionSupervisor &) | |
const CSGActionSupervisor & | operator= (const CSGActionSupervisor &) |
Private Attributes | |
Long_t | m_tooltipDelay |
Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 27 of file CSGActionSupervisor.h.
CSGActionSupervisor::CSGActionSupervisor | ( | ) |
Definition at line 20 of file CSGActionSupervisor.cc.
: m_tooltipDelay(3) { }
CSGActionSupervisor::~CSGActionSupervisor | ( | ) | [virtual] |
Definition at line 25 of file CSGActionSupervisor.cc.
References m_actionList.
{ for(std::vector<CSGAction*>::iterator it= m_actionList.begin(),itEnd = m_actionList.end(); it != itEnd; ++it) { delete *it; } }
CSGActionSupervisor::CSGActionSupervisor | ( | const CSGActionSupervisor & | ) | [private] |
Bool_t CSGActionSupervisor::activateMenuEntry | ( | int | entry | ) |
Definition at line 72 of file CSGActionSupervisor.cc.
References m_actionList.
{ std::vector<CSGAction*>::iterator it_act; for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) { if (entry == (*it_act)->getMenuEntry()) { (*it_act)->activated.emit(); return kTRUE; } } return kFALSE; }
Bool_t CSGActionSupervisor::activateToolBarEntry | ( | int | entry | ) |
Definition at line 83 of file CSGActionSupervisor.cc.
References m_actionList.
Referenced by CSGConnector::handleToolBar().
{ std::vector<CSGAction*>::iterator it_act; for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) { if ((*it_act)->getToolBarData() && (*it_act)->getToolBarData()->fId == entry) { (*it_act)->activated.emit(); return kTRUE; } } return kFALSE; }
void CSGActionSupervisor::addToActionMap | ( | CSGAction * | action | ) |
Definition at line 46 of file CSGActionSupervisor.cc.
References m_actionList.
Referenced by CSGAction::CSGAction().
{ m_actionList.push_back(action); }
void CSGActionSupervisor::defaultAction | ( | ) | [virtual] |
Definition at line 55 of file CSGActionSupervisor.cc.
References fwLog, and fwlog::kInfo.
{ fwLog(fwlog::kInfo) << "Default action.\n"; }
void CSGActionSupervisor::enableActions | ( | bool | enable = true | ) | [virtual] |
Reimplemented in CmsShowMainFrame.
Definition at line 61 of file CSGActionSupervisor.cc.
References m_actionList.
{ std::vector<CSGAction*>::iterator it_act; for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) { if (enable) (*it_act)->globalEnable(); else (*it_act)->globalDisable(); } }
CSGAction * CSGActionSupervisor::getAction | ( | const std::string & | name | ) |
Definition at line 35 of file CSGActionSupervisor.cc.
References fwLog, fwlog::kWarning, m_actionList, and mergeVDriftHistosByStation::name.
Referenced by CmsShowMainFrame::CloseWindow(), FWGUIManager::getAction(), and CmsShowMainFrame::quit().
{ std::vector<CSGAction*>::iterator it_act; for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) { if ((*it_act)->getName() == name) return *it_act; } fwLog(fwlog::kWarning) << "No action is found with name " << name.c_str() << std::endl; return 0; }
const std::vector< CSGAction * > & CSGActionSupervisor::getListOfActions | ( | ) | const |
Definition at line 50 of file CSGActionSupervisor.cc.
References m_actionList.
Referenced by CSGAction::CSGAction(), and CmsShowMainFrame::HandleKey().
{ return m_actionList; }
Long_t CSGActionSupervisor::getToolTipDelay | ( | ) | const |
Definition at line 106 of file CSGActionSupervisor.cc.
References m_tooltipDelay.
Referenced by CSGAction::createCheckButton(), CSGAction::createCustomIconsButton(), CSGAction::createPictureButton(), CSGAction::createTextButton(), and CSGAction::setToolTip().
{ return m_tooltipDelay; }
void CSGActionSupervisor::HandleMenu | ( | Int_t | id | ) | [virtual] |
const CSGActionSupervisor& CSGActionSupervisor::operator= | ( | const CSGActionSupervisor & | ) | [private] |
void CSGActionSupervisor::resizeMenu | ( | TGPopupMenu * | menu | ) |
Definition at line 97 of file CSGActionSupervisor.cc.
References m_actionList.
Referenced by CSGAction::addSCToMenu().
{ std::vector<CSGAction*>::iterator it_act; for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) { if ((*it_act)->getMenu() == menu && (*it_act)->getKeycode() != 0) { (*it_act)->resizeMenuEntry(); } } }
std::vector<CSGAction*> CSGActionSupervisor::m_actionList [protected] |
Definition at line 50 of file CSGActionSupervisor.h.
Referenced by activateMenuEntry(), activateToolBarEntry(), addToActionMap(), CmsShowMainFrame::bindCSGActionKeys(), enableActions(), getAction(), getListOfActions(), resizeMenu(), and ~CSGActionSupervisor().
Long_t CSGActionSupervisor::m_tooltipDelay [private] |
Reimplemented in CmsShowMainFrame.
Definition at line 58 of file CSGActionSupervisor.h.
Referenced by getToolTipDelay().