12 #include "TGLViewer.h" 15 #include "TGTextView.h" 16 #include "TGTextEdit.h" 17 #include "TGNumberEntry.h" 29 TGVerticalFrame *mainFrame =
new TGVerticalFrame(window);
30 TGLayoutHints *hints =
new TGLayoutHints(expandY ? kLHintsExpandX|kLHintsExpandY : kLHintsExpandX,
32 m_window->AddFrame(mainFrame, hints);
54 TGLayoutHints *hints =
new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,
162 style |= expandX ? kLHintsExpandX : 0;
163 style |= expandY ? kLHintsExpandY : 0;
277 FontStruct_t defaultFontStruct = label->GetDefaultFontStruct();
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));
292 label->SetTextJustify(kTextLeft);
295 UInt_t
style = hints->GetLayoutHints() | kLHintsCenterY;
296 hints->SetLayoutHints(style);
306 TGTextView *view =
new TGTextView(
nextFrame(), 100, 100);
308 view->AddLine(defaultText);
327 TGTextEdit *edit =
new TGTextEdit(
nextFrame(), 100, 100);
329 edit->AddLine(defaultText);
339 const char* graphicsLabel =
" ";
344 widget->SetEnabled(kFALSE);
352 TGHSlider *slider =
new TGHSlider(
nextFrame(), size, kSlider1);
354 slider->SetRange(0, 100);
355 slider->SetPosition(100);
356 slider->SetEnabled(
false);
364 TGTextButton *button =
new TGTextButton(
nextFrame(), text);
366 button->SetEnabled(
false);
387 entry->SetEnabled(kFALSE);
394 TGNumberFormat::EStyle
style,
396 TGNumberEntry **
out )
398 TGNumberEntry *
entry =
new TGNumberEntry(
nextFrame(), defaultValue,
400 TGNumberFormat::kNEAAnyNumber,
401 TGNumberFormat::kNELLimitMinMax,
404 entry->GetNumberEntry()->SetEnabled(kFALSE);
405 entry->GetButtonUp()->SetEnabled(kFALSE);
406 entry->GetButtonDown()->SetEnabled(kFALSE);
413 TGCheckButton *button =
new TGCheckButton(
nextFrame(), text);
414 button->SetState(kButtonDown,
false);
415 button->SetEnabled(
false);
427 TGLayoutHints *hints =
new TGLayoutHints(kLHintsExpandX|kLHintsExpandY);
429 frame->AddFrame(table, hints);
435 size_t verticalPadding )
437 TGLayoutHints *hints =
new TGLayoutHints(kLHintsExpandX,
495 TGCompositeFrame *tab =
m_tabs->AddTab(label);
624 frame =
new TGFrame(
nextFrame(), 1, size);
641 frame =
new TGFrame(
nextFrame(), size, 1);
FWDialogBuilder & spaceUp(size_t spacing=3)
TGVerticalFrame * verticalFrame()
TGCompositeFrame * m_window
FWDialogBuilder & frameSpaceUp(size_t spacing=3)
FWDialogBuilder & extract(T *in, T **out)
FWDialogBuilder(TGCompositeFrame *window, FWDialogBuilder *parent=nullptr, bool expandY=true)
TGCompositeFrame * nextFrame()
FWDialogBuilder & endTab(void)
FWDialogBuilder & frameSpaceRight(size_t spacing=3)
FWDialogBuilder & addTextButton(const char *text, TGTextButton **out=nullptr)
FWDialogBuilder & addHSlider(size_t size, TGHSlider **out=nullptr)
FWDialogBuilder & spaceLeftRight(size_t spacing=3)
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWDialogBuilder & addTextView(const char *defaultText=nullptr, TGTextView **out=nullptr)
FWLayoutBuilder & spaceRight(size_t spacing)
std::vector< TGVerticalFrame * > m_framesStack
FWLayoutBuilder(TGCompositeFrame *window, bool expandY=true)
TGLayoutHints * m_currentHints
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWDialogBuilder & addLabel(const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=nullptr)
FWDialogBuilder & addCheckbox(const char *text, TGCheckButton **out=nullptr)
FWDialogBuilder & vSpacer(size_t size=0)
FWDialogBuilder & untabs(void)
FWDialogBuilder & addTextEdit(const char *defaultText=nullptr, TGTextEdit **out=nullptr)
FWLayoutBuilder & frameSpaceUp(size_t spacing)
FWLayoutBuilder & spaceUp(size_t spacing)
FWDialogBuilder & frameSpaceLeftRight(size_t spacing=3)
TGCompositeFrame * m_currentFrame
FWDialogBuilder & frameSpaceDown(size_t spacing=3)
FWLayoutBuilder & floatLeft(size_t spacing)
FWDialogBuilder & frameSpaceUpDown(size_t spacing=3)
TGLayoutHints * m_currentFrameHints
FWDialogBuilder & addHtml(TGHtml **out=nullptr)
FWLayoutBuilder & unindent(void)
FWDialogBuilder & spaceUpDown(size_t spacing=3)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
FWDialogBuilder & newRow()
TGCompositeFrame * currentFrame(void)
FWDialogBuilder & addHSeparator(size_t horizontalPadding=4, size_t verticalPadding=3)
FWLayoutBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & tabs(TGTab **out)
FWDialogBuilder & spaceLeft(size_t spacing=3)
FWDialogBuilder & addValidatingTextEntry(const char *defaultText, FWGUIValidatingTextEntry **out)
FWDialogBuilder & hSpacer(size_t size=0)
FWDialogBuilder & addTextEntry(const char *defaultText, TGTextEntry **out)
FWLayoutBuilder & newRow()
FWDialogBuilder & frameSpaceLeft(size_t spacing=3)
FWDialogBuilder & unindent(void)
FWDialogBuilder & floatLeft(size_t spacing=3)
FWDialogBuilder & addTable(FWTableManagerBase *manager, FWTableWidget **out=nullptr)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
TGLayoutHints * nextHints()
FWLayoutBuilder & spaceDown(size_t spacing)
FWDialogBuilder * m_parent
FWLayoutBuilder & expand(bool expandX=true, bool expandY=false)
FWDialogBuilder & beginTab(const char *label)
FWDialogBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & addNumberEntry(float defaultValue, size_t digits, TGNumberFormat::EStyle style, int min, int max, TGNumberEntry **out)
FWDialogBuilder & addColorPicker(const FWColorManager *manager, FWColorSelect **out=nullptr)
FWDialogBuilder & spaceDown(size_t spacing=3)
FWLayoutBuilder & spaceLeft(size_t spacing)
FWLayoutBuilder & frameSpaceLeft(size_t spacing)
FWDialogBuilder & spaceRight(size_t spacing=3)