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#include "TGFrame.h"
17
18class TVirtualPad;
19class TCanvas;
20class TGLabel;
21class TGToolTip;
22class TList;
23class TGTab;
24class TGedEditor;
25class TGHSlider;
26
28
29public:
30 // Inner class to store information for each extra tab.
31 class TGedSubFrame : public TObject {
32 private:
33 TGedSubFrame(const TGedSubFrame&) = delete;
35 public:
38
40 };
41
42private:
43 TGedFrame(const TGedFrame&) = delete;
44 TGedFrame& operator=(const TGedFrame&) = delete;
45
46protected:
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
57public:
58 TGedFrame(const TGWindow *p = nullptr,
59 Int_t width = 140, Int_t height = 30,
60 UInt_t options = kChildFrame,
62 ~TGedFrame() override;
63
64 virtual void Update();
65
66 Option_t *GetDrawOption() const override;
67
72 virtual void AddExtraTab(TGedSubFrame* sf);
73 virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
74
75 virtual void Refresh(TObject *model);
76 void SetDrawOption(Option_t *option="") override;
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 ClassDefOverride(TGedFrame, 0); //base editor's frame
84};
85
86class TGedNameFrame : public TGedFrame {
87private:
88 TGedNameFrame(const TGedNameFrame&) = delete;
90
91protected:
92 TGLabel *fLabel; //label of attribute frame
93 TGCompositeFrame *f1, *f2; //container frames
94 TGToolTip *fTip; //tool tip associated with button
95
96public:
97 TGedNameFrame(const TGWindow *p = nullptr,
98 Int_t width = 170, Int_t height = 30,
99 UInt_t options = kChildFrame,
101 ~TGedNameFrame() override;
102
103 Bool_t HandleButton(Event_t *event) override;
104 Bool_t HandleCrossing(Event_t *event) override;
105
106 void SetModel(TObject* obj) override;
107
108 ClassDefOverride(TGedNameFrame,0) //frame showing the selected object name
109};
110
111#endif
112
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
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
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:81
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
Concrete class for horizontal slider.
Definition TGSlider.h:119
This class handles GUI labels.
Definition TGLabel.h:24
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
A tooltip can be a one or multiple lines help text that is displayed in a window when the mouse curso...
Definition TGToolTip.h:24
A composite frame that layout their children in vertical way.
Definition TGFrame.h:374
ROOT GUI Window base class.
Definition TGWindow.h:23
TGedSubFrame(const TGedSubFrame &)=delete
TGedSubFrame(TString n, TGCompositeFrame *f)
Definition TGedFrame.h:39
TGCompositeFrame * fFrame
Definition TGedFrame.h:37
TGedSubFrame & operator=(const TGedSubFrame &)=delete
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
virtual void SetGedEditor(TGedEditor *ed)
Definition TGedFrame.h:80
TClass * GetModelClass()
Definition TGedFrame.h:68
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
manager of this frame
Definition TGedFrame.h:48
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
TClass * fModelClass
class corresponding to instantiated GedFrame
Definition TGedFrame.h:49
TGedFrame(const TGedFrame &)=delete
~TGedFrame() override
Destructor of the base GUI attribute frame.
Definition TGedFrame.cxx:53
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
TList * GetExtraTabs()
Definition TGedFrame.h:70
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:95
void SetModelClass(TClass *mcl)
Definition TGedFrame.h:78
void SetDrawOption(Option_t *option="") override
Set drawing option for object.
TList * fExtraTabs
addtional tabs in ged editor
Definition TGedFrame.h:52
virtual void Refresh(TObject *model)
Refresh the GUI info about the object attributes.
Int_t GetPriority()
Definition TGedFrame.h:69
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:72
Int_t fPriority
location in GedEditor
Definition TGedFrame.h:53
Option_t * GetDrawOption() const override
Get draw options of the selected object.
Definition TGedFrame.cxx:80
TGedEditor * GetGedEditor()
Definition TGedFrame.h:71
virtual Bool_t AcceptModel(TObject *)
Definition TGedFrame.h:77
ClassDefOverride(TGedFrame, 0)
TGedFrame & operator=(const TGedFrame &)=delete
Bool_t fAvoidSignal
flag for executing slots
Definition TGedFrame.h:50
TGCompositeFrame * f1
Definition TGedFrame.h:93
TGLabel * fLabel
Definition TGedFrame.h:92
TGedNameFrame(const TGedNameFrame &)=delete
TGToolTip * fTip
Definition TGedFrame.h:94
TGCompositeFrame * f2
Definition TGedFrame.h:93
Bool_t HandleButton(Event_t *event) override
Handle mouse button event.
void SetModel(TObject *obj) override
Sets text for the label.
TGedNameFrame & operator=(const TGedNameFrame &)=delete
Bool_t HandleCrossing(Event_t *event) override
Handle mouse crossing event for tooltip.
~TGedNameFrame() override
Destructor.
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
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