library: libGui #include "TGScrollBar.h" |
Inheritance Chart: | ||||||||||||||||||||||||||||||||
|
public:
virtual ~TGScrollBar() virtual void ChangeBackground(Pixel_t back) static TClass* Class() virtual void DrawBorder() static Pixmap_t GetBckgndPixmap() TGScrollBarElement* GetHead() const virtual Int_t GetPageSize() const virtual Int_t GetPosition() const virtual Int_t GetRange() const static Int_t GetScrollBarWidth() TGScrollBarElement* GetSlider() const TGScrollBarElement* GetTail() const void GrabPointer(Bool_t grab) virtual Bool_t HandleButton(Event_t* event) virtual Bool_t HandleMotion(Event_t* event) virtual Bool_t HandleTimer(TTimer* t) virtual TClass* IsA() const virtual void Layout() virtual void MapSubwindows() virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0) virtual void PageSizeChanged(Int_t range) virtual void PositionChanged(Int_t pos) virtual void RangeChanged(Int_t range) virtual void Resize(UInt_t w = 0, UInt_t h = 0) virtual void Resize(TGDimension size) virtual void SetPosition(Int_t pos) virtual void SetRange(Int_t range, Int_t page_size) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)
protected:
Int_t fX0 Int_t fY0 current slider position in pixels Int_t fXp Int_t fYp previous slider position in pixels Bool_t fDragging in dragging mode? Bool_t fGrabPointer grab pointer when dragging Int_t fRange logical upper range of scrollbar Int_t fPsize logical page size of scrollbar Int_t fPos logical current position Int_t fSliderSize logical slider size Int_t fSliderRange logical slider range TGScrollBarElement* fHead head button of scrollbar TGScrollBarElement* fTail tail button of scrollbar TGScrollBarElement* fSlider slider const TGPicture* fHeadPic picture in head (up or left arrow) const TGPicture* fTailPic picture in tail (down or right arrow) TTimer* fRepeat repeat rate timer (when mouse stays pressed) Window_t fSubw sub window in which mouse is pressed static Pixmap_t fgBckgndPixmap static Int_t fgScrollBarWidth
TGScrollBar and TGScrollBarElement The classes in this file implement scrollbars. Scrollbars can be either placed horizontal or vertical. A scrollbar contains three TGScrollBarElements: The "head", "tail" and "slider". The head and tail are fixed at either end and have the typical arrows in them. The TGHScrollBar will generate the following event messages: kC_HSCROLL, kSB_SLIDERPOS, position, 0 kC_HSCROLL, kSB_SLIDERTRACK, position, 0 The TGVScrollBar will generate the following event messages: kC_VSCROLL, kSB_SLIDERPOS, position, 0 kC_VSCROLL, kSB_SLIDERTRACK, position, 0
Handle repeat timer for horizontal or vertical scrollbar. Every time timer times out we move slider.