TGViewPort


class description - source file - inheritance tree

class TGViewPort : public TGCompositeFrame


    public:
TGViewPort(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kChildFrame, ULong_t back = GetDefaultFrameBackground()) TGViewPort(const TGViewPort&) ~TGViewPort() static TClass* Class() virtual void DrawBorder() TGFrame* GetContainer() const virtual TGDimension GetDefaultSize() const Int_t GetHPos() const Int_t GetVPos() const virtual Bool_t HandleConfigureNotify(Event_t* event) virtual TClass* IsA() const virtual void Layout() void SetContainer(TGFrame* f) virtual void SetHPos(Int_t xpos) void SetPos(Int_t xpos, Int_t ypos) virtual void SetVPos(Int_t ypos) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Int_t fX0 Int_t fY0 position of container frame in viewport TGFrame* fContainer container frame

Class Description

                                                                      
 TGCanvas and TGViewPort and TGContainer                              
                                                                      
 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.                
                                                                      
 A TGContainer frame manages a content area. It can display and       
 control a hierarchy of multi-column items, and provides the ability  
 to add new items at any time. By default it doesn't map subwindows   
 which are items of the container. In this case subwindow must        
 provide DrawCopy method, see for example TGLVEntry class.            
 It is also possible to use option which allow to map subwindows.     
 This option has much slower drawing speed in case of more than 1000  
 items placed in container. To activate this option the fMapSubwindows
 data member must be set to kTRUE (for example TTVLVContainer class)  
                                                                      
   The TGContainer class can handle the keys:                         
                                                                      
    o  F7, Ctnrl-F - activate search dialog                           
    o  F3, Ctnrl-G - continue search                                  
    o  End - go to the last item in container                         
    o  Home - go to the first item in container                       
    o  PageUp,PageDown,arrow keys - navigate inside container         
    o  Return/Enter - equivalent to double click of the mouse button  
    o  Contrl-A - select/activate all items.                          
    o  Space - invert selection.                                      
                                                                      


TGViewPort(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options, ULong_t back) : TGCompositeFrame(p, w, h, options, back)
 Create a viewport object.

void SetContainer(TGFrame *f)
 Add container frame to the viewport. We must make sure that the added
 container is at least a TGCompositeFrame (TGCanvas::AddFrame depends
 on it).

void SetHPos(Int_t xpos)
 Moves content of container frame in horizontal direction.

void SetVPos(Int_t ypos)
  moves content of container frame in vertical direction

void SetPos(Int_t xpos, Int_t ypos)
 goto new position

Bool_t HandleConfigureNotify(Event_t *event)
 handle resize events.



Inline Functions


           TGFrame* GetContainer() const
               void DrawBorder()
               void Layout()
        TGDimension GetDefaultSize() const
              Int_t GetHPos() const
              Int_t GetVPos() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
         TGViewPort TGViewPort(const TGViewPort&)
               void ~TGViewPort()


Author: Fons Rademakers 11/01/98
Last update: root/gui:$Name: $:$Id: TGCanvas.cxx,v 1.16 2003/05/12 16:44: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.