Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
25class TVirtualPad;
26class TCanvas;
27class TGLabel;
28class TGToolTip;
29class TList;
30class TGTab;
31class TGedEditor;
32class TGHSlider;
33
35
36public:
37 // Inner class to store information for each extra tab.
38 class TGedSubFrame : public TObject {
39 private:
40 TGedSubFrame(const TGedSubFrame&) = delete;
42 public:
45
47 };
48
49private:
50 TGedFrame(const TGedFrame&) = delete;
51 TGedFrame& operator=(const TGedFrame&) = delete;
52
53protected:
54 Bool_t fInit; // init flag for setting signals/slots
55 TGedEditor *fGedEditor; // manager of this frame
56 TClass *fModelClass; // class corresponding to instantiated GedFrame
57 Bool_t fAvoidSignal; // flag for executing slots
58
59 TList *fExtraTabs; // addtional tabs in ged editor
60 Int_t fPriority; // location in GedEditor
61
62 virtual void MakeTitle(const char *title);
63
64public:
65 TGedFrame(const TGWindow *p = nullptr,
66 Int_t width = 140, Int_t height = 30,
67 UInt_t options = kChildFrame,
69 virtual ~TGedFrame();
70
71 virtual void Update();
72
73 virtual Option_t *GetDrawOption() const;
74
79 virtual void AddExtraTab(TGedSubFrame* sf);
80 virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
81
82 virtual void Refresh(TObject *model);
83 virtual void SetDrawOption(Option_t *option="");
84 virtual Bool_t AcceptModel(TObject*) { return kTRUE; }
85 void SetModelClass(TClass* mcl) { fModelClass = mcl; }
86 virtual void SetModel(TObject* obj) = 0;
87 virtual void SetGedEditor(TGedEditor* ed) { fGedEditor = ed; }
88 virtual void ActivateBaseClassEditors(TClass* cl);
89
90 ClassDef(TGedFrame, 0); //base editor's frame
91};
92
93class TGedNameFrame : public TGedFrame {
94private:
95 TGedNameFrame(const TGedNameFrame&) = delete;
97
98protected:
99 TGLabel *fLabel; //label of attribute frame
100 TGCompositeFrame *f1, *f2; //container frames
101 TGToolTip *fTip; //tool tip associated with button
102
103public:
104 TGedNameFrame(const TGWindow *p = nullptr,
105 Int_t width = 170, Int_t height = 30,
106 UInt_t options = kChildFrame,
108 virtual ~TGedNameFrame();
109
110 virtual Bool_t HandleButton(Event_t *event);
111 virtual Bool_t HandleCrossing(Event_t *event);
112
113 virtual void SetModel(TObject* obj);
114
115 ClassDef(TGedNameFrame,0) //frame showing the selected object name
116};
117
118#endif
119
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
const Bool_t kTRUE
Definition RtypesCore.h:91
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
include TDocParser_001 C image html pict1_TDocParser_001 png width
char name[80]
Definition TGX11.cxx:110
The Canvas class.
Definition TCanvas.h:23
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:80
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:668
Definition TGTab.h:62
TGedSubFrame(const TGedSubFrame &)=delete
TGedSubFrame(TString n, TGCompositeFrame *f)
Definition TGedFrame.h:46
TGCompositeFrame * fFrame
Definition TGedFrame.h:44
TGedSubFrame & operator=(const TGedSubFrame &)=delete
virtual void SetGedEditor(TGedEditor *ed)
Definition TGedFrame.h:87
virtual Option_t * GetDrawOption() const
Get draw options of the selected object.
Definition TGedFrame.cxx:81
TClass * GetModelClass()
Definition TGedFrame.h:75
virtual void AddExtraTab(TGedSubFrame *sf)
Adds tab container to list of extra tabs.
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
virtual void SetModel(TObject *obj)=0
TGedEditor * fGedEditor
Definition TGedFrame.h:55
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
TClass * fModelClass
Definition TGedFrame.h:56
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
Definition TGedFrame.h:54
TList * GetExtraTabs()
Definition TGedFrame.h:77
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:96
void SetModelClass(TClass *mcl)
Definition TGedFrame.h:85
TList * fExtraTabs
Definition TGedFrame.h:59
virtual void Refresh(TObject *model)
Refresh the GUI info about the object attributes.
Int_t GetPriority()
Definition TGedFrame.h:76
virtual ~TGedFrame()
Destructor of the base GUI attribute frame.
Definition TGedFrame.cxx:54
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:73
Int_t fPriority
Definition TGedFrame.h:60
TGedEditor * GetGedEditor()
Definition TGedFrame.h:78
virtual Bool_t AcceptModel(TObject *)
Definition TGedFrame.h:84
TGedFrame & operator=(const TGedFrame &)=delete
Bool_t fAvoidSignal
Definition TGedFrame.h:57
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event for tooltip.
TGCompositeFrame * f1
Definition TGedFrame.h:100
TGLabel * fLabel
Definition TGedFrame.h:99
TGedNameFrame(const TGedNameFrame &)=delete
TGToolTip * fTip
Definition TGedFrame.h:101
TGCompositeFrame * f2
Definition TGedFrame.h:100
virtual ~TGedNameFrame()
Destructor.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
virtual void SetModel(TObject *obj)
Sets text for the label.
TGedNameFrame & operator=(const TGedNameFrame &)=delete
A doubly linked list.
Definition TList.h:44
Mother of all ROOT objects.
Definition TObject.h:37
Basic string class.
Definition TString.h:136
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
const Int_t n
Definition legend1.C:16
Event structure.
Definition GuiTypes.h:174