TRootCanvas


class description - source file - inheritance tree

class TRootCanvas : public TGMainFrame, public TCanvasImp

    private:
void CreateCanvas(const char* name) 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:
TRootCanvas TRootCanvas(TCanvas* c, const char* name, UInt_t width, UInt_t height) TRootCanvas TRootCanvas(TCanvas* c, const char* name, Int_t x, Int_t y, UInt_t width, UInt_t height) TRootCanvas TRootCanvas(const TRootCanvas&) virtual void ~TRootCanvas() static TClass* Class() virtual void Close() virtual void CloseWindow() void FitCanvas() virtual void ForceUpdate() UInt_t GetCheight() const UInt_t GetCwidth() const virtual void GetWindowGeometry(Int_t& x, Int_t& y, UInt_t& w, UInt_t& h) virtual void Iconify() virtual Int_t InitWindow() virtual TClass* IsA() const virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) virtual void ReallyDelete() virtual void SetCanvasSize(UInt_t w, UInt_t h) virtual void SetStatusText(const char* txt = "0", Int_t partidx = 0) virtual void SetWindowPosition(Int_t x, Int_t y) virtual void SetWindowSize(UInt_t w, UInt_t h) virtual void SetWindowTitle(const char* newTitle) virtual void Show() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void ShowMenuBar(Bool_t show = kTRUE) virtual void ShowStatusBar(Bool_t show = kTRUE) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TGCanvas* fCanvasWindow canvas widget TRootContainer* fCanvasContainer container in canvas widget TGMenuBar* fMenuBar menubar TGPopupMenu* fFileMenu file menu TGPopupMenu* fEditMenu edit menu TGPopupMenu* fViewMenu view menu TGPopupMenu* fOptionMenu option menu TGPopupMenu* fInspectMenu inspect menu TGPopupMenu* fClassesMenu classes menu TGPopupMenu* fHelpMenu help menu TGLayoutHints* fMenuBarLayout menubar layout hints TGLayoutHints* fMenuBarItemLayout layout hints for menu in menubar TGLayoutHints* fMenuBarHelpLayout layout hint for help menu in menubar TGLayoutHints* fCanvasLayout layout for canvas widget TGStatusBar* fStatusBar statusbar widget TGLayoutHints* fStatusBarLayout layout hints for statusbar Int_t fCanvasID index in fWindows array of TGX11 Bool_t fAutoFit when true canvas container keeps same size as canvas Int_t fButton currently pressed button

Class Description

                                                                      
 TRootCanvas                                                          
                                                                      
 This class creates a main window with menubar, scrollbars and a      
 drawing area. The widgets used are the new native ROOT GUI widgets.  
                                                                      


TRootCanvas(TCanvas *c, const char *name, UInt_t width, UInt_t height) : TGMainFrame(gClient->GetRoot(), width, height), TCanvasImp(c)
 Create a basic ROOT canvas.

TRootCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height) : TGMainFrame(gClient->GetRoot(), width, height), TCanvasImp(c)
 Create a basic ROOT canvas.

void CreateCanvas(const char *name)
 Create the actual canvas.

~TRootCanvas()
 Delete ROOT basic canvas. Order is significant. Delete in reverse
 order of creation.

void Close()
 Called via TCanvasImp interface by TCanvas.

void ReallyDelete()
 Really delete the canvas and the this GUI.

void CloseWindow()
 In case window is closed via WM we get here.

UInt_t GetCwidth() const
 Return width of canvas container.

UInt_t GetCheight() const
 Return height of canvas container.

void GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
 Gets the size and position of the window containing the canvas. This
 size includes the menubar and borders.

void SetStatusText(const char *txt, Int_t partidx)
 Set text in status bar.

Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
 Handle menu and other command generated by the user.

Int_t InitWindow()
 Called by TCanvas ctor to get window indetifier.

void SetCanvasSize(UInt_t w, UInt_t h)
 Set size of canvas container. Unix in pixels.

void SetWindowPosition(Int_t x, Int_t y)
 Set canvas position (units in pixels).

void SetWindowSize(UInt_t w, UInt_t h)
 Set size of canvas( units in pixels).

void SetWindowTitle(const char *title)
 Change title on window.

void FitCanvas()
 Fit canvas container to current window size.

void ShowMenuBar(Bool_t show)
 Show or hide menubar.

void ShowStatusBar(Bool_t show)
 Show or hide statusbar.

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


               void ForceUpdate()
               void Iconify()
               void Show()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
        TRootCanvas TRootCanvas(const TRootCanvas&)


Author: Fons Rademakers 15/01/98
Last update: root/gui:$Name: $:$Id: TRootCanvas.cxx,v 1.14 2002/09/18 13:12:59 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.