48 void DoHPosition(
Int_t);
49 void DoVPosition(
Int_t);
50 void DoLeftMargin(
char *);
51 void DoRightMargin(
char *);
52 void DoTopMargin(
char *);
53 void DoBottomMargin(
char *);
78 fButton =
new TGTextButton(contents,
"&This button has a multi-line label\nand shows features\n"
79 "available in the button classes");
80 fButton->Resize(300, 200);
81 fButton->ChangeOptions(fButton->GetOptions() |
kFixedSize);
82 fButton->SetToolTipText(
"The assigned tooltip\ncan be multi-line also", 200);
89 disable->
Connect(
"Toggled(Bool_t)",
"TGButton", fButton,
"SetEnabled(Bool_t)");
100 horizontal->
Connect(
"Pressed(Int_t)",
"ButtonWindow",
this,
"DoHPosition(Int_t)");
110 vertical->
Connect(
"Pressed(Int_t)",
"ButtonWindow",
this,
"DoVPosition(Int_t)");
117 TextMargin *left =
new TextMargin(margins,
"Left");
119 left->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
this,
"DoLeftMargin(char*)");
121 TextMargin *right =
new TextMargin(margins,
"Right");
123 right->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
this,
"DoRightMargin(char*)");
125 TextMargin *top =
new TextMargin(margins,
"Top");
127 top->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
this,
"DoTopMargin(char*)");
129 TextMargin *bottom =
new TextMargin(margins,
"Bottom");
131 bottom->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
this,
"DoBottomMargin(char*)");
139 Connect(
"CloseWindow()",
"TApplication",
gApplication,
"Terminate()");
145 SetWMSizeHints(GetDefaultWidth(), GetDefaultHeight(), 1000, 1000, 0, 0);
146 SetWindowName(
"Button Test");
151void ButtonWindow::DoHPosition(
Int_t id)
155 Int_t tj = fButton->GetTextJustify();
160 fButton->SetTextJustify(tj);
164void ButtonWindow::DoVPosition(
Int_t id)
168 Int_t tj = fButton->GetTextJustify();
174 fButton->SetTextJustify(tj);
178void ButtonWindow::DoLeftMargin(
char *val)
182 fButton->SetLeftMargin(atoi(val));
187void ButtonWindow::DoRightMargin(
char *val)
191 fButton->SetRightMargin(atoi(val));
196void ButtonWindow::DoTopMargin(
char *val)
200 fButton->SetTopMargin(atoi(val));
205void ButtonWindow::DoBottomMargin(
char *val)
209 fButton->SetBottomMargin(atoi(val));
#define ClassDef(name, id)
R__EXTERN TApplication * gApplication
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
A composite frame with a border and a title.
virtual void SetTitlePos(ETitlePos pos=kLeft)
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
A vertical 3D line is a line that can be used to separate groups of widgets.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.