|
|
Go to the documentation of this file.
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);
241 TGTextView *view =
new TGTextView(
nextFrame(), 100, 100);
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);
310 float defaultValue,
size_t digits, TGNumberFormat::EStyle
style,
int min,
int max, TGNumberEntry **
out ) {
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 & endTab(void)
FWLayoutBuilder & spaceDown(size_t spacing)
TGCompositeFrame * nextFrame()
FWDialogBuilder & frameSpaceRight(size_t spacing=3)
FWDialogBuilder & addHSeparator(size_t horizontalPadding=4, size_t verticalPadding=3)
FWLayoutBuilder & frameSpaceLeft(size_t spacing)
TGCompositeFrame * m_currentFrame
FWDialogBuilder & addTextEdit(const char *defaultText=nullptr, TGTextEdit **out=nullptr)
FWDialogBuilder & addTextView(const char *defaultText=nullptr, TGTextView **out=nullptr)
FWDialogBuilder & spaceUpDown(size_t spacing=3)
FWDialogBuilder & newRow()
FWDialogBuilder * m_parent
TGCompositeFrame * m_window
FWDialogBuilder & unindent(void)
TGLayoutHints * m_currentHints
FWLayoutBuilder & frameSpaceDown(size_t spacing)
FWDialogBuilder & tabs(TGTab **out)
FWDialogBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & addNumberEntry(float defaultValue, size_t digits, TGNumberFormat::EStyle style, int min, int max, TGNumberEntry **out)
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 & floatLeft(size_t spacing=3)
FWDialogBuilder & untabs(void)
FWLayoutBuilder & spaceLeft(size_t spacing)
FWDialogBuilder & addTextButton(const char *text, TGTextButton **out=nullptr)
TGCompositeFrame * currentFrame(void)
FWLayoutBuilder & frameSpaceUp(size_t spacing)
TGVerticalFrame * verticalFrame()
FWLayoutBuilder & floatLeft(size_t spacing)
FWDialogBuilder & addValidatingTextEntry(const char *defaultText, FWGUIValidatingTextEntry **out)
FWLayoutBuilder & expand(bool expandX=true, bool expandY=false)
TGLayoutHints * nextHints()
FWDialogBuilder & spaceDown(size_t spacing=3)
FWDialogBuilder & frameSpaceLeft(size_t spacing=3)
FWDialogBuilder & vSpacer(size_t size=0)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
FWDialogBuilder & addHSlider(size_t size, TGHSlider **out=nullptr)
FWDialogBuilder & addColorPicker(const FWColorManager *manager, FWColorSelect **out=nullptr)
FWDialogBuilder & frameSpaceLeftRight(size_t spacing=3)
FWDialogBuilder & spaceUp(size_t spacing=3)
FWLayoutBuilder & frameSpaceRight(size_t spacing)
FWLayoutBuilder & spaceRight(size_t spacing)
FWDialogBuilder & spaceRight(size_t spacing=3)
FWDialogBuilder & spaceLeftRight(size_t spacing=3)
FWDialogBuilder & beginTab(const char *label)
std::vector< TGVerticalFrame * > m_framesStack
TGLayoutHints * m_currentFrameHints
FWLayoutBuilder(TGCompositeFrame *window, bool expandY=true)
FWDialogBuilder & addHtml(TGHtml **out=nullptr)
FWLayoutBuilder & spaceUp(size_t spacing)
FWDialogBuilder(TGCompositeFrame *window, FWDialogBuilder *parent=nullptr, bool expandY=true)
FWDialogBuilder & hSpacer(size_t size=0)
FWDialogBuilder & frameSpaceUpDown(size_t spacing=3)
FWDialogBuilder & frameSpaceUp(size_t spacing=3)
FWLayoutBuilder & unindent(void)
FWLayoutBuilder & newRow()
FWDialogBuilder & addTable(FWTableManagerBase *manager, FWTableWidget **out=nullptr)
FWDialogBuilder & frameSpaceDown(size_t spacing=3)
FWLayoutBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & spaceLeft(size_t spacing=3)
FWDialogBuilder & extract(T *in, T **out)
FWDialogBuilder & addTextEntry(const char *defaultText, TGTextEntry **out)
FWDialogBuilder & addLabel(const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=nullptr)
FWDialogBuilder & addCheckbox(const char *text, TGCheckButton **out=nullptr)