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
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=0)
Add frame to the composite frame using the specified layout hints.
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.