Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoGedFrame.cxx
Go to the documentation of this file.
1// @(#)root/geombuilder:$Id$
2// Author: Matevz Tadel 25/09/2006
3
4/** \class TGeoGedFrame
5\ingroup Geometry_builder
6
7Common base class for geombuilder editors.
8
9*/
10
11#include "TGeoGedFrame.h"
12#include "TGeoTabManager.h"
13#include "TGedEditor.h"
14#include "TGTab.h"
15#include "TVirtualPad.h"
16
18
19////////////////////////////////////////////////////////////////////////////////
20/// Constructor.
21
23 : TGedFrame(p, width, height, options, back), fTab(nullptr), fTabMgr(nullptr), fPad(nullptr)
24{
25 fTab = fGedEditor->GetTab();
26 fPad = fGedEditor->GetPad();
28}
29
30////////////////////////////////////////////////////////////////////////////////
31/// Set active GUI attribute frames related to the selected object.
32
34{
35 if (active)
36 ((TGCompositeFrame *)GetParent())->ShowFrame(this);
37 else
38 ((TGCompositeFrame *)GetParent())->HideFrame(this);
39
40 // no need to call for every single editor Layout of TGMainFrame
41 // ((TGMainFrame*)GetMainFrame())->Layout();
42
43 // to avoid that the user changes options on a deactivated Tab
44 if (fTab->IsEnabled(fTab->GetCurrent()))
45 fTab->SetTab(fTab->GetCurrent());
46 else
47 fTab->SetTab(0);
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Override Update from TGedFrame as fGedEditor can be null.
52
54{
55 if (fGedEditor) {
56 fGedEditor->Update();
57 } else {
58 fPad->Modified();
59 fPad->Update();
60 }
61}
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
unsigned int UInt_t
Definition RtypesCore.h:46
#define ClassImp(name)
Definition Rtypes.h:377
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
TGCompositeFrame(const TGCompositeFrame &)=delete
ROOT GUI Window base class.
Definition TGWindow.h:23
const TGWindow * GetParent() const
Definition TGWindow.h:83
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
TGedFrame(const TGedFrame &)=delete
Common base class for geombuilder editors.
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
TVirtualPad * fPad
TGeoGedFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TGeoTabManager * fTabMgr
static TGeoTabManager * GetMakeTabManager(TGedEditor *ged)
Static method to return the tab manager currently appended to the pad or create one if not existing.