#ifndef ROOT_TRootEmbeddedCanvas
#define ROOT_TRootEmbeddedCanvas
#ifndef ROOT_TGCanvas
#include "TGCanvas.h"
#endif
class TCanvas;
class TRootEmbeddedContainer;
class TDNDData;
class TRootEmbeddedCanvas : public TGCanvas {
friend class TRootEmbeddedContainer;
protected:
Int_t fCWinId;
TRootEmbeddedContainer *fCanvasContainer;
TCanvas *fCanvas;
Bool_t fAutoFit;
Int_t fButton;
Atom_t *fDNDTypeList;
virtual Bool_t HandleContainerButton(Event_t *ev);
virtual Bool_t HandleContainerDoubleClick(Event_t *ev);
virtual Bool_t HandleContainerConfigure(Event_t *ev);
virtual Bool_t HandleContainerKey(Event_t *ev);
virtual Bool_t HandleContainerMotion(Event_t *ev);
virtual Bool_t HandleContainerExpose(Event_t *ev);
virtual Bool_t HandleContainerCrossing(Event_t *ev);
private:
TRootEmbeddedCanvas(const TRootEmbeddedCanvas&);
TRootEmbeddedCanvas& operator=(const TRootEmbeddedCanvas&);
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());
virtual ~TRootEmbeddedCanvas();
void AdoptCanvas(TCanvas *c);
TCanvas *GetCanvas() const { return fCanvas; }
Int_t GetCanvasWindowId() const { return fCWinId; }
Bool_t GetAutoFit() const { return fAutoFit; }
void SetAutoFit(Bool_t fit = kTRUE) { fAutoFit = fit; }
virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual Bool_t HandleDNDDrop(TDNDData *data);
virtual Atom_t HandleDNDPosition(Int_t , Int_t , Atom_t action,
Int_t , Int_t );
virtual Atom_t HandleDNDEnter(Atom_t * typelist);
virtual Bool_t HandleDNDLeave();
ClassDef(TRootEmbeddedCanvas,0)
};
#endif