Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GuiTab.cxx

Go to the documentation of this file.
00001 #include "GuiTab.h"
00002 #include "GuiFrame.h"
00003 
00004 #include <iostream>
00005 using namespace std;
00006 
00007 GuiTab::GuiTab(TGWindow& parent)
00008     : TGTab(&parent,1,1)
00009 {
00010     this->SetLayoutHints(kLHintsExpandX|kLHintsExpandY);
00011 }
00012 
00013 GuiTab::~GuiTab()
00014 {
00015 }
00016 
00017 GuiFrame* GuiTab::Add(const char* tab_title)
00018 {
00019     GuiFrame* frame = manage(new GuiFrame(this->TGTab::AddTab(tab_title)));
00020     fChildren.push_back(frame);
00021     fFrameVector.push_back(frame);
00022     return frame;
00023 }
00024 
00025 void GuiTab::Selected(int id)
00026 {
00027     this->TGTab::Selected(id);
00028     this->selected.emit(id);
00029 }
00030 
00031 GuiBase::ChildrenList GuiTab::GuisAt(int id)
00032 {
00033     int siz = fFrameVector.size();
00034     if (id < 0 || id >= siz) {
00035         cerr << "GuiTab::GuisAt: id=" << id << " siz=" << siz << endl;
00036         return GuiBase::ChildrenList();
00037     }
00038 
00039     return fFrameVector[id]->GetChildrenList();
00040 }

Generated on Mon Feb 15 11:06:47 2010 for loon by  doxygen 1.3.9.1