20 #include "TEveWindow.h" 35 class XXXButton :
public TGPictureButton
39 XXXButton(
const TGWindow*
p,
const TGPicture* pic) :
40 TGPictureButton(p, pic), fXState(kButtonUp) {}
42 void SetState(EButtonState state, Bool_t emit=kFALSE)
override 44 TGPictureButton::SetState(state, kFALSE);
45 if ((fXState == kButtonUp &&
fState == kButtonEngaged) ||
46 (
fState == kButtonUp && fXState == kButtonEngaged))
61 TGHorizontalFrame(parent, 20, height),
68 UInt_t
lh = kLHintsNormal | kLHintsExpandX | kLHintsExpandY;
76 m_infoButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"selectButtonToggle()");
82 m_swapButton->SetToolTipText(
"Swap with the first view or select window to swap with click on toolbar.");
86 m_swapButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"swap()");
89 if (dynamic_cast<const TGMainFrame*>(ef->GetParent()))
97 m_dockButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"dock()");
108 m_undockButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"undock()");
116 m_closeButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"destroy()");
125 m_infoButton->Disconnect(
"Clicked()",
this,
"selectButtonToggle()");
169 TEveWindow* ew =
m_frame->GetEveWindow();
171 TEveCompositeFrameInMainFrame*
emf =
dynamic_cast<TEveCompositeFrameInMainFrame*
>(ew->GetEveFrame());
173 const TGMainFrame* mf =
dynamic_cast<const TGMainFrame*
>(emf->GetParent());
182 TGWindow*
w = (TGWindow*)(
m_frame->GetParent());
184 TTimer::SingleShot(0,
m_frame->ClassName(),
m_frame,
"MainFrameClosed()");
201 return m_frame->GetEveWindow();
210 static const TGPicture* s_icon =
nullptr;
211 if(
nullptr== s_icon) {
212 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
213 if(
nullptr == cmspath) {
214 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
224 static const TGPicture* s_icon =
nullptr;
225 if(
nullptr== s_icon) {
226 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
227 if(
nullptr == cmspath) {
228 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
238 static const TGPicture* s_icon =
nullptr;
239 if(
nullptr== s_icon) {
240 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
241 if(
nullptr == cmspath) {
242 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
252 static const TGPicture* s_icon =
nullptr;
253 if(
nullptr== s_icon) {
254 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
255 if(
nullptr == cmspath) {
256 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
267 static const TGPicture* s_icon =
nullptr;
268 if(
nullptr== s_icon) {
269 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
270 if(
nullptr == cmspath) {
271 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
281 static const TGPicture* s_icon =
nullptr;
282 if(
nullptr== s_icon) {
283 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
284 if(
nullptr == cmspath) {
285 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
295 static const TGPicture* s_icon =
nullptr;
296 if(
nullptr== s_icon) {
297 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
298 if(
nullptr == cmspath) {
299 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
309 static const TGPicture* s_icon =
nullptr;
310 if(
nullptr== s_icon) {
311 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
312 if(
nullptr == cmspath) {
313 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
323 static const TGPicture* s_icon =
nullptr;
324 if(
nullptr== s_icon) {
325 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
326 if(
nullptr == cmspath) {
327 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
337 m_infoButton->SetState(downp ? kButtonEngaged : kButtonUp,
false);
344 TGFrameElement *el = (TGFrameElement*) w->GetEveFrame()->GetList()->First();
345 TGCompositeFrame*
hf = (TGCompositeFrame*)el->fFrame;
347 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()
~FWGUISubviewArea() override
emf
the use of emf in the JEC is not yet implemented
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