#include <Midad/Gui/GuiMainWindow.h>#include <Midad/Gui/GuiMultiEntry.h>#include <Midad/Gui/GuiTextEntry.h>#include <Midad/Gui/GuiBox.h>#include <Midad/Gui/GuiLabel.h>#include <iostream>#include <string>#include <sstream>#include <cstdlib>#include <TROOT.h>#include <TApplication.h>#include <sigc++/signal.h>#include <sigc++/bind.h>#include <sigc++/object_slot.h>Go to the source code of this file.
Functions | |
| void | chirp_entry (const char *label, GuiTextEntry *gte) |
| void | add_entry (GuiMultiEntry *me, GuiTextEntry *gte) |
| int | main (int argc, char *argv[]) |
|
||||||||||||
|
Definition at line 26 of file test-GuiMultiEntry.cxx. References GuiTextEntry::activated, GuiMultiEntry::AddEntry(), and chirp_entry(). Referenced by main(). 00027 {
00028 const char* label = gte->GetText();
00029 GuiTextEntry& newentry = me->AddEntry(label);
00030 newentry.activated.connect(bind(slot(chirp_entry),label,&newentry));
00031 }
|
|
||||||||||||
|
Definition at line 21 of file test-GuiMultiEntry.cxx. Referenced by add_entry(). 00022 {
00023 cerr << label << ": " << gte->GetText() << endl;
00024 }
|
|
||||||||||||
|
Definition at line 33 of file test-GuiMultiEntry.cxx. References GuiTextEntry::activated, add_entry(), and GuiBase::SetLayoutHints(). 00034 {
00035 TApplication theApp("App", &argc, argv);
00036
00037 GuiMainWindow* mw = manage(new GuiMainWindow(100,100));
00038
00039 GuiBox* box = manage(new GuiBox(*mw, kVerticalFrame));
00040 mw->Add(*box);
00041
00042 GuiMultiEntry* me = manage(new GuiMultiEntry(*box));
00043 box->Add(*me);
00044
00045
00046 GuiTextEntry* gte;
00047 GuiLabel* lab;
00048
00049
00050 lab = manage(new GuiLabel(*box,"Add an entry"));
00051 lab->SetLayoutHints(kLHintsExpandX);
00052 box->Add(*lab);
00053 gte = manage(new GuiTextEntry(*box));
00054 box->Add(*gte);
00055 gte->activated.connect(bind(slot(add_entry),me,gte));
00056
00057 mw->ShowAll();
00058 mw->ConnectClose(true);
00059 mw->Resize(mw->GetDefaultWidth(),mw->GetDefaultHeight());
00060
00061 theApp.Run();
00062
00063 return 0;
00064 } // end of main()
|
1.3.9.1