50 void DoHPosition(
Int_t);
51 void DoVPosition(
Int_t);
52 void DoLeftMargin(
char*);
53 void DoRightMargin(
char*);
54 void DoTopMargin(
char*);
55 void DoBottomMargin(
char*);
83 "&This button has a multi-line label\nand shows features\n" 84 "available in the button classes");
85 fButton->Resize(300, 200);
86 fButton->ChangeOptions(fButton->GetOptions() |
kFixedSize);
87 fButton->SetToolTipText(
"The assigned tooltip\ncan be multi-line also",200);
95 disable->
Connect(
"Toggled(Bool_t)",
"TGButton", fButton,
"SetEnabled(Bool_t)");
107 horizontal->
Connect(
"Pressed(Int_t)",
"ButtonWindow",
this,
108 "DoHPosition(Int_t)");
119 vertical->
Connect(
"Pressed(Int_t)",
"ButtonWindow",
this,
120 "DoVPosition(Int_t)");
128 TextMargin *left =
new TextMargin(margins,
"Left");
130 left->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
131 this,
"DoLeftMargin(char*)");
133 TextMargin *right =
new TextMargin(margins,
"Right");
135 right->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
136 this,
"DoRightMargin(char*)");
138 TextMargin *top =
new TextMargin(margins,
"Top");
140 top->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
141 this,
"DoTopMargin(char*)");
143 TextMargin *bottom =
new TextMargin(margins,
"Bottom");
145 bottom->GetEntry()->Connect(
"TextChanged(char*)",
"ButtonWindow",
146 this,
"DoBottomMargin(char*)");
155 Connect(
"CloseWindow()",
"TApplication",
gApplication,
"Terminate()");
161 SetWMSizeHints(GetDefaultWidth(), GetDefaultHeight(), 1000, 1000, 0 ,0);
162 SetWindowName(
"Button Test");
167 void ButtonWindow::DoHPosition(
Int_t id)
171 Int_t tj = fButton->GetTextJustify();
176 fButton->SetTextJustify(tj);
180 void ButtonWindow::DoVPosition(
Int_t id)
184 Int_t tj = fButton->GetTextJustify();
190 fButton->SetTextJustify(tj);
194 void ButtonWindow::DoLeftMargin(
char *val)
198 fButton->SetLeftMargin(atoi(val));
203 void ButtonWindow::DoRightMargin(
char *val)
207 fButton->SetRightMargin(atoi(val));
212 void ButtonWindow::DoTopMargin(
char *val)
216 fButton->SetTopMargin(atoi(val));
221 void ButtonWindow::DoBottomMargin(
char *val)
225 fButton->SetBottomMargin(atoi(val));
R__EXTERN TApplication * gApplication
virtual void SetTitlePos(ETitlePos pos=kLeft)
#define ClassDef(name, id)
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...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
TGNumberEntryField * GetNumberEntry() const