#ifndef ROOT_TRootCanvas
#define ROOT_TRootCanvas
#ifndef ROOT_TCanvasImp
#include "TCanvasImp.h"
#endif
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TGCanvas;
class TGMenuBar;
class TGPopupMenu;
class TGLayoutHints;
class TGStatusBar;
class TRootContainer;
class TGToolBar;
class TGHorizontal3DLine;
class TGVertical3DLine;
class TVirtualPadEditor;
class TGDockableFrame;
class TGDNDManager;
class TRootCanvas : public TGMainFrame, public TCanvasImp {
friend class TRootContainer;
private:
TGCanvas *fCanvasWindow;
TRootContainer *fCanvasContainer;
TGMenuBar *fMenuBar;
TGPopupMenu *fFileMenu;
TGPopupMenu *fFileSaveMenu;
TGPopupMenu *fEditMenu;
TGPopupMenu *fEditClearMenu;
TGPopupMenu *fViewMenu;
TGPopupMenu *fViewWithMenu;
TGPopupMenu *fOptionMenu;
TGPopupMenu *fToolsMenu;
TGPopupMenu *fHelpMenu;
TGLayoutHints *fMenuBarLayout;
TGLayoutHints *fMenuBarItemLayout;
TGLayoutHints *fMenuBarHelpLayout;
TGLayoutHints *fCanvasLayout;
TGStatusBar *fStatusBar;
TGLayoutHints *fStatusBarLayout;
TGCompositeFrame *fEditorFrame;
TGLayoutHints *fEditorLayout;
TGCompositeFrame *fMainFrame;
TGLayoutHints *fToolBarLayout;
TGToolBar *fToolBar;
TGHorizontal3DLine *fToolBarSep;
TGLayoutHints *fMainFrameLayout;
TGVertical3DLine *fVertical1;
TGVertical3DLine *fVertical2;
TGHorizontal3DLine *fHorizontal1;
TGLayoutHints *fVertical1Layout;
TGLayoutHints *fVertical2Layout;
TGLayoutHints *fHorizontal1Layout;
TGDockableFrame *fToolDock;
TGLayoutHints *fDockLayout;
const TGPicture *fIconPic;
TVirtualPadEditor *fEditor;
Int_t fCanvasID;
Bool_t fAutoFit;
Int_t fButton;
TRootCanvas(const TRootCanvas&);
TRootCanvas& operator=(const TRootCanvas&);
void CreateCanvas(const char *name);
void CreateEditor();
Bool_t HandleContainerButton(Event_t *ev);
Bool_t HandleContainerDoubleClick(Event_t *ev);
Bool_t HandleContainerConfigure(Event_t *ev);
Bool_t HandleContainerKey(Event_t *ev);
Bool_t HandleContainerMotion(Event_t *ev);
Bool_t HandleContainerExpose(Event_t *ev);
Bool_t HandleContainerCrossing(Event_t *ev);
Bool_t HandleDNDDrop(TDNDData *data);
Atom_t HandleDNDPosition(Int_t x, Int_t y, Atom_t action,
Int_t xroot, Int_t yroot);
Atom_t HandleDNDEnter(Atom_t * typelist);
Bool_t HandleDNDLeave();
public:
TRootCanvas(TCanvas *c = 0, const char *name = "ROOT Canvas", UInt_t width = 500, UInt_t height = 300);
TRootCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height);
virtual ~TRootCanvas();
void AdjustSize();
void Close();
void ForceUpdate() { Layout(); }
void FitCanvas();
UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
UInt_t GetCwidth() const;
UInt_t GetCheight() const;
void Iconify() { IconifyWindow(); }
Int_t InitWindow();
void PrintCanvas();
void RaiseWindow();
void SetWindowPosition(Int_t x, Int_t y);
void SetWindowSize(UInt_t w, UInt_t h);
void SetWindowTitle(const char *newTitle);
void SetCanvasSize(UInt_t w, UInt_t h);
void SetStatusText(const char *txt = 0, Int_t partidx = 0);
void Show() { MapRaised(); }
void ShowMenuBar(Bool_t show = kTRUE);
void ShowStatusBar(Bool_t show = kTRUE);
void ShowEditor(Bool_t show = kTRUE);
void ShowToolBar(Bool_t show = kTRUE);
Bool_t HasEditor() const;
Bool_t HasMenuBar() const;
Bool_t HasStatusBar() const;
Bool_t HasToolBar() const;
TGMenuBar *GetMenuBar() const { return fMenuBar; }
TGLayoutHints *GetMenuBarItemLayout() const { return fMenuBarItemLayout; }
TGStatusBar *GetStatusBar() const { return fStatusBar; }
TGDockableFrame *GetToolDock() const { return fToolDock; }
void CloseWindow();
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
void ReallyDelete();
ClassDef(TRootCanvas,0)
};
#endif
Last change: Tue Dec 9 17:06:51 2008
Last generated: 2008-12-09 17:06
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.