CMS 3D CMS Logo

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

#include <FWDialogBuilder.h>

Inheritance diagram for FWDialogBuilder:
FWLayoutBuilder

Public Member Functions

FWDialogBuilderaddCheckbox (const char *text, TGCheckButton **out=0)
 
FWDialogBuilderaddColorPicker (const FWColorManager *manager, FWColorSelect **out=0)
 
FWDialogBuilderaddHSeparator (size_t horizontalPadding=4, size_t verticalPadding=3)
 
FWDialogBuilderaddHSlider (size_t size, TGHSlider **out=0)
 
FWDialogBuilderaddHtml (TGHtml **out=0)
 
FWDialogBuilderaddLabel (const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=0)
 
FWDialogBuilderaddNumberEntry (float defaultValue, size_t digits, TGNumberFormat::EStyle style, int min, int max, TGNumberEntry **out)
 
FWDialogBuilderaddTable (FWTableManagerBase *manager, FWTableWidget **out=0)
 
FWDialogBuilderaddTextButton (const char *text, TGTextButton **out=0)
 
FWDialogBuilderaddTextEdit (const char *defaultText=0, TGTextEdit **out=0)
 
FWDialogBuilderaddTextEntry (const char *defaultText, TGTextEntry **out)
 
FWDialogBuilderaddTextView (const char *defaultText=0, TGTextView **out=0)
 
FWDialogBuilderaddValidatingTextEntry (const char *defaultText, FWGUIValidatingTextEntry **out)
 
FWDialogBuilderbeginTab (const char *label)
 
FWDialogBuilderendTab (void)
 
FWDialogBuilderexpand (size_t expandX=true, size_t expandY=false)
 
FWDialogBuilderfloatLeft (size_t spacing=3)
 
FWDialogBuilderframeSpaceDown (size_t spacing=3)
 
FWDialogBuilderframeSpaceLeft (size_t spacing=3)
 
FWDialogBuilderframeSpaceLeftRight (size_t spacing=3)
 
FWDialogBuilderframeSpaceRight (size_t spacing=3)
 
FWDialogBuilderframeSpaceUp (size_t spacing=3)
 
FWDialogBuilderframeSpaceUpDown (size_t spacing=3)
 
 FWDialogBuilder (TGCompositeFrame *window, FWDialogBuilder *parent=0, bool expandY=true)
 
FWDialogBuilderhSpacer (size_t size=0)
 
FWDialogBuilderindent (int left=2, int right=-1)
 
FWDialogBuildernewRow ()
 
FWDialogBuilderspaceDown (size_t spacing=3)
 
FWDialogBuilderspaceLeft (size_t spacing=3)
 
FWDialogBuilderspaceLeftRight (size_t spacing=3)
 
FWDialogBuilderspaceRight (size_t spacing=3)
 
FWDialogBuilderspaceUp (size_t spacing=3)
 
FWDialogBuilderspaceUpDown (size_t spacing=3)
 
FWDialogBuildertabs (TGTab **out)
 
FWDialogBuilderunindent (void)
 
FWDialogBuilderuntabs (void)
 
FWDialogBuildervSpacer (size_t size=0)
 

Protected Member Functions

template<class T >
FWDialogBuilderextract (T *in, T **out)
 
- Protected Member Functions inherited from FWLayoutBuilder
TGCompositeFrame * currentFrame (void)
 
FWLayoutBuilderexpand (bool expandX=true, bool expandY=false)
 
FWLayoutBuilderfloatLeft (size_t spacing)
 
FWLayoutBuilderframeSpaceDown (size_t spacing)
 
FWLayoutBuilderframeSpaceLeft (size_t spacing)
 
FWLayoutBuilderframeSpaceRight (size_t spacing)
 
FWLayoutBuilderframeSpaceUp (size_t spacing)
 
 FWLayoutBuilder (TGCompositeFrame *window, bool expandY=true)
 
FWLayoutBuilderindent (int left=2, int right=-1)
 
bool isFloatingLeft ()
 
FWLayoutBuildernewRow ()
 
TGCompositeFrame * nextFrame ()
 
TGLayoutHints * nextHints ()
 
FWLayoutBuilderspaceDown (size_t spacing)
 
FWLayoutBuilderspaceLeft (size_t spacing)
 
FWLayoutBuilderspaceRight (size_t spacing)
 
FWLayoutBuilderspaceUp (size_t spacing)
 
FWLayoutBuilderunindent (void)
 
TGVerticalFrame * verticalFrame ()
 

Private Attributes

FWDialogBuilderm_parent
 
TGTab * m_tabs
 

Detailed Description

Helper class to construct dialogs in a more readable ways.

Encapsulated TGUI layout hiccups and exposes the developer an API which
allows to layout items in a top->bottom, right->left manner.

Example:

  FWDialogBuilder builder(parent);
  parent.newRow(2)              // New row which has a 2 pixel padding on top.
        .addLabel("MyLabel:")    // A new label.
        .indent(20)             // Whatever follows is indented 20 pixels 

on the right. .addLabel("MyLabel2") // Another label. .spaceDown(4) .addTextButton("Aligned to MyLabel2 ").floatLeft() .addTextButton("Same Row as previous") .unindent() // back one level in the indentation. .addLabel("Aligned to MyLabel:")

Because in ROOT layout and parenting of widgets are mixed we need to take responsibility for creating the widget objects (sigh!), so we have one "addXYZ" method per widget that can be added. If we find our way around this it would be better to have a generic "addWidget()" method and create widgets outside this class.

TODO: For higher configurability we should have an "addWithCallback(Callbak)" method which can be used to specify a generic widget creation action.

Definition at line 93 of file FWDialogBuilder.h.

Constructor & Destructor Documentation

FWDialogBuilder::FWDialogBuilder ( TGCompositeFrame *  window,
FWDialogBuilder parent = 0,
bool  expandY = true 
)
Helper class to construct dialogs in a more readable ways.

Encapsulated TGUI layout hiccups and exposes the developer an API which
allows to layout items in a top->bottom, right->left manner.

Example:

  FWDialogBuilder builder(parent);
  parent.newRow(2)              // New row which has a 2 pixel padding on top.
        .addLabel("MyLabel:")    // A new label.
        .indent(20)             // Whatever follows is indented 20 pixels 

on the right. .addLabel("MyLabel2") // Another label. .spaceDown(4) .addTextButton("Aligned to MyLabel2 ").floatLeft() .addTextButton("Same Row as previous") .unindent() // back one level in the indentation. .addLabel("Aligned to MyLabel:")

Because in ROOT layout and parenting of widgets are mixed we need to take responsibility for creating the widget objects (sigh!), so we have one "addXYZ" method per widget that can be added. If we find our way around this it would be better to have a generic "addWidget()" method and create widgets outside this class.

TODO: For higher configurability we should have an "addWithCallback(Callbak)" method which can be used to specify a generic widget creation action.

Definition at line 228 of file FWDialogBuilder.cc.

Referenced by beginTab().

230  : FWLayoutBuilder(window, expandY),
231  m_parent(parent),
232  m_tabs(0)
233 {}
def window
Definition: svgfig.py:642
FWLayoutBuilder(TGCompositeFrame *window, bool expandY=true)
FWDialogBuilder * m_parent

Member Function Documentation

FWDialogBuilder & FWDialogBuilder::addCheckbox ( const char *  text,
TGCheckButton **  out = 0 
)

Definition at line 398 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI(), CmsShowModelPopup::CmsShowModelPopup(), and FWGUIEventDataAdder::createWindow().

399 {
400  TGCheckButton *button = new TGCheckButton(nextFrame(), text);
401  button->SetState(kButtonDown, false);
402  button->SetEnabled(false);
403  currentFrame()->AddFrame(button, nextHints());
404 
405  return extract(button, out);
406 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
tuple text
Definition: runonSM.py:42
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addColorPicker ( const FWColorManager manager,
FWColorSelect **  out = 0 
)

Definition at line 323 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI(), and CmsShowModelPopup::CmsShowModelPopup().

325 {
326  const char* graphicsLabel = " ";
327  FWColorSelect *widget = new FWColorSelect(nextFrame(), graphicsLabel,
328  0, manager, -1);
329 
330  currentFrame()->AddFrame(widget, nextHints());
331  widget->SetEnabled(kFALSE);
332 
333  return extract(widget, out);
334 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addHSeparator ( size_t  horizontalPadding = 4,
size_t  verticalPadding = 3 
)

Definition at line 421 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), newRow(), and FWLayoutBuilder::nextFrame().

Referenced by CmsShowEDI::CmsShowEDI(), and CmsShowModelPopup::CmsShowModelPopup().

423 {
424  TGLayoutHints *hints = new TGLayoutHints(kLHintsExpandX,
425  horizontalPadding,
426  horizontalPadding,
427  verticalPadding,
428  verticalPadding);
429 
430  TGHorizontal3DLine* separator = new TGHorizontal3DLine(nextFrame(), 200, 2);
431  currentFrame()->AddFrame(separator, hints);
432  return newRow();
433 }
TGCompositeFrame * nextFrame()
FWDialogBuilder & newRow()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & FWDialogBuilder::addHSlider ( size_t  size,
TGHSlider **  out = 0 
)

Definition at line 337 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI(), and CmsShowModelPopup::CmsShowModelPopup().

338 {
339  TGHSlider *slider = new TGHSlider(nextFrame(), size, kSlider1);
340  currentFrame()->AddFrame(slider, nextHints());
341  slider->SetRange(0, 100);
342  slider->SetPosition(100);
343  slider->SetEnabled(false);
344 
345  return extract(slider, out);
346 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
TGLayoutHints * nextHints()
tuple size
Write out results.
FWDialogBuilder & FWDialogBuilder::addHtml ( TGHtml **  out = 0)

Definition at line 302 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), extract(), cmsCodeRulesChecker::html, FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

303 {
304  TGHtml *html = new TGHtml(nextFrame(), 100, 100);
305  currentFrame()->AddFrame(html, nextHints());
306  expand(true, true);
307  return extract(html, out);
308 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addLabel ( const char *  text,
size_t  fontSize = 12,
size_t  weight = 0,
TGLabel **  out = 0 
)

Definition at line 257 of file FWDialogBuilder.cc.

References asciidump::attributes, FWLayoutBuilder::currentFrame(), extract(), diffTwoXMLs::label, FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), and fetchall_from_DQM_v2::pool.

Referenced by CmsShowEDI::CmsShowEDI(), CmsShowModelPopup::CmsShowModelPopup(), FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

259 {
260  TGLabel *label = new TGLabel(nextFrame(), text);
261 
262  if (fontSize != 0)
263  {
264  FontStruct_t defaultFontStruct = label->GetDefaultFontStruct();
265  try
266  {
267  TGFontPool *pool = gClient->GetFontPool();
268  TGFont* defaultFont = pool->GetFont(defaultFontStruct);
269  FontAttributes_t attributes = defaultFont->GetFontAttributes();
270  label->SetTextFont(pool->GetFont(attributes.fFamily, fontSize,
271  attributes.fWeight, attributes.fSlant));
272  }
273  catch(...)
274  {
275  // Ignore exceptions.
276  }
277  }
278 
279  label->SetTextJustify(kTextLeft);
280 
281  TGLayoutHints *hints = nextHints();
282  UInt_t style = hints->GetLayoutHints() | kLHintsCenterY;
283  hints->SetLayoutHints(style);
284  currentFrame()->AddFrame(label, hints);
285 
286  return extract(label, out);
287 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
list attributes
Definition: asciidump.py:415
tuple text
Definition: runonSM.py:42
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addNumberEntry ( float  defaultValue,
size_t  digits,
TGNumberFormat::EStyle  style,
int  min,
int  max,
TGNumberEntry **  out 
)

Definition at line 380 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI().

384 {
385  TGNumberEntry *entry = new TGNumberEntry(nextFrame(), defaultValue,
386  digits, -1, style,
387  TGNumberFormat::kNEAAnyNumber,
388  TGNumberFormat::kNELLimitMinMax,
389  min, max);
390  currentFrame()->AddFrame(entry, nextHints());
391  entry->GetNumberEntry()->SetEnabled(kFALSE);
392  entry->GetButtonUp()->SetEnabled(kFALSE);
393  entry->GetButtonDown()->SetEnabled(kFALSE);
394  return extract(entry, out);
395 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
const T & max(const T &a, const T &b)
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addTable ( FWTableManagerBase manager,
FWTableWidget **  out = 0 
)

Definition at line 409 of file FWDialogBuilder.cc.

References expand(), extract(), table, and FWLayoutBuilder::verticalFrame().

Referenced by FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

411 {
412  expand(true, true);
413  TGCompositeFrame *frame = verticalFrame();
414  TGLayoutHints *hints = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY);
415  FWTableWidget *table = new FWTableWidget(manager, frame);
416  frame->AddFrame(table, hints);
417  return extract(table, out);
418 }
TGVerticalFrame * verticalFrame()
FWDialogBuilder & extract(T *in, T **out)
#define table(NAME)
Definition: DbCore.h:49
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
FWDialogBuilder & FWDialogBuilder::addTextButton ( const char *  text,
TGTextButton **  out = 0 
)

Definition at line 349 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI(), FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

350 {
351  TGTextButton *button = new TGTextButton(nextFrame(), text);
352  currentFrame()->AddFrame(button, nextHints());
353  button->SetEnabled(false);
354 
355  return extract(button, out);
356 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
tuple text
Definition: runonSM.py:42
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addTextEdit ( const char *  defaultText = 0,
TGTextEdit **  out = 0 
)

Definition at line 311 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

313 {
314  TGTextEdit *edit = new TGTextEdit(nextFrame(), 100, 100);
315  if (defaultText)
316  edit->AddLine(defaultText);
317  currentFrame()->AddFrame(edit, nextHints());
318  expand(true, true);
319  return extract(edit, out);
320 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addTextEntry ( const char *  defaultText,
TGTextEntry **  out 
)

Definition at line 369 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI(), FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

371 {
372  TGTextEntry *entry = new TGTextEntry(nextFrame());
373  currentFrame()->AddFrame(entry, nextHints());
374  entry->SetEnabled(kFALSE);
375 
376  return extract(entry, out);
377 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addTextView ( const char *  defaultText = 0,
TGTextView **  out = 0 
)

Definition at line 290 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI().

292 {
293  TGTextView *view = new TGTextView(nextFrame(), 100, 100);
294  if (defaultText)
295  view->AddLine(defaultText);
296  currentFrame()->AddFrame(view, nextHints());
297  expand(true, true);
298  return extract(view, out);
299 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addValidatingTextEntry ( const char *  defaultText,
FWGUIValidatingTextEntry **  out 
)

Definition at line 359 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI().

361 {
363  currentFrame()->AddFrame(entry, nextHints());
364 
365  return extract(entry, out);
366 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::beginTab ( const char *  label)

Adds a new tab called label. A new tab gets a new builder so that tab building is completely scoped.

Definition at line 479 of file FWDialogBuilder.cc.

References FWDialogBuilder(), m_tabs, newRow(), and accesses::tab.

Referenced by CmsShowEDI::CmsShowEDI().

480 {
481  TGCompositeFrame *tab = m_tabs->AddTab(label);
482 
483  FWDialogBuilder *builder = new FWDialogBuilder(tab, this, false);
484  return builder->newRow();
485 }
FWDialogBuilder(TGCompositeFrame *window, FWDialogBuilder *parent=0, bool expandY=true)
tuple tab
Definition: accesses.py:4
FWDialogBuilder & newRow()
FWDialogBuilder & FWDialogBuilder::endTab ( void  )

When we are done with the tab, we delete ourself and return the parent.

Definition at line 490 of file FWDialogBuilder.cc.

References m_parent, and dbtoconf::parent.

Referenced by CmsShowEDI::CmsShowEDI().

491 {
493  delete this;
494  return *parent;
495 }
list parent
Definition: dbtoconf.py:74
FWDialogBuilder * m_parent
FWDialogBuilder & FWDialogBuilder::expand ( size_t  expandX = true,
size_t  expandY = false 
)

Definition at line 597 of file FWDialogBuilder.cc.

References FWLayoutBuilder::expand().

Referenced by addHtml(), addTable(), addTextEdit(), addTextView(), CmsShowEDI::CmsShowEDI(), CmsShowModelPopup::CmsShowModelPopup(), FWGUIEventDataAdder::createWindow(), FWPathsPopup::FWPathsPopup(), hSpacer(), tabs(), and vSpacer().

598 {
599  FWLayoutBuilder::expand(expandX, expandY);
600  return *this;
601 }
FWLayoutBuilder & expand(bool expandX=true, bool expandY=false)
template<class T >
FWDialogBuilder& FWDialogBuilder::extract ( T in,
T **  out 
)
inlineprotected
FWDialogBuilder & FWDialogBuilder::floatLeft ( size_t  spacing = 3)

Definition at line 498 of file FWDialogBuilder.cc.

References FWLayoutBuilder::floatLeft().

Referenced by CmsShowEDI::CmsShowEDI(), FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

499 {
501  return *this;
502 }
FWLayoutBuilder & floatLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceDown ( size_t  spacing = 3)

Definition at line 559 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceDown().

Referenced by FWGUIEventDataAdder::createWindow().

560 {
562  return *this;
563 }
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceLeft ( size_t  spacing = 3)

Definition at line 574 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceLeft().

575 {
577  return *this;
578 }
FWLayoutBuilder & frameSpaceLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceLeftRight ( size_t  spacing = 3)

Definition at line 588 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceLeft(), and FWLayoutBuilder::frameSpaceRight().

589 {
592  return *this;
593 }
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWLayoutBuilder & frameSpaceLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceRight ( size_t  spacing = 3)

Definition at line 581 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceRight().

582 {
584  return *this;
585 }
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceUp ( size_t  spacing = 3)

Definition at line 552 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceUp().

553 {
555  return *this;
556 }
FWLayoutBuilder & frameSpaceUp(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceUpDown ( size_t  spacing = 3)

Definition at line 566 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceDown(), and FWLayoutBuilder::frameSpaceUp().

Referenced by FWGUIEventDataAdder::createWindow().

567 {
570  return *this;
571 }
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWLayoutBuilder & frameSpaceUp(size_t spacing)
FWDialogBuilder & FWDialogBuilder::hSpacer ( size_t  size = 0)

Definition at line 623 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by FWGUIEventDataAdder::createWindow().

624 {
625  TGFrame *frame;
626  if (size)
627  frame = new TGFrame(nextFrame(), size, 1);
628  else
629  frame = new TGFrame(nextFrame());
630 
631  currentFrame()->AddFrame(frame, nextHints());
632 
633  if (!size)
634  expand(true, false);
635  else
636  expand(false, false);
637 
638  return *this;
639 }
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
tuple size
Write out results.
FWDialogBuilder & FWDialogBuilder::indent ( int  left = 2,
int  right = -1 
)

Definition at line 243 of file FWDialogBuilder.cc.

References FWLayoutBuilder::indent().

Referenced by CmsShowEDI::CmsShowEDI(), CmsShowModelPopup::CmsShowModelPopup(), FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

244 {
245  FWLayoutBuilder::indent(left, right);
246  return *this;
247 }
FWLayoutBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & FWDialogBuilder::newRow ( void  )

Definition at line 236 of file FWDialogBuilder.cc.

References FWLayoutBuilder::newRow().

Referenced by addHSeparator(), beginTab(), and vSpacer().

237 {
239  return *this;
240 }
FWLayoutBuilder & newRow()
FWDialogBuilder & FWDialogBuilder::spaceDown ( size_t  spacing = 3)

Definition at line 512 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceDown().

Referenced by FWGUIEventDataAdder::createWindow(), and FWPathsPopup::FWPathsPopup().

513 {
515  return *this;
516 }
FWLayoutBuilder & spaceDown(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceLeft ( size_t  spacing = 3)

Definition at line 527 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceLeft().

528 {
530  return *this;
531 }
FWLayoutBuilder & spaceLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceLeftRight ( size_t  spacing = 3)

Definition at line 541 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceLeft(), and FWLayoutBuilder::spaceRight().

542 {
545  return *this;
546 }
FWLayoutBuilder & spaceRight(size_t spacing)
FWLayoutBuilder & spaceLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceRight ( size_t  spacing = 3)

Definition at line 534 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceRight().

Referenced by FWGUIEventDataAdder::createWindow().

535 {
537  return *this;
538 }
FWLayoutBuilder & spaceRight(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceUp ( size_t  spacing = 3)

Definition at line 505 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceUp().

Referenced by FWGUIEventDataAdder::createWindow().

506 {
507  FWLayoutBuilder::spaceUp(spacing);
508  return *this;
509 }
FWLayoutBuilder & spaceUp(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceUpDown ( size_t  spacing = 3)

Definition at line 519 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceDown(), and FWLayoutBuilder::spaceUp().

520 {
521  FWLayoutBuilder::spaceUp(spacing);
523  return *this;
524 }
FWLayoutBuilder & spaceUp(size_t spacing)
FWLayoutBuilder & spaceDown(size_t spacing)
FWDialogBuilder & FWDialogBuilder::tabs ( TGTab **  out)
Support for tabs.

This is done by creating a new DialogBuilder and returning it for each
of the added tabs.

builder.tabs()               // Adds a TGTab widget to the current frame.
       .beginTab("Foo")      // Add a tab to the TGTab.
       .textButton("In Foo") // This is inside the tab "Foo", the layouting

is independent from previous calls since a separate builder was returned by

       .endTab("Foo")        // End of the tab.
       .beginTab("Bar")
       .endTab("")
       .untabs();            // Tabs completed.
       .textButton("Main scope") // This is on the same level as the TGTab.

Definition at line 454 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), extract(), m_tabs, FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI().

455 {
456  // Calls to tabs cannot be nested within the same builder. Multiple
457  // builders are used to support nested tabs.
458  assert(!m_tabs);
459  expand(true, true);
460  m_tabs = new TGTab(nextFrame());
461  currentFrame()->AddFrame(m_tabs, nextHints());
462  expand(true, true);
463  return extract(m_tabs, out);
464 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
tuple out
Definition: dbtoconf.py:99
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::unindent ( void  )

Definition at line 250 of file FWDialogBuilder.cc.

References FWLayoutBuilder::unindent().

251 {
253  return *this;
254 }
FWLayoutBuilder & unindent(void)
FWDialogBuilder & FWDialogBuilder::untabs ( void  )

Definition at line 467 of file FWDialogBuilder.cc.

References m_tabs.

Referenced by CmsShowEDI::CmsShowEDI().

468 {
469  // No untabs() without tabs().
470  assert(m_tabs);
471  m_tabs = 0;
472  return *this;
473 }
FWDialogBuilder & FWDialogBuilder::vSpacer ( size_t  size = 0)

Definition at line 604 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), newRow(), FWLayoutBuilder::nextFrame(), and FWLayoutBuilder::nextHints().

Referenced by CmsShowEDI::CmsShowEDI().

605 {
606  newRow().expand(true, true);
607 
608  TGFrame *frame;
609  if (size)
610  frame = new TGFrame(nextFrame(), 1, size);
611  else
612  frame = new TGFrame(nextFrame());
613 
614  currentFrame()->AddFrame(frame, nextHints());
615 
616  expand(true, true);
617 
618  return *this;
619 }
TGCompositeFrame * nextFrame()
FWDialogBuilder & newRow()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
tuple size
Write out results.

Member Data Documentation

FWDialogBuilder* FWDialogBuilder::m_parent
private

Definition at line 171 of file FWDialogBuilder.h.

Referenced by endTab().

TGTab* FWDialogBuilder::m_tabs
private

Definition at line 172 of file FWDialogBuilder.h.

Referenced by beginTab(), tabs(), and untabs().