Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/ged:$Id$
2// Author: Ilka Antcheva 10/05/04
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 *************************************************************************/
12#ifndef ROOT_TGedFrame
13#define ROOT_TGedFrame
16#include "TGFrame.h"
18class TVirtualPad;
19class TCanvas;
20class TGLabel;
21class TGToolTip;
22class TList;
23class TGTab;
24class TGedEditor;
25class TGHSlider;
30 // Inner class to store information for each extra tab.
31 class TGedSubFrame : public TObject {
32 private:
33 TGedSubFrame(const TGedSubFrame&) = delete;
35 public:
40 };
43 TGedFrame(const TGedFrame&) = delete;
44 TGedFrame& operator=(const TGedFrame&) = delete;
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
52 TList *fExtraTabs; ///< addtional tabs in ged editor
53 Int_t fPriority; ///< location in GedEditor
55 virtual void MakeTitle(const char *title);
58 TGedFrame(const TGWindow *p = nullptr,
59 Int_t width = 140, Int_t height = 30,
60 UInt_t options = kChildFrame,
62 virtual ~TGedFrame();
64 virtual void Update();
66 virtual Option_t *GetDrawOption() const;
72 virtual void AddExtraTab(TGedSubFrame* sf);
73 virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
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);
83 ClassDef(TGedFrame, 0); //base editor's frame
86class TGedNameFrame : public TGedFrame {
88 TGedNameFrame(const TGedNameFrame&) = delete;
92 TGLabel *fLabel; //label of attribute frame
93 TGCompositeFrame *f1, *f2; //container frames
94 TGToolTip *fTip; //tool tip associated with button
97 TGedNameFrame(const TGWindow *p = nullptr,
98 Int_t width = 170, Int_t height = 30,
99 UInt_t options = kChildFrame,
101 virtual ~TGedNameFrame();
106 virtual void SetModel(TObject* obj);
108 ClassDef(TGedNameFrame,0) //frame showing the selected object name
@ 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:100
const char Option_t
Definition: RtypesCore.h:66
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
virtual Option_t * GetDrawOption() const
Get draw options of the selected object.
Definition: TGedFrame.cxx:80
TClass * GetModelClass()
Definition: TGedFrame.h:68
virtual void AddExtraTab(TGedSubFrame *sf)
Adds tab container to list of extra tabs.
Definition: TGedFrame.cxx:111
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:167
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'.
Definition: TGedFrame.cxx:122
TClass * fModelClass
class corresponding to instantiated GedFrame
Definition: TGedFrame.h:49
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition: TGedFrame.cxx:144
TGedFrame(const TGedFrame &)=delete
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
TList * fExtraTabs
addtional tabs in ged editor
Definition: TGedFrame.h:52
virtual void Refresh(TObject *model)
Refresh the GUI info about the object attributes.
Definition: TGedFrame.cxx:134
Int_t GetPriority()
Definition: TGedFrame.h:69
ClassDef(TGedFrame, 0)
virtual ~TGedFrame()
Destructor of the base GUI attribute frame.
Definition: TGedFrame.cxx:53
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
TGedEditor * GetGedEditor()
Definition: TGedFrame.h:71
virtual Bool_t AcceptModel(TObject *)
Definition: TGedFrame.h:77
TGedFrame & operator=(const TGedFrame &)=delete
Bool_t fAvoidSignal
flag for executing slots
Definition: TGedFrame.h:50
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event for tooltip.
Definition: TGedFrame.cxx:220
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
virtual ~TGedNameFrame()
Definition: TGedFrame.cxx:212
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
Definition: TGedFrame.cxx:233
virtual void SetModel(TObject *obj)
Sets text for the label.
Definition: TGedFrame.cxx:243
TGedNameFrame & operator=(const TGedNameFrame &)=delete
A doubly linked list.
Definition: TList.h:38
Mother of all ROOT objects.
Definition: TObject.h:41
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