TGCanvas


class description - source file - inheritance tree

class TGCanvas : public TGFrame


    public:
TGCanvas TGCanvas(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kSunkenFrame|kDoubleBorder, ULong_t back = fgDefaultFrameBackground) TGCanvas TGCanvas(TGCanvas&) virtual void ~TGCanvas() virtual void AddFrame(TGFrame* f, TGLayoutHints* l = 0) static TClass* Class() virtual void DrawBorder() TGFrame* GetContainer() const virtual TGDimension GetDefaultSize() const TGViewPort* GetViewPort() const virtual TClass* IsA() const virtual void Layout() virtual void MapSubwindows() virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) virtual void SetContainer(TGFrame* f) virtual void SetHsbPosition(Int_t newPos) virtual void SetVsbPosition(Int_t newPos) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
TGViewPort* fVport viewport through which we look at contents TGHScrollBar* fHScrollbar horizontal scrollbar TGVScrollBar* fVScrollbar vertical scrollbar


See also

TGListView, TRootEmbeddedCanvas

Class Description

                                                                      
 TGCanvas and TGViewPort                                              
                                                                      
 A TGCanvas is a frame containing two scrollbars (a horizontal and    
 a vertical) and a viewport. The viewport acts as the window through  
 which we look at the contents of the container frame.                
                                                                      


TGCanvas(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options, ULong_t back) : TGFrame(p, w, h, options, back)
 Create a canvas object.

~TGCanvas()
 Delete canvas.

void MapSubwindows()
 Map all canvas sub windows.

void AddFrame(TGFrame *f, TGLayoutHints *l)
 Adding a frame to a canvas is actually adding the frame to the
 viewport container. The viewport container must be at least a
 TGCompositeFrame for this method to succeed.

void DrawBorder()
 Draw canvas border.

void Layout()
 Create layout for canvas. Depending on the size of the container
 we need to add the scrollbars.

Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
 Handle message generated by the canvas scrollbars.

void SetHsbPosition(Int_t newPos)
 Set position of horizontal scrollbar.

void SetVsbPosition(Int_t newPos)
 Set position of vertical scrollbar.



Inline Functions


           TGFrame* GetContainer() const
        TGViewPort* GetViewPort() const
               void SetContainer(TGFrame* f)
        TGDimension GetDefaultSize() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
           TGCanvas TGCanvas(TGCanvas&)


Author: Fons Rademakers 11/01/98
Last update: root/gui:$Name: $:$Id: TGCanvas.cxx,v 1.2 2000/09/11 09:50:20 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.