Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCanvasImp.cxx
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Fons Rademakers 16/11/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TCanvasImp
13\ingroup Base
14
15ABC describing GUI independent main window (with menubar, scrollbars
16and a drawing area).
17*/
18
19#include "TCanvasImp.h"
20#include "TVirtualX.h"
21#include "TSystem.h"
22
23
24////////////////////////////////////////////////////////////////////////////////
25/// Change mouse pointer, redirect to gVirtualX
26
28{
29 if(gVirtualX)
30 gVirtualX->Warp(ix, iy);
31}
32
33////////////////////////////////////////////////////////////////////////////////
34/// Request current mouse pointer, redirect to gVirtualX
35
37{
38 return gVirtualX ? gVirtualX->RequestLocator(1, 1, x, y) : -1;
39}
40
41////////////////////////////////////////////////////////////////////////////////
42/// Gets the size and position of the canvas paint area.
43
45{
46 Int_t x, y;
47 gVirtualX->GetGeometry(wid, x, y, w, h);
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Resize canvas window, redirect to gVirtualX
52
54{
55 if (gVirtualX)
56 gVirtualX->ResizeWindow(wid); //resize canvas and off-screen buffer
57}
58
59////////////////////////////////////////////////////////////////////////////////
60/// Update gVirtualX display, also optionally sleep to wait until operation finished
61
63{
64 if (gVirtualX)
65 gVirtualX->Update(mode);
66 if (sleep)
67 gSystem->Sleep(30);
68}
#define h(i)
Definition RSha256.hxx:106
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char mode
R__EXTERN C unsigned int sleep(unsigned int seconds)
R__EXTERN TSystem * gSystem
Definition TSystem.h:582
#define gVirtualX
Definition TVirtualX.h:365
virtual Int_t RequestLocator(Int_t &x, Int_t &y)
Request current mouse pointer, redirect to gVirtualX.
virtual void UpdateDisplay(Int_t mode=0, Bool_t sleep=kFALSE)
Update gVirtualX display, also optionally sleep to wait until operation finished.
virtual void Warp(Int_t ix, Int_t iy)
Change mouse pointer, redirect to gVirtualX.
virtual void GetCanvasGeometry(Int_t wid, UInt_t &w, UInt_t &h)
Gets the size and position of the canvas paint area.
virtual void ResizeCanvasWindow(Int_t wid)
Resize canvas window, redirect to gVirtualX.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition TSystem.cxx:435
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17