CMS 3D CMS Logo

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=nullptr)
 
FWDialogBuilderaddColorPicker (const FWColorManager *manager, FWColorSelect **out=nullptr)
 
FWDialogBuilderaddHSeparator (size_t horizontalPadding=4, size_t verticalPadding=3)
 
FWDialogBuilderaddHSlider (size_t size, TGHSlider **out=nullptr)
 
FWDialogBuilderaddHtml (TGHtml **out=nullptr)
 
FWDialogBuilderaddLabel (const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=nullptr)
 
FWDialogBuilderaddNumberEntry (float defaultValue, size_t digits, TGNumberFormat::EStyle style, int min, int max, TGNumberEntry **out)
 
FWDialogBuilderaddTable (FWTableManagerBase *manager, FWTableWidget **out=nullptr)
 
FWDialogBuilderaddTextButton (const char *text, TGTextButton **out=nullptr)
 
FWDialogBuilderaddTextEdit (const char *defaultText=nullptr, TGTextEdit **out=nullptr)
 
FWDialogBuilderaddTextEntry (const char *defaultText, TGTextEntry **out)
 
FWDialogBuilderaddTextView (const char *defaultText=nullptr, TGTextView **out=nullptr)
 
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=nullptr, 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 93 of file FWDialogBuilder.h.

Constructor & Destructor Documentation

◆ FWDialogBuilder()

FWDialogBuilder::FWDialogBuilder ( TGCompositeFrame *  window,
FWDialogBuilder parent = nullptr,
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 194 of file FWDialogBuilder.cc.

Referenced by beginTab().

195  : FWLayoutBuilder(window, expandY), m_parent(parent), m_tabs(nullptr) {}
FWLayoutBuilder(TGCompositeFrame *window, bool expandY=true)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
FWDialogBuilder * m_parent

Member Function Documentation

◆ addCheckbox()

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

Definition at line 327 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), MillePedeFileConverter_cfg::out, and runonSM::text.

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

327  {
328  TGCheckButton *button = new TGCheckButton(nextFrame(), text);
329  button->SetState(kButtonDown, false);
330  button->SetEnabled(false);
331  currentFrame()->AddFrame(button, nextHints());
332 
333  return extract(button, out);
334 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addColorPicker()

FWDialogBuilder & FWDialogBuilder::addColorPicker ( const FWColorManager manager,
FWColorSelect **  out = nullptr 
)

Definition at line 265 of file FWDialogBuilder.cc.

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

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

265  {
266  const char *graphicsLabel = " ";
267  FWColorSelect *widget = new FWColorSelect(nextFrame(), graphicsLabel, 0, manager, -1);
268 
269  currentFrame()->AddFrame(widget, nextHints());
270  widget->SetEnabled(kFALSE);
271 
272  return extract(widget, out);
273 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addHSeparator()

FWDialogBuilder & FWDialogBuilder::addHSeparator ( size_t  horizontalPadding = 4,
size_t  verticalPadding = 3 
)

Definition at line 345 of file FWDialogBuilder.cc.

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

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

345  {
346  TGLayoutHints *hints =
347  new TGLayoutHints(kLHintsExpandX, horizontalPadding, horizontalPadding, verticalPadding, verticalPadding);
348 
349  TGHorizontal3DLine *separator = new TGHorizontal3DLine(nextFrame(), 200, 2);
350  currentFrame()->AddFrame(separator, hints);
351  return newRow();
352 }
string separator
Definition: mps_merge.py:79
TGCompositeFrame * nextFrame()
FWDialogBuilder & newRow()
TGCompositeFrame * currentFrame(void)

◆ addHSlider()

FWDialogBuilder & FWDialogBuilder::addHSlider ( size_t  size,
TGHSlider **  out = nullptr 
)

Definition at line 275 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), MillePedeFileConverter_cfg::out, and findQualityFiles::size.

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

275  {
276  TGHSlider *slider = new TGHSlider(nextFrame(), size, kSlider1);
277  currentFrame()->AddFrame(slider, nextHints());
278  slider->SetRange(0, 100);
279  slider->SetPosition(100);
280  slider->SetEnabled(false);
281 
282  return extract(slider, out);
283 }
size
Write out results.
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addHtml()

FWDialogBuilder & FWDialogBuilder::addHtml ( TGHtml **  out = nullptr)

Definition at line 249 of file FWDialogBuilder.cc.

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

249  {
250  TGHtml *html = new TGHtml(nextFrame(), 100, 100);
251  currentFrame()->AddFrame(html, nextHints());
252  expand(true, true);
253  return extract(html, out);
254 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
Definition: html.py:1
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()

◆ addLabel()

FWDialogBuilder & FWDialogBuilder::addLabel ( const char *  text,
size_t  fontSize = 12,
size_t  weight = 0,
TGLabel **  out = nullptr 
)

Definition at line 212 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), label, FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), MillePedeFileConverter_cfg::out, submitPVResolutionJobs::pool, and runonSM::text.

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

215  {
216  TGLabel *label = new TGLabel(nextFrame(), text);
217 
218  if (fontSize != 0) {
219  FontStruct_t defaultFontStruct = label->GetDefaultFontStruct();
220  try {
221  TGFontPool *pool = gClient->GetFontPool();
222  TGFont *defaultFont = pool->GetFont(defaultFontStruct);
223  FontAttributes_t attributes = defaultFont->GetFontAttributes();
224  label->SetTextFont(pool->GetFont(attributes.fFamily, fontSize, attributes.fWeight, attributes.fSlant));
225  } catch (...) {
226  // Ignore exceptions.
227  }
228  }
229 
230  label->SetTextJustify(kTextLeft);
231 
232  TGLayoutHints *hints = nextHints();
233  UInt_t style = hints->GetLayoutHints() | kLHintsCenterY;
234  hints->SetLayoutHints(style);
235  currentFrame()->AddFrame(label, hints);
236 
237  return extract(label, out);
238 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
char const * label
Definition: style.py:1
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addNumberEntry()

FWDialogBuilder & FWDialogBuilder::addNumberEntry ( float  defaultValue,
size_t  digits,
TGNumberFormat::EStyle  style,
int  min,
int  max,
TGNumberEntry **  out 
)

Definition at line 309 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), hltPixelClustersMultiplicity_cfi::defaultValue, mps_splice::entry, extract(), SiStripPI::max, SiStripPI::min, FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), and MillePedeFileConverter_cfg::out.

Referenced by CmsShowEDI::CmsShowEDI().

310  {
311  TGNumberEntry *entry = new TGNumberEntry(nextFrame(),
312  defaultValue,
313  digits,
314  -1,
315  style,
316  TGNumberFormat::kNEAAnyNumber,
317  TGNumberFormat::kNELLimitMinMax,
318  min,
319  max);
320  currentFrame()->AddFrame(entry, nextHints());
321  entry->GetNumberEntry()->SetEnabled(kFALSE);
322  entry->GetButtonUp()->SetEnabled(kFALSE);
323  entry->GetButtonDown()->SetEnabled(kFALSE);
324  return extract(entry, out);
325 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
Definition: style.py:1
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addTable()

FWDialogBuilder & FWDialogBuilder::addTable ( FWTableManagerBase manager,
FWTableWidget **  out = nullptr 
)

Definition at line 336 of file FWDialogBuilder.cc.

References expand(), extract(), amptDefault_cfi::frame, MillePedeFileConverter_cfg::out, TableParser::table, and FWLayoutBuilder::verticalFrame().

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

336  {
337  expand(true, true);
338  TGCompositeFrame *frame = verticalFrame();
339  TGLayoutHints *hints = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY);
340  FWTableWidget *table = new FWTableWidget(manager, frame);
341  frame->AddFrame(table, hints);
342  return extract(table, out);
343 }
TGVerticalFrame * verticalFrame()
FWDialogBuilder & extract(T *in, T **out)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)

◆ addTextButton()

FWDialogBuilder & FWDialogBuilder::addTextButton ( const char *  text,
TGTextButton **  out = nullptr 
)

Definition at line 285 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), extract(), FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), MillePedeFileConverter_cfg::out, and runonSM::text.

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

285  {
286  TGTextButton *button = new TGTextButton(nextFrame(), text);
287  currentFrame()->AddFrame(button, nextHints());
288  button->SetEnabled(false);
289 
290  return extract(button, out);
291 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addTextEdit()

FWDialogBuilder & FWDialogBuilder::addTextEdit ( const char *  defaultText = nullptr,
TGTextEdit **  out = nullptr 
)

Definition at line 256 of file FWDialogBuilder.cc.

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

256  {
257  TGTextEdit *edit = new TGTextEdit(nextFrame(), 100, 100);
258  if (defaultText)
259  edit->AddLine(defaultText);
260  currentFrame()->AddFrame(edit, nextHints());
261  expand(true, true);
262  return extract(edit, out);
263 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()

◆ addTextEntry()

FWDialogBuilder & FWDialogBuilder::addTextEntry ( const char *  defaultText,
TGTextEntry **  out 
)

Definition at line 301 of file FWDialogBuilder.cc.

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

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

301  {
302  TGTextEntry *entry = new TGTextEntry(nextFrame());
303  currentFrame()->AddFrame(entry, nextHints());
304  entry->SetEnabled(kFALSE);
305 
306  return extract(entry, out);
307 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
TGLayoutHints * nextHints()

◆ addTextView()

FWDialogBuilder & FWDialogBuilder::addTextView ( const char *  defaultText = nullptr,
TGTextView **  out = nullptr 
)

Definition at line 240 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

240  {
241  TGTextView *view = new TGTextView(nextFrame(), 100, 100);
242  if (defaultText)
243  view->AddLine(defaultText);
244  currentFrame()->AddFrame(view, nextHints());
245  expand(true, true);
246  return extract(view, out);
247 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()

◆ addValidatingTextEntry()

FWDialogBuilder & FWDialogBuilder::addValidatingTextEntry ( const char *  defaultText,
FWGUIValidatingTextEntry **  out 
)

◆ beginTab()

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 393 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

393  {
394  TGCompositeFrame *tab = m_tabs->AddTab(label);
395 
396  FWDialogBuilder *builder = new FWDialogBuilder(tab, this, false);
397  return builder->newRow();
398 }
FWDialogBuilder(TGCompositeFrame *window, FWDialogBuilder *parent=nullptr, bool expandY=true)
char const * label
FWDialogBuilder & newRow()

◆ endTab()

FWDialogBuilder & FWDialogBuilder::endTab ( void  )

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

Definition at line 402 of file FWDialogBuilder.cc.

References m_parent, and class-composition::parent.

Referenced by CmsShowEDI::CmsShowEDI().

402  {
404  delete this;
405  return *parent;
406 }
FWDialogBuilder * m_parent

◆ expand()

FWDialogBuilder & FWDialogBuilder::expand ( size_t  expandX = true,
size_t  expandY = false 
)

Definition at line 479 of file FWDialogBuilder.cc.

References FWLayoutBuilder::expand().

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

479  {
480  FWLayoutBuilder::expand(expandX, expandY);
481  return *this;
482 }
FWLayoutBuilder & expand(bool expandX=true, bool expandY=false)

◆ extract()

template<class T >
FWDialogBuilder& FWDialogBuilder::extract ( T in,
T **  out 
)
inlineprotected

◆ floatLeft()

FWDialogBuilder & FWDialogBuilder::floatLeft ( size_t  spacing = 3)

Definition at line 408 of file FWDialogBuilder.cc.

References FWLayoutBuilder::floatLeft().

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

408  {
410  return *this;
411 }
FWLayoutBuilder & floatLeft(size_t spacing)

◆ frameSpaceDown()

FWDialogBuilder & FWDialogBuilder::frameSpaceDown ( size_t  spacing = 3)

Definition at line 452 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceDown().

Referenced by FWGUIEventDataAdder::createWindow().

452  {
454  return *this;
455 }
FWLayoutBuilder & frameSpaceDown(size_t spacing)

◆ frameSpaceLeft()

FWDialogBuilder & FWDialogBuilder::frameSpaceLeft ( size_t  spacing = 3)

Definition at line 463 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceLeft().

463  {
465  return *this;
466 }
FWLayoutBuilder & frameSpaceLeft(size_t spacing)

◆ frameSpaceLeftRight()

FWDialogBuilder & FWDialogBuilder::frameSpaceLeftRight ( size_t  spacing = 3)

Definition at line 473 of file FWDialogBuilder.cc.

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

473  {
476  return *this;
477 }
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWLayoutBuilder & frameSpaceLeft(size_t spacing)

◆ frameSpaceRight()

FWDialogBuilder & FWDialogBuilder::frameSpaceRight ( size_t  spacing = 3)

Definition at line 468 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceRight().

468  {
470  return *this;
471 }
FWLayoutBuilder & frameSpaceRight(size_t spacing)

◆ frameSpaceUp()

FWDialogBuilder & FWDialogBuilder::frameSpaceUp ( size_t  spacing = 3)

Definition at line 447 of file FWDialogBuilder.cc.

References FWLayoutBuilder::frameSpaceUp().

447  {
449  return *this;
450 }
FWLayoutBuilder & frameSpaceUp(size_t spacing)

◆ frameSpaceUpDown()

FWDialogBuilder & FWDialogBuilder::frameSpaceUpDown ( size_t  spacing = 3)

Definition at line 457 of file FWDialogBuilder.cc.

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

Referenced by FWGUIEventDataAdder::createWindow().

457  {
460  return *this;
461 }
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWLayoutBuilder & frameSpaceUp(size_t spacing)

◆ hSpacer()

FWDialogBuilder & FWDialogBuilder::hSpacer ( size_t  size = 0)

Definition at line 500 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), amptDefault_cfi::frame, FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), and findQualityFiles::size.

Referenced by FWGUIEventDataAdder::createWindow().

500  {
501  TGFrame *frame;
502  if (size)
503  frame = new TGFrame(nextFrame(), size, 1);
504  else
505  frame = new TGFrame(nextFrame());
506 
507  currentFrame()->AddFrame(frame, nextHints());
508 
509  if (!size)
510  expand(true, false);
511  else
512  expand(false, false);
513 
514  return *this;
515 }
size
Write out results.
TGCompositeFrame * nextFrame()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()

◆ indent()

FWDialogBuilder & FWDialogBuilder::indent ( int  left = 2,
int  right = -1 
)

◆ newRow()

FWDialogBuilder & FWDialogBuilder::newRow ( void  )

Definition at line 197 of file FWDialogBuilder.cc.

References FWLayoutBuilder::newRow().

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

197  {
199  return *this;
200 }
FWLayoutBuilder & newRow()

◆ spaceDown()

FWDialogBuilder & FWDialogBuilder::spaceDown ( size_t  spacing = 3)

Definition at line 418 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceDown().

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

418  {
420  return *this;
421 }
FWLayoutBuilder & spaceDown(size_t spacing)

◆ spaceLeft()

FWDialogBuilder & FWDialogBuilder::spaceLeft ( size_t  spacing = 3)

Definition at line 429 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceLeft().

429  {
431  return *this;
432 }
FWLayoutBuilder & spaceLeft(size_t spacing)

◆ spaceLeftRight()

FWDialogBuilder & FWDialogBuilder::spaceLeftRight ( size_t  spacing = 3)

Definition at line 439 of file FWDialogBuilder.cc.

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

439  {
442  return *this;
443 }
FWLayoutBuilder & spaceRight(size_t spacing)
FWLayoutBuilder & spaceLeft(size_t spacing)

◆ spaceRight()

FWDialogBuilder & FWDialogBuilder::spaceRight ( size_t  spacing = 3)

Definition at line 434 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceRight().

Referenced by FWGUIEventDataAdder::createWindow().

434  {
436  return *this;
437 }
FWLayoutBuilder & spaceRight(size_t spacing)

◆ spaceUp()

FWDialogBuilder & FWDialogBuilder::spaceUp ( size_t  spacing = 3)

Definition at line 413 of file FWDialogBuilder.cc.

References FWLayoutBuilder::spaceUp().

Referenced by FWGUIEventDataAdder::createWindow().

413  {
414  FWLayoutBuilder::spaceUp(spacing);
415  return *this;
416 }
FWLayoutBuilder & spaceUp(size_t spacing)

◆ spaceUpDown()

FWDialogBuilder & FWDialogBuilder::spaceUpDown ( size_t  spacing = 3)

Definition at line 423 of file FWDialogBuilder.cc.

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

423  {
424  FWLayoutBuilder::spaceUp(spacing);
426  return *this;
427 }
FWLayoutBuilder & spaceUp(size_t spacing)
FWLayoutBuilder & spaceDown(size_t spacing)

◆ tabs()

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 372 of file FWDialogBuilder.cc.

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

Referenced by CmsShowEDI::CmsShowEDI().

372  {
373  // m_currentFrame = new TGVerticalFrame(m_framesStack.back());
374  //m_framesStack.back()->AddFrame(m_currentFrame, new TGLayoutHints(kLHintsExpandX| kLHintsExpandY));
375  frameForTab();
376 
377  m_tabs = new TGTab(currentFrame());
378  currentFrame()->AddFrame(m_tabs, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
379  //expand(true, true);
380  return extract(m_tabs, out);
381 }
FWDialogBuilder & extract(T *in, T **out)
TGCompositeFrame * currentFrame(void)

◆ unindent()

FWDialogBuilder & FWDialogBuilder::unindent ( void  )

Definition at line 207 of file FWDialogBuilder.cc.

References FWLayoutBuilder::unindent().

207  {
209  return *this;
210 }
FWLayoutBuilder & unindent(void)

◆ untabs()

FWDialogBuilder & FWDialogBuilder::untabs ( void  )

Definition at line 383 of file FWDialogBuilder.cc.

References cms::cuda::assert(), and m_tabs.

Referenced by CmsShowEDI::CmsShowEDI().

383  {
384  // No untabs() without tabs().
385  assert(m_tabs);
386  m_tabs = nullptr;
387  return *this;
388 }
assert(be >=bs)

◆ vSpacer()

FWDialogBuilder & FWDialogBuilder::vSpacer ( size_t  size = 0)

Definition at line 484 of file FWDialogBuilder.cc.

References FWLayoutBuilder::currentFrame(), expand(), amptDefault_cfi::frame, newRow(), FWLayoutBuilder::nextFrame(), FWLayoutBuilder::nextHints(), and findQualityFiles::size.

Referenced by CmsShowEDI::CmsShowEDI().

484  {
485  newRow().expand(true, true);
486 
487  TGFrame *frame;
488  if (size)
489  frame = new TGFrame(nextFrame(), 1, size);
490  else
491  frame = new TGFrame(nextFrame());
492 
493  currentFrame()->AddFrame(frame, nextHints());
494 
495  expand(true, true);
496 
497  return *this;
498 }
size
Write out results.
TGCompositeFrame * nextFrame()
FWDialogBuilder & newRow()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()

Member Data Documentation

◆ m_parent

FWDialogBuilder* FWDialogBuilder::m_parent
private

Definition at line 159 of file FWDialogBuilder.h.

Referenced by endTab().

◆ m_tabs

TGTab* FWDialogBuilder::m_tabs
private

Definition at line 160 of file FWDialogBuilder.h.

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