Logo ROOT   6.12/07
Reference Guide
TVirtualX.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 3/12/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 #ifndef ROOT_TVirtualX
13 #define ROOT_TVirtualX
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TVirtualX //
19 // //
20 // Semi-Abstract base class defining a generic interface to the //
21 // underlying, low level, graphics system (X11, Win32, MacOS). //
22 // An instance of TVirtualX itself defines a batch interface to the //
23 // graphics system. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #include <utility>
28 #include <vector>
29 
30 #include "TNamed.h"
31 #include "TAttLine.h"
32 #include "TAttFill.h"
33 #include "TAttText.h"
34 #include "TAttMarker.h"
35 #include "GuiTypes.h"
36 
37 
38 // WM Atoms are initialized in TGClient
42 
43 const int kNumCursors = 19;
48 
49 class TPoint;
50 class TString;
51 class TGWin32Command;
52 #ifdef __cplusplus
53  class GLUtesselator;
54 #else
55  extern "C" { struct GLUtesselator; }
56 #endif
57 
58 class TVirtualX : public TNamed, public TAttLine, public TAttFill, public TAttText, public TAttMarker {
59 
60 public:
61  enum EDrawMode { kCopy = 1, kXor, kInvert };
65 
66 protected:
67  EDrawMode fDrawMode; //Drawing mode
68 
69 public:
70  TVirtualX(): fDrawMode() { }
71  TVirtualX(const char *name, const char *title);
72  virtual ~TVirtualX() { }
73 
74  virtual Bool_t Init(void *display=0);
75  virtual void ClearWindow();
76  virtual void ClosePixmap();
77  virtual void CloseWindow();
78  virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos);
79  virtual void CreateOpenGLContext(Int_t wid=0);
80  virtual void DeleteOpenGLContext(Int_t wid=0);
81 
82  //---- OpenGL related stuff, required only with R__HAS_COCOA ----
84  virtual Window_t CreateOpenGLWindow(Window_t parentID, UInt_t width, UInt_t height, const std::vector<std::pair<UInt_t, Int_t> > &format);
85  virtual Handle_t CreateOpenGLContext(Window_t windowID, Handle_t sharedContext);
86  virtual Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID);
88  virtual void FlushOpenGLBuffer(Handle_t ctx);
89 
90  virtual void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode);
91  virtual void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2,
92  Int_t nx, Int_t ny, Int_t *ic);
93  virtual void DrawFillArea(Int_t n, TPoint *xy);
94  virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2);
95  virtual void DrawPolyLine(Int_t n, TPoint *xy);
96  virtual void DrawPolyMarker(Int_t n, TPoint *xy);
97  virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text,
98  ETextMode mode);
99  virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const wchar_t *text,
100  ETextMode mode);
101  virtual UInt_t ExecCommand(TGWin32Command *code);
102  virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy);
104  virtual Int_t GetDoubleBuffer(Int_t wid);
105  virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
106  virtual const char *DisplayName(const char * = 0);
107  virtual Handle_t GetNativeEvent() const;
108  virtual ULong_t GetPixel(Color_t cindex);
109  virtual void GetPlanes(Int_t &nplanes);
110  virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b);
111  virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess);
112  virtual void GetTextExtent(UInt_t &w, UInt_t &h, wchar_t *mess);
113  virtual Int_t GetFontAscent() const;
114  virtual Int_t GetFontAscent(const char *mess) const;
115  virtual Int_t GetFontDescent() const;
116  virtual Int_t GetFontDescent(const char *mess) const;
117  virtual Float_t GetTextMagnitude();
118  virtual Window_t GetWindowID(Int_t wid);
119  virtual Bool_t HasTTFonts() const;
120  virtual Int_t InitWindow(ULong_t window);
121  virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h);
122  virtual Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h);
123  virtual void RemoveWindow(ULong_t qwid);
124  virtual void MoveWindow(Int_t wid, Int_t x, Int_t y);
125  virtual Int_t OpenPixmap(UInt_t w, UInt_t h);
126  virtual void QueryPointer(Int_t &ix, Int_t &iy);
127  virtual Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0);
128  virtual Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y);
129  virtual Int_t RequestString(Int_t x, Int_t y, char *text);
130  virtual void RescaleWindow(Int_t wid, UInt_t w, UInt_t h);
131  virtual Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h);
132  virtual void ResizeWindow(Int_t wid);
133  virtual void SelectWindow(Int_t wid);
134  virtual void SelectPixmap(Int_t qpixid);
135  virtual void SetCharacterUp(Float_t chupx, Float_t chupy);
136  virtual void SetClipOFF(Int_t wid);
137  virtual void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
138  virtual void SetCursor(Int_t win, ECursor cursor);
139  virtual void SetDoubleBuffer(Int_t wid, Int_t mode);
140  virtual void SetDoubleBufferOFF();
141  virtual void SetDoubleBufferON();
142  virtual void SetDrawMode(EDrawMode mode);
143  virtual void SetFillColor(Color_t cindex);
144  virtual void SetFillStyle(Style_t style);
145  virtual void SetLineColor(Color_t cindex);
146  virtual void SetLineType(Int_t n, Int_t *dash);
147  virtual void SetLineStyle(Style_t linestyle);
148  virtual void SetLineWidth(Width_t width);
149  virtual void SetMarkerColor(Color_t cindex);
150  virtual void SetMarkerSize(Float_t markersize);
151  virtual void SetMarkerStyle(Style_t markerstyle);
152  virtual void SetOpacity(Int_t percent);
153  virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b);
154  virtual void SetTextAlign(Short_t talign=11);
155  virtual void SetTextColor(Color_t cindex);
156  virtual Int_t SetTextFont(char *fontname, ETextSetMode mode);
157  virtual void SetTextFont(Font_t fontnumber);
158  virtual void SetTextMagnitude(Float_t mgn);
159  virtual void SetTextSize(Float_t textsize);
160  virtual void Sync(Int_t mode);
161  virtual void UpdateWindow(Int_t mode);
162  virtual void Warp(Int_t ix, Int_t iy, Window_t id = 0);
163  virtual Int_t WriteGIF(char *name);
164  virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname);
165  virtual Window_t GetCurrentWindow() const;
166  virtual Int_t SupportsExtension(const char *ext) const;
167 
168  //---- Methods used for GUI -----
169  virtual void GetWindowAttributes(Window_t id, WindowAttributes_t &attr);
170  virtual void MapWindow(Window_t id);
171  virtual void MapSubwindows(Window_t id);
172  virtual void MapRaised(Window_t id);
173  virtual void UnmapWindow(Window_t id);
174  virtual void DestroyWindow(Window_t id);
175  virtual void DestroySubwindows(Window_t id);
176  virtual void RaiseWindow(Window_t id);
177  virtual void LowerWindow(Window_t id);
178  virtual void MoveWindow(Window_t id, Int_t x, Int_t y);
179  virtual void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
180  virtual void ResizeWindow(Window_t id, UInt_t w, UInt_t h);
181  virtual void IconifyWindow(Window_t id);
182  virtual Bool_t NeedRedraw(ULong_t tgwindow, Bool_t force);
183  virtual void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y);
184  virtual void SetWindowBackground(Window_t id, ULong_t color);
185  virtual void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm);
186  virtual Window_t CreateWindow(Window_t parent, Int_t x, Int_t y,
187  UInt_t w, UInt_t h, UInt_t border,
188  Int_t depth, UInt_t clss,
189  void *visual, SetWindowAttributes_t *attr,
190  UInt_t wtype);
191  virtual Int_t OpenDisplay(const char *dpyName);
192  virtual void CloseDisplay();
193  virtual Display_t GetDisplay() const;
194  virtual Visual_t GetVisual() const;
195  virtual Int_t GetScreen() const;
196  virtual Int_t GetDepth() const;
197  virtual UInt_t ScreenWidthMM() const;
198  virtual Colormap_t GetColormap() const;
199  virtual Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist);
200  virtual Window_t GetDefaultRootWindow() const;
201  virtual Window_t GetParent(Window_t id) const;
202  virtual FontStruct_t LoadQueryFont(const char *font_name);
203  virtual FontH_t GetFontHandle(FontStruct_t fs);
204  virtual void DeleteFont(FontStruct_t fs);
205  virtual GContext_t CreateGC(Drawable_t id, GCValues_t *gval);
206  virtual void ChangeGC(GContext_t gc, GCValues_t *gval);
207  virtual void CopyGC(GContext_t org, GContext_t dest, Mask_t mask);
208  virtual void DeleteGC(GContext_t gc);
209  virtual Cursor_t CreateCursor(ECursor cursor);
210  virtual void SetCursor(Window_t id, Cursor_t curid);
211  virtual Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h);
212  virtual Pixmap_t CreatePixmap(Drawable_t id, const char *bitmap, UInt_t width,
213  UInt_t height, ULong_t forecolor, ULong_t backcolor,
214  Int_t depth);
215  virtual Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap,
216  UInt_t width, UInt_t height);
217  virtual void DeletePixmap(Pixmap_t pmap);
218  virtual Bool_t CreatePictureFromFile(Drawable_t id, const char *filename,
219  Pixmap_t &pict, Pixmap_t &pict_mask,
220  PictureAttributes_t &attr);
221  virtual Bool_t CreatePictureFromData(Drawable_t id, char **data,
222  Pixmap_t &pict, Pixmap_t &pict_mask,
223  PictureAttributes_t &attr);
224  virtual Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height);
225  virtual Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data);
226  virtual void DeletePictureData(void *data);
227  virtual void SetDashes(GContext_t gc, Int_t offset, const char *dash_list,
228  Int_t n);
229  virtual Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color);
230  virtual Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color);
231  virtual void QueryColor(Colormap_t cmap, ColorStruct_t &color);
232  virtual void FreeColor(Colormap_t cmap, ULong_t pixel);
233  virtual Int_t EventsPending();
234  virtual void NextEvent(Event_t &event);
235  virtual void Bell(Int_t percent);
236  virtual void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc,
237  Int_t src_x, Int_t src_y, UInt_t width,
238  UInt_t height, Int_t dest_x, Int_t dest_y);
239  virtual void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr);
240  virtual void ChangeProperty(Window_t id, Atom_t property, Atom_t type,
241  UChar_t *data, Int_t len);
242  virtual void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2);
243  virtual void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
244  virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev);
245  virtual void SendEvent(Window_t id, Event_t *ev);
246  virtual void DispatchClientMessage(UInt_t messageID);
247  virtual void WMDeleteNotify(Window_t id);
248  virtual void SetKeyAutoRepeat(Bool_t on = kTRUE);
249  virtual void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE);
250  virtual void GrabButton(Window_t id, EMouseButton button, UInt_t modifier,
251  UInt_t evmask, Window_t confine, Cursor_t cursor,
252  Bool_t grab = kTRUE);
253  virtual void GrabPointer(Window_t id, UInt_t evmask, Window_t confine,
254  Cursor_t cursor, Bool_t grab = kTRUE,
255  Bool_t owner_events = kTRUE);
256  virtual void SetWindowName(Window_t id, char *name);
257  virtual void SetIconName(Window_t id, char *name);
258  virtual void SetIconPixmap(Window_t id, Pixmap_t pix);
259  virtual void SetClassHints(Window_t id, char *className, char *resourceName);
260  virtual void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input);
261  virtual void SetWMPosition(Window_t id, Int_t x, Int_t y);
262  virtual void SetWMSize(Window_t id, UInt_t w, UInt_t h);
263  virtual void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin,
264  UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc);
265  virtual void SetWMState(Window_t id, EInitialState state);
266  virtual void SetWMTransientHint(Window_t id, Window_t main_id);
267  virtual void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
268  const char *s, Int_t len);
269  virtual Int_t TextWidth(FontStruct_t font, const char *s, Int_t len);
270  virtual void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent);
271  virtual void GetGCValues(GContext_t gc, GCValues_t &gval);
272  virtual FontStruct_t GetGCFont(GContext_t gc);
273  virtual FontStruct_t GetFontStruct(FontH_t fh);
274  virtual void FreeFontStruct(FontStruct_t fs);
275  virtual void ClearWindow(Window_t id);
276  virtual Int_t KeysymToKeycode(UInt_t keysym);
277  virtual void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
278  UInt_t w, UInt_t h);
279  virtual void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
280  UInt_t w, UInt_t h);
281  virtual void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg);
282  virtual void SelectInput(Window_t id, UInt_t evmask);
283  virtual Window_t GetInputFocus();
284  virtual void SetInputFocus(Window_t id);
286  virtual void SetPrimarySelectionOwner(Window_t id);
287  virtual void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when);
288  virtual void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym);
289  virtual void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar,
290  Bool_t del);
291  virtual void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,Int_t src_y,
292  Int_t &dest_x, Int_t &dest_y, Window_t &child);
293  virtual void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
294  virtual void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt);
295  virtual void QueryPointer(Window_t id, Window_t &rootw, Window_t &childw,
296  Int_t &root_x, Int_t &root_y, Int_t &win_x,
297  Int_t &win_y, UInt_t &mask);
298  virtual void SetForeground(GContext_t gc, ULong_t foreground);
299  virtual void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n);
300  virtual void Update(Int_t mode = 0);
301  virtual Region_t CreateRegion();
302  virtual void DestroyRegion(Region_t reg);
303  virtual void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest);
304  virtual Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding);
305  virtual void UnionRegion(Region_t rega, Region_t regb, Region_t result);
306  virtual void IntersectRegion(Region_t rega, Region_t regb, Region_t result);
307  virtual void SubtractRegion(Region_t rega, Region_t regb, Region_t result);
308  virtual void XorRegion(Region_t rega, Region_t regb, Region_t result);
309  virtual Bool_t EmptyRegion(Region_t reg);
310  virtual Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg);
311  virtual Bool_t EqualRegion(Region_t rega, Region_t regb);
312  virtual void GetRegionBox(Region_t reg, Rectangle_t *rect);
313  virtual char **ListFonts(const char *fontname, Int_t max, Int_t &count);
314  virtual void FreeFontNames(char **fontlist);
315  virtual Drawable_t CreateImage(UInt_t width, UInt_t height);
316  virtual void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height);
317  virtual void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel);
318  virtual void PutImage(Drawable_t id, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy,
319  Int_t x, Int_t y, UInt_t w, UInt_t h);
320  virtual void DeleteImage(Drawable_t img);
321  virtual unsigned char *GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0);
322  virtual void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask);
323 
324  //---- Drag and Drop -----
325  virtual void DeleteProperty(Window_t, Atom_t&);
327  Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**);
329  virtual void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&);
331  virtual void ChangeProperties(Window_t id, Atom_t property, Atom_t type,
332  Int_t format, UChar_t *data, Int_t len);
333  virtual void SetDNDAware(Window_t, Atom_t *);
334  virtual void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist);
335  virtual Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd);
336  virtual Bool_t IsDNDAware(Window_t win, Atom_t *typelist);
337 
338  virtual void BeginModalSessionFor(Window_t window);
339 
340  virtual Bool_t IsCmdThread() const { return kTRUE; }
341 
342  virtual void MapGCFont(GContext_t, FontStruct_t);
343 
344  static TVirtualX *&Instance();
345 
346  ClassDef(TVirtualX,0) //ABC defining a generic interface to graphics system
347 };
348 
349 #ifndef __CINT__
350 #define gVirtualX (TVirtualX::Instance())
351 R__EXTERN TVirtualX *(*gPtr2VirtualX)();
352 #endif
354 
355 #endif
virtual void XorRegion(Region_t rega, Region_t regb, Region_t result)
Calculates the difference between the union and intersection of two regions.
Definition: TVirtualX.cxx:2210
virtual GContext_t CreateGC(Drawable_t id, GCValues_t *gval)
Creates a graphics context using the provided GCValues_t *gval structure.
Definition: TVirtualX.cxx:1326
virtual Bool_t HasTTFonts() const
Returns True when TrueType fonts are used.
Definition: TVirtualX.cxx:520
virtual Bool_t EmptyRegion(Region_t reg)
Returns kTRUE if the region reg is empty.
Definition: TVirtualX.cxx:2218
Handle_t FontStruct_t
Definition: GuiTypes.h:38
EDrawMode fDrawMode
Definition: TVirtualX.h:67
virtual void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h)
Sets clipping region for the window "wid".
Definition: TVirtualX.cxx:725
Semi-Abstract base class defining a generic interface to the underlying, low level, native graphics backend (X11, Win32, MacOS, OpenGL...).
Definition: TVirtualX.h:58
virtual void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when)
Causes a SelectionRequest event to be sent to the current primary selection owner.
Definition: TVirtualX.cxx:1992
virtual void SetDoubleBuffer(Int_t wid, Int_t mode)
Sets the double buffer on/off on the window "wid".
Definition: TVirtualX.cxx:747
virtual const char * DisplayName(const char *=0)
Returns hostname on which the display is opened.
Definition: TVirtualX.cxx:410
virtual Int_t RequestString(Int_t x, Int_t y, char *text)
Requests string: text is displayed and can be edited with Emacs-like keybinding.
Definition: TVirtualX.cxx:655
virtual Bool_t NeedRedraw(ULong_t tgwindow, Bool_t force)
Notify the low level GUI layer ROOT requires "tgwindow" to be updated.
Definition: TVirtualX.cxx:1126
virtual void SetDrawMode(EDrawMode mode)
Sets the drawing mode.
Definition: TVirtualX.cxx:774
virtual Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0)
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
Definition: TVirtualX.cxx:607
virtual Window_t GetPrimarySelectionOwner()
Returns the window id of the current owner of the primary selection.
Definition: TVirtualX.cxx:1969
EInitialState
Definition: GuiTypes.h:344
short Style_t
Definition: RtypesCore.h:76
virtual void MapRaised(Window_t id)
Maps the window "id" and all of its subwindows that have had map requests on the screen and put this ...
Definition: TVirtualX.cxx:1017
virtual void SetMarkerColor(Color_t cindex)
Sets color index "cindex" for markers.
Definition: TVirtualX.cxx:841
float Float_t
Definition: RtypesCore.h:53
virtual void MoveWindow(Int_t wid, Int_t x, Int_t y)
Moves the window "wid" to the specified x and y coordinates.
Definition: TVirtualX.cxx:583
UInt_t Mask_t
Definition: GuiTypes.h:40
virtual void SubtractRegion(Region_t rega, Region_t regb, Region_t result)
Subtracts regb from rega and stores the results in result.
Definition: TVirtualX.cxx:2197
virtual void PutImage(Drawable_t id, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy, Int_t x, Int_t y, UInt_t w, UInt_t h)
Combines an image with a rectangle of the specified drawable.
Definition: TVirtualX.cxx:2324
virtual void SetTextSize(Float_t textsize)
Sets the current text size to "textsize".
Definition: TVirtualX.cxx:932
virtual void DeleteProperty(Window_t, Atom_t &)
Deletes the specified property only if the property was defined on the specified window and causes th...
Definition: TVirtualX.cxx:2402
virtual Float_t GetTextMagnitude()
Returns the current font magnification factor.
Definition: TVirtualX.cxx:512
static TVirtualX *& Instance()
Returns gVirtualX global.
Definition: TVirtualX.cxx:57
virtual Region_t CreateRegion()
Creates a new empty region.
Definition: TVirtualX.cxx:2132
virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode)
Draws a text string using current font.
Definition: TVirtualX.cxx:345
virtual void ChangeProperties(Window_t id, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len)
Alters the property for the specified window and causes the X server to generate a PropertyNotify eve...
Definition: TVirtualX.cxx:2447
virtual void NextEvent(Event_t &event)
The "event" is set to default event.
Definition: TVirtualX.cxx:137
ULong_t Time_t
Definition: GuiTypes.h:41
virtual void DrawFillArea(Int_t n, TPoint *xy)
Fills area described by the polygon.
Definition: TVirtualX.cxx:300
TH1 * h
Definition: legend2.C:5
virtual Window_t GetDefaultRootWindow() const
Returns handle to the default root window created when calling XOpenDisplay().
Definition: TVirtualX.cxx:1267
virtual Bool_t IsDNDAware(Window_t win, Atom_t *typelist)
Checks if the Window is DND aware, and knows any of the DND formats passed in argument.
Definition: TVirtualX.cxx:2479
EGEventType
Definition: GuiTypes.h:58
Handle_t Cursor_t
Definition: GuiTypes.h:33
virtual Handle_t GetCurrentOpenGLContext()
Asks OpenGL subsystem about the current OpenGL context.
Definition: TVirtualX.cxx:252
virtual void RescaleWindow(Int_t wid, UInt_t w, UInt_t h)
Rescales the window "wid".
Definition: TVirtualX.cxx:668
virtual void IntersectRegion(Region_t rega, Region_t regb, Region_t result)
Computes the intersection of two regions.
Definition: TVirtualX.cxx:2189
virtual UInt_t ScreenWidthMM() const
Returns the width of the screen in millimeters.
Definition: TVirtualX.cxx:2392
virtual Int_t TextWidth(FontStruct_t font, const char *s, Int_t len)
Return length of the string "s" in pixels. Size depends on font.
Definition: TVirtualX.cxx:1816
virtual Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd)
Recursively search in the children of Window for a Window which is at location x, y and is DND aware...
Definition: TVirtualX.cxx:2470
virtual void SetFillColor(Color_t cindex)
Sets color index "cindex" for fill areas.
Definition: TVirtualX.cxx:781
virtual void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar, Bool_t del)
Gets contents of the paste buffer "atom" into the string "text".
Definition: TVirtualX.cxx:158
virtual void SetDoubleBufferON()
Turns double buffer mode on.
Definition: TVirtualX.cxx:761
virtual void ChangeGC(GContext_t gc, GCValues_t *gval)
Changes the components specified by the mask in gval for the specified GC.
Definition: TVirtualX.cxx:1339
Handle_t GContext_t
Definition: GuiTypes.h:37
virtual void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Changes the size and location of the specified window "id" without raising it.
Definition: TVirtualX.cxx:1087
virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy)
Returns character up vector.
Definition: TVirtualX.cxx:387
virtual void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr)
Changes the attributes of the specified window "id" according the values provided in "attr"...
Definition: TVirtualX.cxx:1554
R__EXTERN Atom_t gWM_DELETE_WINDOW
Definition: TVirtualX.h:39
virtual void SetClassHints(Window_t id, char *className, char *resourceName)
Sets the windows class and resource name.
Definition: TVirtualX.cxx:1727
Basic string class.
Definition: TString.h:125
virtual void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Paints a rectangular area in the specified window "id" according to the specified dimensions with the...
Definition: TVirtualX.cxx:1603
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void DeletePictureData(void *data)
Delete picture data created by the function ReadPictureDataFromFile.
Definition: TVirtualX.cxx:1473
virtual void SetLineColor(Color_t cindex)
Sets color index "cindex" for drawing lines.
Definition: TVirtualX.cxx:798
Handle_t Drawable_t
Definition: GuiTypes.h:30
virtual void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
Sets the background pixmap of the window "id" to the specified pixmap "pxm".
Definition: TVirtualX.cxx:1156
virtual void SelectInput(Window_t id, UInt_t evmask)
Defines which input events the window is interested in.
Definition: TVirtualX.cxx:1946
virtual void DeleteOpenGLContext(Int_t wid=0)
Deletes OpenGL context for window "wid".
Definition: TVirtualX.cxx:221
virtual Bool_t CreatePictureFromFile(Drawable_t id, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr)
Creates a picture pict from data in file "filename".
Definition: TVirtualX.cxx:1438
ECursor
Definition: TVirtualX.h:44
virtual void SetTextColor(Color_t cindex)
Sets the color index "cindex" for text.
Definition: TVirtualX.cxx:897
virtual Visual_t GetVisual() const
Returns handle to visual.
Definition: TVirtualX.cxx:1227
short Font_t
Definition: RtypesCore.h:75
virtual void SetWMSize(Window_t id, UInt_t w, UInt_t h)
Tells window manager the desired size of window "id".
Definition: TVirtualX.cxx:1754
virtual void SetDoubleBufferOFF()
Turns double buffer mode off.
Definition: TVirtualX.cxx:754
Handle_t Display_t
Definition: GuiTypes.h:26
virtual void SetFillStyle(Style_t style)
Sets fill area style.
Definition: TVirtualX.cxx:791
virtual FontH_t GetFontHandle(FontStruct_t fs)
Returns the font handle of the specified font structure "fs".
Definition: TVirtualX.cxx:1307
virtual Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y)
Requests Locator position.
Definition: TVirtualX.cxx:641
virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b)
Returns RGB values for color "index".
Definition: TVirtualX.cxx:442
virtual void SetForeground(GContext_t gc, ULong_t foreground)
Sets the foreground color for the specified GC (shortcut for ChangeGC with only foreground mask set)...
Definition: TVirtualX.cxx:2105
virtual Int_t OpenDisplay(const char *dpyName)
Opens connection to display server (if such a thing exist on the current platform).
Definition: TVirtualX.cxx:1199
Handle_t FontH_t
Definition: GuiTypes.h:34
virtual void WMDeleteNotify(Window_t id)
Tells WM to send message when window is closed via WM.
Definition: TVirtualX.cxx:1637
virtual void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest)
Updates the destination region from a union of the specified rectangle and the specified source regio...
Definition: TVirtualX.cxx:2152
virtual void LowerWindow(Window_t id)
Lowers the specified window "id" to the bottom of the stack so that it does not obscure any sibling w...
Definition: TVirtualX.cxx:1060
virtual void DeletePixmap(Pixmap_t pmap)
Explicitly deletes the pixmap resource "pmap".
Definition: TVirtualX.cxx:1428
virtual void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n)
Sets the dash-offset and dash-list attributes for dashed line styles in the specified GC...
Definition: TVirtualX.cxx:1493
Marker Attributes class.
Definition: TAttMarker.h:19
virtual void UnmapWindow(Window_t id)
Unmaps the specified window "id".
Definition: TVirtualX.cxx:1027
static const double x2[5]
Fill Area Attributes class.
Definition: TAttFill.h:19
Double_t x[n]
Definition: legend1.C:17
virtual void DispatchClientMessage(UInt_t messageID)
Force processing of event, sent by SendEvent before.
Definition: TVirtualX.cxx:1630
virtual Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height)
create pixmap from RGB data.
Definition: TVirtualX.cxx:2374
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual void GetPlanes(Int_t &nplanes)
Returns the maximum number of planes.
Definition: TVirtualX.cxx:434
virtual void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x, Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child)
Translates coordinates in one window to the coordinate space of another window.
Definition: TVirtualX.cxx:2029
virtual void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym)
Converts the keycode from the event structure to a key symbol (according to the modifiers specified i...
Definition: TVirtualX.cxx:2009
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual Bool_t SetSelectionOwner(Window_t, Atom_t &)
Changes the owner and last-change time for the specified selection.
Definition: TVirtualX.cxx:2438
EDrawMode GetDrawMode()
Definition: TVirtualX.h:103
virtual void MapSubwindows(Window_t id)
Maps all subwindows for the specified window "id" in top-to-bottom stacking order.
Definition: TVirtualX.cxx:1008
Handle_t Atom_t
Definition: GuiTypes.h:36
virtual void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE)
Establishes an active pointer grab.
Definition: TVirtualX.cxx:1696
virtual void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Returns the location and the size of window "id".
Definition: TVirtualX.cxx:2046
virtual void SetWindowBackground(Window_t id, ULong_t color)
Sets the background of the window "id" to the specified color value "color".
Definition: TVirtualX.cxx:1148
virtual Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height)
Creates a bitmap (i.e.
Definition: TVirtualX.cxx:1419
virtual Int_t OpenPixmap(UInt_t w, UInt_t h)
Creates a pixmap of the width "w" and height "h" you specified.
Definition: TVirtualX.cxx:590
virtual Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist)
Returns the atom identifier associated with the specified "atom_name" string.
Definition: TVirtualX.cxx:1280
virtual void MapWindow(Window_t id)
Maps the window "id" and all of its subwindows that have had map requests.
Definition: TVirtualX.cxx:1000
virtual void RemoveWindow(ULong_t qwid)
Removes the created by Qt window "qwid".
Definition: TVirtualX.cxx:570
short Color_t
Definition: RtypesCore.h:79
virtual UInt_t ExecCommand(TGWin32Command *code)
Executes the command "code" coming from the other threads (Win32)
Definition: TVirtualX.cxx:371
virtual void SendEvent(Window_t id, Event_t *ev)
Specifies the event "ev" is to be sent to the window "id".
Definition: TVirtualX.cxx:1623
virtual void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic)
Draws a cell array.
Definition: TVirtualX.cxx:288
virtual Window_t GetParent(Window_t id) const
Returns the parent of the window "id".
Definition: TVirtualX.cxx:1289
virtual void CloseWindow()
Deletes current window.
Definition: TVirtualX.cxx:184
virtual void QueryPointer(Int_t &ix, Int_t &iy)
Returns the pointer position.
Definition: TVirtualX.cxx:598
Definition: TPoint.h:31
virtual void DrawPolyMarker(Int_t n, TPoint *xy)
Draws "n" markers with the current attributes at position [x,y].
Definition: TVirtualX.cxx:330
virtual Window_t GetCurrentWindow() const
pointer to the current internal window used in canvas graphics
Definition: TVirtualX.cxx:2340
virtual void DrawPolyLine(Int_t n, TPoint *xy)
Draws a line through all points in the list.
Definition: TVirtualX.cxx:320
point * points
Definition: X3DBuffer.c:20
virtual Double_t GetOpenGLScalingFactor()
On a HiDPI resolution it can be > 1., this means glViewport should use scaled width and height...
Definition: TVirtualX.cxx:206
virtual Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data)
Reads picture data from file "filename" and store it in "ret_data".
Definition: TVirtualX.cxx:1464
virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Returns position and size of window "wid".
Definition: TVirtualX.cxx:400
virtual Window_t GetInputFocus()
Returns the window id of the window having the input focus.
Definition: TVirtualX.cxx:1953
virtual void SetLineType(Int_t n, Int_t *dash)
Sets the line type.
Definition: TVirtualX.cxx:812
virtual void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc, Int_t src_x, Int_t src_y, UInt_t width, UInt_t height, Int_t dest_x, Int_t dest_y)
Combines the specified rectangle of "src" with the specified rectangle of "dest" according to the "gc...
Definition: TVirtualX.cxx:1540
virtual void CopyGC(GContext_t org, GContext_t dest, Mask_t mask)
Copies the specified components from the source GC "org" to the destination GC "dest".
Definition: TVirtualX.cxx:1348
virtual unsigned char * GetColorBits(Drawable_t wid, Int_t x=0, Int_t y=0, UInt_t w=0, UInt_t h=0)
Returns an array of pixels created from a part of drawable (defined by x, y, w, h) in format: ...
Definition: TVirtualX.cxx:2358
R__EXTERN TVirtualX * gGXBatch
Definition: TVirtualX.h:353
EMouseButton
Definition: GuiTypes.h:213
virtual Int_t GetFontAscent() const
Returns the ascent of the current font (in pixels).
Definition: TVirtualX.cxx:476
ROOT::R::TRInterface & r
Definition: Object.C:4
virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h)
Registers a window created by Qt as a ROOT window.
Definition: TVirtualX.cxx:550
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
virtual void ResizeWindow(Int_t wid)
Resizes the window "wid" if necessary.
Definition: TVirtualX.cxx:686
virtual void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len)
Each character image, as defined by the font in the GC, is treated as an additional mask for a fill o...
Definition: TVirtualX.cxx:1808
Handle_t Visual_t
Definition: GuiTypes.h:27
virtual Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color)
Allocates a read-only colormap entry corresponding to the closest RGB value supported by the hardware...
Definition: TVirtualX.cxx:113
Text Attributes class.
Definition: TAttText.h:18
virtual Bool_t CreatePictureFromData(Drawable_t id, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr)
Creates a picture pict from data in bitmap format.
Definition: TVirtualX.cxx:1453
virtual void SetTextAlign(Short_t talign=11)
Sets the text alignment.
Definition: TVirtualX.cxx:890
virtual void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t)
Changes the specified dynamic parameters if the pointer is actively grabbed by the client and if the ...
Definition: TVirtualX.cxx:2423
virtual void SetTextMagnitude(Float_t mgn)
Sets the current text magnification factor to "mgn".
Definition: TVirtualX.cxx:925
virtual Handle_t GetNativeEvent() const
Returns the current native event handle.
Definition: TVirtualX.cxx:418
virtual void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input)
Sets decoration style.
Definition: TVirtualX.cxx:1735
virtual Int_t GetDepth() const
Returns depth of screen (number of bit planes).
Definition: TVirtualX.cxx:1247
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt)
Fills the region closed by the specified path.
Definition: TVirtualX.cxx:2069
virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess)
Returns the size of the specified character string "mess".
Definition: TVirtualX.cxx:454
virtual void UnionRegion(Region_t rega, Region_t regb, Region_t result)
Computes the union of two regions.
Definition: TVirtualX.cxx:2177
virtual void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Gives the window manager minimum and maximum size hints of the window "id".
Definition: TVirtualX.cxx:1768
short Short_t
Definition: RtypesCore.h:35
virtual void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE)
Establishes a passive grab on the keyboard.
Definition: TVirtualX.cxx:1673
virtual void DeleteImage(Drawable_t img)
Deallocates the memory associated with the image img.
Definition: TVirtualX.cxx:2333
virtual Window_t GetWindowID(Int_t wid)
Returns the X11 window identifier.
Definition: TVirtualX.cxx:530
virtual Int_t EventsPending()
Returns the number of events that have been received from the X server but have not been removed from...
Definition: TVirtualX.cxx:1509
virtual void GetGCValues(GContext_t gc, GCValues_t &gval)
Returns the components specified by the mask in "gval" for the specified GC "gc" (see also the GCValu...
Definition: TVirtualX.cxx:1836
virtual void SetWMPosition(Window_t id, Int_t x, Int_t y)
Tells the window manager the desired position [x,y] of window "id".
Definition: TVirtualX.cxx:1743
virtual FontStruct_t GetGCFont(GContext_t gc)
Return the font associated with the graphics context gc.
Definition: TVirtualX.cxx:1844
virtual void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draws rectangle outlines of [x,y] [x+w,y] [x+w,y+h] [x,y+h].
Definition: TVirtualX.cxx:1913
virtual Int_t WriteGIF(char *name)
Writes the current window into GIF file.
Definition: TVirtualX.cxx:977
virtual void CreateOpenGLContext(Int_t wid=0)
Creates OpenGL context for window "wid".
Definition: TVirtualX.cxx:214
virtual void SetLineStyle(Style_t linestyle)
Sets the line style.
Definition: TVirtualX.cxx:825
virtual void SetPrimarySelectionOwner(Window_t id)
Makes the window "id" the current owner of the primary selection.
Definition: TVirtualX.cxx:1978
virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b)
Sets color intensities the specified color index "cindex".
Definition: TVirtualX.cxx:878
virtual void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &)
Requests that the specified selection be converted to the specified target type.
Definition: TVirtualX.cxx:2431
virtual void ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t *data, Int_t len)
Alters the property for the specified window and causes the X server to generate a PropertyNotify eve...
Definition: TVirtualX.cxx:1572
virtual Bool_t EqualRegion(Region_t rega, Region_t regb)
Returns kTRUE if the two regions have the same offset, size, and shape.
Definition: TVirtualX.cxx:2234
virtual Int_t GetScreen() const
Returns screen number.
Definition: TVirtualX.cxx:1238
virtual void DeleteGC(GContext_t gc)
Deletes the specified GC "gc".
Definition: TVirtualX.cxx:1355
virtual void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE)
Establishes a passive grab on a certain mouse button.
Definition: TVirtualX.cxx:1684
virtual void RaiseWindow(Window_t id)
Raises the specified window to the top of the stack so that no sibling window obscures it...
Definition: TVirtualX.cxx:1052
Handle_t Colormap_t
Definition: GuiTypes.h:32
short Width_t
Definition: RtypesCore.h:78
virtual void SetOpacity(Int_t percent)
Sets opacity of the current window.
Definition: TVirtualX.cxx:868
virtual FontStruct_t LoadQueryFont(const char *font_name)
Provides the most common way for accessing a font: opens (loads) the specified font and returns a poi...
Definition: TVirtualX.cxx:1299
virtual FontStruct_t GetFontStruct(FontH_t fh)
Retrieves the associated font structure of the font specified font handle "fh".
Definition: TVirtualX.cxx:1855
virtual void GetRegionBox(Region_t reg, Rectangle_t *rect)
Returns smallest enclosing rectangle.
Definition: TVirtualX.cxx:2242
virtual void DestroyWindow(Window_t id)
Destroys the window "id" as well as all of its subwindows.
Definition: TVirtualX.cxx:1036
virtual void Update(Int_t mode=0)
Flushes (mode = 0, default) or synchronizes (mode = 1) X output buffer.
Definition: TVirtualX.cxx:2125
long Long_t
Definition: RtypesCore.h:50
virtual void FlushOpenGLBuffer(Handle_t ctx)
Flushes OpenGL buffer.
Definition: TVirtualX.cxx:260
virtual void SetWMState(Window_t id, EInitialState state)
Sets the initial state of the window "id": either kNormalState or kIconicState.
Definition: TVirtualX.cxx:1778
virtual void IconifyWindow(Window_t id)
Iconifies the window "id".
Definition: TVirtualX.cxx:1108
static const double x1[5]
virtual Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h)
Resizes the specified pixmap "wid".
Definition: TVirtualX.cxx:678
virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos)
Copies the pixmap "wid" at the position [xpos,ypos] in the current window.
Definition: TVirtualX.cxx:198
virtual Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color)
Looks up the string name of a color "cname" with respect to the screen associated with the specified ...
Definition: TVirtualX.cxx:90
double Double_t
Definition: RtypesCore.h:55
virtual void SetLineWidth(Width_t width)
Sets the line width.
Definition: TVirtualX.cxx:834
TText * text
virtual char ** ListFonts(const char *fontname, Int_t max, Int_t &count)
Returns list of font names matching fontname regexp, like "-*-times-*".
Definition: TVirtualX.cxx:2260
virtual void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel)
Overwrites the pixel in the image with the specified pixel value.
Definition: TVirtualX.cxx:2299
const int kNumCursors
Definition: TVirtualX.h:43
virtual void CloseDisplay()
Closes connection to display server and destroys all windows.
Definition: TVirtualX.cxx:1207
virtual void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
Fills the specified rectangle defined by [x,y] [x+w,y] [x+w,y+h] [x,y+h].
Definition: TVirtualX.cxx:1897
virtual Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg)
Returns kTRUE if the point [x, y] is contained in the region reg.
Definition: TVirtualX.cxx:2226
int type
Definition: TGX11.cxx:120
virtual void Sync(Int_t mode)
Set synchronisation on or off.
Definition: TVirtualX.cxx:943
unsigned long ULong_t
Definition: RtypesCore.h:51
virtual void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask)
The Non-rectangular Window Shape Extension adds non-rectangular windows to the System.
Definition: TVirtualX.cxx:2385
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
virtual void UpdateWindow(Int_t mode)
Updates or synchronises client and server once (not permanent).
Definition: TVirtualX.cxx:955
virtual Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding)
Returns a region for the polygon defined by the points array.
Definition: TVirtualX.cxx:2164
static constexpr double s
virtual void SetMarkerSize(Float_t markersize)
Sets marker size index.
Definition: TVirtualX.cxx:850
virtual void SetIconPixmap(Window_t id, Pixmap_t pix)
Sets the icon name pixmap.
Definition: TVirtualX.cxx:1720
virtual void SetDNDAware(Window_t, Atom_t *)
Add XdndAware property and the list of drag and drop types to the Window win.
Definition: TVirtualX.cxx:2455
virtual Window_t CreateOpenGLWindow(Window_t parentID, UInt_t width, UInt_t height, const std::vector< std::pair< UInt_t, Int_t > > &format)
Create window with special pixel format. Noop everywhere except Cocoa.
Definition: TVirtualX.cxx:228
virtual void FreeFontNames(char **fontlist)
Frees the specified the array of strings "fontlist".
Definition: TVirtualX.cxx:2268
virtual void Warp(Int_t ix, Int_t iy, Window_t id=0)
Sets the pointer position.
Definition: TVirtualX.cxx:969
#define org(otri, vertexptr)
Definition: triangle.c:1037
virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Draws a line.
Definition: TVirtualX.cxx:310
virtual void DeleteFont(FontStruct_t fs)
Explicitly deletes the font structure "fs" obtained via LoadQueryFont().
Definition: TVirtualX.cxx:1315
R__EXTERN Atom_t gMOTIF_WM_HINTS
Definition: TVirtualX.h:40
virtual Bool_t IsCmdThread() const
Definition: TVirtualX.h:340
#define R__EXTERN
Definition: DllImport.h:27
Handle_t Window_t
Definition: GuiTypes.h:28
virtual Int_t GetDoubleBuffer(Int_t wid)
Queries the double buffer value for the window "wid".
Definition: TVirtualX.cxx:379
virtual Colormap_t GetColormap() const
Returns handle to colormap.
Definition: TVirtualX.cxx:1258
virtual void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height)
Returns the width and height of the image id.
Definition: TVirtualX.cxx:2286
virtual void GetWindowAttributes(Window_t id, WindowAttributes_t &attr)
The WindowAttributes_t structure is set to default.
Definition: TVirtualX.cxx:67
virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname)
Writes the pixmap "wid" in the bitmap file "pxname".
Definition: TVirtualX.cxx:989
virtual void SetCharacterUp(Float_t chupx, Float_t chupy)
Sets character up vector.
Definition: TVirtualX.cxx:707
virtual Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h)
Creates a pixmap of the specified width and height and returns a pixmap ID that identifies it...
Definition: TVirtualX.cxx:1387
Definition: file.py:1
virtual void SetMarkerStyle(Style_t markerstyle)
Sets marker style.
Definition: TVirtualX.cxx:857
virtual Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID)
Makes context ctx current OpenGL context.
Definition: TVirtualX.cxx:244
#define dest(otri, vertexptr)
Definition: triangle.c:1040
virtual void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent)
Returns the font properties.
Definition: TVirtualX.cxx:1825
virtual void SetClipOFF(Int_t wid)
Turns off the clipping for the window "wid".
Definition: TVirtualX.cxx:714
virtual void SetCursor(Int_t win, ECursor cursor)
The cursor "cursor" will be used when the pointer is in the window "wid".
Definition: TVirtualX.cxx:734
Handle_t Region_t
Definition: GuiTypes.h:31
virtual void MapGCFont(GContext_t, FontStruct_t)
Map the XftFont with the Graphics Context using it.
Definition: TVirtualX.cxx:2504
virtual void SelectWindow(Int_t wid)
Selects the window "wid" to which subsequent output is directed.
Definition: TVirtualX.cxx:693
Handle_t Pixmap_t
Definition: GuiTypes.h:29
virtual Drawable_t CreateImage(UInt_t width, UInt_t height)
Allocates the memory needed for an drawable.
Definition: TVirtualX.cxx:2278
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
virtual void Bell(Int_t percent)
Sets the sound bell. Percent is loudness from -100% to 100%.
Definition: TVirtualX.cxx:1517
virtual Window_t CreateWindow(Window_t parent, Int_t x, Int_t y, UInt_t w, UInt_t h, UInt_t border, Int_t depth, UInt_t clss, void *visual, SetWindowAttributes_t *attr, UInt_t wtype)
Creates an unmapped subwindow for a specified parent window and returns the created window...
Definition: TVirtualX.cxx:1180
virtual void ClosePixmap()
Deletes current pixmap.
Definition: TVirtualX.cxx:191
virtual void SetWMTransientHint(Window_t id, Window_t main_id)
Tells window manager that the window "id" is a transient window of the window "main_id".
Definition: TVirtualX.cxx:1787
virtual void DestroyRegion(Region_t reg)
Destroys the region "reg".
Definition: TVirtualX.cxx:2140
virtual void BeginModalSessionFor(Window_t window)
Start a modal session for a dialog window.
Definition: TVirtualX.cxx:2487
unsigned char UChar_t
Definition: RtypesCore.h:34
virtual Int_t SupportsExtension(const char *ext) const
Returns 1 if window system server supports extension given by the argument, returns 0 in case extensi...
Definition: TVirtualX.cxx:2496
virtual void SelectPixmap(Int_t qpixid)
Selects the pixmap "qpixid".
Definition: TVirtualX.cxx:700
virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev)
Check if there is for window "id" an event of type "type".
Definition: TVirtualX.cxx:1613
virtual ULong_t GetPixel(Color_t cindex)
Returns pixel value associated to specified ROOT color number "cindex".
Definition: TVirtualX.cxx:426
virtual Bool_t Init(void *display=0)
Initializes the X system.
Definition: TVirtualX.cxx:169
virtual void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y)
If the specified window is mapped, ReparentWindow automatically performs an UnmapWindow request on it...
Definition: TVirtualX.cxx:1138
TVirtualX()
Definition: TVirtualX.h:70
virtual void FreeFontStruct(FontStruct_t fs)
Frees the font structure "fs".
Definition: TVirtualX.cxx:1864
virtual Int_t SetTextFont(char *fontname, ETextSetMode mode)
Sets text font to specified name "fontname".This function returns 0 if the specified font is found...
Definition: TVirtualX.cxx:910
virtual void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist)
Add the list of drag and drop types to the Window win.
Definition: TVirtualX.cxx:2462
virtual ~TVirtualX()
Definition: TVirtualX.h:72
virtual void SetKeyAutoRepeat(Bool_t on=kTRUE)
Turns key auto repeat on (kTRUE) or off (kFALSE).
Definition: TVirtualX.cxx:1644
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg)
Draws multiple line segments.
Definition: TVirtualX.cxx:1935
virtual void SetIconName(Window_t id, char *name)
Sets the window icon name.
Definition: TVirtualX.cxx:1713
virtual Int_t InitWindow(ULong_t window)
Creates a new window and return window number.
Definition: TVirtualX.cxx:539
virtual void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n)
Sets clipping rectangles in graphics context.
Definition: TVirtualX.cxx:2115
const Int_t n
Definition: legend1.C:16
virtual void QueryColor(Colormap_t cmap, ColorStruct_t &color)
Returns the current RGB value for the pixel in the "color" structure.
Definition: TVirtualX.cxx:128
virtual void SetWindowName(Window_t id, char *name)
Sets the window name.
Definition: TVirtualX.cxx:1706
Line Attributes class.
Definition: TAttLine.h:18
virtual Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t, Atom_t *, Int_t *, ULong_t *, ULong_t *, unsigned char **)
Returns the actual type of the property; the actual format of the property; the number of 8-bit...
Definition: TVirtualX.cxx:2412
virtual void FreeColor(Colormap_t cmap, ULong_t pixel)
Frees color cell with specified pixel value.
Definition: TVirtualX.cxx:1501
char name[80]
Definition: TGX11.cxx:109
virtual Int_t KeysymToKeycode(UInt_t keysym)
Converts the "keysym" to the appropriate keycode.
Definition: TVirtualX.cxx:1882
virtual void ClearWindow()
Clears the entire area of the current window.
Definition: TVirtualX.cxx:177
virtual void SetInputFocus(Window_t id)
Changes the input focus to specified window "id".
Definition: TVirtualX.cxx:1961
R__EXTERN Atom_t gROOT_MESSAGE
Definition: TVirtualX.h:41
virtual void DestroySubwindows(Window_t id)
The DestroySubwindows function destroys all inferior windows of the specified window, in bottom-to-top stacking order.
Definition: TVirtualX.cxx:1044
virtual Cursor_t CreateCursor(ECursor cursor)
Creates the specified cursor.
Definition: TVirtualX.cxx:1370
virtual Display_t GetDisplay() const
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
Definition: TVirtualX.cxx:1216
virtual void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode)
Draws a box between [x1,y1] and [x2,y2] according to the "mode".
Definition: TVirtualX.cxx:273
virtual Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h)
Registers a pixmap created by TGLManager as a ROOT pixmap.
Definition: TVirtualX.cxx:561
virtual Int_t GetFontDescent() const
Returns the descent of the current font (in pixels.
Definition: TVirtualX.cxx:495
ULong_t Handle_t
Definition: GuiTypes.h:25
static constexpr double g