TRootEmbeddedCanvas


class description - source file - inheritance tree

class TRootEmbeddedCanvas : public TGCanvas

    private:
Bool_t HandleContainerButton(Event_t* ev) Bool_t HandleContainerConfigure(Event_t* ev) Bool_t HandleContainerCrossing(Event_t* ev) Bool_t HandleContainerDoubleClick(Event_t* ev) Bool_t HandleContainerExpose(Event_t* ev) Bool_t HandleContainerKey(Event_t* ev) Bool_t HandleContainerMotion(Event_t* ev) public:
TRootEmbeddedCanvas TRootEmbeddedCanvas(const char* name, const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kSunkenFrame|kDoubleBorder, ULong_t back = fgDefaultFrameBackground) TRootEmbeddedCanvas TRootEmbeddedCanvas(TRootEmbeddedCanvas&) virtual void ~TRootEmbeddedCanvas() void AdoptCanvas(TCanvas* c) static TClass* Class() TCanvas* GetCanvas() const Int_t GetCanvasWindowId() const virtual TClass* IsA() const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

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

Class Description

                                                                      
 TRootEmbeddedCanvas                                                  
                                                                      
 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);
 embedded->AdoptCanvas(myc);
      [ the MyCanvas is adopted by the embedded canvas and will be
        destroyed by it ]

~TRootEmbeddedCanvas()
 Delete embedded ROOT canvas.

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.



Inline Functions


                   TCanvas* GetCanvas() const
                       void AdoptCanvas(TCanvas* c)
                      Int_t GetCanvasWindowId() const
                    TClass* Class()
                    TClass* IsA() const
                       void ShowMembers(TMemberInspector& insp, char* parent)
                       void Streamer(TBuffer& b)
        TRootEmbeddedCanvas TRootEmbeddedCanvas(TRootEmbeddedCanvas&)


Author: Fons Rademakers 15/07/98
Last update: root/gui:$Name: $:$Id: TRootEmbeddedCanvas.cxx,v 1.2 2000/10/04 23:40:08 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - 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.