test
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)
 
void frameForTab ()
 
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 94 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 241 of file FWDialogBuilder.cc.

Referenced by beginTab().

243  : FWLayoutBuilder(window, expandY),
244  m_parent(parent),
245  m_tabs(0)
246 {}
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 411 of file FWDialogBuilder.cc.

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

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

412 {
413  TGCheckButton *button = new TGCheckButton(nextFrame(), text);
414  button->SetState(kButtonDown, false);
415  button->SetEnabled(false);
416  currentFrame()->AddFrame(button, nextHints());
417 
418  return extract(button, out);
419 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
tuple text
Definition: runonSM.py:42
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addColorPicker ( const FWColorManager manager,
FWColorSelect **  out = 0 
)

Definition at line 336 of file FWDialogBuilder.cc.

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

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

338 {
339  const char* graphicsLabel = " ";
340  FWColorSelect *widget = new FWColorSelect(nextFrame(), graphicsLabel,
341  0, manager, -1);
342 
343  currentFrame()->AddFrame(widget, nextHints());
344  widget->SetEnabled(kFALSE);
345 
346  return extract(widget, out);
347 }
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 434 of file FWDialogBuilder.cc.

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

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

436 {
437  TGLayoutHints *hints = new TGLayoutHints(kLHintsExpandX,
438  horizontalPadding,
439  horizontalPadding,
440  verticalPadding,
441  verticalPadding);
442 
443  TGHorizontal3DLine* separator = new TGHorizontal3DLine(nextFrame(), 200, 2);
444  currentFrame()->AddFrame(separator, hints);
445  return newRow();
446 }
TGCompositeFrame * nextFrame()
FWDialogBuilder & newRow()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & FWDialogBuilder::addHSlider ( size_t  size,
TGHSlider **  out = 0 
)

Definition at line 350 of file FWDialogBuilder.cc.

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

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

351 {
352  TGHSlider *slider = new TGHSlider(nextFrame(), size, kSlider1);
353  currentFrame()->AddFrame(slider, nextHints());
354  slider->SetRange(0, 100);
355  slider->SetPosition(100);
356  slider->SetEnabled(false);
357 
358  return extract(slider, out);
359 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
tuple size
Write out results.
FWDialogBuilder & FWDialogBuilder::addHtml ( TGHtml **  out = 0)

Definition at line 315 of file FWDialogBuilder.cc.

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

316 {
317  TGHtml *html = new TGHtml(nextFrame(), 100, 100);
318  currentFrame()->AddFrame(html, nextHints());
319  expand(true, true);
320  return extract(html, out);
321 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
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 270 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), diffTwoXMLs::label, FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), and edmIntegrityCheck::pool.

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

272 {
273  TGLabel *label = new TGLabel(nextFrame(), text);
274 
275  if (fontSize != 0)
276  {
277  FontStruct_t defaultFontStruct = label->GetDefaultFontStruct();
278  try
279  {
280  TGFontPool *pool = gClient->GetFontPool();
281  TGFont* defaultFont = pool->GetFont(defaultFontStruct);
282  FontAttributes_t attributes = defaultFont->GetFontAttributes();
283  label->SetTextFont(pool->GetFont(attributes.fFamily, fontSize,
284  attributes.fWeight, attributes.fSlant));
285  }
286  catch(...)
287  {
288  // Ignore exceptions.
289  }
290  }
291 
292  label->SetTextJustify(kTextLeft);
293 
294  TGLayoutHints *hints = nextHints();
295  UInt_t style = hints->GetLayoutHints() | kLHintsCenterY;
296  hints->SetLayoutHints(style);
297  currentFrame()->AddFrame(label, hints);
298 
299  return extract(label, out);
300 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
tuple text
Definition: runonSM.py:42
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addNumberEntry ( float  defaultValue,
size_t  digits,
TGNumberFormat::EStyle  style,
int  min,
int  max,
TGNumberEntry **  out 
)

Definition at line 393 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

397 {
398  TGNumberEntry *entry = new TGNumberEntry(nextFrame(), defaultValue,
399  digits, -1, style,
400  TGNumberFormat::kNEAAnyNumber,
401  TGNumberFormat::kNELLimitMinMax,
402  min, max);
403  currentFrame()->AddFrame(entry, nextHints());
404  entry->GetNumberEntry()->SetEnabled(kFALSE);
405  entry->GetButtonUp()->SetEnabled(kFALSE);
406  entry->GetButtonDown()->SetEnabled(kFALSE);
407  return extract(entry, out);
408 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
T min(T a, T b)
Definition: MathUtil.h:58
TGLayoutHints * nextHints()
list entry
Definition: mps_splice.py:62
FWDialogBuilder & FWDialogBuilder::addTable ( FWTableManagerBase manager,
FWTableWidget **  out = 0 
)

Definition at line 422 of file FWDialogBuilder.cc.

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

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

424 {
425  expand(true, true);
426  TGCompositeFrame *frame = verticalFrame();
427  TGLayoutHints *hints = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY);
428  FWTableWidget *table = new FWTableWidget(manager, frame);
429  frame->AddFrame(table, hints);
430  return extract(table, out);
431 }
TGVerticalFrame * verticalFrame()
FWDialogBuilder & extract(T *in, T **out)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
FWDialogBuilder & FWDialogBuilder::addTextButton ( const char *  text,
TGTextButton **  out = 0 
)

Definition at line 362 of file FWDialogBuilder.cc.

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

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

363 {
364  TGTextButton *button = new TGTextButton(nextFrame(), text);
365  currentFrame()->AddFrame(button, nextHints());
366  button->SetEnabled(false);
367 
368  return extract(button, out);
369 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
tuple text
Definition: runonSM.py:42
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addTextEdit ( const char *  defaultText = 0,
TGTextEdit **  out = 0 
)

Definition at line 324 of file FWDialogBuilder.cc.

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

326 {
327  TGTextEdit *edit = new TGTextEdit(nextFrame(), 100, 100);
328  if (defaultText)
329  edit->AddLine(defaultText);
330  currentFrame()->AddFrame(edit, nextHints());
331  expand(true, true);
332  return extract(edit, out);
333 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addTextEntry ( const char *  defaultText,
TGTextEntry **  out 
)

Definition at line 382 of file FWDialogBuilder.cc.

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

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

384 {
385  TGTextEntry *entry = new TGTextEntry(nextFrame());
386  currentFrame()->AddFrame(entry, nextHints());
387  entry->SetEnabled(kFALSE);
388 
389  return extract(entry, out);
390 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
list entry
Definition: mps_splice.py:62
FWDialogBuilder & FWDialogBuilder::addTextView ( const char *  defaultText = 0,
TGTextView **  out = 0 
)

Definition at line 303 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

305 {
306  TGTextView *view = new TGTextView(nextFrame(), 100, 100);
307  if (defaultText)
308  view->AddLine(defaultText);
309  currentFrame()->AddFrame(view, nextHints());
310  expand(true, true);
311  return extract(view, out);
312 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & FWDialogBuilder::addValidatingTextEntry ( const char *  defaultText,
FWGUIValidatingTextEntry **  out 
)

Definition at line 372 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

374 {
376  currentFrame()->AddFrame(entry, nextHints());
377 
378  return extract(entry, out);
379 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()
list entry
Definition: mps_splice.py:62
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 493 of file FWDialogBuilder.cc.

References FWDialogBuilder(), m_tabs, and newRow().

Referenced by CmsShowEDI::CmsShowEDI().

494 {
495  TGCompositeFrame *tab = m_tabs->AddTab(label);
496 
497  FWDialogBuilder *builder = new FWDialogBuilder(tab, this, false);
498  return builder->newRow();
499 }
FWDialogBuilder(TGCompositeFrame *window, FWDialogBuilder *parent=0, bool expandY=true)
FWDialogBuilder & newRow()
FWDialogBuilder & FWDialogBuilder::endTab ( void  )

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

Definition at line 504 of file FWDialogBuilder.cc.

References m_parent.

Referenced by CmsShowEDI::CmsShowEDI().

505 {
506  FWDialogBuilder *parent = m_parent;
507  delete this;
508  return *parent;
509 }
FWDialogBuilder * m_parent
FWDialogBuilder & FWDialogBuilder::expand ( size_t  expandX = true,
size_t  expandY = false 
)

Definition at line 611 of file FWDialogBuilder.cc.

References FWLayoutBuilder::expand().

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

612 {
613  FWLayoutBuilder::expand(expandX, expandY);
614  return *this;
615 }
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 512 of file FWDialogBuilder.cc.

References FWLayoutBuilder::floatLeft().

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

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

Definition at line 573 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceDown().

Referenced by FWGUIEventDataAdder::createWindow().

574 {
576  return *this;
577 }
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceLeft ( size_t  spacing = 3)

Definition at line 588 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceLeft().

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

Definition at line 602 of file FWDialogBuilder.cc.

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

603 {
606  return *this;
607 }
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWLayoutBuilder & frameSpaceLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceRight ( size_t  spacing = 3)

Definition at line 595 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceRight().

596 {
598  return *this;
599 }
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceUp ( size_t  spacing = 3)

Definition at line 566 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceUp().

567 {
569  return *this;
570 }
FWLayoutBuilder & frameSpaceUp(size_t spacing)
FWDialogBuilder & FWDialogBuilder::frameSpaceUpDown ( size_t  spacing = 3)

Definition at line 580 of file FWDialogBuilder.cc.

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

Referenced by FWGUIEventDataAdder::createWindow().

581 {
584  return *this;
585 }
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWLayoutBuilder & frameSpaceUp(size_t spacing)
FWDialogBuilder & FWDialogBuilder::hSpacer ( size_t  size = 0)

Definition at line 637 of file FWDialogBuilder.cc.

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

Referenced by FWGUIEventDataAdder::createWindow().

638 {
639  TGFrame *frame;
640  if (size)
641  frame = new TGFrame(nextFrame(), size, 1);
642  else
643  frame = new TGFrame(nextFrame());
644 
645  currentFrame()->AddFrame(frame, nextHints());
646 
647  if (!size)
648  expand(true, false);
649  else
650  expand(false, false);
651 
652  return *this;
653 }
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 256 of file FWDialogBuilder.cc.

References FWLayoutBuilder::indent().

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

257 {
258  FWLayoutBuilder::indent(left, right);
259  return *this;
260 }
FWLayoutBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & FWDialogBuilder::newRow ( void  )

Definition at line 249 of file FWDialogBuilder.cc.

References FWLayoutBuilder::newRow().

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

250 {
252  return *this;
253 }
FWLayoutBuilder & newRow()
FWDialogBuilder & FWDialogBuilder::spaceDown ( size_t  spacing = 3)

Definition at line 526 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceDown().

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

527 {
529  return *this;
530 }
FWLayoutBuilder & spaceDown(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceLeft ( size_t  spacing = 3)

Definition at line 541 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceLeft().

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

Definition at line 555 of file FWDialogBuilder.cc.

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

556 {
559  return *this;
560 }
FWLayoutBuilder & spaceRight(size_t spacing)
FWLayoutBuilder & spaceLeft(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceRight ( size_t  spacing = 3)

Definition at line 548 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceRight().

Referenced by FWGUIEventDataAdder::createWindow().

549 {
551  return *this;
552 }
FWLayoutBuilder & spaceRight(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceUp ( size_t  spacing = 3)

Definition at line 519 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceUp().

Referenced by FWGUIEventDataAdder::createWindow().

520 {
521  FWLayoutBuilder::spaceUp(spacing);
522  return *this;
523 }
FWLayoutBuilder & spaceUp(size_t spacing)
FWDialogBuilder & FWDialogBuilder::spaceUpDown ( size_t  spacing = 3)

Definition at line 533 of file FWDialogBuilder.cc.

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

534 {
535  FWLayoutBuilder::spaceUp(spacing);
537  return *this;
538 }
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 467 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::frameForTab(), and m_tabs.

Referenced by CmsShowEDI::CmsShowEDI().

468 {
469 
470  // m_currentFrame = new TGVerticalFrame(m_framesStack.back());
471  //m_framesStack.back()->AddFrame(m_currentFrame, new TGLayoutHints(kLHintsExpandX| kLHintsExpandY));
472  frameForTab();
473 
474  m_tabs = new TGTab(currentFrame());
475  currentFrame()->AddFrame(m_tabs, new TGLayoutHints(kLHintsExpandX| kLHintsExpandY));
476  //expand(true, true);
477  return extract(m_tabs, out);
478 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & FWDialogBuilder::unindent ( void  )

Definition at line 263 of file FWDialogBuilder.cc.

References FWLayoutBuilder::unindent().

264 {
266  return *this;
267 }
FWLayoutBuilder & unindent(void)
FWDialogBuilder & FWDialogBuilder::untabs ( void  )

Definition at line 481 of file FWDialogBuilder.cc.

References assert(), and m_tabs.

Referenced by CmsShowEDI::CmsShowEDI().

482 {
483  // No untabs() without tabs().
484  assert(m_tabs);
485  m_tabs = 0;
486  return *this;
487 }
assert(m_qm.get())
FWDialogBuilder & FWDialogBuilder::vSpacer ( size_t  size = 0)

Definition at line 618 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

619 {
620  newRow().expand(true, true);
621 
622  TGFrame *frame;
623  if (size)
624  frame = new TGFrame(nextFrame(), 1, size);
625  else
626  frame = new TGFrame(nextFrame());
627 
628  currentFrame()->AddFrame(frame, nextHints());
629 
630  expand(true, true);
631 
632  return *this;
633 }
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 172 of file FWDialogBuilder.h.

Referenced by endTab().

TGTab* FWDialogBuilder::m_tabs
private

Definition at line 173 of file FWDialogBuilder.h.

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