#ifndef ROOT_TGView
#define ROOT_TGView
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TGWidget
#include "TGWidget.h"
#endif
#ifndef ROOT_TTimer
#include "TTimer.h"
#endif
class TGViewFrame;
class TGHScrollBar;
class TGVScrollBar;
class TViewTimer;
class TGView : public TGCompositeFrame, public TGWidget {
public:
enum { kNoHSB = BIT(0), kNoVSB = BIT(1) };
enum { kHorizontal = 0, kVertical = 1 };
protected:
TGLongPosition fMarkedStart;
TGLongPosition fMarkedEnd;
TGLongPosition fVisible;
TGLongPosition fMousePos;
TGLongPosition fScrollVal;
Bool_t fIsMarked;
Bool_t fIsMarking;
Bool_t fIsSaved;
Int_t fScrolling;
Atom_t fClipboard;
UInt_t fXMargin;
UInt_t fYMargin;
TGViewFrame *fCanvas;
TGHScrollBar *fHsb;
TGVScrollBar *fVsb;
TViewTimer *fScrollTimer;
TGGC fWhiteGC;
Bool_t fReadOnly;
private:
TGView(const TGView&);
TGView& operator=(const TGView&);
public:
TGView(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1, Int_t id = -1,
UInt_t xMargin = 0, UInt_t yMargin = 0,
UInt_t options = kSunkenFrame | kDoubleBorder,
UInt_t sboptions = 0,
Pixel_t back = GetWhitePixel());
virtual ~TGView();
TGViewFrame *GetCanvas() const { return fCanvas; }
virtual void Clear(Option_t * = "");
virtual void SetVisibleStart(Int_t newTop, Int_t direction);
virtual void ScrollCanvas(Int_t newTop, Int_t direction);
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
virtual void DrawBorder();
virtual void Layout();
virtual void SetLayoutManager(TGLayoutManager*) { }
virtual void HLayout();
virtual void VLayout();
virtual void SetSBRange(Int_t direction);
virtual void SetHsbPosition(Long_t newPos);
virtual void SetVsbPosition(Long_t newPos);
virtual void ShowBottom();
virtual void ShowTop();
virtual TGDimension GetDefaultSize() const { return TGDimension(fWidth, fHeight); }
virtual Long_t ToObjXCoord(Long_t xCoord, Long_t line);
virtual Long_t ToObjYCoord(Long_t yCoord) { return yCoord; }
virtual Long_t ToScrXCoord(Long_t xCoord, Long_t line);
virtual Long_t ToScrYCoord(Long_t yCoord) { return yCoord; }
virtual void Mark(Long_t xPos, Long_t yPos);
virtual void UnMark() { }
virtual void DrawRegion(Int_t x, Int_t y, UInt_t width, UInt_t height);
virtual Long_t ReturnLineLength(Long_t line);
virtual Long_t ReturnLineCount() { return 0; }
virtual Long_t ReturnHeighestColHeight() { return 0; }
virtual Long_t ReturnLongestLineWidth() { return 0; }
Bool_t IsMarked() const { return fIsMarked; }
Bool_t IsSaved() { return fIsSaved; }
virtual Bool_t HandleMotion(Event_t *event);
virtual Bool_t HandleButton(Event_t *event);
virtual Bool_t HandleExpose(Event_t *event);
virtual Bool_t HandleCrossing(Event_t *event);
virtual Bool_t HandleDoubleClick(Event_t *event);
virtual Bool_t HandleTimer(TTimer *t);
virtual void SetReadOnly(Bool_t on = kTRUE) { fReadOnly = on; }
virtual Bool_t IsReadOnly() const { return fReadOnly; }
virtual void ChangeBackground(Pixel_t);
const TGGC &GetWhiteGC() { return fWhiteGC; }
virtual void Marked(Bool_t mark) { Emit("Marked(Bool_t)", mark); }
ClassDef(TGView,0)
};
inline Long_t TGView::ToObjXCoord(Long_t xCoord, Long_t) { return xCoord; }
inline Long_t TGView::ToScrXCoord(Long_t xCoord, Long_t) { return xCoord; }
inline void TGView::Mark(Long_t, Long_t) { }
inline void TGView::DrawRegion(Int_t, Int_t, UInt_t, UInt_t) { }
inline Long_t TGView::ReturnLineLength(Long_t) { return 0; }
class TGViewFrame : public TGCompositeFrame {
private:
TGView *fView;
TGViewFrame(const TGViewFrame&);
TGViewFrame& operator=(const TGViewFrame&);
public:
TGViewFrame(TGView *v, UInt_t w, UInt_t h, UInt_t options = 0,
Pixel_t back = GetWhitePixel());
Bool_t HandleSelectionRequest(Event_t *event)
{ return fView->HandleSelectionRequest(event); }
Bool_t HandleSelectionClear(Event_t *event)
{ return fView->HandleSelectionClear(event); }
Bool_t HandleSelection(Event_t *event)
{ return fView->HandleSelection(event); }
Bool_t HandleButton(Event_t *event)
{ return fView->HandleButton(event); }
Bool_t HandleExpose(Event_t *event)
{ return fView->HandleExpose(event); }
Bool_t HandleCrossing(Event_t *event)
{ return fView->HandleCrossing(event); }
Bool_t HandleMotion(Event_t *event)
{ return fView->HandleMotion(event); }
Bool_t HandleKey(Event_t *event)
{ return fView->HandleKey(event); }
Bool_t HandleDoubleClick(Event_t *event)
{ return fView->HandleDoubleClick(event); }
ClassDef(TGViewFrame,0)
};
class TViewTimer : public TTimer {
private:
TGView *fView;
TViewTimer(const TViewTimer&);
TViewTimer& operator=(const TViewTimer&);
public:
TViewTimer(TGView *t, Long_t ms) : TTimer(ms, kTRUE), fView(t) { }
Bool_t Notify();
};
#endif
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.