Logo ROOT  
Reference Guide
TGedFrame.h
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Ilka Antcheva 10/05/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGedFrame
13 #define ROOT_TGedFrame
14 
15 
16 #include "TGFrame.h"
17 
18 class TVirtualPad;
19 class TCanvas;
20 class TGLabel;
21 class TGToolTip;
22 class TList;
23 class TGTab;
24 class TGedEditor;
25 class TGHSlider;
26 
27 class TGedFrame : public TGCompositeFrame {
28 
29 public:
30  // Inner class to store information for each extra tab.
31  class TGedSubFrame : public TObject {
32  private:
33  TGedSubFrame(const TGedSubFrame&) = delete;
34  TGedSubFrame& operator=(const TGedSubFrame&) = delete;
35  public:
38 
40  };
41 
42 private:
43  TGedFrame(const TGedFrame&) = delete;
44  TGedFrame& operator=(const TGedFrame&) = delete;
45 
46 protected:
47  Bool_t fInit; ///< init flag for setting signals/slots
48  TGedEditor *fGedEditor; ///< manager of this frame
49  TClass *fModelClass; ///< class corresponding to instantiated GedFrame
50  Bool_t fAvoidSignal; ///< flag for executing slots
51 
52  TList *fExtraTabs; ///< addtional tabs in ged editor
53  Int_t fPriority; ///< location in GedEditor
54 
55  virtual void MakeTitle(const char *title);
56 
57 public:
58  TGedFrame(const TGWindow *p = nullptr,
59  Int_t width = 140, Int_t height = 30,
60  UInt_t options = kChildFrame,
62  virtual ~TGedFrame();
63 
64  virtual void Update();
65 
66  virtual Option_t *GetDrawOption() const;
67 
69  Int_t GetPriority() { return fPriority; }
70  TList* GetExtraTabs() { return fExtraTabs; }
72  virtual void AddExtraTab(TGedSubFrame* sf);
73  virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
74 
75  virtual void Refresh(TObject *model);
76  virtual void SetDrawOption(Option_t *option="");
77  virtual Bool_t AcceptModel(TObject*) { return kTRUE; }
78  void SetModelClass(TClass* mcl) { fModelClass = mcl; }
79  virtual void SetModel(TObject* obj) = 0;
80  virtual void SetGedEditor(TGedEditor* ed) { fGedEditor = ed; }
81  virtual void ActivateBaseClassEditors(TClass* cl);
82 
83  ClassDef(TGedFrame, 0); //base editor's frame
84 };
85 
86 class TGedNameFrame : public TGedFrame {
87 private:
88  TGedNameFrame(const TGedNameFrame&) = delete;
90 
91 protected:
92  TGLabel *fLabel; //label of attribute frame
93  TGCompositeFrame *f1, *f2; //container frames
94  TGToolTip *fTip; //tool tip associated with button
95 
96 public:
97  TGedNameFrame(const TGWindow *p = nullptr,
98  Int_t width = 170, Int_t height = 30,
99  UInt_t options = kChildFrame,
101  virtual ~TGedNameFrame();
102 
103  virtual Bool_t HandleButton(Event_t *event);
105 
106  virtual void SetModel(TObject* obj);
107 
108  ClassDef(TGedNameFrame,0) //frame showing the selected object name
109 };
110 
111 #endif
112 
TGedFrame::GetDrawOption
virtual Option_t * GetDrawOption() const
Get draw options of the selected object.
Definition: TGedFrame.cxx:80
TGedNameFrame::~TGedNameFrame
virtual ~TGedNameFrame()
Destructor.
Definition: TGedFrame.cxx:212
n
const Int_t n
Definition: legend1.C:16
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGedFrame::ActivateBaseClassEditors
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:167
TGedNameFrame::fTip
TGToolTip * fTip
Definition: TGedFrame.h:94
TGedNameFrame
Definition: TGedFrame.h:86
f
#define f(i)
Definition: RSha256.hxx:104
TGedFrame::CreateEditorTabSubFrame
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
Definition: TGedFrame.cxx:122
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGedFrame::GetPriority
Int_t GetPriority()
Definition: TGedFrame.h:69
TGedFrame::GetGedEditor
TGedEditor * GetGedEditor()
Definition: TGedFrame.h:71
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
TGedFrame::GetExtraTabs
TList * GetExtraTabs()
Definition: TGedFrame.h:70
TGLabel
This class handles GUI labels.
Definition: TGLabel.h:24
TGHSlider
Concrete class for horizontal slider.
Definition: TGSlider.h:128
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
event
Definition: triangle.c:553
TGToolTip
Definition: TGToolTip.h:24
TGedFrame::SetModelClass
void SetModelClass(TClass *mcl)
Definition: TGedFrame.h:78
TGedFrame::operator=
TGedFrame & operator=(const TGedFrame &)=delete
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
TGedFrame::SetGedEditor
virtual void SetGedEditor(TGedEditor *ed)
Definition: TGedFrame.h:80
TGedFrame::GetModelClass
TClass * GetModelClass()
Definition: TGedFrame.h:68
TGedNameFrame::fLabel
TGLabel * fLabel
Definition: TGedFrame.h:92
TGedFrame::Update
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition: TGedFrame.cxx:72
TString
Basic string class.
Definition: TString.h:136
bool
TGedNameFrame::f2
TGCompositeFrame * f2
Definition: TGedFrame.h:93
TGedFrame::TGedSubFrame::TGedSubFrame
TGedSubFrame(const TGedSubFrame &)=delete
TGedNameFrame::TGedNameFrame
TGedNameFrame(const TGedNameFrame &)=delete
TGedNameFrame::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event for tooltip.
Definition: TGedFrame.cxx:220
TGedFrame::fAvoidSignal
Bool_t fAvoidSignal
flag for executing slots
Definition: TGedFrame.h:50
TGedNameFrame::f1
TGCompositeFrame * f1
Definition: TGedFrame.h:93
TGedNameFrame::operator=
TGedNameFrame & operator=(const TGedNameFrame &)=delete
TGVerticalFrame
A composite frame that layout their children in vertical way.
Definition: TGFrame.h:375
TGedNameFrame::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
Definition: TGedFrame.cxx:233
TGFrame.h
TGedFrame::~TGedFrame
virtual ~TGedFrame()
Destructor of the base GUI attribute frame.
Definition: TGedFrame.cxx:53
TGedFrame::fModelClass
TClass * fModelClass
class corresponding to instantiated GedFrame
Definition: TGedFrame.h:49
TGTab
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Definition: TGTab.h:46
TGedFrame::SetModel
virtual void SetModel(TObject *obj)=0
TGedFrame::MakeTitle
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition: TGedFrame.cxx:95
TGedFrame::TGedSubFrame::fName
TString fName
Definition: TGedFrame.h:36
TGedFrame::fExtraTabs
TList * fExtraTabs
addtional tabs in ged editor
Definition: TGedFrame.h:52
unsigned int
TGedFrame::TGedSubFrame::TGedSubFrame
TGedSubFrame(TString n, TGCompositeFrame *f)
Definition: TGedFrame.h:39
TGedFrame
Base frame for implementing GUI - a service class.
Definition: TGedFrame.h:27
TGedFrame::Refresh
virtual void Refresh(TObject *model)
Refresh the GUI info about the object attributes.
Definition: TGedFrame.cxx:134
TGedFrame::TGedSubFrame::operator=
TGedSubFrame & operator=(const TGedSubFrame &)=delete
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
TCanvas
The Canvas class.
Definition: TCanvas.h:23
TGedNameFrame::SetModel
virtual void SetModel(TObject *obj)
Sets text for the label.
Definition: TGedFrame.cxx:243
TGedFrame::AddExtraTab
virtual void AddExtraTab(TGedSubFrame *sf)
Adds tab container to list of extra tabs.
Definition: TGedFrame.cxx:111
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TGedFrame::TGedSubFrame::fFrame
TGCompositeFrame * fFrame
Definition: TGedFrame.h:37
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
Event_t
Event structure.
Definition: GuiTypes.h:174
name
char name[80]
Definition: TGX11.cxx:110
TGedFrame::SetDrawOption
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition: TGedFrame.cxx:144
TGedFrame::fGedEditor
TGedEditor * fGedEditor
manager of this frame
Definition: TGedFrame.h:48
TGedFrame::TGedFrame
TGedFrame(const TGedFrame &)=delete
TGedFrame::fInit
Bool_t fInit
init flag for setting signals/slots
Definition: TGedFrame.h:47
TGedFrame::AcceptModel
virtual Bool_t AcceptModel(TObject *)
Definition: TGedFrame.h:77
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGedFrame::fPriority
Int_t fPriority
location in GedEditor
Definition: TGedFrame.h:53
TGedFrame::TGedSubFrame
Definition: TGedFrame.h:31
TGedEditor
Definition: TGedEditor.h:31
TList
A doubly linked list.
Definition: TList.h:44
kChildFrame
@ kChildFrame
Definition: GuiTypes.h:379
int