20 #include "TEveWindow.h" 33 class XXXButton :
public TGPictureButton {
37 XXXButton(
const TGWindow*
p,
const TGPicture* pic) : TGPictureButton(
p, pic), fXState(kButtonUp) {}
39 void SetState(EButtonState
state, Bool_t emit = kFALSE)
override {
40 TGPictureButton::SetState(
state, kFALSE);
41 if ((fXState == kButtonUp &&
fState == kButtonEngaged) || (
fState == kButtonUp && fXState == kButtonEngaged)) {
54 : TGHorizontalFrame(
parent, 20, height),
56 m_swapButton(nullptr),
57 m_undockButton(nullptr),
58 m_dockButton(nullptr),
59 m_closeButton(nullptr),
60 m_infoButton(nullptr) {
61 UInt_t
lh = kLHintsNormal | kLHintsExpandX | kLHintsExpandY;
69 m_infoButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"selectButtonToggle()");
75 m_swapButton->SetToolTipText(
"Swap with the first view or select window to swap with click on toolbar.");
79 m_swapButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"swap()");
82 if (dynamic_cast<const TGMainFrame*>(ef->GetParent())) {
89 m_dockButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"dock()");
98 m_undockButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"undock()");
106 m_closeButton->Connect(
"Clicked()",
"FWGUISubviewArea",
this,
"destroy()");
114 m_infoButton->Disconnect(
"Clicked()",
this,
"selectButtonToggle()");
138 TEveWindow* ew =
m_frame->GetEveWindow();
140 TEveCompositeFrameInMainFrame*
emf =
dynamic_cast<TEveCompositeFrameInMainFrame*
>(ew->GetEveFrame());
142 const TGMainFrame* mf =
dynamic_cast<const TGMainFrame*
>(
emf->GetParent());
149 TGWindow*
w = (TGWindow*)(
m_frame->GetParent());
151 TTimer::SingleShot(0,
m_frame->ClassName(),
m_frame,
"MainFrameClosed()");
166 static const TGPicture* s_icon =
nullptr;
167 if (
nullptr == s_icon) {
168 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
169 if (
nullptr == cmspath) {
170 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
178 static const TGPicture* s_icon =
nullptr;
179 if (
nullptr == s_icon) {
180 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
181 if (
nullptr == cmspath) {
182 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
190 static const TGPicture* s_icon =
nullptr;
191 if (
nullptr == s_icon) {
192 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
193 if (
nullptr == cmspath) {
194 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
202 static const TGPicture* s_icon =
nullptr;
203 if (
nullptr == s_icon) {
204 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
205 if (
nullptr == cmspath) {
206 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
214 static const TGPicture* s_icon =
nullptr;
215 if (
nullptr == s_icon) {
216 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
217 if (
nullptr == cmspath) {
218 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
226 static const TGPicture* s_icon =
nullptr;
227 if (
nullptr == s_icon) {
228 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
229 if (
nullptr == cmspath) {
230 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");
250 static const TGPicture* s_icon =
nullptr;
251 if (
nullptr == s_icon) {
252 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
253 if (
nullptr == cmspath) {
254 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
262 static const TGPicture* s_icon =
nullptr;
263 if (
nullptr == s_icon) {
264 const char* cmspath = gSystem->Getenv(
"CMSSW_BASE");
265 if (
nullptr == cmspath) {
266 throw std::runtime_error(
"CMSSW_BASE environment variable not set");
277 TGFrameElement* el = (TGFrameElement*)
w->GetEveFrame()->GetList()->First();
278 TGCompositeFrame*
hf = (TGCompositeFrame*)el->fFrame;
280 el = (TGFrameElement*)
hf->GetList()->Last();
TGPictureButton * m_undockButton
static const TString & coreIcondir()
TEveWindow * getEveWindow()
TGPictureButton * m_dockButton
static const TGPicture * swapIcon()
static const TGPicture * undockIcon()
static const TGPicture * swapDisabledIcon()
static const TGPicture * infoIcon()
void setInfoButton(bool downp)
static const TGPicture * closeDisabledIcon()
sigc::signal< void(FWGUISubviewArea *)> swap_
CmsShowMainFrame * getMainFrame() const
void connectSubviewAreaSignals(FWGUISubviewArea *)
static const TGPicture * undockDisabledIcon()
~FWGUISubviewArea() override
FWGUISubviewArea(TEveCompositeFrame *ef, TGCompositeFrame *parent, Int_t height)
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
static const TGPicture * infoDisabledIcon()
void selectButtonToggle()
TGPictureButton * m_swapButton
TGPictureButton * m_closeButton
TEveCompositeFrame * m_frame
static const TGPicture * dockIcon()
static FWGUIManager * getGUIManager()
sigc::signal< void(FWGUISubviewArea *)> unselected_
sigc::signal< void(FWGUISubviewArea *)> selected_
void bindCSGActionKeys(const TGMainFrame *f) const
static const TGPicture * closeIcon()
TGPictureButton * m_infoButton
sigc::signal< void(FWGUISubviewArea *)> goingToBeDestroyed_