28 GroupBox(
const TGWindow *
p,
const char *
name,
const char *title);
30 TGComboBox *GetCombo()
const {
return fCombo; }
36GroupBox::GroupBox(
const TGWindow *
p,
const char *
name,
const char *title) :
49 fCombo->Resize(100, 20);
56class TextEntryWindow {
67 virtual ~TextEntryWindow() {
delete fMain; }
74TextEntryWindow::TextEntryWindow()
86 fEcho =
new GroupBox(fMain,
"Echo",
"Mode:");
88 combo = fEcho->GetCombo();
89 entry = fEcho->GetEntry();
94 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetEchoMode(TGTextEntry::EEchoMode)");
97 fAlign =
new GroupBox(fMain,
"Alignment",
"Type:");
99 combo = fAlign->GetCombo();
100 entry = fAlign->GetEntry();
105 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetAlignment(ETextJustification)");
108 fAccess =
new GroupBox(fMain,
"Access",
"Read-only:");
110 combo = fAccess->GetCombo();
111 entry = fAccess->GetEntry();
115 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetEnabled(Int_t)");
118 fBorder =
new GroupBox(fMain,
"Border",
"Drawn:");
120 combo = fBorder->GetCombo();
121 entry = fBorder->GetEntry();
125 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetFrameDrawn(Int_t)");
129 fMain->Connect(
"CloseWindow()",
"TApplication",
gApplication,
"Terminate()");
130 fMain->DontCallClose();
132 fMain->MapSubwindows();
136 fMain->SetWMSizeHints(fMain->GetDefaultWidth(), fMain->GetDefaultHeight(),
138 fMain->SetWindowName(
"Text Entries");
148 new TextEntryWindow();
#define ClassDef(name, id)
R__EXTERN TApplication * gApplication
winID h TVirtualViewer3D TVirtualGLPainter p
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual void AddEntry(TGString *s, Int_t id)
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
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.
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.
A TGTextEntry is a one line text input widget.
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.