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