27 GroupBox(
const TGWindow *p,
const char *
name,
const char *title);
28 TGTextEntry *GetEntry()
const {
return fEntry; }
29 TGComboBox *GetCombo()
const {
return fCombo; }
46 fCombo->Resize(100, 20);
53class TextEntryWindow {
64 virtual ~TextEntryWindow() {
delete fMain; }
70TextEntryWindow::TextEntryWindow()
82 fEcho =
new GroupBox(fMain,
"Echo",
"Mode:");
84 combo = fEcho->GetCombo();
85 entry = fEcho->GetEntry();
90 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetEchoMode(TGTextEntry::EEchoMode)");
93 fAlign =
new GroupBox(fMain,
"Alignment",
"Type:");
95 combo = fAlign->GetCombo();
96 entry = fAlign->GetEntry();
101 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetAlignment(ETextJustification)");
104 fAccess =
new GroupBox(fMain,
"Access",
"Read-only:");
106 combo = fAccess->GetCombo();
107 entry = fAccess->GetEntry();
111 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetEnabled(Int_t)");
114 fBorder =
new GroupBox(fMain,
"Border",
"Drawn:");
116 combo = fBorder->GetCombo();
117 entry = fBorder->GetEntry();
121 combo->
Connect(
"Selected(Int_t)",
"TGTextEntry", entry,
"SetFrameDrawn(Int_t)");
125 fMain->Connect(
"CloseWindow()",
"TApplication",
gApplication,
"Terminate()");
126 fMain->DontCallClose();
128 fMain->MapSubwindows();
132 fMain->SetWMSizeHints(fMain->GetDefaultWidth(), fMain->GetDefaultHeight(), 1000, 1000, 0, 0);
133 fMain->SetWindowName(
"Text Entries");
142 new TextEntryWindow();
#define ClassDef(name, id)
externTApplication * gApplication
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.