Loading [MathJax]/jax/output/HTML-CSS/config.js
ROOT
6.14/05
Reference Guide
ROOT Home
Main Page
Tutorials
Functional Parts
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
v
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
u
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
tutorials
gui
customTH1Fmenu.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_gui
3
/// Example showing how to customize a context menu for a class
4
///
5
/// \macro_code
6
///
7
/// \author Ilka antcheva
8
9
{
10
cl =
gROOT
->GetClass(
"TH1F"
);
11
12
cl->MakeCustomMenuList();
13
ml = cl->GetMenuList();
14
15
((
TClassMenuItem
*)ml->At(1))->SetTitle(
"Add histos..."
);
16
((
TClassMenuItem
*)ml->At(2))->SetTitle(
"Divide histos..."
);
17
((
TClassMenuItem
*)ml->At(3))->SetTitle(
"Draw panel..."
);
18
((
TClassMenuItem
*)ml->At(4))->SetTitle(
"Fit one function..."
);
19
((
TClassMenuItem
*)ml->At(5))->SetTitle(
"Fit panel..."
);
20
((
TClassMenuItem
*)ml->At(6))->SetTitle(
"Multiply histos..."
);
21
((
TClassMenuItem
*)ml->At(7))->SetTitle(
"Rebin..."
);
22
((
TClassMenuItem
*)ml->At(8))->SetTitle(
"Set maximum scale..."
);
23
((
TClassMenuItem
*)ml->At(9))->SetTitle(
"Set minimum scale..."
);
24
((
TClassMenuItem
*)ml->At(10))->SetTitle(
"Smooth histogram"
);
25
((
TClassMenuItem
*)ml->At(12))->SetTitle(
"Set name..."
);
26
((
TClassMenuItem
*)ml->At(13))->SetTitle(
"Set title..."
);
27
((
TClassMenuItem
*)ml->At(15))->SetTitle(
"Delete histogram"
);
28
((
TClassMenuItem
*)ml->At(16))->SetTitle(
"Draw class info"
);
29
((
TClassMenuItem
*)ml->At(17))->SetTitle(
"Draw clone"
);
30
((
TClassMenuItem
*)ml->At(18))->SetTitle(
"Dump information"
);
31
((
TClassMenuItem
*)ml->At(19))->SetTitle(
"Inspect"
);
32
((
TClassMenuItem
*)ml->At(20))->SetTitle(
"Set drawing option..."
);
33
((
TClassMenuItem
*)ml->At(22))->SetTitle(
"Set line attributes..."
);
34
((
TClassMenuItem
*)ml->At(24))->SetTitle(
"Set fill attributes..."
);
35
((
TClassMenuItem
*)ml->At(26))->SetTitle(
"Set marker attributes..."
);
36
37
// Remove separators at the end, between attributes
38
mi = (
TClassMenuItem
*)ml->At(23);
39
delete
mi;
40
mi = (
TClassMenuItem
*)ml->At(24);
41
delete
mi;
42
}
TClassMenuItem
Describes one element of the context menu associated to a class The menu item may describe...
Definition:
TClassMenuItem.h:31
gROOT
#define gROOT
Definition:
TROOT.h:410