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

GuiMultiEntry.cxx

Go to the documentation of this file.
00001 #include "GuiMultiEntry.h"
00002 #include "GuiTextEntry.h"
00003 #include "GuiLabel.h"
00004 #include "GuiMainWindow.h"
00005 
00006 using namespace std;
00007 
00008 GuiMultiEntry::GuiMultiEntry(TGWindow& parent)
00009     :GuiBox(parent,kVerticalFrame)
00010 {
00011 }
00012 
00013 GuiMultiEntry::~GuiMultiEntry()
00014 {
00015 }
00016 
00017 GuiTextEntry& GuiMultiEntry::AddEntry(string label, string init_entry)
00018 {
00019     GuiBox* box = manage(new GuiBox(*this,kHorizontalFrame));
00020     this->Add(*box);
00021 
00022     GuiLabel* glabel = manage(new GuiLabel(*box,label.c_str()));
00023     box->Add(*glabel);
00024 
00025     GuiTextEntry* te = manage(new GuiTextEntry(*box,init_entry.c_str()));
00026     box->Add(*te);
00027 
00028     this->GetMainWindow()->ShowAll();
00029     this->GetMainWindow()->Layout();
00030 
00031     fEntryMap[label] = te;
00032     fBoxMap[label] = box;
00033     return *te;
00034 }
00035 
00036 GuiMultiEntry::EntryMap_t GuiMultiEntry::GetEntries()
00037 {
00038     return fEntryMap;
00039 }
00040 
00041 GuiMultiEntry::BoxMap_t GuiMultiEntry::GetBoxes()
00042 {
00043     return fBoxMap;
00044 }

Generated on Mon Nov 23 05:26:56 2009 for loon by  doxygen 1.3.9.1