library: libGui #include "TGCanvas.h" |
TGContainer
class description - header file - source file - inheritance tree (.pdf)
protected:
TGContainer(const TGContainer&)
virtual void ActivateItem(TGFrameElement* el)
virtual void ClearViewPort()
virtual void DoRedraw()
static const TGGC& GetLineGC()
virtual void OnAutoScroll()
TGContainer& operator=(const TGContainer&)
virtual void RepeatSearch()
virtual void SearchPattern()
public:
TGContainer(const TGWindow* p = 0, UInt_t w = 1, UInt_t h = 1, UInt_t options = kSunkenFrame, Pixel_t back = GetDefaultFrameBackground())
TGContainer(TGCanvas* p, UInt_t options = kSunkenFrame, Pixel_t back = GetDefaultFrameBackground())
virtual ~TGContainer()
virtual void AdjustPosition()
virtual void Associate(const TGWindow* w)
static TClass* Class()
virtual void Clicked(TGFrame* f, Int_t btn)
virtual void Clicked(TGFrame* f, Int_t btn, Int_t x, Int_t y)
virtual void CurrentChanged(Int_t x, Int_t y)
virtual void CurrentChanged(TGFrame* f)
virtual void DoubleClicked(TGFrame* f, Int_t btn)
virtual void DoubleClicked(TGFrame* f, Int_t btn, Int_t x, Int_t y)
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void End(Bool_t select = kFALSE)
virtual TGFrameElement* FindFrame(Int_t x, Int_t y, Bool_t exclude = kTRUE)
virtual TGFrame* FindFrameByName(const char* name)
virtual void* FindItem(const TString& name, Bool_t direction = kTRUE, Bool_t caseSensitive = kTRUE, Bool_t beginWith = kFALSE)
TGCanvas* GetCanvas() const
virtual TGHScrollBar* GetHScrollbar() const
virtual TGFrame* GetLastActive() const
const TGWindow* GetMessageWindow() const
virtual const TGFrame* GetNextSelected(void** current)
TGDimension GetPageDimension() const
TGPosition GetPagePosition() const
virtual TGVScrollBar* GetVScrollbar() const
virtual Bool_t HandleButton(Event_t* event)
virtual Bool_t HandleDoubleClick(Event_t* event)
virtual Bool_t HandleExpose(Event_t* event)
virtual Bool_t HandleKey(Event_t* event)
virtual Bool_t HandleMotion(Event_t* event)
virtual void Home(Bool_t select = kFALSE)
virtual void InvertSelection()
virtual TClass* IsA() const
virtual void KeyPressed(TGFrame*, UInt_t keysym, UInt_t mask)
virtual void Layout()
virtual void LineDown(Bool_t select = kFALSE)
virtual void LineLeft(Bool_t select = kFALSE)
virtual void LineRight(Bool_t select = kFALSE)
virtual void LineUp(Bool_t select = kFALSE)
virtual Int_t NumItems() const
virtual Int_t NumSelected() const
virtual void OnMouseOver(TGFrame*)
virtual void PageDown(Bool_t select = kFALSE)
virtual void PageUp(Bool_t select = kFALSE)
virtual void RemoveAll()
virtual void RemoveItem(TGFrame* item)
virtual void ReturnPressed(TGFrame*)
virtual void SavePrimitive(ostream& out, Option_t* option = "")
virtual void Search(Bool_t close = kTRUE)
virtual void SelectAll()
virtual void SetHsbPosition(Int_t newPos)
virtual void SetPageDimension(const TGDimension& dim)
virtual void SetPageDimension(UInt_t w, UInt_t h)
virtual void SetPagePosition(const TGPosition& pos)
virtual void SetPagePosition(Int_t x, Int_t y)
virtual void SetVsbPosition(Int_t newPos)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void SpacePressed(TGFrame*)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual void UnSelectAll()
protected:
TGViewPort* fViewPort container viewport
TGCanvas* fCanvas pointer to canvas
const TGWindow* fMsgWindow window handling container messages
TGFrameElement* fLastActiveEl last active item
Int_t fXp
Int_t fYp previous pointer position
Int_t fX0
Int_t fY0 corner of rubber band box
Int_t fXf
Int_t fYf other corner of rubber band box
Bool_t fDragging true if in dragging mode
Int_t fTotal total items
Int_t fSelected number of selected items
TTimer* fScrollTimer autoscroll timer
Bool_t fOnMouseOver kTRUE when mouse pointer is over entry
Bool_t fLastDir direction of last search
Bool_t fLastCase case sensetivity of last search
TString fLastName the name of object of last search
TTimer* fKeyTimer keyboard timer
TString fKeyInput keyboard input (buffer)
Bool_t fKeyTimerActive kTRUE - keyboard timer is active
Bool_t fScrolling kTRUE - when scrolling is ON
static TGGC* fgLineGC
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.
void ReturnPressed(TGFrame* f)
Signal emitted when Return/Enter key pressed.
It's equivalent to "double click" of mouse button.
void SpacePressed(TGFrame* f)
Signal emitted when space key pressed.
Pressing space key inverts selection.
void UnSelectAll()
Unselect all items in the container.
void InvertSelection()
Invert the selection, all selected items become unselected and
vice versa.
void RemoveAll()
Remove all items from the container.
void DoRedraw()
Redraw content of container in the viewport region.
void Search(Bool_t close)
Invokes search dialog. Looks for item with the entered name.
void OnAutoScroll()
Autoscroll while close to & beyond The Wall
void LineUp(Bool_t select)
Make current position first line in window by scrolling up.
void End(Bool_t select)
Move to the bottom-right corner of container.
Author: Fons Rademakers 11/01/98
Last update: root/gui:$Name: $:$Id: TGCanvas.cxx,v 1.47 2006/07/09 05:27:54 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - 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.