00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 #include "TGeoGedFrame.h"
00013 #include "TGeoTabManager.h"
00014 #include "TGedEditor.h"
00015 #include "TGTab.h"
00016 #include "TVirtualPad.h"
00017 
00018 ClassImp(TGeoGedFrame)
00019 
00020 
00021 TGeoGedFrame::TGeoGedFrame(const TGWindow *p, Int_t width, Int_t height,
00022                            UInt_t options, Pixel_t back) :
00023   TGedFrame(p, width, height, options, back),
00024   fTab(0), fTabMgr(0), fPad(0)
00025 {
00026 
00027    fTab = fGedEditor->GetTab();
00028    fPad = fGedEditor->GetPad();
00029    fTabMgr = TGeoTabManager::GetMakeTabManager(fGedEditor);
00030 }
00031 
00032 
00033 void TGeoGedFrame::SetActive(Bool_t active)
00034 {
00035    
00036 
00037    if (active)
00038       ((TGCompositeFrame*)GetParent())->ShowFrame(this);
00039    else
00040       ((TGCompositeFrame*)GetParent())->HideFrame(this);
00041 
00042 
00043 
00044 
00045    
00046    if (fTab->IsEnabled(fTab->GetCurrent()))
00047       fTab->SetTab(fTab->GetCurrent());
00048    else
00049       fTab->SetTab(0);
00050 }
00051 
00052 
00053 void TGeoGedFrame::Update()
00054 {
00055    
00056 
00057    if (fGedEditor) {
00058       fGedEditor->Update();
00059    } else {
00060       fPad->Modified();
00061       fPad->Update();
00062    }
00063 }