#include <Fireworks/Core/interface/FWGUISubviewArea.h>
Public Member Functions | |
ClassDef (FWGUISubviewArea, 0) | |
void | destroy () |
void | dock () |
FWGUISubviewArea (TEveCompositeFrame *ef, TGCompositeFrame *parent, Int_t height) | |
TEveWindow * | getEveWindow () |
bool | isSelected () const |
void | selectButtonToggle () |
void | setInfoButton (bool downp) |
void | setSwapIcon (bool) |
void | swap () |
void | undock () |
void | unselect () |
virtual | ~FWGUISubviewArea () |
Static Public Member Functions | |
static const TGPicture * | closeDisabledIcon () |
static const TGPicture * | closeIcon () |
static const TGPicture * | dockIcon () |
static FWGUISubviewArea * | getToolBarFromWindow (TEveWindow *) |
static const TGPicture * | infoDisabledIcon () |
static const TGPicture * | infoIcon () |
static const TGPicture * | swapDisabledIcon () |
static const TGPicture * | swapIcon () |
static const TGPicture * | undockDisabledIcon () |
static const TGPicture * | undockIcon () |
Public Attributes | |
sigc::signal< void, FWGUISubviewArea * > | goingToBeDestroyed_ |
sigc::signal< void, FWGUISubviewArea * > | selected_ |
sigc::signal< void, FWGUISubviewArea * > | swap_ |
sigc::signal< void, FWGUISubviewArea * > | unselected_ |
Private Member Functions | |
FWGUISubviewArea (const FWGUISubviewArea &) | |
const FWGUISubviewArea & | operator= (const FWGUISubviewArea &) |
Private Attributes | |
TGPictureButton * | m_closeButton |
TGPictureButton * | m_dockButton |
TEveCompositeFrame * | m_frame |
TGPictureButton * | m_infoButton |
TGPictureButton * | m_swapButton |
TGPictureButton * | m_undockButton |
Description: Manages the GUI area where a sub Subview is displayed
Usage: <usage>
Definition at line 34 of file FWGUISubviewArea.h.
FWGUISubviewArea::FWGUISubviewArea | ( | TEveCompositeFrame * | ef, |
TGCompositeFrame * | parent, | ||
Int_t | height | ||
) |
Definition at line 61 of file FWGUISubviewArea.cc.
References closeIcon(), FWGUIManager::connectSubviewAreaSignals(), dockIcon(), FWGUIManager::getGUIManager(), infoDisabledIcon(), infoIcon(), m_closeButton, m_dockButton, m_infoButton, m_swapButton, m_undockButton, swapDisabledIcon(), swapIcon(), undockDisabledIcon(), and undockIcon().
: TGHorizontalFrame(parent, 20, height), m_frame (ef), m_swapButton(0), m_undockButton(0), m_dockButton(0), m_closeButton(0), m_infoButton(0) { UInt_t lh = kLHintsNormal | kLHintsExpandX | kLHintsExpandY; // info m_infoButton = new XXXButton(this,infoIcon()); m_infoButton->ChangeOptions(kRaisedFrame); m_infoButton->SetDisabledPicture(infoDisabledIcon()); AddFrame(m_infoButton, new TGLayoutHints(lh)); m_infoButton->AllowStayDown(kTRUE); m_infoButton->Connect("Clicked()","FWGUISubviewArea",this,"selectButtonToggle()"); m_infoButton->SetToolTipText("Edit View"); //swap m_swapButton = new TGPictureButton(this, swapIcon()); m_swapButton->SetDisabledPicture(swapDisabledIcon()); m_swapButton->SetToolTipText("Swap with the first view or select window to swap with click on toolbar."); m_swapButton->ChangeOptions(kRaisedFrame); m_swapButton->SetHeight(height); AddFrame(m_swapButton, new TGLayoutHints(lh)); m_swapButton->Connect("Clicked()","FWGUISubviewArea",this,"swap()"); // dock if (dynamic_cast<const TGMainFrame*>(ef->GetParent())) { m_dockButton = new TGPictureButton(this, dockIcon()); m_dockButton->ChangeOptions(kRaisedFrame); m_dockButton->ChangeOptions(kRaisedFrame); m_dockButton->SetToolTipText("Dock view"); m_dockButton->SetHeight(height); AddFrame(m_dockButton, new TGLayoutHints(lh)); m_dockButton->Connect("Clicked()", "FWGUISubviewArea",this,"dock()"); } else { // undock m_undockButton = new TGPictureButton(this, undockIcon()); m_undockButton->ChangeOptions(kRaisedFrame); m_undockButton->SetDisabledPicture(undockDisabledIcon()); m_undockButton->SetToolTipText("Undock view to own window"); m_undockButton->SetHeight(height); AddFrame(m_undockButton, new TGLayoutHints(lh)); m_undockButton->Connect("Clicked()", "FWGUISubviewArea",this,"undock()"); } // destroy m_closeButton = new TGPictureButton(this,closeIcon()); m_closeButton->ChangeOptions(kRaisedFrame); m_closeButton->SetToolTipText("Close view"); m_closeButton->SetHeight(height); AddFrame(m_closeButton, new TGLayoutHints(lh)); m_closeButton->Connect("Clicked()", "FWGUISubviewArea",this,"destroy()"); FWGUIManager::getGUIManager()->connectSubviewAreaSignals(this); }
FWGUISubviewArea::~FWGUISubviewArea | ( | ) | [virtual] |
Definition at line 122 of file FWGUISubviewArea.cc.
References m_closeButton, and m_infoButton.
{ //std::cout <<"IN dstr FWGUISubviewArea"<<std::endl; m_closeButton->Disconnect("Clicked()", this,"destroy()"); m_infoButton->Disconnect("Clicked()",this,"selectButtonToggle()"); }
FWGUISubviewArea::FWGUISubviewArea | ( | const FWGUISubviewArea & | ) | [private] |
FWGUISubviewArea::ClassDef | ( | FWGUISubviewArea | , |
0 | |||
) |
const TGPicture * FWGUISubviewArea::closeDisabledIcon | ( | ) | [static] |
Definition at line 251 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"delete-disabled.png"); } return s_icon; }
const TGPicture * FWGUISubviewArea::closeIcon | ( | ) | [static] |
Definition at line 237 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"delete.png"); } return s_icon; }
void FWGUISubviewArea::destroy | ( | ) |
Definition at line 162 of file FWGUISubviewArea.cc.
References goingToBeDestroyed_.
{ goingToBeDestroyed_(this); }
void FWGUISubviewArea::dock | ( | ) |
const TGPicture * FWGUISubviewArea::dockIcon | ( | ) | [static] |
Definition at line 280 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"dock.png"); } return s_icon; }
TEveWindow * FWGUISubviewArea::getEveWindow | ( | ) |
Definition at line 200 of file FWGUISubviewArea.cc.
References m_frame.
Referenced by FWGUIManager::subviewDestroy(), FWGUIManager::subviewInfoSelected(), and FWGUIManager::subviewSwapped().
{ return m_frame->GetEveWindow(); }
FWGUISubviewArea * FWGUISubviewArea::getToolBarFromWindow | ( | TEveWindow * | w | ) | [static] |
Definition at line 342 of file FWGUISubviewArea.cc.
Referenced by FWGUIManager::checkSubviewAreaIconState(), FWGUIManager::popupViewClosed(), FWGUIManager::subviewDestroyAll(), and FWGUIManager::subviewInfoSelected().
{ // horizontal frame TGFrameElement *el = (TGFrameElement*) w->GetEveFrame()->GetList()->First(); TGCompositeFrame* hf = (TGCompositeFrame*)el->fFrame; // subview last in the horizontal frame el = (TGFrameElement*)hf->GetList()->Last(); FWGUISubviewArea* ar = dynamic_cast<FWGUISubviewArea*>(el->fFrame); return ar; }
const TGPicture * FWGUISubviewArea::infoDisabledIcon | ( | ) | [static] |
Definition at line 322 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"info-disabled.png"); } return s_icon; }
const TGPicture * FWGUISubviewArea::infoIcon | ( | ) | [static] |
Definition at line 308 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"info.png"); } return s_icon; }
bool FWGUISubviewArea::isSelected | ( | ) | const |
Definition at line 192 of file FWGUISubviewArea.cc.
References m_infoButton.
Referenced by selectButtonToggle(), and FWGUIManager::subviewIsBeingDestroyed().
{ return m_infoButton->IsDown(); }
const FWGUISubviewArea& FWGUISubviewArea::operator= | ( | const FWGUISubviewArea & | ) | [private] |
void FWGUISubviewArea::selectButtonToggle | ( | ) |
Definition at line 135 of file FWGUISubviewArea.cc.
References isSelected(), selected_, and unselected_.
{ if (isSelected()) selected_(this); else unselected_(this); }
void FWGUISubviewArea::setInfoButton | ( | bool | downp | ) |
Definition at line 336 of file FWGUISubviewArea.cc.
References m_infoButton.
Referenced by FWGUIManager::checkSubviewAreaIconState(), FWGUIManager::popupViewClosed(), and FWGUIManager::subviewInfoSelected().
{ m_infoButton->SetState(downp ? kButtonEngaged : kButtonUp, false); }
void FWGUISubviewArea::setSwapIcon | ( | bool | isOn | ) |
Definition at line 150 of file FWGUISubviewArea.cc.
References m_swapButton.
Referenced by FWGUIManager::checkSubviewAreaIconState().
{ m_swapButton->SetEnabled(isOn); }
void FWGUISubviewArea::swap | ( | ) |
const TGPicture * FWGUISubviewArea::swapDisabledIcon | ( | ) | [static] |
Definition at line 223 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"moveup-disabled.png"); } return s_icon; }
const TGPicture * FWGUISubviewArea::swapIcon | ( | ) | [static] |
Definition at line 209 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"moveup.png"); } return s_icon; }
void FWGUISubviewArea::undock | ( | ) |
Definition at line 168 of file FWGUISubviewArea.cc.
References CmsShowMainFrame::bindCSGActionKeys(), FWGUIManager::getGUIManager(), FWGUIManager::getMainFrame(), and m_frame.
{ TEveWindow* ew = m_frame->GetEveWindow(); ew->UndockWindow(); TEveCompositeFrameInMainFrame* emf = dynamic_cast<TEveCompositeFrameInMainFrame*>(ew->GetEveFrame()); if (emf) { const TGMainFrame* mf = dynamic_cast<const TGMainFrame*>(emf->GetParent()); if (mf) FWGUIManager::getGUIManager()->getMainFrame()->bindCSGActionKeys(mf); } }
const TGPicture * FWGUISubviewArea::undockDisabledIcon | ( | ) | [static] |
Definition at line 294 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"expand-disabled.png"); } return s_icon; }
const TGPicture * FWGUISubviewArea::undockIcon | ( | ) | [static] |
Definition at line 266 of file FWGUISubviewArea.cc.
References FWCheckBoxIcon::coreIcondir().
Referenced by FWGUISubviewArea().
{ static const TGPicture* s_icon = 0; if(0== s_icon) { const char* cmspath = gSystem->Getenv("CMSSW_BASE"); if(0 == cmspath) { throw std::runtime_error("CMSSW_BASE environment variable not set"); } s_icon = gClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"expand.png"); } return s_icon; }
void FWGUISubviewArea::unselect | ( | ) |
Definition at line 144 of file FWGUISubviewArea.cc.
References m_infoButton.
{ m_infoButton->SetState(kButtonUp); }
sigc::signal<void, FWGUISubviewArea*> FWGUISubviewArea::goingToBeDestroyed_ |
Definition at line 67 of file FWGUISubviewArea.h.
Referenced by FWGUIManager::connectSubviewAreaSignals(), and destroy().
TGPictureButton* FWGUISubviewArea::m_closeButton [private] |
Definition at line 89 of file FWGUISubviewArea.h.
Referenced by FWGUISubviewArea(), and ~FWGUISubviewArea().
TGPictureButton* FWGUISubviewArea::m_dockButton [private] |
Definition at line 88 of file FWGUISubviewArea.h.
Referenced by FWGUISubviewArea().
TEveCompositeFrame* FWGUISubviewArea::m_frame [private] |
Definition at line 84 of file FWGUISubviewArea.h.
Referenced by dock(), getEveWindow(), and undock().
TGPictureButton* FWGUISubviewArea::m_infoButton [private] |
Definition at line 90 of file FWGUISubviewArea.h.
Referenced by FWGUISubviewArea(), isSelected(), setInfoButton(), unselect(), and ~FWGUISubviewArea().
TGPictureButton* FWGUISubviewArea::m_swapButton [private] |
Definition at line 86 of file FWGUISubviewArea.h.
Referenced by FWGUISubviewArea(), and setSwapIcon().
TGPictureButton* FWGUISubviewArea::m_undockButton [private] |
Definition at line 87 of file FWGUISubviewArea.h.
Referenced by FWGUISubviewArea().
sigc::signal<void, FWGUISubviewArea*> FWGUISubviewArea::selected_ |
Definition at line 68 of file FWGUISubviewArea.h.
Referenced by FWGUIManager::connectSubviewAreaSignals(), and selectButtonToggle().
sigc::signal<void, FWGUISubviewArea*> FWGUISubviewArea::swap_ |
Definition at line 66 of file FWGUISubviewArea.h.
Referenced by FWGUIManager::connectSubviewAreaSignals(), and swap().
sigc::signal<void, FWGUISubviewArea*> FWGUISubviewArea::unselected_ |
Definition at line 69 of file FWGUISubviewArea.h.
Referenced by FWGUIManager::connectSubviewAreaSignals(), and selectButtonToggle().