Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
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 "TNamed.h"
28#include "TAttLine.h"
29#include "TAttFill.h"
30#include "TAttText.h"
31#include "TAttMarker.h"
32#include "GuiTypes.h"
33
34#include <vector>
35#include <utility>
36
37// WM Atoms are initialized in TGClient
41
42class TPoint;
43class TString;
44class TGWin32Command;
45
46class TVirtualX : public TNamed, public TAttLine, public TAttFill, public TAttText, public TAttMarker {
47
48public:
49 enum EDrawMode { kCopy = 1, kXor, kInvert };
53
54protected:
55 EDrawMode fDrawMode; //Drawing mode
56
57public:
59 TVirtualX(const char *name, const char *title);
60 virtual ~TVirtualX() {}
61
62 virtual Bool_t Init(void *display = nullptr);
63 virtual void ClearWindow();
64 virtual void ClosePixmap();
65 virtual void CloseWindow();
66 virtual void CreateOpenGLContext(Int_t wid=0);
67 virtual void DeleteOpenGLContext(Int_t wid=0);
68
69
70 //---- Old, no longer used graphics interface -----
71
72 virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos);
73
74 void SetFillColor(Color_t cindex) override;
75 void SetFillStyle(Style_t style) override;
76 void SetLineColor(Color_t cindex) override;
77 virtual void SetLineType(Int_t n, Int_t *dash);
78 void SetLineStyle(Style_t linestyle) override;
79 void SetLineWidth(Width_t width) override;
80 void SetMarkerColor(Color_t cindex) override;
81 void SetMarkerSize(Float_t markersize) override;
82 void SetMarkerStyle(Style_t markerstyle) override;
83 virtual void SetOpacity(Int_t percent);
84 virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b);
85 void SetTextAlign(Short_t talign=11) override;
86 void SetTextColor(Color_t cindex) override;
87 virtual Int_t SetTextFont(char *fontname, ETextSetMode mode);
88 void SetTextFont(Font_t fontnumber) override;
89 virtual void SetTextMagnitude(Float_t mgn);
90 void SetTextSize(Float_t textsize) override;
91
92 virtual void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode);
93 virtual void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2,
94 Int_t nx, Int_t ny, Int_t *ic);
95 virtual void DrawFillArea(Int_t n, TPoint *xy);
96 virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2);
97 virtual void DrawPolyLine(Int_t n, TPoint *xy);
98 virtual void DrawLinesSegments(Int_t n, TPoint *xy);
99 virtual void DrawPolyMarker(Int_t n, TPoint *xy);
100 virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text,
101 ETextMode mode);
102 virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const wchar_t *text,
103 ETextMode mode);
104
105 virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess);
106 virtual void GetTextExtent(UInt_t &w, UInt_t &h, wchar_t *mess);
107 virtual Int_t GetFontAscent() const;
108 virtual Int_t GetFontAscent(const char *mess) const;
109 virtual Int_t GetFontDescent() const;
110 virtual Int_t GetFontDescent(const char *mess) const;
111
112
113 //---- New graphics interface -----
114
116 virtual void SetAttFill(WinContext_t wctxt, const TAttFill &att);
117 virtual void SetAttLine(WinContext_t wctxt, const TAttLine &att);
118 virtual void SetAttMarker(WinContext_t wctxt, const TAttMarker &att);
119 virtual void SetAttText(WinContext_t wctxt, const TAttText &att);
120 virtual void SetDrawModeW(WinContext_t wctxt, EDrawMode mode);
121 virtual EDrawMode GetDrawModeW(WinContext_t wctxt);
122 virtual void ClearWindowW(WinContext_t wctxt);
123 virtual void UpdateWindowW(WinContext_t wctxt, Int_t mode);
124 virtual void SetOpacityW(WinContext_t wctxt, Int_t percent);
125 virtual void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos);
126
127 virtual void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode);
128 virtual void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy);
129 virtual void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2);
130 virtual void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy);
131 virtual void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy);
132 virtual void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy);
133 virtual void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode);
134 virtual void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const wchar_t *text, ETextMode mode);
135 virtual Int_t WriteGIFW(WinContext_t wctxt, const char *name);
136
137 virtual Bool_t GetTextExtentA(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const char *mess);
138 virtual Bool_t GetTextExtentA(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const wchar_t *mess);
139 virtual Bool_t GetFontAscentDescent(Font_t font, Double_t size, UInt_t &a, UInt_t &d, const char *mess);
140
141
142 //---- OpenGL related stuff, required only with R__HAS_COCOA ----
144 virtual Window_t CreateOpenGLWindow(Window_t parentID, UInt_t width, UInt_t height, const std::vector<std::pair<UInt_t, Int_t> > &format);
145 virtual Handle_t CreateOpenGLContext(Window_t windowID, Handle_t sharedContext);
146 virtual Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID);
148 virtual void FlushOpenGLBuffer(Handle_t ctx);
149
150 virtual UInt_t ExecCommand(TGWin32Command *code);
151 virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy);
153 virtual Int_t GetDoubleBuffer(Int_t wid);
154 virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
155 virtual const char *DisplayName(const char * = nullptr);
156 virtual Handle_t GetNativeEvent() const;
157 virtual ULong_t GetPixel(Color_t cindex);
158 virtual void GetPlanes(Int_t &nplanes);
159 virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b);
160 virtual Float_t GetTextMagnitude();
161 virtual Window_t GetWindowID(Int_t wid);
162 virtual Bool_t HasTTFonts() const;
163 virtual Int_t InitWindow(ULongptr_t window);
164 virtual Int_t AddWindow(ULongptr_t qwid, UInt_t w, UInt_t h);
165 virtual Int_t AddPixmap(ULongptr_t pixid, UInt_t w, UInt_t h);
166 virtual void RemoveWindow(ULongptr_t qwid);
167 virtual void MoveWindow(Int_t wid, Int_t x, Int_t y);
168 virtual Int_t OpenPixmap(UInt_t w, UInt_t h);
169 virtual void QueryPointer(Int_t &ix, Int_t &iy);
170 virtual Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0);
171 virtual Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y);
172 virtual Int_t RequestString(Int_t x, Int_t y, char *text);
173 virtual void RescaleWindow(Int_t wid, UInt_t w, UInt_t h);
174 virtual Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h);
175 virtual void ResizeWindow(Int_t wid);
176 virtual void SelectWindow(Int_t wid);
177 virtual void SelectPixmap(Int_t qpixid);
178 virtual void SetCharacterUp(Float_t chupx, Float_t chupy);
179 virtual void SetClipOFF(Int_t wid);
180 virtual void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
181 virtual void SetCursor(Int_t win, ECursor cursor);
182 virtual void SetDoubleBuffer(Int_t wid, Int_t mode);
183 virtual void SetDoubleBufferOFF();
184 virtual void SetDoubleBufferON();
185 virtual void SetDrawMode(EDrawMode mode);
186 virtual void Sync(Int_t mode);
187 virtual void UpdateWindow(Int_t mode);
188 virtual void Warp(Int_t ix, Int_t iy, Window_t id = 0);
189 virtual Int_t WriteGIF(char *name);
190 virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname);
191 virtual Window_t GetCurrentWindow() const;
192 virtual Int_t SupportsExtension(const char *ext) const;
193
194 //---- Methods used for GUI -----
195 virtual void GetWindowAttributes(Window_t id, WindowAttributes_t &attr);
196 virtual void MapWindow(Window_t id);
197 virtual void MapSubwindows(Window_t id);
198 virtual void MapRaised(Window_t id);
199 virtual void UnmapWindow(Window_t id);
200 virtual void DestroyWindow(Window_t id);
201 virtual void DestroySubwindows(Window_t id);
202 virtual void RaiseWindow(Window_t id);
203 virtual void LowerWindow(Window_t id);
204 virtual void MoveWindow(Window_t id, Int_t x, Int_t y);
205 virtual void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
206 virtual void ResizeWindow(Window_t id, UInt_t w, UInt_t h);
207 virtual void IconifyWindow(Window_t id);
208 virtual Bool_t NeedRedraw(ULongptr_t tgwindow, Bool_t force);
209 virtual void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y);
210 virtual void SetWindowBackground(Window_t id, ULong_t color);
211 virtual void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm);
212 virtual Window_t CreateWindow(Window_t parent, Int_t x, Int_t y,
213 UInt_t w, UInt_t h, UInt_t border,
214 Int_t depth, UInt_t clss,
215 void *visual, SetWindowAttributes_t *attr,
216 UInt_t wtype);
217 virtual Int_t OpenDisplay(const char *dpyName);
218 virtual void CloseDisplay();
219 virtual Display_t GetDisplay() const;
220 virtual Visual_t GetVisual() const;
221 virtual Int_t GetScreen() const;
222 virtual Int_t GetDepth() const;
223 virtual UInt_t ScreenWidthMM() const;
224 virtual Colormap_t GetColormap() const;
225 virtual Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist);
226 virtual Window_t GetDefaultRootWindow() const;
227 virtual Window_t GetParent(Window_t id) const;
228 virtual FontStruct_t LoadQueryFont(const char *font_name);
230 virtual void DeleteFont(FontStruct_t fs);
231 virtual GContext_t CreateGC(Drawable_t id, GCValues_t *gval);
232 virtual void ChangeGC(GContext_t gc, GCValues_t *gval);
233 virtual void CopyGC(GContext_t org, GContext_t dest, Mask_t mask);
234 virtual void DeleteGC(GContext_t gc);
235 virtual Cursor_t CreateCursor(ECursor cursor);
236 virtual void SetCursor(Window_t id, Cursor_t curid);
238 virtual Pixmap_t CreatePixmap(Drawable_t id, const char *bitmap, UInt_t width,
239 UInt_t height, ULong_t forecolor, ULong_t backcolor,
240 Int_t depth);
241 virtual Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap,
242 UInt_t width, UInt_t height);
243 virtual void DeletePixmap(Pixmap_t pmap);
244 virtual Bool_t CreatePictureFromFile(Drawable_t id, const char *filename,
245 Pixmap_t &pict, Pixmap_t &pict_mask,
246 PictureAttributes_t &attr);
247 virtual Bool_t CreatePictureFromData(Drawable_t id, char **data,
248 Pixmap_t &pict, Pixmap_t &pict_mask,
249 PictureAttributes_t &attr);
250 virtual Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height);
251 virtual Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data);
252 virtual void DeletePictureData(void *data);
253 virtual void SetDashes(GContext_t gc, Int_t offset, const char *dash_list,
254 Int_t n);
255 virtual Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color);
256 virtual Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color);
257 virtual void QueryColor(Colormap_t cmap, ColorStruct_t &color);
258 virtual void FreeColor(Colormap_t cmap, ULong_t pixel);
259 virtual Int_t EventsPending();
260 virtual void NextEvent(Event_t &event);
261 virtual void Bell(Int_t percent);
262 virtual void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc,
263 Int_t src_x, Int_t src_y, UInt_t width,
264 UInt_t height, Int_t dest_x, Int_t dest_y);
266 virtual void ChangeProperty(Window_t id, Atom_t property, Atom_t type,
267 UChar_t *data, Int_t len);
268 virtual void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2);
269 virtual void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
270 virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev);
271 virtual void SendEvent(Window_t id, Event_t *ev);
272 virtual void DispatchClientMessage(UInt_t messageID);
273 virtual void WMDeleteNotify(Window_t id);
274 virtual void SetKeyAutoRepeat(Bool_t on = kTRUE);
275 virtual void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE);
276 virtual void GrabButton(Window_t id, EMouseButton button, UInt_t modifier,
277 UInt_t evmask, Window_t confine, Cursor_t cursor,
278 Bool_t grab = kTRUE);
279 virtual void GrabPointer(Window_t id, UInt_t evmask, Window_t confine,
280 Cursor_t cursor, Bool_t grab = kTRUE,
281 Bool_t owner_events = kTRUE);
282 virtual void SetWindowName(Window_t id, char *name);
283 virtual void SetIconName(Window_t id, char *name);
284 virtual void SetIconPixmap(Window_t id, Pixmap_t pix);
285 virtual void SetClassHints(Window_t id, char *className, char *resourceName);
286 virtual void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input);
287 virtual void SetWMPosition(Window_t id, Int_t x, Int_t y);
288 virtual void SetWMSize(Window_t id, UInt_t w, UInt_t h);
289 virtual void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin,
290 UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc);
291 virtual void SetWMState(Window_t id, EInitialState state);
292 virtual void SetWMTransientHint(Window_t id, Window_t main_id);
293 virtual void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
294 const char *s, Int_t len);
295 virtual Int_t TextWidth(FontStruct_t font, const char *s, Int_t len);
296 virtual void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent);
297 virtual void GetGCValues(GContext_t gc, GCValues_t &gval);
300 virtual void FreeFontStruct(FontStruct_t fs);
301 virtual void ClearWindow(Window_t id);
302 virtual Int_t KeysymToKeycode(UInt_t keysym);
303 virtual void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
304 UInt_t w, UInt_t h);
305 virtual void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
306 UInt_t w, UInt_t h);
307 virtual void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg);
308 virtual void SelectInput(Window_t id, UInt_t evmask);
309 virtual Window_t GetInputFocus();
310 virtual void SetInputFocus(Window_t id);
312 virtual void SetPrimarySelectionOwner(Window_t id);
313 virtual void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when);
314 virtual void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym);
315 virtual void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar,
316 Bool_t del);
317 virtual void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,Int_t src_y,
318 Int_t &dest_x, Int_t &dest_y, Window_t &child);
319 virtual void GetWindowSize(Drawable_t id, Int_t &x, Int_t & overridey, UInt_t &w, UInt_t &h);
320 virtual void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt);
321 virtual void QueryPointer(Window_t id, Window_t &rootw, Window_t &childw,
322 Int_t &root_x, Int_t &root_y, Int_t &win_x,
323 Int_t &win_y, UInt_t &mask);
324 virtual void SetForeground(GContext_t gc, ULong_t foreground);
325 virtual void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n);
326 virtual void Update(Int_t mode = 0);
327 virtual Region_t CreateRegion();
328 virtual void DestroyRegion(Region_t reg);
329 virtual void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest);
330 virtual Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding);
331 virtual void UnionRegion(Region_t rega, Region_t regb, Region_t result);
332 virtual void IntersectRegion(Region_t rega, Region_t regb, Region_t result);
333 virtual void SubtractRegion(Region_t rega, Region_t regb, Region_t result);
334 virtual void XorRegion(Region_t rega, Region_t regb, Region_t result);
335 virtual Bool_t EmptyRegion(Region_t reg);
336 virtual Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg);
337 virtual Bool_t EqualRegion(Region_t rega, Region_t regb);
338 virtual void GetRegionBox(Region_t reg, Rectangle_t *rect);
339 virtual char **ListFonts(const char *fontname, Int_t max, Int_t &count);
340 virtual void FreeFontNames(char **fontlist);
341 virtual Drawable_t CreateImage(UInt_t width, UInt_t height);
342 virtual void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height);
343 virtual void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel);
344 virtual void PutImage(Drawable_t id, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy,
345 Int_t x, Int_t y, UInt_t w, UInt_t h);
346 virtual void DeleteImage(Drawable_t img);
347 virtual unsigned char *GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0);
348 virtual void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask);
349
350 //---- Drag and Drop -----
351 virtual void DeleteProperty(Window_t, Atom_t&);
353 Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**);
355 virtual void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&);
357 virtual void ChangeProperties(Window_t id, Atom_t property, Atom_t type,
358 Int_t format, UChar_t *data, Int_t len);
359 virtual void SetDNDAware(Window_t, Atom_t *);
360 virtual void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist);
361 virtual Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd);
362 virtual Bool_t IsDNDAware(Window_t win, Atom_t *typelist);
363
364 virtual void BeginModalSessionFor(Window_t window);
365
366 virtual Bool_t IsCmdThread() const { return kTRUE; }
367
368 virtual void MapGCFont(GContext_t, FontStruct_t);
369
370 static TVirtualX *&Instance();
371
372 ClassDefOverride(TVirtualX,0) //ABC defining a generic interface to graphics system
373};
374
375#define gVirtualX (TVirtualX::Instance())
376R__EXTERN TVirtualX *(*gPtr2VirtualX)();
378
379#endif
#define R__EXTERN
Definition DllImport.h:26
Handle_t WinContext_t
Window drawing context.
Definition GuiTypes.h:30
EGEventType
Definition GuiTypes.h:60
Handle_t Cursor_t
Cursor handle.
Definition GuiTypes.h:35
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index).
Definition GuiTypes.h:36
Handle_t Visual_t
Visual handle.
Definition GuiTypes.h:28
Handle_t Display_t
Display handle.
Definition GuiTypes.h:27
Handle_t Pixmap_t
Pixmap handle.
Definition GuiTypes.h:31
ULong_t Time_t
Event time.
Definition GuiTypes.h:43
EInitialState
Initial window mapping state.
Definition GuiTypes.h:346
Handle_t Drawable_t
Drawable handle.
Definition GuiTypes.h:32
Handle_t Colormap_t
Colormap handle.
Definition GuiTypes.h:34
Handle_t Atom_t
WM token.
Definition GuiTypes.h:38
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:39
UInt_t Mask_t
Structure mask type.
Definition GuiTypes.h:42
ECursor
Definition GuiTypes.h:373
Handle_t Region_t
Region handle.
Definition GuiTypes.h:33
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:40
EMouseButton
Button names.
Definition GuiTypes.h:215
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
ULongptr_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
ROOT::R::TRInterface & r
Definition Object.C:4
#define d(i)
Definition RSha256.hxx:102
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
#define a(i)
Definition RSha256.hxx:99
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
Definition RtypesCore.h:52
unsigned long ULongptr_t
Unsigned integer large enough to hold a pointer (platform-dependent).
Definition RtypesCore.h:90
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
Definition RtypesCore.h:69
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
Definition RtypesCore.h:68
short Width_t
Line width (short).
Definition RtypesCore.h:98
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
short Font_t
Font number (short).
Definition RtypesCore.h:95
short Short_t
Signed Short integer 2 bytes (short).
Definition RtypesCore.h:53
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
short Color_t
Color number (short).
Definition RtypesCore.h:99
short Style_t
Style number (short).
Definition RtypesCore.h:96
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
char name[80]
Definition TGX11.cxx:148
externAtom_t gROOT_MESSAGE
Definition TVirtualX.h:40
externTVirtualX * gGXBatch
Definition TVirtualX.h:377
externAtom_t gMOTIF_WM_HINTS
Definition TVirtualX.h:39
externAtom_t gWM_DELETE_WINDOW
Definition TVirtualX.h:38
point * points
Definition X3DBuffer.c:22
TNamed()
Definition TNamed.h:38
Basic string class.
Definition TString.h:138
Semi-Abstract base class defining a generic interface to the underlying, low level,...
Definition TVirtualX.h:46
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].
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...
virtual Int_t WriteGIF(char *name)
Writes the current window into GIF file.
virtual void DestroyWindow(Window_t id)
Destroys the window "id" as well as all of its subwindows.
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.
virtual void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos)
Copy pixmap to specified window.
virtual void DispatchClientMessage(UInt_t messageID)
Force processing of event, sent by SendEvent before.
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...
virtual Handle_t GetCurrentOpenGLContext()
Asks OpenGL subsystem about the current OpenGL context.
virtual void DrawPolyLine(Int_t n, TPoint *xy)
Draws a line through all points in the list.
virtual void SetWindowBackground(Window_t id, ULong_t color)
Sets the background of the window "id" to the specified color value "color".
virtual Int_t KeysymToKeycode(UInt_t keysym)
Converts the "keysym" to the appropriate keycode.
virtual void SetPrimarySelectionOwner(Window_t id)
Makes the window "id" the current owner of the primary selection.
virtual void DeleteImage(Drawable_t img)
Deallocates the memory associated with the image img.
void SetFillColor(Color_t cindex) override
Sets color index "cindex" for fill areas.
void SetMarkerStyle(Style_t markerstyle) override
Sets marker style.
virtual void DrawLinesSegments(Int_t n, TPoint *xy)
Draws N segments between provided points.
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".
virtual void SetTextMagnitude(Float_t mgn)
Sets the current text magnification factor to "mgn".
virtual void GetWindowSize(Drawable_t id, Int_t &x, Int_t &overridey, UInt_t &w, UInt_t &h)
Returns the location and the size of window "id".
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 ...
virtual void SetOpacity(Int_t percent)
Sets opacity of the current window.
virtual void DeleteFont(FontStruct_t fs)
Explicitly deletes the font structure "fs" obtained via LoadQueryFont().
virtual Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height)
Creates a bitmap (i.e.
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.
virtual void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Draw line on specified window.
virtual ~TVirtualX()
Definition TVirtualX.h:60
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.
virtual Bool_t IsCmdThread() const
Definition TVirtualX.h:366
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 ...
virtual EDrawMode GetDrawModeW(WinContext_t wctxt)
Returns window draw mode.
virtual Int_t OpenPixmap(UInt_t w, UInt_t h)
Creates a pixmap of the width "w" and height "h" you specified.
virtual void UnmapWindow(Window_t id)
Unmaps the specified window "id".
virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b)
Sets color intensities the specified color index "cindex".
virtual void FreeFontStruct(FontStruct_t fs)
Frees the font structure "fs".
virtual Int_t AddPixmap(ULongptr_t pixid, UInt_t w, UInt_t h)
Registers a pixmap created by TGLManager as a ROOT pixmap.
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.
EDrawMode GetDrawMode()
Definition TVirtualX.h:152
virtual void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt)
Fills the region closed by the specified path.
virtual FontStruct_t GetGCFont(GContext_t gc)
Return the font associated with the graphics context gc.
virtual void XorRegion(Region_t rega, Region_t regb, Region_t result)
Calculates the difference between the union and intersection of two regions.
virtual void SetClipOFF(Int_t wid)
Turns off the clipping for the window "wid".
virtual void FlushOpenGLBuffer(Handle_t ctx)
Flushes OpenGL buffer.
virtual void DeleteOpenGLContext(Int_t wid=0)
Deletes OpenGL context for window "wid".
virtual Colormap_t GetColormap() const
Returns handle to colormap.
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...
virtual void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist)
Add the list of drag and drop types to the Window win.
virtual void DeleteProperty(Window_t, Atom_t &)
Deletes the specified property only if the property was defined on the specified window and causes th...
virtual Bool_t HasTTFonts() const
Returns True when TrueType fonts are used.
virtual Cursor_t CreateCursor(ECursor cursor)
Creates the specified cursor.
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...
virtual void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy)
Draw line segments on specified window.
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.
virtual void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy)
Draw fill area on specified window.
virtual void RaiseWindow(Window_t id)
Raises the specified window to the top of the stack so that no sibling window obscures it.
virtual Float_t GetTextMagnitude()
Returns the current font magnification factor.
virtual void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
Sets the background pixmap of the window "id" to the specified pixmap "pxm".
virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy)
Returns character up vector.
virtual void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy)
Draw poly marker on specified window.
virtual void SelectInput(Window_t id, UInt_t evmask)
Defines which input events the window is interested in.
virtual Display_t GetDisplay() const
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
virtual Bool_t EqualRegion(Region_t rega, Region_t regb)
Returns kTRUE if the two regions have the same offset, size, and shape.
virtual void SetAttMarker(WinContext_t wctxt, const TAttMarker &att)
Set marker attributes for specified window.
virtual void SetAttLine(WinContext_t wctxt, const TAttLine &att)
Set line attributes for specified window.
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.
virtual void SetIconPixmap(Window_t id, Pixmap_t pix)
Sets the icon name pixmap.
virtual Bool_t SetSelectionOwner(Window_t, Atom_t &)
Changes the owner and last-change time for the specified selection.
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".
virtual void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height)
Returns the width and height of the image id.
virtual Window_t GetDefaultRootWindow() const
Returns handle to the default root window created when calling XOpenDisplay().
virtual Bool_t EmptyRegion(Region_t reg)
Returns kTRUE if the region reg is empty.
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...
virtual void BeginModalSessionFor(Window_t window)
Start a modal session for a dialog window.
virtual void DeletePixmap(Pixmap_t pmap)
Explicitly deletes the pixmap resource "pmap".
virtual void SetClassHints(Window_t id, char *className, char *resourceName)
Sets the windows class and resource name.
virtual FontH_t GetFontHandle(FontStruct_t fs)
Returns the font handle of the specified font structure "fs".
EDrawMode fDrawMode
Definition TVirtualX.h:55
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.
virtual Bool_t Init(void *display=nullptr)
Initializes the X system.
virtual void ResizeWindow(Int_t wid)
Resizes the window "wid" if necessary.
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.
virtual void SetAttFill(WinContext_t wctxt, const TAttFill &att)
Set fill attributes for specified window.
virtual void Warp(Int_t ix, Int_t iy, Window_t id=0)
Sets the pointer position.
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,...
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].
virtual Drawable_t CreateImage(UInt_t width, UInt_t height)
Allocates the memory needed for an drawable.
virtual Int_t GetDoubleBuffer(Int_t wid)
Queries the double buffer value for the window "wid".
virtual void SetDoubleBuffer(Int_t wid, Int_t mode)
Sets the double buffer on/off on the window "wid".
virtual Int_t GetScreen() const
Returns screen number.
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...
virtual void CreateOpenGLContext(Int_t wid=0)
Creates OpenGL context for window "wid".
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...
virtual void MapSubwindows(Window_t id)
Maps all subwindows for the specified window "id" in top-to-bottom stacking order.
virtual void FreeFontNames(char **fontlist)
Frees the specified the array of strings "fontlist".
virtual Window_t GetInputFocus()
Returns the window id of the window having the input focus.
virtual void ClosePixmap()
Deletes current pixmap.
virtual void SetInputFocus(Window_t id)
Changes the input focus to specified window "id".
virtual void SetWMState(Window_t id, EInitialState state)
Sets the initial state of the window "id": either kNormalState or kIconicState.
virtual void Update(Int_t mode=0)
Flushes (mode = 0, default) or synchronizes (mode = 1) X output buffer.
virtual Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y)
Requests Locator position.
virtual UInt_t ExecCommand(TGWin32Command *code)
Executes the command "code" coming from the other threads (Win32).
virtual void SendEvent(Window_t id, Event_t *ev)
Specifies the event "ev" is to be sent to the window "id".
virtual Int_t AddWindow(ULongptr_t qwid, UInt_t w, UInt_t h)
Registers a window created by Qt as a ROOT window.
virtual Int_t GetFontAscent() const
Returns the ascent of the current font (in pixels).
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).
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".
virtual FontStruct_t GetFontStruct(FontH_t fh)
Retrieves the associated font structure of the font specified font handle "fh".
virtual Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data)
Reads picture data from file "filename" and store it in "ret_data".
virtual void SetDrawModeW(WinContext_t wctxt, EDrawMode mode)
Set window draw mode.
virtual void UpdateWindow(Int_t mode)
Updates or synchronises client and server once (not permanent).
virtual void SetCursor(Int_t win, ECursor cursor)
The cursor "cursor" will be used when the pointer is in the window "wid".
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".
void SetFillStyle(Style_t style) override
Sets fill area style.
virtual void CloseWindow()
Deletes current window.
virtual void RescaleWindow(Int_t wid, UInt_t w, UInt_t h)
Rescales the window "wid".
virtual Int_t OpenDisplay(const char *dpyName)
Opens connection to display server (if such a thing exist on the current platform).
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,...
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.
virtual Int_t WriteGIFW(WinContext_t wctxt, const char *name)
Save specified window as GIF image.
virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess)
Returns the size of the specified character string "mess".
virtual ULong_t GetPixel(Color_t cindex)
Returns pixel value associated to specified ROOT color number "cindex".
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...
virtual void SetDNDAware(Window_t, Atom_t *)
Add XdndAware property and the list of drag and drop types to the Window win.
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".
virtual void GetWindowAttributes(Window_t id, WindowAttributes_t &attr)
The WindowAttributes_t structure is set to default.
Definition TVirtualX.cxx:67
void SetTextSize(Float_t textsize) override
Sets the current text size to "textsize".
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".
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
virtual Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h)
Resizes the specified pixmap "wid".
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,...
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.
virtual Double_t GetOpenGLScalingFactor()
On a HiDPI resolution it can be > 1., this means glViewport should use scaled width and height.
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...
virtual void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode)
Draw text on specified window.
virtual void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg)
Draws multiple line segments.
virtual void CloseDisplay()
Closes connection to display server and destroys all windows.
virtual void DeletePictureData(void *data)
Delete picture data created by the function ReadPictureDataFromFile.
static TVirtualX *& Instance()
Returns gVirtualX global.
Definition TVirtualX.cxx:57
virtual void UnionRegion(Region_t rega, Region_t regb, Region_t result)
Computes the union of two regions.
virtual void SetWindowName(Window_t id, char *name)
Sets the window name.
virtual void Bell(Int_t percent)
Sets the sound bell. Percent is loudness from -100% to 100%.
virtual void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent)
Returns the font properties.
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.
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.
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.
virtual void SetOpacityW(WinContext_t wctxt, Int_t percent)
Set opactity for specified window.
virtual Int_t GetFontDescent() const
Returns the descent of the current font (in pixels.
virtual void SetDoubleBufferOFF()
Turns double buffer mode off.
void SetLineColor(Color_t cindex) override
Sets color index "cindex" for drawing lines.
virtual void GetPlanes(Int_t &nplanes)
Returns the maximum number of planes.
virtual void SetKeyAutoRepeat(Bool_t on=kTRUE)
Turns key auto repeat on (kTRUE) or off (kFALSE).
virtual Bool_t GetFontAscentDescent(Font_t font, Double_t size, UInt_t &a, UInt_t &d, const char *mess)
Returns ascent/descent for specified character string "mess" with font and size.
void SetLineStyle(Style_t linestyle) override
Sets the line style.
virtual void DrawPolyMarker(Int_t n, TPoint *xy)
Draws "n" markers with the current attributes at position [x,y].
virtual void UpdateWindowW(WinContext_t wctxt, Int_t mode)
Update specified window.
virtual void SetWMSize(Window_t id, UInt_t w, UInt_t h)
Tells window manager the desired size of window "id".
virtual void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr)
Changes the attributes of the specified window "id" according the values provided in "attr".
virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b)
Returns RGB values for color "index".
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".
virtual Handle_t GetNativeEvent() const
Returns the current native event handle.
virtual void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode)
Draw box on specified window.
virtual void SetIconName(Window_t id, char *name)
Sets the window icon name.
virtual void Sync(Int_t mode)
Set synchronisation on or off.
virtual void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n)
Sets clipping rectangles in graphics context.
void SetMarkerColor(Color_t cindex) override
Sets color index "cindex" for markers.
virtual void SetLineType(Int_t n, Int_t *dash)
Sets the line type.
virtual Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding)
Returns a region for the polygon defined by the points array.
virtual void DestroySubwindows(Window_t id)
The DestroySubwindows function destroys all inferior windows of the specified window,...
virtual void SelectPixmap(Int_t qpixid)
Selects the pixmap "qpixid".
void SetTextAlign(Short_t talign=11) override
Sets the text alignment.
virtual Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist)
Returns the atom identifier associated with the specified "atom_name" string.
virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname)
Writes the pixmap "wid" in the bitmap file "pxname".
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...
virtual void SetDoubleBufferON()
Turns double buffer mode on.
virtual void SetDrawMode(EDrawMode mode)
Sets the drawing mode.
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:
virtual void ChangeGC(GContext_t gc, GCValues_t *gval)
Changes the components specified by the mask in gval for the specified GC.
virtual const char * DisplayName(const char *=nullptr)
Returns hostname on which the display is opened.
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.
virtual Bool_t GetTextExtentA(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const char *mess)
Returns the size of the specified character string "mess" for font and size.
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.
virtual Window_t GetPrimarySelectionOwner()
Returns the window id of the current owner of the primary selection.
virtual void IconifyWindow(Window_t id)
Iconifies the window "id".
virtual Window_t GetCurrentWindow() const
pointer to the current internal window used in canvas graphics
void SetLineWidth(Width_t width) override
Sets the line width.
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...
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.
virtual char ** ListFonts(const char *fontname, Int_t max, Int_t &count)
Returns list of font names matching fontname regexp, like "-*-times-*".
virtual void DeleteGC(GContext_t gc)
Deletes the specified GC "gc".
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...
virtual void NextEvent(Event_t &event)
The "event" is set to default event.
virtual void FreeColor(Colormap_t cmap, ULong_t pixel)
Frees color cell with specified pixel value.
virtual void QueryPointer(Int_t &ix, Int_t &iy)
Returns the pointer position.
virtual WinContext_t GetWindowContext(Int_t wid)
Get window drawing context Should remain valid until window exists.
virtual void SetCharacterUp(Float_t chupx, Float_t chupy)
Sets character up vector.
virtual void QueryColor(Colormap_t cmap, ColorStruct_t &color)
Returns the current RGB value for the pixel in the "color" structure.
void SetTextColor(Color_t cindex) override
Sets the color index "cindex" for text.
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".
virtual Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height)
create pixmap from RGB data.
virtual void GetRegionBox(Region_t reg, Rectangle_t *rect)
Returns smallest enclosing rectangle.
virtual void RemoveWindow(ULongptr_t qwid)
Removes the created by Qt window "qwid".
virtual Window_t GetParent(Window_t id) const
Returns the parent of the window "id".
virtual void DrawFillArea(Int_t n, TPoint *xy)
Fills area described by the polygon.
virtual void SetWMPosition(Window_t id, Int_t x, Int_t y)
Tells the window manager the desired position [x,y] of window "id".
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...
virtual void MapGCFont(GContext_t, FontStruct_t)
Map the XftFont with the Graphics Context using it.
virtual void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy)
Draw poly line on specified window.
virtual void DestroyRegion(Region_t reg)
Destroys the region "reg".
virtual void SubtractRegion(Region_t rega, Region_t regb, Region_t result)
Subtracts regb from rega and stores the results in result.
virtual void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE)
Establishes a passive grab on the keyboard.
virtual Int_t EventsPending()
Returns the number of events that have been received from the X server but have not been removed from...
virtual GContext_t CreateGC(Drawable_t id, GCValues_t *gval)
Creates a graphics context using the provided GCValues_t *gval structure.
virtual Int_t InitWindow(ULongptr_t window)
Creates a new window and return window number.
virtual Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID)
Makes context ctx current OpenGL context.
void SetMarkerSize(Float_t markersize) override
Sets marker size index.
virtual UInt_t ScreenWidthMM() const
Returns the width of the screen in millimeters.
virtual void SetAttText(WinContext_t wctxt, const TAttText &att)
Set text attributes for specified window.
virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Draws a line.
virtual void ClearWindowW(WinContext_t wctxt)
Clear specified window.
virtual Bool_t NeedRedraw(ULongptr_t tgwindow, Bool_t force)
Notify the low level GUI layer ROOT requires "tgwindow" to be updated.
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.
virtual Visual_t GetVisual() const
Returns handle to visual.
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.
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.
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.
virtual void ClearWindow()
Clears the entire area of the current window.
virtual void SelectWindow(Int_t wid)
Selects the window "wid" to which subsequent output is directed.
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.
virtual Int_t GetDepth() const
Returns depth of screen (number of bit planes).
virtual Window_t GetWindowID(Int_t wid)
Returns the X11 window identifier.
virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev)
Check if there is for window "id" an event of type "type".
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.
virtual void MoveWindow(Int_t wid, Int_t x, Int_t y)
Moves the window "wid" to the specified x and y coordinates.
virtual void WMDeleteNotify(Window_t id)
Tells WM to send message when window is closed via WM.
virtual void IntersectRegion(Region_t rega, Region_t regb, Region_t result)
Computes the intersection of two regions.
virtual Region_t CreateRegion()
Creates a new empty region.
virtual void MapWindow(Window_t id)
Maps the window "id" and all of its subwindows that have had map requests.
virtual void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input)
Sets decoration style.
TText * text
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Event structure.
Definition GuiTypes.h:175
Graphics context structure.
Definition GuiTypes.h:225
Point structure (maps to the X11 XPoint structure).
Definition GuiTypes.h:357
Rectangle structure (maps to the X11 XRectangle structure).
Definition GuiTypes.h:362
Used for drawing line segments (maps to the X11 XSegments structure).
Definition GuiTypes.h:352
Attributes that can be used when creating or changing a window.
Definition GuiTypes.h:94
Window attributes that can be inquired.
Definition GuiTypes.h:115
TCanvas * style()
Definition style.C:1