11 #include "TGLViewer.h" 14 #include "TGTextView.h" 15 #include "TGTextEdit.h" 16 #include "TGNumberEntry.h" 21 m_currentFrame(nullptr),
25 m_currentHints(nullptr),
26 m_currentFrameHints(nullptr) {
27 TGVerticalFrame *mainFrame =
new TGVerticalFrame(
window);
28 TGLayoutHints *hints =
new TGLayoutHints(expandY ? kLHintsExpandX | kLHintsExpandY : kLHintsExpandX, 0, 0, 0, 0);
29 m_window->AddFrame(mainFrame, hints);
45 TGLayoutHints *hints =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, left, right, 0, 0);
127 style |= expandX ? kLHintsExpandX : 0;
128 style |= expandY ? kLHintsExpandY : 0;
219 FontStruct_t defaultFontStruct =
label->GetDefaultFontStruct();
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));
230 label->SetTextJustify(kTextLeft);
233 UInt_t
style = hints->GetLayoutHints() | kLHintsCenterY;
234 hints->SetLayoutHints(
style);
243 view->AddLine(defaultText);
257 TGTextEdit *edit =
new TGTextEdit(
nextFrame(), 100, 100);
259 edit->AddLine(defaultText);
266 const char *graphicsLabel =
" ";
270 widget->SetEnabled(kFALSE);
276 TGHSlider *slider =
new TGHSlider(
nextFrame(),
size, kSlider1);
278 slider->SetRange(0, 100);
279 slider->SetPosition(100);
280 slider->SetEnabled(
false);
288 button->SetEnabled(
false);
304 entry->SetEnabled(kFALSE);
316 TGNumberFormat::kNEAAnyNumber,
317 TGNumberFormat::kNELLimitMinMax,
321 entry->GetNumberEntry()->SetEnabled(kFALSE);
322 entry->GetButtonUp()->SetEnabled(kFALSE);
323 entry->GetButtonDown()->SetEnabled(kFALSE);
328 TGCheckButton *button =
new TGCheckButton(
nextFrame(),
text);
329 button->SetState(kButtonDown,
false);
330 button->SetEnabled(
false);
339 TGLayoutHints *hints =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY);
346 TGLayoutHints *hints =
347 new TGLayoutHints(kLHintsExpandX, horizontalPadding, horizontalPadding, verticalPadding, verticalPadding);
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)