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{
28}
29
30////////////////////////////////////////////////////////////////////////////////
31/// Set active GUI attribute frames related to the selected object.
32
34{
35 if (active)
37 else
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
46 else
47 fTab->SetTab(0);
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Override Update from TGedFrame as fGedEditor can be null.
52
54{
55 if (fGedEditor) {
57 } else {
58 fPad->Modified();
59 fPad->Update();
60 }
61}
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define ClassImp(name)
Definition Rtypes.h:377
winID h TVirtualViewer3D TVirtualGLPainter p
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
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition TGFrame.cxx:1204
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition TGFrame.cxx:1190
Bool_t IsEnabled(Int_t tabIndex) const
Returns true if tab is enabled.
Definition TGTab.cxx:498
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
Definition TGTab.cxx:558
Int_t GetCurrent() const
Definition TGTab.h:90
ROOT GUI Window base class.
Definition TGWindow.h:23
const TGWindow * GetParent() const
Definition TGWindow.h:83
TGTab * GetTab() const
Definition TGedEditor.h:73
virtual void Update(TGedFrame *frame=nullptr)
Virtual method that is called on any change in the dependent frames.
virtual TVirtualPad * GetPad() const
Definition TGedEditor.h:78
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
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.
virtual void Modified(Bool_t flag=1)=0
virtual void Update()=0