CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
CSGAction Class Reference

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

Inheritance diagram for CSGAction:
CSGContinuousAction

Public Member Functions

void activate ()
 
void addSCToMenu ()
 
void createCheckButton (TGCompositeFrame *p, TGLayoutHints *l=0, Bool_t state=true, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), FontStruct_t font=TGTextButton::GetDefaultFontStruct())
 
FWCustomIconsButtoncreateCustomIconsButton (TGCompositeFrame *p, const TGPicture *upPic, const TGPicture *downPic, const TGPicture *disabledPic, TGLayoutHints *l=0, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), UInt_t option=0)
 
void createMenuEntry (TGPopupMenu *menu)
 
void createPictureButton (TGCompositeFrame *p, const TGPicture *pic, TGLayoutHints *l=0, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder)
 
void createShortcut (UInt_t key, const char *mod, int windowID)
 
void createTextButton (TGCompositeFrame *p, TGLayoutHints *l=0, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), FontStruct_t font=TGTextButton::GetDefaultFontStruct(), UInt_t option=kRaisedFrame|kDoubleBorder)
 
 CSGAction (CSGActionSupervisor *supervisor, const char *name)
 
void disable ()
 
void enable ()
 
Int_t getKeycode () const
 
TGPopupMenu * getMenu () const
 
int getMenuEntry () const
 
Int_t getModcode () const
 
const std::string & getName () const
 
TString getSCCombo () const
 
TGToolBar * getToolBar () const
 
ToolBarData_t * getToolBarData () const
 
const std::string & getToolTip () const
 
virtual void globalDisable ()
 
virtual void globalEnable ()
 
virtual Bool_t isEnabled () const
 
Bool_t resizeMenuEntry ()
 
void setMenuLabel (const std::string &label)
 
void setName (const std::string &name)
 
void setToolTip (const std::string &tip)
 
virtual ~CSGAction ()
 

Static Public Member Functions

static TString keycodeToString (Int_t keycode)
 

Public Attributes

sigc::signal< void > activated
 

Private Member Functions

 CSGAction (const CSGAction &)
 
void disableImp ()
 
void enableImp ()
 
const CSGActionoperator= (const CSGAction &)
 

Private Attributes

std::vector< TGButton * > m_buttons
 
CSGConnectorm_connector
 
Bool_t m_enabled
 
int m_entry
 
Bool_t m_globalEnabled
 
Int_t m_keycode
 
TGPopupMenu * m_menu
 
Int_t m_modcode
 
std::string m_name
 
TString m_scCombo
 
CSGActionSupervisorm_supervisor
 
TGToolBar * m_toolBar
 
ToolBarData_t * m_tools
 
std::string m_toolTip
 
int m_windowID
 

Detailed Description

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

Usage: <usage>

Definition at line 39 of file CSGAction.h.

Constructor & Destructor Documentation

CSGAction::CSGAction ( CSGActionSupervisor supervisor,
const char *  name 
)

Definition at line 38 of file CSGAction.cc.

References CSGActionSupervisor::addToActionMap(), CSGActionSupervisor::getListOfActions(), m_connector, m_enabled, m_entry, m_globalEnabled, m_keycode, m_menu, m_modcode, m_name, m_supervisor, m_toolBar, m_tools, m_toolTip, m_windowID, and mergeVDriftHistosByStation::name.

38  :
39  m_connector(0)
40  {
41  m_enabled = true;
42  m_globalEnabled = true;
43  m_supervisor = supervisor;
44  m_name = name;
45  m_toolTip = "";
46  m_menu = 0;
47  m_toolBar = 0;
48  m_tools = 0;
52  m_keycode = 0;
53  m_modcode = 0;
54  m_windowID = -1;
55 }
int m_entry
Definition: CSGAction.h:107
Int_t m_modcode
Definition: CSGAction.h:105
ToolBarData_t * m_tools
Definition: CSGAction.h:109
CSGConnector * m_connector
Definition: CSGAction.h:110
TGToolBar * m_toolBar
Definition: CSGAction.h:108
TGPopupMenu * m_menu
Definition: CSGAction.h:106
int m_windowID
Definition: CSGAction.h:113
Bool_t m_enabled
Definition: CSGAction.h:111
void addToActionMap(CSGAction *action)
Bool_t m_globalEnabled
Definition: CSGAction.h:112
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
const std::vector< CSGAction * > & getListOfActions() const
std::string m_toolTip
Definition: CSGAction.h:101
std::string m_name
Definition: CSGAction.h:100
Int_t m_keycode
Definition: CSGAction.h:104
CSGAction::~CSGAction ( )
virtual

Definition at line 61 of file CSGAction.cc.

References m_connector.

62 {
63  delete m_connector;
64  //Don't delete GUI parts since they are owned by their GUI parent
65 }
CSGConnector * m_connector
Definition: CSGAction.h:110
CSGAction::CSGAction ( const CSGAction )
private

Member Function Documentation

void CSGAction::activate ( )
inline

Definition at line 85 of file CSGAction.h.

References activated.

85  {
86  activated.emit();
87  }
sigc::signal< void > activated
Definition: CSGAction.h:89
void CSGAction::addSCToMenu ( )

Definition at line 213 of file CSGAction.cc.

References m_menu, m_supervisor, CSGActionSupervisor::resizeMenu(), and resizeMenuEntry().

Referenced by createMenuEntry(), and createShortcut().

213  {
214  Bool_t widthChanged = resizeMenuEntry();
215  if (widthChanged) m_supervisor->resizeMenu(m_menu);
216 }
void resizeMenu(TGPopupMenu *menu)
TGPopupMenu * m_menu
Definition: CSGAction.h:106
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
Bool_t resizeMenuEntry()
Definition: CSGAction.cc:218
void CSGAction::createCheckButton ( TGCompositeFrame *  p,
TGLayoutHints *  l = 0,
Bool_t  state = true,
Int_t  id = -1,
GContext_t  norm = TGButton::GetDefaultGC() (),
FontStruct_t  font = TGTextButton::GetDefaultFontStruct() 
)

Definition at line 127 of file CSGAction.cc.

References CSGActionSupervisor::getToolTipDelay(), isEnabled(), m_buttons, m_name, m_supervisor, m_toolTip, and lumiNorm::norm.

127  {
128  TGCheckButton* checkButton = new TGCheckButton(p, m_name.c_str(), id, norm, font);
129  if (m_toolTip != "") checkButton->SetToolTipText(m_toolTip.c_str(), m_supervisor->getToolTipDelay());
130  p->AddFrame(checkButton, l);
131 
132  if (state) checkButton->SetState(kButtonDown, false);
133  TQObject::Connect(checkButton, "Clicked()", "CSGAction", this, "activate()");
134  m_buttons.push_back(checkButton);
135  if(!isEnabled()) {
136  checkButton->SetEnabled(kFALSE);
137  }
138 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
Long_t getToolTipDelay() const
tuple norm
Definition: lumiNorm.py:78
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
char state
Definition: procUtils.cc:75
std::string m_toolTip
Definition: CSGAction.h:101
std::string m_name
Definition: CSGAction.h:100
FWCustomIconsButton * CSGAction::createCustomIconsButton ( TGCompositeFrame *  p,
const TGPicture *  upPic,
const TGPicture *  downPic,
const TGPicture *  disabledPic,
TGLayoutHints *  l = 0,
Int_t  id = -1,
GContext_t  norm = TGButton::GetDefaultGC() (),
UInt_t  option = 0 
)

Definition at line 152 of file CSGAction.cc.

References CSGActionSupervisor::getToolTipDelay(), isEnabled(), m_buttons, m_supervisor, and m_toolTip.

Referenced by CmsShowMainFrame::CmsShowMainFrame(), and CSGContinuousAction::createCustomIconsButton().

160 {
161  FWCustomIconsButton* picButton = new FWCustomIconsButton(p, upPic, downPic, disabledPic, 0, id, norm, option);
162  if (m_toolTip != "") picButton->SetToolTipText(m_toolTip.c_str(), m_supervisor->getToolTipDelay());
163  p->AddFrame(picButton, l);
164  TQObject::Connect(picButton, "Clicked()", "CSGAction", this, "activate()");
165  m_buttons.push_back(picButton);
166  if(!isEnabled()) {
167  picButton->SetEnabled(kFALSE);
168  }
169  return picButton;
170 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
Long_t getToolTipDelay() const
tuple norm
Definition: lumiNorm.py:78
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
std::string m_toolTip
Definition: CSGAction.h:101
void CSGAction::createMenuEntry ( TGPopupMenu *  menu)

Definition at line 203 of file CSGAction.cc.

References addSCToMenu(), isEnabled(), m_connector, m_entry, m_keycode, m_menu, and m_name.

Referenced by CmsShowMainFrame::CmsShowMainFrame(), and CmsShowMainFrame::createNewViewerAction().

203  {
204  m_menu = menu;
205  if (!(menu->HasConnection("Activated(Int_t)"))) TQObject::Connect(menu, "Activated(Int_t)", "CSGConnector", m_connector, "handleMenu(Int_t)");
206  menu->AddEntry(m_name.c_str(), m_entry);
207  if (m_keycode != 0) addSCToMenu();
208  if(!isEnabled()) {
209  m_menu->DisableEntry(m_entry);
210  }
211 }
int m_entry
Definition: CSGAction.h:107
void addSCToMenu()
Definition: CSGAction.cc:213
CSGConnector * m_connector
Definition: CSGAction.h:110
TGPopupMenu * m_menu
Definition: CSGAction.h:106
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
std::string m_name
Definition: CSGAction.h:100
Int_t m_keycode
Definition: CSGAction.h:104
void CSGAction::createPictureButton ( TGCompositeFrame *  p,
const TGPicture *  pic,
TGLayoutHints *  l = 0,
Int_t  id = -1,
GContext_t  norm = TGButton::GetDefaultGC() (),
UInt_t  option = kRaisedFrame|kDoubleBorder 
)

Definition at line 140 of file CSGAction.cc.

References CSGActionSupervisor::getToolTipDelay(), isEnabled(), m_buttons, m_supervisor, and m_toolTip.

140  {
141  TGPictureButton* picButton = new TGPictureButton(p, pic, id, norm, option);
142  if (m_toolTip != "") picButton->SetToolTipText(m_toolTip.c_str(), m_supervisor->getToolTipDelay());
143  p->AddFrame(picButton, l);
144  TQObject::Connect(picButton, "Clicked()", "CSGAction", this, "activate()");
145  m_buttons.push_back(picButton);
146  if(!isEnabled()) {
147  picButton->SetEnabled(kFALSE);
148  }
149 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
Long_t getToolTipDelay() const
tuple norm
Definition: lumiNorm.py:78
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
std::string m_toolTip
Definition: CSGAction.h:101
void CSGAction::createShortcut ( UInt_t  key,
const char *  mod,
int  windowID 
)

Definition at line 172 of file CSGAction.cc.

References addSCToMenu(), keycodeToString(), m_keycode, m_menu, m_modcode, m_scCombo, and m_windowID.

Referenced by CmsShowMainFrame::CmsShowMainFrame().

172  {
173  Int_t keycode = gVirtualX->KeysymToKeycode((int)key);
174  m_windowID = windowID;
175  Int_t modcode;
176  TString scText;
177  if (strcmp(mod, "CTRL") == 0) {
178  modcode = kKeyControlMask;
179  scText = "<ctrl> ";
180  }
181  else if (strcmp(mod, "CTRL+SHIFT") == 0) {
182  modcode = kKeyControlMask | kKeyShiftMask;
183  scText = "<ctrl> <shift> ";
184  }
185  else {
186  // Default to ALT for now
187  modcode = kKeyMod1Mask;
188  scText = "<alt> ";
189  }
190  scText += keycodeToString(keycode);
191  m_scCombo = scText;
192 
193  gVirtualX->GrabKey(m_windowID, keycode, modcode, kTRUE);
194  gVirtualX->GrabKey(m_windowID, keycode, modcode | kKeyMod2Mask, kTRUE);
195  gVirtualX->GrabKey(m_windowID, keycode, modcode | kKeyLockMask, kTRUE);
196  gVirtualX->GrabKey(m_windowID, keycode, modcode | kKeyMod2Mask | kKeyLockMask, kTRUE);
197 
198  m_keycode = keycode;
199  m_modcode = modcode;
200  if (m_menu != 0) addSCToMenu();
201 }
Int_t m_modcode
Definition: CSGAction.h:105
TString m_scCombo
Definition: CSGAction.h:102
void addSCToMenu()
Definition: CSGAction.cc:213
TGPopupMenu * m_menu
Definition: CSGAction.h:106
int m_windowID
Definition: CSGAction.h:113
static TString keycodeToString(Int_t keycode)
Definition: CSGAction.cc:345
list key
Definition: combine.py:13
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
Int_t m_keycode
Definition: CSGAction.h:104
void CSGAction::createTextButton ( TGCompositeFrame *  p,
TGLayoutHints *  l = 0,
Int_t  id = -1,
GContext_t  norm = TGButton::GetDefaultGC() (),
FontStruct_t  font = TGTextButton::GetDefaultFontStruct(),
UInt_t  option = kRaisedFrame|kDoubleBorder 
)

Definition at line 116 of file CSGAction.cc.

References CSGActionSupervisor::getToolTipDelay(), isEnabled(), m_buttons, m_name, m_supervisor, m_toolTip, and lumiNorm::norm.

Referenced by FWConvTrackHitsDetailView::build(), and FWTrackHitsDetailView::build().

116  {
117  TGTextButton* textButton = new TGTextButton(p, m_name.c_str(), id, norm, font, option);
118  if (m_toolTip != "") textButton->SetToolTipText(m_toolTip.c_str(), m_supervisor->getToolTipDelay());
119  p->AddFrame(textButton, l);
120  TQObject::Connect(textButton, "Clicked()", "CSGAction", this, "activate()");
121  m_buttons.push_back(textButton);
122  if(!isEnabled()) {
123  textButton->SetEnabled(kFALSE);
124  }
125 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
Long_t getToolTipDelay() const
tuple norm
Definition: lumiNorm.py:78
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
std::string m_toolTip
Definition: CSGAction.h:101
std::string m_name
Definition: CSGAction.h:100
void CSGAction::disable ( )
void CSGAction::disableImp ( )
private

Definition at line 321 of file CSGAction.cc.

References isEnabled(), m_buttons, m_entry, m_keycode, m_menu, m_modcode, m_toolBar, and m_windowID.

Referenced by disable(), and globalDisable().

321  {
322  if(!isEnabled()) {
323  if (m_menu != 0) m_menu->DisableEntry(m_entry);
324  for(std::vector<TGButton*>::iterator it = m_buttons.begin(), itEnd = m_buttons.end();
325  it != itEnd;
326  ++it) {
327  (*it)->SetEnabled(kFALSE);
328  }
329  if (m_toolBar != 0) m_toolBar->GetButton(m_entry)->SetEnabled(kFALSE);
330  if (m_keycode != 0) {
331  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode, kFALSE);
332  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode | kKeyMod2Mask, kFALSE);
333  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode | kKeyLockMask, kFALSE);
334  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode | kKeyMod2Mask | kKeyLockMask, kFALSE);
335  }
336  }
337 }
int m_entry
Definition: CSGAction.h:107
Int_t m_modcode
Definition: CSGAction.h:105
TGToolBar * m_toolBar
Definition: CSGAction.h:108
TGPopupMenu * m_menu
Definition: CSGAction.h:106
int m_windowID
Definition: CSGAction.h:113
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
Int_t m_keycode
Definition: CSGAction.h:104
void CSGAction::enable ( )
void CSGAction::enableImp ( )
private

Definition at line 302 of file CSGAction.cc.

References isEnabled(), m_buttons, m_entry, m_keycode, m_menu, m_modcode, m_toolBar, and m_windowID.

Referenced by enable(), and globalEnable().

302  {
303  if(isEnabled()) {
304  if (m_menu != 0) m_menu->EnableEntry(m_entry);
305  for(std::vector<TGButton*>::iterator it = m_buttons.begin(), itEnd = m_buttons.end();
306  it != itEnd;
307  ++it) {
308  (*it)->SetEnabled(kTRUE);
309  }
310 
311  if (m_toolBar != 0) m_toolBar->GetButton(m_entry)->SetEnabled(kTRUE);
312  if (m_keycode != 0) {
313  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode, kTRUE);
314  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode | kKeyMod2Mask, kTRUE);
315  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode | kKeyLockMask, kTRUE);
316  gVirtualX->GrabKey(m_windowID, m_keycode, m_modcode | kKeyMod2Mask | kKeyLockMask, kTRUE);
317  }
318  }
319 }
int m_entry
Definition: CSGAction.h:107
Int_t m_modcode
Definition: CSGAction.h:105
TGToolBar * m_toolBar
Definition: CSGAction.h:108
TGPopupMenu * m_menu
Definition: CSGAction.h:106
int m_windowID
Definition: CSGAction.h:113
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
Int_t m_keycode
Definition: CSGAction.h:104
Int_t CSGAction::getKeycode ( ) const

Definition at line 258 of file CSGAction.cc.

References m_keycode.

258  {
259  return m_keycode;
260 }
Int_t m_keycode
Definition: CSGAction.h:104
TGPopupMenu * CSGAction::getMenu ( ) const

Definition at line 250 of file CSGAction.cc.

References m_menu.

Referenced by CSGContinuousAction::stop(), and CSGContinuousAction::switchMode().

250  {
251  return m_menu;
252 }
TGPopupMenu * m_menu
Definition: CSGAction.h:106
int CSGAction::getMenuEntry ( ) const

Definition at line 254 of file CSGAction.cc.

References m_entry.

Referenced by CSGContinuousAction::stop(), and CSGContinuousAction::switchMode().

254  {
255  return m_entry;
256 }
int m_entry
Definition: CSGAction.h:107
Int_t CSGAction::getModcode ( ) const

Definition at line 262 of file CSGAction.cc.

References m_modcode.

262  {
263  return m_modcode;
264 }
Int_t m_modcode
Definition: CSGAction.h:105
const std::string & CSGAction::getName ( void  ) const

Definition at line 82 of file CSGAction.cc.

References m_name.

82  {
83  return m_name;
84 }
std::string m_name
Definition: CSGAction.h:100
TString CSGAction::getSCCombo ( ) const

Definition at line 90 of file CSGAction.cc.

References m_scCombo.

90  {
91  return m_scCombo;
92 }
TString m_scCombo
Definition: CSGAction.h:102
TGToolBar * CSGAction::getToolBar ( ) const

Definition at line 270 of file CSGAction.cc.

References m_toolBar.

Referenced by CSGContinuousAction::stop(), and CSGContinuousAction::switchMode().

270  {
271  return m_toolBar;
272 }
TGToolBar * m_toolBar
Definition: CSGAction.h:108
ToolBarData_t * CSGAction::getToolBarData ( ) const

Definition at line 266 of file CSGAction.cc.

References m_tools.

Referenced by CSGContinuousAction::stop(), and CSGContinuousAction::switchMode().

266  {
267  return m_tools;
268 }
ToolBarData_t * m_tools
Definition: CSGAction.h:109
const std::string & CSGAction::getToolTip ( ) const

Definition at line 86 of file CSGAction.cc.

References m_toolTip.

86  {
87  return m_toolTip;
88 }
std::string m_toolTip
Definition: CSGAction.h:101
void CSGAction::globalDisable ( )
virtual

Reimplemented in CSGContinuousAction.

Definition at line 292 of file CSGAction.cc.

References disableImp(), and m_globalEnabled.

Referenced by CSGContinuousAction::globalDisable().

293 {
294  m_globalEnabled=false;
295  disableImp();
296 }
void disableImp()
Definition: CSGAction.cc:321
Bool_t m_globalEnabled
Definition: CSGAction.h:112
void CSGAction::globalEnable ( )
virtual

Reimplemented in CSGContinuousAction.

Definition at line 285 of file CSGAction.cc.

References enableImp(), and m_globalEnabled.

Referenced by CSGContinuousAction::globalEnable(), and CSGContinuousAction::switchMode().

286 {
287  m_globalEnabled=true;
288  enableImp();
289 }
Bool_t m_globalEnabled
Definition: CSGAction.h:112
void enableImp()
Definition: CSGAction.cc:302
Bool_t CSGAction::isEnabled ( ) const
virtual
TString CSGAction::keycodeToString ( Int_t  keycode)
static

Definition at line 345 of file CSGAction.cc.

References i.

Referenced by createShortcut().

345  {
346  int i;
347  char letter;
348  TString rep;
349  for (i = kKey_a; i < kKey_a + 26; i++) {
350  if (gVirtualX->KeysymToKeycode(i) == keycode) {
351  letter = (char)(i - kKey_a + 'a');
352  rep = TString(letter);
353  return rep;
354  }
355  }
356  for (i = kKey_A; i < kKey_A + 26; i++) {
357  if(gVirtualX->KeysymToKeycode(i) == keycode) {
358  letter = (char)(i - kKey_A + 'a');
359  rep = TString(letter);
360  return rep;
361  }
362  }
363  if (keycode == gVirtualX->KeysymToKeycode(kKey_Left)) {
364  rep = TString("<-");
365  return rep;
366  }
367  if (keycode == gVirtualX->KeysymToKeycode(kKey_Right)) {
368  rep = TString("->");
369  return rep;
370  }
371  rep = TString("");
372  return rep;
373 }
int i
Definition: DBlmapReader.cc:9
const CSGAction& CSGAction::operator= ( const CSGAction )
private
Bool_t CSGAction::resizeMenuEntry ( )

Definition at line 218 of file CSGAction.cc.

References cond::rpcobimon::current, m_entry, m_menu, m_name, m_scCombo, and tablePrinter::width.

Referenced by addSCToMenu().

218  {
219  FontStruct_t font = gClient->GetResourcePool()->GetMenuHiliteFont()->GetFontStruct();
220  Bool_t widthChanged = kTRUE;
221  UInt_t width = m_menu->GetWidth();
222  TString realName(m_name);
223  if (realName.Contains("->")) {
224  // Should make function to do this and store in member data...
225  while (!(realName.BeginsWith("->")) && realName.Length() > 0) {
226  realName.Replace(0,1,0,0);
227  }
228  realName.Replace(0,2,0,0);
229  }
230  TString scText = m_scCombo;
231  while (gVirtualX->TextWidth(font, realName.Data(), realName.Length()) + gVirtualX->TextWidth(font, scText.Data(), scText.Length()) + 53 < (Int_t)width) {
232  widthChanged = kFALSE;
233  realName += " ";
234  }
235  realName += "\t";
236  realName += scText;
237  TIter next(m_menu->GetListOfEntries());
238  TGMenuEntry *current;
239  while (0 != (current = (TGMenuEntry *)next())) {
240  if (current == m_menu->GetEntry(m_entry)) {
241  break;
242  }
243  }
244  current = (TGMenuEntry *)next();
245  m_menu->DeleteEntry(m_entry);
246  m_menu->AddEntry(realName, m_entry, 0, 0, current);
247  return widthChanged;
248 }
int m_entry
Definition: CSGAction.h:107
TString m_scCombo
Definition: CSGAction.h:102
TGPopupMenu * m_menu
Definition: CSGAction.h:106
unsigned int UInt_t
Definition: FUTypes.h:12
std::string m_name
Definition: CSGAction.h:100
void CSGAction::setMenuLabel ( const std::string &  label)

Definition at line 100 of file CSGAction.cc.

References m_entry, and m_menu.

100  {
101  if(m_menu) {
102  m_menu->GetEntry(m_entry)->GetLabel()->SetString(label.c_str());
103  }
104 }
int m_entry
Definition: CSGAction.h:107
const std::string & label
Definition: MVAComputer.cc:186
TGPopupMenu * m_menu
Definition: CSGAction.h:106
void CSGAction::setName ( const std::string &  name)

Definition at line 94 of file CSGAction.cc.

References m_name, and mergeVDriftHistosByStation::name.

Referenced by python.Vispa.Gui.PortWidget.PortWidget::__init__(), and python.Vispa.Views.PropertyView.Property::__init__().

94  {
95  // Does not update menu yet
96  m_name = name;
97 }
std::string m_name
Definition: CSGAction.h:100
void CSGAction::setToolTip ( const std::string &  tip)

Definition at line 106 of file CSGAction.cc.

References CSGActionSupervisor::getToolTipDelay(), m_buttons, m_supervisor, m_tools, and m_toolTip.

Referenced by python.Vispa.Plugins.EdmBrowser.EventContentView.LabelItem::__init__(), FWConvTrackHitsDetailView::build(), FWTrackHitsDetailView::build(), CmsShowMainFrame::CmsShowMainFrame(), python.Vispa.Gui.PortWidget.PortWidget::setName(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), and python.Vispa.Views.PropertyView.TextEditWithButtonProperty::valueChanged().

106  {
107  m_toolTip = tip;
108  for(std::vector<TGButton*>::iterator it = m_buttons.begin(), itEnd = m_buttons.end();
109  it != itEnd;
110  ++it) {
111  (*it)->SetToolTipText(tip.c_str(), m_supervisor->getToolTipDelay());
112  }
113  if (m_tools != 0) m_tools->fTipText = tip.c_str();
114 }
ToolBarData_t * m_tools
Definition: CSGAction.h:109
Long_t getToolTipDelay() const
CSGActionSupervisor * m_supervisor
Definition: CSGAction.h:99
std::vector< TGButton * > m_buttons
Definition: CSGAction.h:103
std::string m_toolTip
Definition: CSGAction.h:101

Member Data Documentation

sigc::signal<void> CSGAction::activated
std::vector<TGButton*> CSGAction::m_buttons
private
CSGConnector* CSGAction::m_connector
private

Definition at line 110 of file CSGAction.h.

Referenced by createMenuEntry(), CSGAction(), and ~CSGAction().

Bool_t CSGAction::m_enabled
private

Definition at line 111 of file CSGAction.h.

Referenced by CSGAction(), disable(), enable(), and isEnabled().

int CSGAction::m_entry
private
Bool_t CSGAction::m_globalEnabled
private

Definition at line 112 of file CSGAction.h.

Referenced by CSGAction(), globalDisable(), globalEnable(), and isEnabled().

Int_t CSGAction::m_keycode
private
TGPopupMenu* CSGAction::m_menu
private
Int_t CSGAction::m_modcode
private

Definition at line 105 of file CSGAction.h.

Referenced by createShortcut(), CSGAction(), disableImp(), enableImp(), and getModcode().

std::string CSGAction::m_name
private
TString CSGAction::m_scCombo
private

Definition at line 102 of file CSGAction.h.

Referenced by createShortcut(), getSCCombo(), and resizeMenuEntry().

CSGActionSupervisor* CSGAction::m_supervisor
private
TGToolBar* CSGAction::m_toolBar
private

Definition at line 108 of file CSGAction.h.

Referenced by CSGAction(), disableImp(), enableImp(), and getToolBar().

ToolBarData_t* CSGAction::m_tools
private

Definition at line 109 of file CSGAction.h.

Referenced by CSGAction(), getToolBarData(), and setToolTip().

std::string CSGAction::m_toolTip
private
int CSGAction::m_windowID
private

Definition at line 113 of file CSGAction.h.

Referenced by createShortcut(), CSGAction(), disableImp(), and enableImp().