#include <GuiBase.h>
Inheritance diagram for GuiBase:

Public Types | |
| typedef std::list< SigC::Ptr< GuiBase > > | ChildrenList |
Public Member Functions | |
| GuiBase () | |
| virtual | ~GuiBase () |
| void | SetLayoutHints (unsigned int loh) |
| virtual unsigned int | GetLayoutHints () |
| void | SetName (const char *name) |
| const char * | GetName () |
| GuiMainWindow * | GetMainWindow () |
| virtual TGFrame * | GetFrame () |
Protected Member Functions | |
| bool | AddChild (TGFrame &obj) |
| void | AddObject (TObject *obj) |
| void | LayoutChildren (void) |
Protected Attributes | |
| ChildrenList | fChildren |
Private Attributes | |
| TList * | fCleanup |
| unsigned int | fLayoutHints |
| std::string | fName |
|
|
Definition at line 39 of file GuiBase.h. Referenced by GuiTab::GuisAt(). |
|
|
Definition at line 19 of file GuiBase.cxx. References fCleanup. 00020 : SigC::Object() 00021 , fCleanup(0) 00022 , fLayoutHints(kLHintsExpandX|kLHintsExpandY) 00023 , fName("GuiBase") 00024 { 00025 fCleanup = new TList; 00026 00027 #ifdef GUI_DEBUG 00028 ++nguis; 00029 cerr << "GuiBase(), " << nguis << " alive\n"; 00030 #endif 00031 }
|
|
|
Definition at line 33 of file GuiBase.cxx. References fCleanup, and GetName(). 00034 {
00035 if (fCleanup) {
00036 fCleanup->Delete();
00037 delete fCleanup;
00038 }
00039
00040 // when fChildren goes out of scope, its elements will be deleted
00041 // if managed() and if no longer referenced.
00042
00043 #ifdef GUI_DEBUG
00044 --nguis;
00045 cerr << "~GuiBase(\""<<this->GetName()<<"\"), " << nguis << " alive\n";
00046 #endif
00047 }
|
|
|
Definition at line 74 of file GuiBase.cxx. References fChildren. Referenced by GuiMenuBar::AddMenu(), and GuiTable::Attach(). 00075 {
00076 GuiBase* child = dynamic_cast<GuiBase*>(&obj);
00077 if (!child) {
00078 cerr << "GuiBase::AddChild: failed to cast child to GuiBase\n";
00079 return false;
00080 }
00081 fChildren.push_back(child);
00082 return true;
00083 }
|
|
|
Definition at line 85 of file GuiBase.cxx. References GuiCompositeFrameBase::Add(), and fCleanup. Referenced by GuiCompositeFrameBase::Add(), GuiMenuBar::AddMenu(), and GuiTable::Attach(). 00086 {
00087 fCleanup->Add(obj);
00088 }
|
|
|
Reimplemented in GuiFrame. Definition at line 106 of file GuiBase.cxx. Referenced by GuiCompositeFrameBase::Add(), GetMainWindow(), and LayoutChildren(). 00107 {
00108 TGFrame* frame = dynamic_cast<TGFrame*>(this);
00109 if (!frame) cerr << "GuiBase::GetFrame, Can't cast to TGFrame\n";
00110 return frame;
00111 }
|
|
|
Definition at line 46 of file GuiBase.h. Referenced by GuiCompositeFrameBase::Add(), GuiMenuBar::AddMenu(), GuiTable::Attach(), build_table(), main(), and TridAnimator::OpenWindow(). 00046 { return fLayoutHints; }
|
|
|
Definition at line 49 of file GuiBase.cxx. References GetFrame(). Referenced by add_it(), PageDisplay::AddButton(), PageDisplay::AddEntry(), GuiMultiEntry::AddEntry(), PageDisplay::AddPage(), EVD::Digittext(), handler_menu(), hide_it(), PageDisplay::LoadLib(), EVD::MCtext(), EVD::MCTreetext(), DisplayOptions::OpenDialog(), PageDisplay::OpenFile(), EVD::Recotext(), remove_it(), RegistryGui::SetPossibles(), show_it(), and PageDisplay::UpdateGui(). 00050 {
00051 TGFrame* as_frame = this->GetFrame();
00052 if (!as_frame) return 0;
00053
00054 TGWindow* parent = const_cast<TGWindow*>(as_frame->GetParent());
00055 if (!parent) {
00056 cerr << "We have no parent?!?\n";
00057 return 0;
00058 }
00059
00060 GuiBase* gb = dynamic_cast<GuiBase*>(parent);
00061 if (!gb) {
00062 cerr << "Parent not a GuiBase\n";
00063 return 0;
00064 }
00065
00066 GuiMainWindow* mw = dynamic_cast<GuiMainWindow*>(gb);
00067 if (!mw) {
00068 //cerr << "Parent not a main window, recurring\n";
00069 return gb->GetMainWindow();
00070 }
00071 return mw;
00072 }
|
|
|
Definition at line 49 of file GuiBase.h. References fName. Referenced by MCText::AddSimSnarl(), NueDisplayModule::IntRecoCalc(), tab_chirp(), and ~GuiBase(). 00049 { return fName.c_str(); }
|
|
|
Reimplemented in MyVBox. Definition at line 90 of file GuiBase.cxx. References done(), fChildren, and GetFrame(). Referenced by MyVBox::LayoutChildren(), and GuiMainWindow::ShowAll(). 00091 {
00092 ChildrenList::iterator childit, done = fChildren.end();
00093
00094 for (childit = fChildren.begin(); childit != done; ++childit) {
00095 SigC::Ptr<GuiBase> gptr = *childit;
00096 GuiBase* child = gptr;
00097 // TGFrame* frame = dynamic_cast<TGFrame*>(c);
00098 TGFrame* frame = child->GetFrame();
00099 // cerr << "Layout child: " << frame->GetName() << endl;
00100 child->LayoutChildren();
00101 frame->Layout();
00102 }
00103 }
|
|
|
|
Definition at line 48 of file GuiBase.h. References fName. Referenced by GuiButtonBase::GuiButtonBase(), and TridControl::TridControl(). 00048 { fName = name; }
|
|
|
Definition at line 68 of file GuiBase.h. Referenced by AddChild(), and LayoutChildren(). |
|
|
Definition at line 72 of file GuiBase.h. Referenced by AddObject(), GuiBase(), and ~GuiBase(). |
|
|
Definition at line 73 of file GuiBase.h. Referenced by SetLayoutHints(). |
|
|
|
1.3.9.1