CMS 3D CMS Logo

Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes

CSGActionSupervisor Class Reference

#include <Fireworks/Core/interface/CSGActionSupervisor.h>

Inheritance diagram for CSGActionSupervisor:
CmsShowMainFrame FWConvTrackHitsDetailView FWTrackHitsDetailView

List of all members.

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)
CSGActiongetAction (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 CSGActionSupervisoroperator= (const CSGActionSupervisor &)

Private Attributes

Long_t m_tooltipDelay

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 27 of file CSGActionSupervisor.h.


Constructor & Destructor Documentation

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]

Member Function Documentation

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 AlCaRecoCosmics_cfg::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
void CSGActionSupervisor::HandleMenu ( Int_t  id) [virtual]

Reimplemented in CmsShowMainFrame.

Definition at line 94 of file CSGActionSupervisor.cc.

                                           {
}
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();
      }
   }
}

Member Data Documentation

std::vector<CSGAction*> CSGActionSupervisor::m_actionList [protected]

Reimplemented in CmsShowMainFrame.

Definition at line 58 of file CSGActionSupervisor.h.

Referenced by getToolTipDelay().