ROOT
v6-32
Reference Guide
Loading...
Searching...
No Matches
demoshelp.py
Go to the documentation of this file.
1
## \file
2
## \ingroup tutorial_pyroot
3
## \notebook
4
## Display demo help.
5
##
6
## \macro_code
7
##
8
## \author Wim Lavrijsen
9
10
import
os
11
from
ROOT
import
TCanvas, TPaveText
12
from
ROOT
import
gROOT
13
14
15
16
chelp =
TCanvas
(
'chelp'
,
'Help to run demos'
, 200, 10, 700, 500 )
17
18
welcome =
TPaveText
( .1, .8, .9, .97 )
19
welcome.AddText(
'Welcome to the ROOT demos'
)
20
welcome.SetTextFont( 32 )
21
welcome.SetTextColor( 4 )
22
welcome.SetFillColor( 24 )
23
welcome.Draw()
24
25
hdemo =
TPaveText
( .05, .05, .95, .7 )
26
hdemo.SetTextAlign( 12 )
27
hdemo.SetTextFont( 52 )
28
29
text =
"""- Run demo hsimple.py first. Then in any order
30
- Click left mouse button to execute one demo
31
- Click right mouse button to see the title of the demo
32
- Click on 'Close Bar' to exit from the demo menu
33
- Select 'File/Print' to print a Postscript view of the canvas
34
- You can execute a demo with the mouse or type commands
35
- During the demo (try on this canvas) you can:
36
.... Use left button to move/grow/etc objects
37
.... Use middle button to pop overlapping objects
38
.... Use right button to get an object sensitive pop-up
39
"""
40
for
line
in
text.split( os.linesep ):
41
hdemo.AddText( line )
42
43
hdemo.SetAllWith(
'....'
,
'color'
, 2 )
44
hdemo.SetAllWith(
'....'
,
'font'
, 72 )
45
hdemo.SetAllWith(
'....'
,
'size'
, 0.04 )
46
47
hdemo.Draw()
48
chelp.Update()
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TPaveText
A Pave (see TPave) with text, lines or/and boxes inside.
Definition
TPaveText.h:21
tutorials
pyroot
demoshelp.py
ROOT v6-32 - Reference Guide Generated on Fri Nov 1 2024 15:09:41 (GVA Time) using Doxygen 1.9.8