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 // //
17 // TGedFrame //
18 // //
19 // Base editor's attribute frame - a service class. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TGFrame.h"
24 
25 class TVirtualPad;
26 class TCanvas;
27 class TGLabel;
28 class TGToolTip;
29 class TList;
30 class TGTab;
31 class TGedEditor;
32 
33 class TGedFrame : public TGCompositeFrame {
34 
35 public:
36  // Inner class to store information for each extra tab.
37  class TGedSubFrame : public TObject {
38  private:
39  TGedSubFrame(const TGedSubFrame&); // Not implemented
40  TGedSubFrame& operator=(const TGedSubFrame&); // Not implemented
41  public:
44 
46  };
47 
48 private:
49  TGedFrame(const TGedFrame&); // Not implemented
50  TGedFrame& operator=(const TGedFrame&); // Not implemented
51 
52 protected:
53  Bool_t fInit; // init flag for setting signals/slots
54  TGedEditor *fGedEditor; // manager of this frame
55  TClass *fModelClass; // class corresponding to instantiated GedFrame
56  Bool_t fAvoidSignal; // flag for executing slots
57 
58  TList *fExtraTabs; // addtional tabs in ged editor
59  Int_t fPriority; // location in GedEditor
60 
61  virtual void MakeTitle(const char *title);
62 
63 public:
64  TGedFrame(const TGWindow *p = 0,
65  Int_t width = 140, Int_t height = 30,
66  UInt_t options = kChildFrame,
68  virtual ~TGedFrame();
69 
70  virtual void Update();
71 
72  virtual Option_t *GetDrawOption() const;
73 
75  Int_t GetPriority() { return fPriority; }
76  TList* GetExtraTabs() { return fExtraTabs; }
78  virtual void AddExtraTab(TGedSubFrame* sf);
79  virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
80 
81  virtual void Refresh(TObject *model);
82  virtual void SetDrawOption(Option_t *option="");
83  virtual Bool_t AcceptModel(TObject*) { return kTRUE; }
84  void SetModelClass(TClass* mcl) { fModelClass = mcl; }
85  virtual void SetModel(TObject* obj) = 0;
86  virtual void SetGedEditor(TGedEditor* ed) { fGedEditor = ed; }
87  virtual void ActivateBaseClassEditors(TClass* cl);
88 
89  ClassDef(TGedFrame, 0); //base editor's frame
90 };
91 
92 class TGedNameFrame : public TGedFrame {
93 private:
94  TGedNameFrame(const TGedNameFrame&); // not implemented
95  TGedNameFrame& operator=(const TGedNameFrame&); // not implemented
96 
97 protected:
98  TGLabel *fLabel; //label of attribute frame
99  TGCompositeFrame *f1, *f2; //container frames
100  TGToolTip *fTip; //tool tip associated with button
101 
102 public:
103  TGedNameFrame(const TGWindow *p =0 ,
104  Int_t width = 170, Int_t height = 30,
105  UInt_t options = kChildFrame,
107  virtual ~TGedNameFrame();
108 
109  virtual Bool_t HandleButton(Event_t *event);
110  virtual Bool_t HandleCrossing(Event_t *event);
111 
112  virtual void SetModel(TObject* obj);
113 
114  ClassDef(TGedNameFrame,0) //frame showing the selected object name
115 };
116 
117 #endif
118 
TGedFrame::GetDrawOption
virtual Option_t * GetDrawOption() const
Get draw options of the selected object.
Definition: TGedFrame.cxx:81
TGedNameFrame::~TGedNameFrame
virtual ~TGedNameFrame()
Destructor.
Definition: TGedFrame.cxx:213
n
const Int_t n
Definition: legend1.C:16
TGWindow
Definition: TGWindow.h:31
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TGedFrame::ActivateBaseClassEditors
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:168
TGedNameFrame::fTip
TGToolTip * fTip
Definition: TGedFrame.h:100
TGedNameFrame
Definition: TGedFrame.h:92
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:123
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGedFrame::GetPriority
Int_t GetPriority()
Definition: TGedFrame.h:75
TGedFrame::GetGedEditor
TGedEditor * GetGedEditor()
Definition: TGedFrame.h:77
Pixel_t
ULong_t Pixel_t
Definition: GuiTypes.h:39
TGedFrame::GetExtraTabs
TList * GetExtraTabs()
Definition: TGedFrame.h:76
TGedNameFrame::TGedNameFrame
TGedNameFrame(const TGedNameFrame &)
TGLabel
Definition: TGLabel.h:32
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGToolTip
Definition: TGToolTip.h:35
TGedFrame::SetModelClass
void SetModelClass(TClass *mcl)
Definition: TGedFrame.h:84
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:668
TGedFrame::SetGedEditor
virtual void SetGedEditor(TGedEditor *ed)
Definition: TGedFrame.h:86
TGedFrame::GetModelClass
TClass * GetModelClass()
Definition: TGedFrame.h:74
TGedFrame::operator=
TGedFrame & operator=(const TGedFrame &)
TGedNameFrame::fLabel
TGLabel * fLabel
Definition: TGedFrame.h:98
TGedFrame::Update
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition: TGedFrame.cxx:73
TString
Basic string class.
Definition: TString.h:136
bool
TGedNameFrame::f2
TGCompositeFrame * f2
Definition: TGedFrame.h:99
TGedNameFrame::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event for tooltip.
Definition: TGedFrame.cxx:221
TGedFrame::fAvoidSignal
Bool_t fAvoidSignal
Definition: TGedFrame.h:56
TGedFrame::TGedSubFrame::operator=
TGedSubFrame & operator=(const TGedSubFrame &)
TGedNameFrame::f1
TGCompositeFrame * f1
Definition: TGedFrame.h:99
TGVerticalFrame
Definition: TGFrame.h:412
TGedNameFrame::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
Definition: TGedFrame.cxx:234
TGFrame.h
TGedFrame::TGedSubFrame::TGedSubFrame
TGedSubFrame(const TGedSubFrame &)
TGedFrame::~TGedFrame
virtual ~TGedFrame()
Destructor of the base GUI attribute frame.
Definition: TGedFrame.cxx:54
TGedFrame::fModelClass
TClass * fModelClass
Definition: TGedFrame.h:55
TGTab
Definition: TGTab.h:62
TGedFrame::SetModel
virtual void SetModel(TObject *obj)=0
TGedFrame::MakeTitle
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition: TGedFrame.cxx:96
TGedFrame::TGedSubFrame::fName
TString fName
Definition: TGedFrame.h:42
TGedFrame::TGedFrame
TGedFrame(const TGedFrame &)
TGedFrame::fExtraTabs
TList * fExtraTabs
Definition: TGedFrame.h:58
unsigned int
TGedFrame::TGedSubFrame::TGedSubFrame
TGedSubFrame(TString n, TGCompositeFrame *f)
Definition: TGedFrame.h:45
TGedFrame
Definition: TGedFrame.h:33
TGedFrame::Refresh
virtual void Refresh(TObject *model)
Refresh the GUI info about the object attributes.
Definition: TGedFrame.cxx:135
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:244
TGedFrame::AddExtraTab
virtual void AddExtraTab(TGedSubFrame *sf)
Adds tab container to list of extra tabs.
Definition: TGedFrame.cxx:112
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:43
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
Event_t
Definition: GuiTypes.h:173
name
char name[80]
Definition: TGX11.cxx:110
TGedFrame::SetDrawOption
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition: TGedFrame.cxx:145
make_cnn_model.model
model
Definition: make_cnn_model.py:6
TGedFrame::fGedEditor
TGedEditor * fGedEditor
Definition: TGedFrame.h:54
TGedFrame::fInit
Bool_t fInit
Definition: TGedFrame.h:53
TGedFrame::AcceptModel
virtual Bool_t AcceptModel(TObject *)
Definition: TGedFrame.h:83
TGCompositeFrame
Definition: TGFrame.h:324
TGedFrame::fPriority
Int_t fPriority
Definition: TGedFrame.h:59
TGedNameFrame::operator=
TGedNameFrame & operator=(const TGedNameFrame &)
TGedFrame::TGedSubFrame
Definition: TGedFrame.h:37
TGedEditor
Definition: TGedEditor.h:42
TList
A doubly linked list.
Definition: TList.h:44
kChildFrame
@ kChildFrame
Definition: GuiTypes.h:379
int