#include <Midad/Gui/GuiButton.h>#include <Midad/Gui/GuiTextView.h>#include <Midad/Gui/GuiMainWindow.h>#include <Midad/Gui/GuiBox.h>#include <Midad/Gui/GuiTextEntry.h>#include "TROOT.h"#include "TApplication.h"#include <sigc++/sigc++.h>#include <sigc++/retype_return.h>#include <string>#include <vector>Go to the source code of this file.
Functions | |
| void | spawn_text_window (void) |
| void | update_text (GuiTextEntry *gte) |
| int | main (int argc, char *argv[]) |
Variables | |
| vector< Ptr< GuiTextView > > | gui_text_views |
|
||||||||||||
|
Definition at line 45 of file test-GuiTextView.cxx. References GuiTextEntry::activated, GuiCompositeFrameBase::Add(), GuiButtonBase::clicked, GuiMainWindow::ConnectClose(), gui_text_views, GuiBase::SetLayoutHints(), GuiMainWindow::SetMinSize(), GuiMainWindow::ShowAll(), spawn_text_window(), and update_text(). 00046 {
00047 TApplication theApp("App", &argc, argv);
00048
00049 GuiMainWindow mw(300,300);
00050
00051 GuiBox box(mw,kVerticalFrame);
00052 mw.Add(box);
00053
00054 GuiTextView gtv(box,300,300);
00055 box.Add(gtv);
00056 gui_text_views.push_back(>v);
00057
00058
00059 GuiTextEntry gte(box);
00060 box.Add(gte);
00061
00062 GuiTextButton but(box,"Spawn GuiTextWindow");
00063 but.SetLayoutHints(kLHintsExpandX);
00064 box.Add(but);
00065
00066
00067 but.clicked.connect(slot(spawn_text_window));
00068 gte.activated.connect(bind(slot(update_text),>e));
00069
00070
00071
00072 mw.ShowAll();
00073 mw.SetMinSize();
00074 mw.ConnectClose();
00075
00076 theApp.Run();
00077 return 0;
00078 } // end of main()
|
|
|
Definition at line 20 of file test-GuiTextView.cxx. References GuiButtonBase::clicked, and gui_text_views. Referenced by main(). 00021 {
00022 GuiMainWindow* gmw = new GuiMainWindow(300,300);
00023 GuiTextView* gtv = manage(new GuiTextView(*gmw,300,300));
00024 gmw->Add(*gtv);
00025
00026 gui_text_views.push_back(gtv);
00027
00028 GuiTextButton* but = manage(new GuiTextButton(*gmw,"close"));
00029 gmw->Add(*but);
00030 but->clicked.connect(slot(*gmw,&GuiMainWindow::SendCloseMessage));
00031
00032 gmw->ShowAll();
00033 gmw->ConnectClose(false);
00034 }
|
|
|
Definition at line 37 of file test-GuiTextView.cxx. References gui_text_views. Referenced by main(). 00038 {
00039 const char* text = gte->GetText();
00040 for (unsigned int ind = 0; ind < gui_text_views.size(); ++ind) {
00041 gui_text_views[ind]->AddLine(text);
00042 }
00043 }
|
|
|
Definition at line 18 of file test-GuiTextView.cxx. Referenced by main(), spawn_text_window(), and update_text(). |
1.3.9.1