library: libGui
#include "TRootEmbeddedCanvas.h"


class description - source file - inheritance tree (.pdf)

class TRootEmbeddedCanvas : public TGCanvas

Inheritance Chart:

virtual Bool_t HandleContainerButton(Event_t* ev) virtual Bool_t HandleContainerConfigure(Event_t* ev) virtual Bool_t HandleContainerCrossing(Event_t* ev) virtual Bool_t HandleContainerDoubleClick(Event_t* ev) virtual Bool_t HandleContainerExpose(Event_t* ev) virtual Bool_t HandleContainerKey(Event_t* ev) virtual Bool_t HandleContainerMotion(Event_t* ev) public:
TRootEmbeddedCanvas(const char* name = "0", const TGWindow* p = 0, UInt_t w = 10, UInt_t h = 10, UInt_t options = kSunkenFrame|kDoubleBorder, Pixel_t back = GetDefaultFrameBackground()) TRootEmbeddedCanvas(const TRootEmbeddedCanvas&) virtual ~TRootEmbeddedCanvas() void AdoptCanvas(TCanvas* c) static TClass* Class() Bool_t GetAutoFit() const TCanvas* GetCanvas() const Int_t GetCanvasWindowId() const virtual TClass* IsA() const virtual void SavePrimitive(ofstream& out, Option_t* option) void SetAutoFit(Bool_t fit = kTRUE) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

Int_t fCWinId window id used by embedded TCanvas TRootEmbeddedContainer* fCanvasContainer container in canvas widget TCanvas* fCanvas pointer to TCanvas Bool_t fAutoFit canvas container keeps same size as canvas Int_t fButton currently pressed button

Class Description

 This class creates a TGCanvas in which a TCanvas is created. Use     
 GetCanvas() to get a pointer to the TCanvas.                         

TRootEmbeddedCanvas(const char *name, const TGWindow *p, UInt_t w, UInt_t h, UInt_t options, ULong_t back) : TGCanvas(p, w, h, options, back)
 Create an TCanvas embedded in a TGFrame. A pointer to the TCanvas can
 be obtained via the GetCanvas() member function. To embed a canvas
 derived from a TCanvas do the following:
 TRootEmbeddedCanvas *embedded = new TRootEmbeddedCanvas(0, p, w, h);
      [note name must be 0, not null string ""]
 Int_t wid = embedded->GetCanvasWindowId();
 TMyCanvas *myc = new TMyCanvas("myname", 10, 10, wid);
      [ the MyCanvas is adopted by the embedded canvas and will be
        destroyed by it ]

 Delete embedded ROOT canvas.

void AdoptCanvas(TCanvas *c)

Bool_t HandleContainerButton(Event_t *event)
 Handle mouse button events in the canvas container.

Bool_t HandleContainerDoubleClick(Event_t *event)
 Handle mouse button double click events in the canvas container.

Bool_t HandleContainerConfigure(Event_t *)
 Handle configure (i.e. resize) event.

Bool_t HandleContainerKey(Event_t *event)
 Handle keyboard events in the canvas container.

Bool_t HandleContainerMotion(Event_t *event)
 Handle mouse motion event in the canvas container.

Bool_t HandleContainerExpose(Event_t *event)
 Handle expose events.

Bool_t HandleContainerCrossing(Event_t *event)
 Handle enter/leave events. Only leave is activated at the moment.

void SavePrimitive(ofstream &out, Option_t *option)
 Save an embedded canvas as a C++ statement(s) on output stream out.

Inline Functions

                   TCanvas* GetCanvas() const
                      Int_t GetCanvasWindowId() const
                     Bool_t GetAutoFit() const
                       void SetAutoFit(Bool_t fit = kTRUE)
                    TClass* Class()
                    TClass* IsA() const
                       void ShowMembers(TMemberInspector& insp, char* parent)
                       void Streamer(TBuffer& b)
                       void StreamerNVirtual(TBuffer& b)
        TRootEmbeddedCanvas TRootEmbeddedCanvas(const TRootEmbeddedCanvas&)

Author: Fons Rademakers 15/07/98
Last update: root/gui:$Name: $:$Id: TRootEmbeddedCanvas.cxx,v 1.16 2005/08/10 14:00:34 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.