CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FWSummaryManager Class Reference

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

List of all members.

Public Member Functions

void colorsChanged ()
 FWSummaryManager (TGFrame *iParent, FWSelectionManager *, FWEventItemsManager *, FWGUIManager *, FWModelChangeManager *, FWColorManager *)
void requestForController (FWEventItem *)
void requestForError (FWEventItem *)
void requestForFilter (FWEventItem *)
void requestForInfo (FWEventItem *)
void requestForSelectedModelContextMenu (Int_t iGlobalX, Int_t iGlobalY)
TGCompositeFrame * widget () const
virtual ~FWSummaryManager ()

Private Member Functions

void changesDone ()
 FWSummaryManager (const FWSummaryManager &)
void itemChanged (const FWEventItem *)
void itemDestroyed (const FWEventItem *)
void newItem (FWEventItem *iItem)
const FWSummaryManageroperator= (const FWSummaryManager &)
void removeAllItems ()
void selectionChanged (const FWSelectionManager &)

Private Attributes

std::vector
< FWCollectionSummaryWidget * > 
m_collectionWidgets
FWColorManagerm_colorManager
FWGUIManagerm_guiManager
bool m_itemChanged
TGCompositeFrame * m_pack

Detailed Description

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

Usage: <usage>

Definition at line 42 of file FWSummaryManager.h.


Constructor & Destructor Documentation

FWSummaryManager::FWSummaryManager ( TGFrame *  iParent,
FWSelectionManager sm,
FWEventItemsManager eim,
FWGUIManager gm,
FWModelChangeManager cm,
FWColorManager colorm 
)
FWSummaryManager::~FWSummaryManager ( ) [virtual]

Definition at line 74 of file FWSummaryManager.cc.

{
}
FWSummaryManager::FWSummaryManager ( const FWSummaryManager ) [private]

Member Function Documentation

void FWSummaryManager::changesDone ( ) [private]

Definition at line 153 of file FWSummaryManager.cc.

References m_itemChanged, and m_pack.

Referenced by FWSummaryManager().

{
   if(m_itemChanged) {
      m_pack->Layout();
      m_itemChanged=false;
   }
}
void FWSummaryManager::colorsChanged ( )

Definition at line 162 of file FWSummaryManager.cc.

References FWColorManager::backgroundColorIndex(), FWColorManager::isColorSetLight(), FWColorManager::kWhiteIndex, m_collectionWidgets, m_colorManager, and m_pack.

Referenced by FWSummaryManager().

{
   bool backgroundIsWhite = m_colorManager->backgroundColorIndex()==FWColorManager::kWhiteIndex;
   
   if(m_colorManager->isColorSetLight()) {
      m_pack->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
   } else {
      const unsigned int backgroundColor=0x2f2f2f;
      m_pack->SetBackgroundColor(backgroundColor);
   }
   gClient->NeedRedraw(m_pack);
   for(std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(), 
          itEnd = m_collectionWidgets.end();
       it != itEnd;
       ++it) {
      if(0!=*it) {
         (*it)->setBackgroundToWhite(backgroundIsWhite);
      }
   }
}
void FWSummaryManager::itemChanged ( const FWEventItem ) [private]

Definition at line 123 of file FWSummaryManager.cc.

References m_itemChanged.

Referenced by newItem().

{
   m_itemChanged = true;
}
void FWSummaryManager::itemDestroyed ( const FWEventItem iItem) [private]

Definition at line 112 of file FWSummaryManager.cc.

References FWEventItem::id(), m_collectionWidgets, and m_pack.

Referenced by newItem().

{
   m_pack->HideFrame(m_collectionWidgets[iItem->id()]);
   m_pack->RemoveFrame(m_collectionWidgets[iItem->id()]);
   delete m_collectionWidgets[iItem->id()];
   m_collectionWidgets[iItem->id()]=0;
   m_pack->Layout();
   gClient->NeedRedraw(m_pack);
}
void FWSummaryManager::newItem ( FWEventItem iItem) [private]

Definition at line 94 of file FWSummaryManager.cc.

References FWColorManager::backgroundColorIndex(), FWEventItem::goingToBeDestroyed_, itemChanged(), FWEventItem::itemChanged_, itemDestroyed(), FWColorManager::kWhiteIndex, lst, m_collectionWidgets, m_colorManager, m_pack, and FWCollectionSummaryWidget::setBackgroundToWhite().

Referenced by FWSummaryManager().

{
   TGLayoutHints* hints = new TGLayoutHints(kLHintsExpandX);
   FWCollectionSummaryWidget* lst = new FWCollectionSummaryWidget(m_pack,*iItem,hints);
   m_pack->AddFrame(lst, hints);
   m_collectionWidgets.push_back(lst);
   bool backgroundIsWhite = m_colorManager->backgroundColorIndex()==FWColorManager::kWhiteIndex;
   lst->setBackgroundToWhite(backgroundIsWhite);
   iItem->goingToBeDestroyed_.connect(boost::bind(&FWSummaryManager::itemDestroyed,this,_1));
   iItem->itemChanged_.connect(boost::bind(&FWSummaryManager::itemChanged,this,_1));
   lst->Connect("requestForInfo(FWEventItem*)","FWSummaryManager",this,"requestForInfo(FWEventItem*)");
   lst->Connect("requestForFilter(FWEventItem*)","FWSummaryManager",this,"requestForFilter(FWEventItem*)");
   lst->Connect("requestForErrorInfo(FWEventItem*)","FWSummaryManager",this,"requestForError(FWEventItem*)");
   lst->Connect("requestForController(FWEventItem*)","FWSummaryManager",this,"requestForController(FWEventItem*)");
   lst->Connect("requestForModelContextMenu(Int_t,Int_t)","FWSummaryManager",this,"requestForSelectedModelContextMenu(Int_t,Int_t)");
}
const FWSummaryManager& FWSummaryManager::operator= ( const FWSummaryManager ) [private]
void FWSummaryManager::removeAllItems ( ) [private]

Definition at line 129 of file FWSummaryManager.cc.

References m_collectionWidgets, and m_pack.

Referenced by FWSummaryManager().

{
   for(std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(), 
       itEnd = m_collectionWidgets.end();
       it != itEnd;
       ++it) {
      if(0!=*it) {
         m_pack->HideFrame(*it);
         m_pack->RemoveFrame(*it);
         delete *it;
         *it=0;
      }
   }
   m_collectionWidgets.clear();
   m_pack->Layout();
   gClient->NeedRedraw(m_pack);
}
void FWSummaryManager::requestForController ( FWEventItem iItem)

Definition at line 200 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

void FWSummaryManager::requestForError ( FWEventItem iItem)

Definition at line 194 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

void FWSummaryManager::requestForFilter ( FWEventItem iItem)
void FWSummaryManager::requestForInfo ( FWEventItem iItem)
void FWSummaryManager::requestForSelectedModelContextMenu ( Int_t  iGlobalX,
Int_t  iGlobalY 
)

Definition at line 206 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showSelectedModelContextMenu().

{
   m_guiManager->showSelectedModelContextMenu(iGlobalX,iGlobalY,0);
}
void FWSummaryManager::selectionChanged ( const FWSelectionManager iSM) [private]

Definition at line 148 of file FWSummaryManager.cc.

Referenced by FWSummaryManager().

{
}
TGCompositeFrame * FWSummaryManager::widget ( ) const

Definition at line 215 of file FWSummaryManager.cc.

References m_pack.

Referenced by FWGUIManager::createList().

{
   return m_pack;
}

Member Data Documentation

Definition at line 84 of file FWSummaryManager.h.

Referenced by colorsChanged(), itemDestroyed(), newItem(), and removeAllItems().

Definition at line 86 of file FWSummaryManager.h.

Referenced by colorsChanged(), and newItem().

Definition at line 87 of file FWSummaryManager.h.

Referenced by changesDone(), and itemChanged().

TGCompositeFrame* FWSummaryManager::m_pack [private]