ROOT: TCanvas Class Reference [PDF]

Public Member Functions. TCanvas (Bool_t build=kTRUE). Canvas default constructor. More... TCanvas (const char *name, co

2 downloads 32 Views 8MB Size

Recommend Stories


2018 Class List (PDF)
It always seems impossible until it is done. Nelson Mandela

MIND | Class Schedule [PDF]
You are here >> MY MIND | Notice Board | ... Professional Certificate in Customs Regulation and Documentation · Course: Customs Acts and Related Laws Date: August 23, 2017 | Course Co-ordinator: Reckonel Simpson ... Course: Introduction to Project Ma

Samuel Root Kwabla Doe .pdf
If you want to go quickly, go alone. If you want to go far, go together. African proverb

Read PDF Root Cause Analysis
I tried to make sense of the Four Books, until love arrived, and it all became a single syllable. Yunus

MIND | Class Schedule [PDF]
You are here >> MY MIND | Notice Board | ... Professional Certificate in Customs Regulation and Documentation · Course: Customs Acts and Related Laws Date: August 23, 2017 | Course Co-ordinator: Reckonel Simpson ... Course: Introduction to Project Ma

Subtest Class Report (PDF)
Learn to light a candle in the darkest moments of someone’s life. Be the light that helps others see; i

Class Timetable AS2018.pdf
Learn to light a candle in the darkest moments of someone’s life. Be the light that helps others see; i

Download PDF class timetable
At the end of your life, you will never regret not having passed one more test, not winning one more

GSL Reference Manual - PDF
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

Writing Reference Guide (PDF)
I cannot do all the good that the world needs, but the world needs all the good that I can do. Jana

Idea Transcript


TCanvas Class Reference Graphics » 2D Graphics » Graphics pad

The Canvas class. A Canvas is an area mapped to a window directly under the control of the display manager. A ROOT session may have several canvases open at any given time. A Canvas may be subdivided into independent graphical areas: the Pads. A canvas has a default pad which has the name of the canvas itself. An example of a Canvas layout is sketched in the picture below.

This canvas contains two pads named P1 and P2. Both Canvas, P1 and P2 can be moved, grown, shrinked using the normal rules of the Display manager. Once objects have been drawn in a canvas, they can be edited/moved by pointing directly to them. The cursor shape is changed to suggest the type of action that one can do on this object. Clicking with the right mouse button on an object pops-up a contextmenu with a complete list of actions possible on this object. A graphical editor may be started from the canvas "View" menu under the menu entry "Toolbar". An interactive HELP is available by clicking on the HELP button at the top right of the canvas. It gives a short explanation about the canvas' menus. A canvas may be automatically divided into pads via TPad::Divide. At creation time, no matter if in interactive or batch mode, the canvas size defines the size of the canvas window (including the size of the window manager's decoration). To define precisely the graphics area size of a canvas in the interactive mode, the following four lines of code should be used: { Double_t w = 600; Double_t h = 600; TCanvas * c1 = new TCanvas("c", "c", w, h); c->SetWindowSize(w + (w - c->GetWw()), h + (h - c->GetWh())); }

and in the batch mode simply do: c->SetCanvasSize(w,h);

If the canvas size this exceed the window size, scroll bars will be added to the canvas This allows to display very large canvases (even bigger than the screen size). The Following example shows how to proceed. TCanvas *c1 = new TCanvas("c1","c1"); c1->SetCanvasSize(1500, 1500); c1->SetWindowSize(500, 500);

Definition at line 31 of file TCanvas.h.

Public Types enum { kShowEventStatus = BIT(15), kAutoExec = BIT(16), kMenuBar = BIT(17), kShowToolBar = BIT(18), kShowEditor = BIT(19), kMoveOpaque = BIT(20), kResizeOpaque = BIT(21), kIsGrayscale = BIT(22), kShowToolTips = BIT(23) }



Public Types inherited from TPad Public Types inherited from TObject

Public Member Functions TCanvas (Bool_t build=kTRUE)



Canvas default constructor. More... TCanvas (const char *name, const char *title="", Int_t form=1)



Create a new canvas with a predefined size form. More... TCanvas (const char *name, const char *title, Int_t ww, Int_t wh)



Create a new canvas at a random position. More... TCanvas (const char *name, const char *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)



Create a new canvas. More... TCanvas (const char *name, Int_t ww, Int_t wh, Int_t winid)



Create an embedded canvas, i.e. More... virtual ~TCanvas ()



Canvas destructor. More... virtual void Browse (TBrowser *b )



Browse. More... TVirtualPad * cd (Int_t subpadnumber=0)



Set current canvas & pad. More... void Clear (Option_t *option="")



Remove all primitives from the canvas. More... virtual void Cleared (TVirtualPad *pad)



Emit pad Cleared signal. More... void ClearPadSave ()







void Close (Option_t *option="")

Close canvas. More... virtual void Closed ()



Emit Closed signal. More... void Constructor ()



Canvas default constructor. More... void Constructor (const char *name, const char *title, Int_t form)



Create a new canvas with a predefined size form. More... void Constructor (const char *name, const char *title, Int_t ww, Int_t wh)



Create a new canvas at a random position. More... void Constructor (const char *name, const char *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)



Create a new canvas. More... virtual void Delete (Option_t *="")



Delete this object. More... void DeleteCanvasPainter ()



assert on IsBatch() == false? More... void Destructor ()



Actual canvas destructor. More... void DisconnectWidget ()



Used by friend class TCanvasImp. More... virtual void Draw (Option_t *option="")



Draw a canvas. More... virtual TObject * DrawClone (Option_t *option="") const



Draw a clone of this canvas A new canvas is created that is a clone of this canvas. More... virtual TObject * DrawClonePad () Draw a clone of this canvas into the current pad In an interactive session, select the destination/current pad with the middle mouse button,



then point to the canvas area to select the canvas context menu item DrawClonePad. More...





virtual void EditorBar ()

Get editor bar. More... void EmbedInto (Int_t winid, Int_t ww, Int_t wh)



Embedded a canvas into a TRootEmbeddedCanvas. More... void EnterLeave (TPad *prevSelPad, TObject *prevSelObj)



Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the currently selected object. More... void FeedbackMode (Bool_t set)



Turn rubberband feedback mode on or off. More... void Flush ()



Flush canvas buffers. More... void ForceUpdate ()



Bool_t GetAutoExec () const



Int_t GetCanvasID () const

Get canvas identifier. More... TCanvasImp * GetCanvasImp () const



Get canvas implementation pointer if any. More...

TVirtualPadPainter * GetCanvasPainter ()

Access and (probably) creation of pad painter. More... virtual void GetCanvasPar (Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)



TObject * GetClickSelected () const



TVirtualPad * GetClickSelectedPad () const



TContextMenu * GetContextMenu () const



const char * GetDISPLAY () const



Int_t GetDoubleBuffer () const



Int_t GetEvent () const

Get Event. More... Int_t GetEventX () const



Get X event. More... Int_t GetEventY () const



Get Y event. More... Color_t GetHighLightColor () const



Get highlight color. More... TVirtualPad * GetPadSave () const



TObject * GetSelected () const

Get selected. More... Option_t * GetSelectedOpt () const



TVirtualPad * GetSelectedPad () const



Int_t GetSelectedX () const



Int_t GetSelectedY () const



Bool_t GetShowEditor () const



Bool_t GetShowEventStatus () const



Bool_t GetShowToolBar () const



Bool_t GetShowToolTips () const



UInt_t GetWh () const

Get Wh. More... UInt_t GetWindowHeight () const



Int_t GetWindowTopX ()

Returns current top x position of window on screen. More... Int_t GetWindowTopY ()



Returns current top y position of window on screen. More... UInt_t GetWindowWidth () const



UInt_t GetWw () const

Get Ww. More... Size_t GetXsizeReal () const



Size_t GetXsizeUser () const



Size_t GetYsizeReal () const



Size_t GetYsizeUser () const



virtual void HandleInput (EEventType button, Int_t x, Int_t y)

Handle Input Events. More... Bool_t HasMenuBar () const



void Iconify ()



Bool_t IsBatch () const

Is pad in batch mode ? More... Bool_t IsDrawn ()









Bool_t IsFolder () const

Is folder ? More... Bool_t IsGrayscale ()



Check whether this canvas is to be drawn in grayscale mode. More... Bool_t IsRetained () const



Is pad retained ? More... virtual void ls (Option_t *option="") const



List all pads. More... void MoveOpaque (Int_t set=1)



Set option to move objects/pads in a canvas. More... Bool_t OpaqueMoving () const



Is pad moving in opaque mode ? More... Bool_t OpaqueResizing () const



Is pad resizing in opaque mode ? More... virtual void Paint (Option_t *option="")



Paint canvas. More... virtual TPad * Pick (Int_t px, Int_t py, TObjLink *&pickobj)



Search for an object at pixel position px,py. More... virtual TPad * Pick (Int_t px, Int_t py, TObject *prevSelObj)



Prepare for pick, call TPad::Pick() and when selected object is different from previous then emit Picked() signal. More... virtual void Picked (TPad *selpad, TObject *selected, Int_t event)



Emit Picked() signal. More... virtual void ProcessedEvent (Int_t event, Int_t x, Int_t y, TObject *selected)



Emit ProcessedEvent() signal. More... void RaiseWindow ()



void ResetDrawn ()





virtual void Resize (Option_t *option="")

Recompute canvas parameters following a X11 Resize. More... void ResizeOpaque (Int_t set=1)



Set option to resize objects/pads in a canvas. More... void SavePrimitive (std::ostream &out, Option_t *option="")



Save primitives in this canvas in C++ macro file with GUI. More... void SaveSource (const char *filename="", Option_t *option="")



Save primitives in this canvas as a C++ macro file. More... virtual void Selected (TVirtualPad *pad, TObject *obj, Int_t event)



Emit Selected() signal. More... void SetBatch (Bool_t batch=kTRUE)



Toggle batch mode. More... void SetCanvasImp (TCanvasImp *i)



void SetCanvasSize (UInt_t ww, UInt_t wh)

Set Width and Height of canvas to ww and wh respectively. More... void SetClickSelected (TObject *obj)



void SetClickSelectedPad (TPad *pad)



virtual void SetCursor (ECursor cursor)

Set cursor. More... virtual void SetDoubleBuffer (Int_t mode=1)



Set Double Buffer On/Off. More... virtual void SetFixedAspectRatio (Bool_t fixed=kTRUE)



Fix canvas aspect ratio to current value if fixed is true. More... void SetGrayscale (Bool_t set=kTRUE)



Set whether this canvas should be painted in grayscale, and re-paint it if necessary. More... void SetHighLightColor (Color_t col)



void SetPadSave (TPad *pad)



void SetRetained (Bool_t retained=kTRUE)



void SetSelected (TObject *obj)

Set selected canvas. More... void SetSelectedPad (TPad *pad)



void SetSupportGL (Bool_t support)



void SetTitle (const char *title="")

Set canvas title. More... void SetWindowPosition (Int_t x, Int_t y)



void SetWindowSize (UInt_t ww, UInt_t wh)



void Show ()



virtual void Size (Float_t xsizeuser=0, Float_t ysizeuser=0)

Set the canvas scale in centimeters. More... virtual void ToggleAutoExec ()



Toggle pad auto execution of list of TExecs. More... virtual void ToggleEditor ()



Toggle editor. More... virtual void ToggleEventStatus ()



Toggle event statusbar. More... virtual void ToggleToolBar ()



Toggle toolbar. More... virtual void ToggleToolTips ()



Toggle tooltip display. More... virtual void Update ()



Update canvas pad buffers. More... void UseCurrentStyle ()



Force a copy of current style for all objects in canvas. More... Bool_t UseGL () const



Public Member Functions inherited from TPad Public Member Functions inherited from TVirtualPad Public Member Functions inherited from TObject Public Member Functions inherited from TAttLine Public Member Functions inherited from TAttFill Public Member Functions inherited from TAttPad Public Member Functions inherited from TQObject Public Member Functions inherited from TAttBBox2D

Static Public Member Functions static TCanvas * MakeDefCanvas ()



Static function to build a default canvas. More... static void SetFolder (Bool_t isfolder=kTRUE)



If isfolder=kTRUE, the canvas can be browsed like a folder by default a canvas is not browsable. More... static Bool_t SupportAlpha ()



Static function returning "true" if transparency is supported. More... Static Public Member Functions inherited from TPad Static Public Member Functions inherited from TVirtualPad Static Public Member Functions inherited from TObject Static Public Member Functions inherited from TQObject

Protected Member Functions virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)





Execute action corresponding to one event. More... void Init ()



Initialize the TCanvas members. Called by all constructors. More... Protected Member Functions inherited from TPad Protected Member Functions inherited from TVirtualPad Protected Member Functions inherited from TObject Protected Member Functions inherited from TQObject

Protected Attributes Bool_t fBatch





! True when in batchmode More... Int_t fCanvasID



! Canvas identifier More... TCanvasImp * fCanvasImp



! Window system specific canvas implementation More... TAttCanvas fCatt



Canvas attributes. More... UInt_t fCh



Height of the canvas along Y (pixels) More... TObject * fClickSelected



! Currently click-selected object More... TPad * fClickSelectedPad



! Pad containing currently click-selected object More... TContextMenu * fContextMenu



! Context menu pointer More... UInt_t fCw



Width of the canvas along X (pixels) More... TString fDISPLAY



Name of destination screen. More... Int_t fDoubleBuffer



Double buffer flag (0=off, 1=on) More... Bool_t fDrawn



! Set to True when the Draw method is called More... Int_t fEvent



! Type of current or last handled event More... Int_t fEventX



! Last X mouse position in canvas More... Int_t fEventY



! Last Y mouse position in canvas More... Color_t fHighLightColor



Highlight color of active pad. More... TPad * fPadSave



! Pointer to saved pad in HandleInput More...

TVirtualPadPainter * fPainter

! Canvas (pad) painter. More... Bool_t fRetained



Retain structure flag. More... TObject * fSelected



! Currently selected object More... TString fSelectedOpt



! Drawing option of selected object More... TPad * fSelectedPad



! Pad containing currently selected object More... Int_t fSelectedX



! X of selected object More... Int_t fSelectedY



! Y of selected object More... Bool_t fUpdating



! True when Updating the canvas More... Bool_t fUseGL



! True when rendering is with GL More... UInt_t fWindowHeight



Height of window (including menubar, borders, etc.) More... Int_t fWindowTopX



Top X position of window (in pixels) More... Int_t fWindowTopY



Top Y position of window (in pixels) More... UInt_t fWindowWidth



Width of window (including borders, etc.) More... Size_t fXsizeReal



Current size of canvas along X in CM. More... Size_t fXsizeUser



User specified size of canvas along X in CM. More... Size_t fYsizeReal



Current size of canvas along Y in CM. More... Size_t fYsizeUser



User specified size of canvas along Y in CM. More... Protected Attributes inherited from TPad Protected Attributes inherited from TVirtualPad Protected Attributes inherited from TAttLine Protected Attributes inherited from TAttFill Protected Attributes inherited from TAttPad Protected Attributes inherited from TQObject

Static Protected Attributes static Bool_t fgIsFolder = kFALSE



Indicates if canvas can be browsed as a folder. More... Static Protected Attributes inherited from TPad Static Protected Attributes inherited from TQObject

Private Member Functions TCanvas (const TCanvas &canvas)





void Build ()

Build a canvas. Called by all constructors. More... void CopyPixmaps ()



Copy the canvas pixmap of the pad to the canvas. More... void CreatePainter ()



Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpainter"). More... void DrawEventStatus (Int_t event, Int_t x, Int_t y, TObject *selected)



Report name and title of primitive below the cursor. More...

TCanvas & operator= (const TCanvas &rhs) void RunAutoExec ()

Execute the list of TExecs in the current pad. More...

Friends

class TCanvasImp class TInterpreter class TThread

Additional Inherited Members Static Protected Member Functions inherited from TQObject #include Inheritance diagram for TCanvas: TObject

TAttLine

TAttFill

TAttPad

TVirtualPad

TQObject

TAttBBox2D

TPad

TCanvas

TDialogCanvas

TInspectCanvas

[legend]

Member Enumeration Documentation u anonymous enum anonymous enum Enumerator

kShowEventStatus kAutoExec kMenuBar kShowToolBar kShowEditor kMoveOpaque kResizeOpaque kIsGrayscale kShowToolTips Definition at line 94 of file TCanvas.h.

Constructor & Destructor Documentation u TCanvas() [1/6] TCanvas::TCanvas ( const TCanvas & canvas )

private

u TCanvas() [2/6] TCanvas::TCanvas ( Bool_t build = kTRUE ) Canvas default constructor. Definition at line 119 of file TCanvas.cxx.

u TCanvas() [3/6] TCanvas::TCanvas ( const char * name, const char * title = "", Int_t

form = 1

) Create a new canvas with a predefined size form. If form < 0 the menubar is not shown. form = 1 700x500 at 10,10 (set by TStyle::SetCanvasDefH,W,X,Y) form = 2 500x500 at 20,20 form = 3 500x500 at 30,30 form = 4 500x500 at 40,40 form = 5 500x500 at 50,50 If "name" starts with "gl" the canvas is ready to receive GL output. Definition at line 250 of file TCanvas.cxx.

u TCanvas() [4/6] TCanvas::TCanvas ( const char * name, const char * title, Int_t

ww,

Int_t

wh

) Create a new canvas at a random position. Parameters [in] name canvas name [in] title

canvas title

[in] ww

is the canvas size in pixels along X (if ww < 0 the menubar is not shown)

[in] wh

is the canvas size in pixels along Y

If "name" starts with "gl" the canvas is ready to receive GL output. Definition at line 353 of file TCanvas.cxx.

u TCanvas() [5/6] TCanvas::TCanvas ( const char * name, const char * title, Int_t

wtopx,

Int_t

wtopy,

Int_t

ww,

Int_t

wh

) Create a new canvas. Parameters [in] name

canvas name

[in] title

canvas title

[in] wtopx,wtopy are the pixel coordinates of the top left corner of the canvas (if wtopx < 0) the menubar is not shown) [in] ww

is the canvas size in pixels along X

[in] wh

is the canvas size in pixels along Y

If "name" starts with "gl" the canvas is ready to receive GL output. Definition at line 435 of file TCanvas.cxx.

u TCanvas() [6/6] TCanvas::TCanvas ( const char * name, Int_t

ww,

Int_t

wh,

Int_t

winid

) Create an embedded canvas, i.e. a canvas that is in a TGCanvas widget which is placed in a TGFrame. This ctor is only called via the TRootEmbeddedCanvas class. If "name" starts with "gl" the canvas is ready to receive GL output. Definition at line 204 of file TCanvas.cxx.

u ~TCanvas() TCanvas::~TCanvas ( )

virtual

Canvas destructor. Definition at line 646 of file TCanvas.cxx.

Member Function Documentation u Browse() void TCanvas::Browse ( TBrowser * b )

virtual

Browse. Reimplemented from TPad. Definition at line 654 of file TCanvas.cxx.

u Build() void TCanvas::Build ( )

private

Build a canvas. Called by all constructors. Definition at line 561 of file TCanvas.cxx.

u cd() TVirtualPad * TCanvas::cd ( Int_t subpadnumber = 0 )

virtual

Set current canvas & pad. Returns the new current pad, or 0 in case of failure. See TPad::cd() for an explanation of the parameter. Implements TVirtualPad. Definition at line 688 of file TCanvas.cxx.

u Clear() void TCanvas::Clear ( Option_t * option = "" )

virtual

Remove all primitives from the canvas. If option "D" is specified, direct sub-pads are cleared but not deleted. This option is not recursive, i.e. pads in direct sub-pads are deleted. Implements TVirtualPad. Definition at line 707 of file TCanvas.cxx.

u Cleared() void TCanvas::Cleared ( TVirtualPad * pad )

virtual

Emit pad Cleared signal. Definition at line 740 of file TCanvas.cxx.

u ClearPadSave() void TCanvas::ClearPadSave ( )

inline

Definition at line 146 of file TCanvas.h.

u Close() void TCanvas::Close ( Option_t * option = "" )

virtual

Close canvas. Delete window/pads data structure Reimplemented from TPad. Definition at line 758 of file TCanvas.cxx.

u Closed() void TCanvas::Closed ( )

virtual

Emit Closed signal. Reimplemented from TPad. Definition at line 748 of file TCanvas.cxx.

u Constructor() [1/4] void TCanvas::Constructor ( ) Canvas default constructor. Definition at line 172 of file TCanvas.cxx.

u Constructor() [2/4] void TCanvas::Constructor ( const char * name, const char * title, Int_t

form

) Create a new canvas with a predefined size form. If form < 0 the menubar is not shown. form = 1 700x500 at 10,10 (set by TStyle::SetCanvasDefH,W,X,Y) form = 2 500x500 at 20,20 form = 3 500x500 at 30,30 form = 4 500x500 at 40,40 form = 5 500x500 at 50,50 Definition at line 268 of file TCanvas.cxx.

u Constructor() [3/4] void TCanvas::Constructor ( const char * name, const char * title, Int_t

ww,

Int_t

wh

) Create a new canvas at a random position. Parameters [in] name canvas name [in] title

canvas title

[in] ww

is the canvas size in pixels along X (if ww < 0 the menubar is not shown)

[in] wh

is the canvas size in pixels along Y

Definition at line 370 of file TCanvas.cxx.

u Constructor() [4/4] void TCanvas::Constructor ( const char * name, const char * title, Int_t

wtopx,

Int_t

wtopy,

Int_t

ww,

Int_t

wh

) Create a new canvas. Parameters [in] name

canvas name

[in] title

canvas title

[in] wtopx,wtopy are the pixel coordinates of the top left corner of the canvas (if wtopx < 0) the menubar is not shown) [in] ww

is the canvas size in pixels along X

[in] wh

is the canvas size in pixels along Y

Definition at line 454 of file TCanvas.cxx.

u CopyPixmaps() void TCanvas::CopyPixmaps ( )

private

virtual

Copy the canvas pixmap of the pad to the canvas. Reimplemented from TPad. Definition at line 808 of file TCanvas.cxx.

u CreatePainter() void TCanvas::CreatePainter ( )

private

Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpainter"). But now, it's directly in a gpad dir, so, in case of default painter, no *.so should be loaded, no need in plugin managers. May change in future. Definition at line 2330 of file TCanvas.cxx.

u Delete() virtual void TCanvas::Delete ( Option_t * option = "" )

inline

virtual

Delete this object. Typically called as a command via the interpreter. Normally use "delete" operator when object has been allocated on the heap. Reimplemented from TObject. Definition at line 126 of file TCanvas.h.

u DeleteCanvasPainter() void TCanvas::DeleteCanvasPainter ( ) assert on IsBatch() == false? Definition at line 2361 of file TCanvas.cxx.

u Destructor() void TCanvas::Destructor ( ) Actual canvas destructor. Definition at line 664 of file TCanvas.cxx.

u DisconnectWidget() void TCanvas::DisconnectWidget ( ) Used by friend class TCanvasImp. Definition at line 2298 of file TCanvas.cxx.

u Draw() void TCanvas::Draw ( Option_t * option = "" )

virtual

Draw a canvas. If a canvas with the name is already on the screen, the canvas is repainted. This function is useful when a canvas object has been saved in a Root file. One can then do: Root > Tfile f("file.root"); Root > canvas.Draw();

Reimplemented from TPad. Definition at line 826 of file TCanvas.cxx.

u DrawClone() TObject * TCanvas::DrawClone ( Option_t * option = "" ) const

virtual

Draw a clone of this canvas A new canvas is created that is a clone of this canvas. Reimplemented from TObject. Definition at line 873 of file TCanvas.cxx.

u DrawClonePad() TObject * TCanvas::DrawClonePad ( )

virtual

Draw a clone of this canvas into the current pad In an interactive session, select the destination/current pad with the middle mouse button, then point to the canvas area to select the canvas context menu item DrawClonePad. Note that the original canvas may have subpads. Definition at line 899 of file TCanvas.cxx.

u DrawEventStatus() void TCanvas::DrawEventStatus ( Int_t

event,

Int_t

px,

Int_t

py,

TObject * selected )

private

Report name and title of primitive below the cursor. This function is called when the option "Event Status" in the canvas menu "Options" is selected. Definition at line 954 of file TCanvas.cxx.

u EditorBar() void TCanvas::EditorBar ( )

virtual

Get editor bar. Definition at line 981 of file TCanvas.cxx.

u EmbedInto() void TCanvas::EmbedInto ( Int_t winid, Int_t ww, Int_t wh ) Embedded a canvas into a TRootEmbeddedCanvas. This method is only called via TRootEmbeddedCanvas::AdoptCanvas. Definition at line 990 of file TCanvas.cxx.

u EnterLeave() void TCanvas::EnterLeave ( TPad *

prevSelPad,

TObject * prevSelObj ) Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the currently selected object. Does nothing if the selected object does not change. Definition at line 1016 of file TCanvas.cxx.

u ExecuteEvent() void TCanvas::ExecuteEvent ( Int_t event, Int_t px, Int_t py )

protected

virtual

Execute action corresponding to one event. This member function must be implemented to realize the action corresponding to the mouse click on the object in the canvas Only handle mouse motion events in TCanvas, all other events are ignored for the time being Reimplemented from TPad. Definition at line 1053 of file TCanvas.cxx.

u FeedbackMode() void TCanvas::FeedbackMode ( Bool_t set ) Turn rubberband feedback mode on or off. Definition at line 1071 of file TCanvas.cxx.

u Flush() void TCanvas::Flush ( ) Flush canvas buffers. Definition at line 1085 of file TCanvas.cxx.

u ForceUpdate() void TCanvas::ForceUpdate ( )

inline

Definition at line 137 of file TCanvas.h.

u GetAutoExec() Bool_t TCanvas::GetAutoExec ( ) const

inline

Definition at line 158 of file TCanvas.h.

u GetCanvasID() Int_t TCanvas::GetCanvasID ( ) const

inline

virtual

inline

virtual

inline

virtual

Get canvas identifier. Reimplemented from TPad. Definition at line 163 of file TCanvas.h.

u GetCanvasImp() TCanvasImp * TCanvas::GetCanvasImp ( ) const Get canvas implementation pointer if any. Reimplemented from TPad. Definition at line 164 of file TCanvas.h.

u GetCanvasPainter() TVirtualPadPainter * TCanvas::GetCanvasPainter ( ) Access and (probably) creation of pad painter. Definition at line 2351 of file TCanvas.cxx.

u GetCanvasPar() virtual void TCanvas::GetCanvasPar ( Int_t &

wtopx,

Int_t &

wtopy,

UInt_t & ww, UInt_t & wh ) Definition at line 171 of file TCanvas.h.

u GetClickSelected() TObject* TCanvas::GetClickSelected ( ) const

inline

Definition at line 148 of file TCanvas.h.

u GetClickSelectedPad() TVirtualPad * TCanvas::GetClickSelectedPad ( ) const

inline

Definition at line 153 of file TCanvas.h.

u GetContextMenu() TContextMenu * TCanvas::GetContextMenu ( ) const

inline

Definition at line 139 of file TCanvas.h.

u GetDISPLAY() const char* TCanvas::GetDISPLAY ( ) const

inline

Definition at line 138 of file TCanvas.h.

u GetDoubleBuffer() Int_t TCanvas::GetDoubleBuffer ( ) const

inline

Definition at line 140 of file TCanvas.h.

u GetEvent() Int_t TCanvas::GetEvent ( ) const

inline

virtual

inline

virtual

inline

virtual

inline

virtual

inline

virtual

inline

virtual

Get Event. Reimplemented from TPad. Definition at line 141 of file TCanvas.h.

u GetEventX() Int_t TCanvas::GetEventX ( ) const Get X event. Reimplemented from TPad. Definition at line 142 of file TCanvas.h.

u GetEventY() Int_t TCanvas::GetEventY ( ) const Get Y event. Reimplemented from TPad. Definition at line 143 of file TCanvas.h.

u GetHighLightColor() Color_t TCanvas::GetHighLightColor ( ) const Get highlight color. Reimplemented from TPad. Definition at line 144 of file TCanvas.h.

u GetPadSave() TVirtualPad * TCanvas::GetPadSave ( ) const Implements TVirtualPad. Definition at line 145 of file TCanvas.h.

u GetSelected() TObject* TCanvas::GetSelected ( ) const Get selected. Reimplemented from TPad. Definition at line 147 of file TCanvas.h.

u GetSelectedOpt() Option_t* TCanvas::GetSelectedOpt ( ) const

inline

Definition at line 151 of file TCanvas.h.

u GetSelectedPad() TVirtualPad * TCanvas::GetSelectedPad ( ) const

inline

virtual

Implements TVirtualPad. Definition at line 152 of file TCanvas.h.

u GetSelectedX() Int_t TCanvas::GetSelectedX ( ) const

inline

Definition at line 149 of file TCanvas.h.

u GetSelectedY() Int_t TCanvas::GetSelectedY ( ) const

inline

Definition at line 150 of file TCanvas.h.

u GetShowEditor() Bool_t TCanvas::GetShowEditor ( ) const

inline

Definition at line 156 of file TCanvas.h.

u GetShowEventStatus() Bool_t TCanvas::GetShowEventStatus ( ) const

inline

Definition at line 154 of file TCanvas.h.

u GetShowToolBar() Bool_t TCanvas::GetShowToolBar ( ) const

inline

Definition at line 155 of file TCanvas.h.

u GetShowToolTips() Bool_t TCanvas::GetShowToolTips ( ) const

inline

Definition at line 157 of file TCanvas.h.

u GetWh() UInt_t TCanvas::GetWh ( ) const

inline

virtual

Get Wh. Reimplemented from TPad. Definition at line 170 of file TCanvas.h.

u GetWindowHeight() UInt_t TCanvas::GetWindowHeight ( ) const

inline

Definition at line 168 of file TCanvas.h.

u GetWindowTopX() Int_t TCanvas::GetWindowTopX ( ) Returns current top x position of window on screen. Definition at line 1144 of file TCanvas.cxx.

u GetWindowTopY() Int_t TCanvas::GetWindowTopY ( ) Returns current top y position of window on screen. Definition at line 1155 of file TCanvas.cxx.

u GetWindowWidth() UInt_t TCanvas::GetWindowWidth ( ) const

inline

Definition at line 167 of file TCanvas.h.

u GetWw() UInt_t TCanvas::GetWw ( ) const

inline

virtual

Get Ww. Reimplemented from TPad. Definition at line 169 of file TCanvas.h.

u GetXsizeReal() Size_t TCanvas::GetXsizeReal ( ) const

inline

Definition at line 161 of file TCanvas.h.

u GetXsizeUser() Size_t TCanvas::GetXsizeUser ( ) const

inline

Definition at line 159 of file TCanvas.h.

u GetYsizeReal() Size_t TCanvas::GetYsizeReal ( ) const

inline

Definition at line 162 of file TCanvas.h.

u GetYsizeUser() Size_t TCanvas::GetYsizeUser ( ) const

inline

Definition at line 160 of file TCanvas.h.

u HandleInput() void TCanvas::HandleInput ( EEventType event, Int_t

px,

Int_t

py

)

virtual

Handle Input Events. Handle input events, like button up/down in current canvas. Definition at line 1168 of file TCanvas.cxx.

u HasMenuBar() Bool_t TCanvas::HasMenuBar ( ) const

inline

Definition at line 174 of file TCanvas.h.

u Iconify() void TCanvas::Iconify ( )

inline

Definition at line 175 of file TCanvas.h.

u Init() void TCanvas::Init ( )

protected

Initialize the TCanvas members. Called by all constructors. Definition at line 512 of file TCanvas.cxx.

u IsBatch() Bool_t TCanvas::IsBatch ( ) const

inline

virtual

Is pad in batch mode ? Reimplemented from TPad. Definition at line 176 of file TCanvas.h.

u IsDrawn() Bool_t TCanvas::IsDrawn ( )

inline

Definition at line 177 of file TCanvas.h.

u IsFolder() Bool_t TCanvas::IsFolder ( ) const

virtual

Is folder ? Reimplemented from TObject. Definition at line 1412 of file TCanvas.cxx.

u IsGrayscale() Bool_t TCanvas::IsGrayscale ( ) Check whether this canvas is to be drawn in grayscale mode. Definition at line 2307 of file TCanvas.cxx.

u IsRetained() Bool_t TCanvas::IsRetained ( ) const

inline

virtual

Is pad retained ? Reimplemented from TPad. Definition at line 180 of file TCanvas.h.

u ls() void TCanvas::ls ( Option_t * option = "" ) const

virtual

List all pads. Reimplemented from TPad. Definition at line 1420 of file TCanvas.cxx.

u MakeDefCanvas() TCanvas * TCanvas::MakeDefCanvas ( )

static

Static function to build a default canvas. Definition at line 1432 of file TCanvas.cxx.

u MoveOpaque() void TCanvas::MoveOpaque ( Int_t set = 1 ) Set option to move objects/pads in a canvas. set = 1 (default) graphics objects are moved in opaque mode set = 0 only the outline of objects is drawn when moving them The option opaque produces the best effect. It requires however a a reasonably fast workstation or response time. Definition at line 1463 of file TCanvas.cxx.

u OpaqueMoving() Bool_t TCanvas::OpaqueMoving ( ) const

inline

virtual

inline

virtual

Is pad moving in opaque mode ? Reimplemented from TPad. Definition at line 183 of file TCanvas.h.

u OpaqueResizing() Bool_t TCanvas::OpaqueResizing ( ) const Is pad resizing in opaque mode ? Reimplemented from TPad. Definition at line 184 of file TCanvas.h.

u operator=() TCanvas& TCanvas::operator= ( const TCanvas & rhs )

private

u Paint() void TCanvas::Paint ( Option_t * option = "" )

virtual

Paint canvas. Reimplemented from TPad. Definition at line 1471 of file TCanvas.cxx.

u Pick() [1/2] virtual TPad * TCanvas::Pick ( Int_t

px,

Int_t

py,

TObjLink *& pickobj )

inline

virtual

Search for an object at pixel position px,py. Check if point is in this pad. If yes, check if it is in one of the sub-pads If found in the pad, compute closest distance of approach to each primitive. If one distance of approach is found to be within the limit Distancemaximum the corresponding primitive is selected and the routine returns. Reimplemented from TPad. Definition at line 186 of file TCanvas.h.

u Pick() [2/2] TPad * TCanvas::Pick ( Int_t

px,

Int_t

py,

TObject * prevSelObj )

virtual

Prepare for pick, call TPad::Pick() and when selected object is different from previous then emit Picked() signal. Definition at line 1480 of file TCanvas.cxx.

u Picked() void TCanvas::Picked ( TPad *

selpad,

TObject * selected, Int_t

event

)

virtual

Emit Picked() signal. Definition at line 1520 of file TCanvas.cxx.

u ProcessedEvent() void TCanvas::ProcessedEvent ( Int_t

event,

Int_t

x,

Int_t

y,

TObject * selected )

virtual

Emit ProcessedEvent() signal. Definition at line 1548 of file TCanvas.cxx.

u RaiseWindow() void TCanvas::RaiseWindow ( )

inline

Definition at line 193 of file TCanvas.h.

u ResetDrawn() void TCanvas::ResetDrawn ( )

inline

Definition at line 194 of file TCanvas.h.

u Resize() void TCanvas::Resize ( Option_t * option = "" )

virtual

Recompute canvas parameters following a X11 Resize. Definition at line 1563 of file TCanvas.cxx.

u ResizeOpaque() void TCanvas::ResizeOpaque ( Int_t set = 1 ) Set option to resize objects/pads in a canvas. set = 1 (default) graphics objects are resized in opaque mode set = 0 only the outline of objects is drawn when resizing them The option opaque produces the best effect. It requires however a a reasonably fast workstation or response time. Definition at line 1647 of file TCanvas.cxx.

u RunAutoExec() void TCanvas::RunAutoExec ( )

private

Execute the list of TExecs in the current pad. Definition at line 1655 of file TCanvas.cxx.

u SavePrimitive() void TCanvas::SavePrimitive ( std::ostream & out, Option_t *

option = ""

)

virtual

Save primitives in this canvas in C++ macro file with GUI. Reimplemented from TPad. Definition at line 1666 of file TCanvas.cxx.

u SaveSource() void TCanvas::SaveSource ( const char * filename = "", Option_t * option = "" ) Save primitives in this canvas as a C++ macro file. This function loops on all the canvas primitives and for each primitive calls the object SavePrimitive function. When outputting floating point numbers, the default precision is 7 digits. The precision can be changed (via system.rootrc) by changing the value of the environment variable "Canvas.SavePrecision" Definition at line 1711 of file TCanvas.cxx.

u Selected() void TCanvas::Selected ( TVirtualPad * pad, TObject *

obj,

Int_t

event

)

virtual

Emit Selected() signal. Definition at line 1534 of file TCanvas.cxx.

u SetBatch() void TCanvas::SetBatch ( Bool_t batch = kTRUE )

virtual

Toggle batch mode. However, if the canvas is created without a window then batch mode always stays set. Reimplemented from TPad. Definition at line 1862 of file TCanvas.cxx.

u SetCanvasImp() void TCanvas::SetCanvasImp ( TCanvasImp * i )

inline

Definition at line 211 of file TCanvas.h.

u SetCanvasSize() void TCanvas::SetCanvasSize ( UInt_t ww, UInt_t wh )

virtual

Set Width and Height of canvas to ww and wh respectively. If ww and/or wh are greater than the current canvas window a scroll bar is automatically generated. Use this function to zoom in a canvas and navigate via the scroll bars. The Width and Height in this method are different from those given in the TCanvas constructors where these two dimension include the size of the window decoration whereas they do not in this method. Reimplemented from TPad. Definition at line 1878 of file TCanvas.cxx.

u SetClickSelected() void TCanvas::SetClickSelected ( TObject * obj )

inline

Definition at line 215 of file TCanvas.h.

u SetClickSelectedPad() void TCanvas::SetClickSelectedPad ( TPad * pad )

inline

Definition at line 217 of file TCanvas.h.

u SetCursor() void TCanvas::SetCursor ( ECursor cursor )

virtual

Set cursor. Reimplemented from TPad. Definition at line 1891 of file TCanvas.cxx.

u SetDoubleBuffer() void TCanvas::SetDoubleBuffer ( Int_t mode = 1 )

virtual

Set Double Buffer On/Off. Reimplemented from TPad. Definition at line 1900 of file TCanvas.cxx.

u SetFixedAspectRatio() void TCanvas::SetFixedAspectRatio ( Bool_t fixed = kTRUE )

virtual

Fix canvas aspect ratio to current value if fixed is true. Reimplemented from TPad. Definition at line 1917 of file TCanvas.cxx.

u SetFolder() void TCanvas::SetFolder ( Bool_t isfolder = kTRUE )

static

If isfolder=kTRUE, the canvas can be browsed like a folder by default a canvas is not browsable. Definition at line 1939 of file TCanvas.cxx.

u SetGrayscale() void TCanvas::SetGrayscale ( Bool_t set = kTRUE ) Set whether this canvas should be painted in grayscale, and re-paint it if necessary. Definition at line 2316 of file TCanvas.cxx.

u SetHighLightColor() void TCanvas::SetHighLightColor ( Color_t col )

inline

Definition at line 213 of file TCanvas.h.

u SetPadSave() void TCanvas::SetPadSave ( TPad * pad )

inline

Definition at line 222 of file TCanvas.h.

u SetRetained() void TCanvas::SetRetained ( Bool_t retained = kTRUE )

inline

Definition at line 223 of file TCanvas.h.

u SetSelected() void TCanvas::SetSelected ( TObject * obj )

virtual

Set selected canvas. Reimplemented from TPad. Definition at line 1947 of file TCanvas.cxx.

u SetSelectedPad() void TCanvas::SetSelectedPad ( TPad * pad )

inline

Definition at line 216 of file TCanvas.h.

u SetSupportGL() void TCanvas::SetSupportGL ( Bool_t support )

inline

Definition at line 233 of file TCanvas.h.

u SetTitle() void TCanvas::SetTitle ( const char * title = "" )

virtual

Set canvas title. Reimplemented from TPad. Definition at line 1956 of file TCanvas.cxx.

u SetWindowPosition() void TCanvas::SetWindowPosition ( Int_t x, Int_t y )

inline

Definition at line 203 of file TCanvas.h.

u SetWindowSize() void TCanvas::SetWindowSize ( UInt_t ww, UInt_t wh )

inline

Definition at line 204 of file TCanvas.h.

u Show() void TCanvas::Show ( )

inline

Definition at line 218 of file TCanvas.h.

u Size() void TCanvas::Size ( Float_t xsize = 0, Float_t ysize = 0 )

virtual

Set the canvas scale in centimeters. This information is used by PostScript to set the page size. Parameters [in] xsize size of the canvas in centimeters along X [in] ysize size of the canvas in centimeters along Y if xsize and ysize are not equal to 0, then the scale factors will be computed to keep the ratio ysize/xsize independently of the canvas size (parts of the physical canvas will be unused). if xsize = 0 and ysize is not zero, then xsize will be computed to fit to the current canvas scale. If the canvas is resized, a new value for xsize will be recomputed. In this case the aspect ratio is not preserved. if both xsize = 0 and ysize = 0, then the scaling is automatic. the largest dimension will be allocated a size of 20 centimeters. Definition at line 1982 of file TCanvas.cxx.

u SupportAlpha() Bool_t TCanvas::SupportAlpha ( )

static

Static function returning "true" if transparency is supported. Definition at line 2235 of file TCanvas.cxx.

u ToggleAutoExec() void TCanvas::ToggleAutoExec ( )

virtual

Toggle pad auto execution of list of TExecs. Definition at line 2181 of file TCanvas.cxx.

u ToggleEditor() void TCanvas::ToggleEditor ( )

virtual

Toggle editor. Definition at line 2212 of file TCanvas.cxx.

u ToggleEventStatus() void TCanvas::ToggleEventStatus ( )

virtual

Toggle event statusbar. Definition at line 2190 of file TCanvas.cxx.

u ToggleToolBar() void TCanvas::ToggleToolBar ( )

virtual

Toggle toolbar. Definition at line 2201 of file TCanvas.cxx.

u ToggleToolTips() void TCanvas::ToggleToolTips ( )

virtual

Toggle tooltip display. Definition at line 2223 of file TCanvas.cxx.

u Update() void TCanvas::Update ( )

virtual

Update canvas pad buffers. Reimplemented from TPad. Definition at line 2248 of file TCanvas.cxx.

u UseCurrentStyle() void TCanvas::UseCurrentStyle ( )

virtual

Force a copy of current style for all objects in canvas. Reimplemented from TPad. Definition at line 1119 of file TCanvas.cxx.

u UseGL() Bool_t TCanvas::UseGL ( ) const

inline

Definition at line 232 of file TCanvas.h.

Friends And Related Function Documentation u TCanvasImp friend class TCanvasImp

friend

Definition at line 33 of file TCanvas.h.

u TInterpreter friend class TInterpreter

friend

Definition at line 35 of file TCanvas.h.

u TThread friend class TThread

friend

Definition at line 34 of file TCanvas.h.

Member Data Documentation u fBatch Bool_t TCanvas::fBatch

protected

! True when in batchmode Definition at line 66 of file TCanvas.h.

u fCanvasID Int_t TCanvas::fCanvasID

protected

! Canvas identifier Definition at line 55 of file TCanvas.h.

u fCanvasImp TCanvasImp * TCanvas::fCanvasImp

protected

! Window system specific canvas implementation Definition at line 64 of file TCanvas.h.

u fCatt TAttCanvas TCanvas::fCatt

protected

Canvas attributes. Definition at line 38 of file TCanvas.h.

u fCh UInt_t TCanvas::fCh

protected

Height of the canvas along Y (pixels) Definition at line 51 of file TCanvas.h.

u fClickSelected TObject* TCanvas::fClickSelected

protected

! Currently click-selected object Definition at line 57 of file TCanvas.h.

u fClickSelectedPad TPad * TCanvas::fClickSelectedPad

protected

! Pad containing currently click-selected object Definition at line 62 of file TCanvas.h.

u fContextMenu TContextMenu * TCanvas::fContextMenu

protected

! Context menu pointer Definition at line 65 of file TCanvas.h.

u fCw UInt_t TCanvas::fCw

protected

Width of the canvas along X (pixels) Definition at line 50 of file TCanvas.h.

u fDISPLAY TString TCanvas::fDISPLAY

protected

Name of destination screen. Definition at line 39 of file TCanvas.h.

u fDoubleBuffer Int_t TCanvas::fDoubleBuffer

protected

Double buffer flag (0=off, 1=on) Definition at line 45 of file TCanvas.h.

u fDrawn Bool_t TCanvas::fDrawn

protected

! Set to True when the Draw method is called Definition at line 70 of file TCanvas.h.

u fEvent Int_t TCanvas::fEvent

protected

! Type of current or last handled event Definition at line 52 of file TCanvas.h.

u fEventX Int_t TCanvas::fEventX

protected

! Last X mouse position in canvas Definition at line 53 of file TCanvas.h.

u fEventY Int_t TCanvas::fEventY

protected

! Last Y mouse position in canvas Definition at line 54 of file TCanvas.h.

u fgIsFolder Bool_t TCanvas::fgIsFolder = kFALSE

static

protected

Indicates if canvas can be browsed as a folder. Definition at line 74 of file TCanvas.h.

u fHighLightColor Color_t TCanvas::fHighLightColor

protected

Highlight color of active pad. Definition at line 44 of file TCanvas.h.

u fPadSave TPad * TCanvas::fPadSave

protected

! Pointer to saved pad in HandleInput Definition at line 63 of file TCanvas.h.

u fPainter TVirtualPadPainter* TCanvas::fPainter

protected

! Canvas (pad) painter. Definition at line 72 of file TCanvas.h.

u fRetained Bool_t TCanvas::fRetained

protected

Retain structure flag. Definition at line 68 of file TCanvas.h.

u fSelected TObject* TCanvas::fSelected

protected

! Currently selected object Definition at line 56 of file TCanvas.h.

u fSelectedOpt TString TCanvas::fSelectedOpt

protected

! Drawing option of selected object Definition at line 60 of file TCanvas.h.

u fSelectedPad TPad * TCanvas::fSelectedPad

protected

! Pad containing currently selected object Definition at line 61 of file TCanvas.h.

u fSelectedX Int_t TCanvas::fSelectedX

protected

! X of selected object Definition at line 58 of file TCanvas.h.

u fSelectedY Int_t TCanvas::fSelectedY

protected

! Y of selected object Definition at line 59 of file TCanvas.h.

u fUpdating Bool_t TCanvas::fUpdating

protected

! True when Updating the canvas Definition at line 67 of file TCanvas.h.

u fUseGL Bool_t TCanvas::fUseGL

protected

! True when rendering is with GL Definition at line 69 of file TCanvas.h.

u fWindowHeight UInt_t TCanvas::fWindowHeight

protected

Height of window (including menubar, borders, etc.) Definition at line 49 of file TCanvas.h.

u fWindowTopX Int_t TCanvas::fWindowTopX

protected

Top X position of window (in pixels) Definition at line 46 of file TCanvas.h.

u fWindowTopY Int_t TCanvas::fWindowTopY

protected

Top Y position of window (in pixels) Definition at line 47 of file TCanvas.h.

u fWindowWidth UInt_t TCanvas::fWindowWidth

protected

Width of window (including borders, etc.) Definition at line 48 of file TCanvas.h.

u fXsizeReal Size_t TCanvas::fXsizeReal

protected

Current size of canvas along X in CM. Definition at line 42 of file TCanvas.h.

u fXsizeUser Size_t TCanvas::fXsizeUser

protected

User specified size of canvas along X in CM. Definition at line 40 of file TCanvas.h.

u fYsizeReal Size_t TCanvas::fYsizeReal

protected

Current size of canvas along Y in CM. Definition at line 43 of file TCanvas.h.

u fYsizeUser Size_t TCanvas::fYsizeUser

protected

User specified size of canvas along Y in CM. Definition at line 41 of file TCanvas.h. Libraries for TCanvas: libGraf

libHist

libMathCore

libCore libGpad libRIO

libMatrix

libImt

libThread [legend]

The documentation for this class was generated from the following files: graf2d/gpad/inc/TCanvas.h graf2d/gpad/src/TCanvas.cxx Loading [MathJax]/extensions/tex2jax.js ROOT 6.13/01 - Reference Guide Generated on Tue Mar 13 2018 03:18:33 (GVA Time) using Doxygen 1.8.13.

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.