21 #include "TEveWindow.h"
36 class XXXButton :
public TGPictureButton
40 XXXButton(
const TGWindow*
p,
const TGPicture* pic) :
41 TGPictureButton(p, pic), fXState(kButtonUp) {}
43 virtual void SetState(EButtonState
state, Bool_t emit=kFALSE)
45 TGPictureButton::SetState(state, kFALSE);
46 if ((fXState == kButtonUp && fState == kButtonEngaged) ||
47 (fState == kButtonUp && fXState == kButtonEngaged))
62 TGHorizontalFrame(parent, 20, height),
65 m_undockButton(0), m_dockButton(0),
69 UInt_t lh = kLHintsNormal | kLHintsExpandX | kLHintsExpandY;
77 m_infoButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"selectButtonToggle()");
83 m_swapButton->SetToolTipText(
"Swap with the first view or select window to swap with click on toolbar.");
87 m_swapButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"swap()");
90 if (dynamic_cast<const TGMainFrame*>(ef->GetParent()))
98 m_dockButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"dock()");
109 m_undockButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"undock()");
117 m_closeButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"destroy()");
126 m_infoButton->Disconnect(
"Clicked()",
this,
"selectButtonToggle()");
170 TEveWindow* ew =
m_frame->GetEveWindow();
172 TEveCompositeFrameInMainFrame* emf =
dynamic_cast<TEveCompositeFrameInMainFrame*
>(ew->GetEveFrame());
174 const TGMainFrame* mf =
dynamic_cast<const TGMainFrame*
>(emf->GetParent());
183 TGWindow*
w = (TGWindow*)(
m_frame->GetParent());
185 TTimer::SingleShot(0,
m_frame->ClassName(),
m_frame,
"MainFrameClosed()");
202 return m_frame->GetEveWindow();
211 static const TGPicture* s_icon = 0;
213 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
215 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
225 static const TGPicture* s_icon = 0;
227 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
229 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
239 static const TGPicture* s_icon = 0;
241 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
243 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
253 static const TGPicture* s_icon = 0;
255 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
257 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
268 static const TGPicture* s_icon = 0;
270 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
272 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
282 static const TGPicture* s_icon = 0;
284 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
286 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
296 static const TGPicture* s_icon = 0;
298 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
300 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
310 static const TGPicture* s_icon = 0;
312 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
314 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
324 static const TGPicture* s_icon = 0;
326 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
328 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
338 m_infoButton->SetState(downp ? kButtonEngaged : kButtonUp,
false);
345 TGFrameElement *el = (TGFrameElement*) w->GetEveFrame()->GetList()->First();
346 TGCompositeFrame* hf = (TGCompositeFrame*)el->fFrame;
348 el = (TGFrameElement*)hf->GetList()->Last();
TGPictureButton * m_undockButton
static const TString & coreIcondir()
TEveWindow * getEveWindow()
void bindCSGActionKeys(const TGMainFrame *f) const
TGPictureButton * m_dockButton
static const TGPicture * swapIcon()
static const TGPicture * undockIcon()
sigc::signal< void, FWGUISubviewArea * > unselected_
static const TGPicture * swapDisabledIcon()
static const TGPicture * infoIcon()
void setInfoButton(bool downp)
static const TGPicture * closeDisabledIcon()
void connectSubviewAreaSignals(FWGUISubviewArea *)
static const TGPicture * undockDisabledIcon()
virtual ~FWGUISubviewArea()
FWGUISubviewArea(TEveCompositeFrame *ef, TGCompositeFrame *parent, Int_t height)
sigc::signal< void, FWGUISubviewArea * > goingToBeDestroyed_
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
static const TGPicture * infoDisabledIcon()
void selectButtonToggle()
TGPictureButton * m_swapButton
CmsShowMainFrame * getMainFrame() const
TGPictureButton * m_closeButton
TEveCompositeFrame * m_frame
static const TGPicture * dockIcon()
static FWGUIManager * getGUIManager()
sigc::signal< void, FWGUISubviewArea * > swap_
static const TGPicture * closeIcon()
sigc::signal< void, FWGUISubviewArea * > selected_
TGPictureButton * m_infoButton