Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveProjectionAxesEditor.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Author: Matevz Tadel 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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
13#include "TEveProjectionAxes.h"
14#include "TEveGValuators.h"
15
16#include "TGComboBox.h"
17#include "TGButton.h"
18#include "TGLabel.h"
19#include "TG3DLine.h"
20
21/** \class TEveProjectionAxesEditor
22\ingroup TEve
23GUI editor for TEveProjectionAxes.
24*/
25
26
27////////////////////////////////////////////////////////////////////////////////
28
30 UInt_t options, Pixel_t back) :
31 TGedFrame(p, width, height, options | kVerticalFrame, back),
32 fM(nullptr),
33
34 fLabMode(nullptr),
35 fAxesMode(nullptr),
36
37 fCenterFrame(nullptr),
38 fDrawCenter(nullptr),
39 fDrawOrigin(nullptr)
40{
41 // Constructor.
42
43 MakeTitle("TEveProjectionAxis");
44 Int_t labw=52;
45
46 {
48
50 labfr->AddFrame(new TGLabel(labfr, "Labels:") , new TGLayoutHints(kLHintsLeft | kLHintsBottom));
51 f->AddFrame(labfr, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 0, 1, 1, 1));
52
53 fLabMode = new TGComboBox(f, "Position");
54 fLabMode->AddEntry("Value", 1);
55 fLabMode->AddEntry("Position", 0);
56 fLabMode->GetTextEntry()->SetToolTipText("Set tick-marks on equidistant values/screen position.");
58 lb->Resize(lb->GetWidth(), 2*18);
59 fLabMode->Resize(80, 20);
60 fLabMode->Connect("Selected(Int_t)", "TEveProjectionAxesEditor", this, "DoLabMode(Int_t)");
61 f->AddFrame(fLabMode, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
62 AddFrame(f);
63 }
64
65 {
68 labfr->AddFrame(new TGLabel(labfr, "Axes:") , new TGLayoutHints(kLHintsLeft | kLHintsBottom));
69 f->AddFrame(labfr, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 0, 1, 1, 1));
70
71
72 fAxesMode = new TGComboBox(f, "All");
77 lb->Resize(lb->GetWidth(), 2*18);
78 fAxesMode->Resize(80, 20);
79 fAxesMode->Connect("Selected(Int_t)", "TEveProjectionAxesEditor", this, "DoAxesMode(Int_t)");
80 f->AddFrame(fAxesMode, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
81 AddFrame(f);
82 }
83
84 //______________________________________________________________________________
85
86 // center tab
88
91 kFitWidth |
94 title1->AddFrame(new TGLabel(title1, "Distortion Center"),
95 new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
96 title1->AddFrame(new TGHorizontal3DLine(title1),
97 new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
99
100
101 {
102
104
105 fDrawOrigin = new TGCheckButton(hf1, "DrawOrigin");
106 hf1->AddFrame(fDrawOrigin, new TGLayoutHints(kLHintsLeft, 2,1,0,4));
107 fDrawOrigin->Connect("Toggled(Bool_t)", "TEveProjectionAxesEditor", this, "DoDrawOrigin()");
108
109
110 fDrawCenter = new TGCheckButton(hf1, "DrawCenter");
111 hf1->AddFrame(fDrawCenter, new TGLayoutHints(kLHintsLeft, 2,1,0,4));
112 fDrawCenter->Connect("Toggled(Bool_t)", "TEveProjectionAxesEditor", this, "DoDrawCenter()");
113
115
116 }
117}
118
119////////////////////////////////////////////////////////////////////////////////
120/// Set model object.
121
132
133////////////////////////////////////////////////////////////////////////////////
134/// Slot for setting draw of origin.
135
141
142////////////////////////////////////////////////////////////////////////////////
143/// Slot for setting draw of center.
144
150
151////////////////////////////////////////////////////////////////////////////////
152/// Slot for setting tick-mark step mode.
153
160
161////////////////////////////////////////////////////////////////////////////////
162/// Slot for setting number of axes.
163
@ kVerticalFrame
Definition GuiTypes.h:381
@ kFixedWidth
Definition GuiTypes.h:387
@ kFitWidth
Definition GuiTypes.h:386
@ kHorizontalFrame
Definition GuiTypes.h:382
@ kFixedSize
Definition GuiTypes.h:390
@ kOwnBackground
Definition GuiTypes.h:391
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
@ kButtonDown
Definition TGButton.h:54
@ kButtonUp
Definition TGButton.h:53
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char mode
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
void SetModel(TObject *obj) override
Set model object.
void DoLabMode(Int_t type)
Slot for setting tick-mark step mode.
void DoAxesMode(Int_t type)
Slot for setting number of axes.
void DoDrawOrigin()
Slot for setting draw of origin.
void DoDrawCenter()
Slot for setting draw of center.
TEveProjectionAxesEditor(const TEveProjectionAxesEditor &)
Axes for non-linear projections.
void SetDrawOrigin(Bool_t x)
void SetLabMode(ELabMode x)
Bool_t GetDrawOrigin() const
EAxesMode GetAxesMode() const
void SetAxesMode(EAxesMode x)
Bool_t GetDrawCenter() const
ELabMode GetLabMode() const
void SetDrawCenter(Bool_t x)
Selects different options.
Definition TGButton.h:264
Bool_t IsOn() const override
Definition TGButton.h:310
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set check button state.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
virtual TGTextEntry * GetTextEntry() const
Definition TGComboBox.h:111
virtual void AddEntry(TGString *s, Int_t id)
Definition TGComboBox.h:86
virtual TGListBox * GetListBox() const
Definition TGComboBox.h:110
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
TGCompositeFrame(const TGCompositeFrame &)=delete
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
Definition TG3DLine.h:18
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
A listbox is a box, possibly with scrollbar, containing entries.
Definition TGListBox.h:221
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Mother of all ROOT objects.
Definition TObject.h:41
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:865