Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGX11.h
Go to the documentation of this file.
1// @(#)root/x11:$Id$
2// Author: Rene Brun, Olivier Couet, Fons Rademakers 28/11/94
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_TGX11
13#define ROOT_TGX11
14
15#include "TVirtualX.h"
16#include <map>
17#include <memory>
18
19#ifdef Status
20// Convert Status from a CPP macro to a typedef:
21typedef Status X11Status_t;
22#undef Status
23typedef X11Status_t Status;
24#endif
25
26#ifdef None
27// Convert None from a CPP macro to a static const int:
28static const unsigned long gX11None = None;
29#undef None
30static const unsigned long None = gX11None;
31#endif
32
33
34typedef unsigned long XID;
35typedef XID Drawable;
36typedef XID Cursor;
37typedef XID Colormap;
38typedef XID Window;
39
40struct RXGCValues;
41struct RXColor;
42struct RXImage;
43struct RXPoint;
44struct RXpmAttributes;
46struct RXVisualInfo;
47struct RVisual;
48
49/// Description of a X11 color.
50struct XColor_t {
51 ULong_t fPixel; ///< color pixel value
52 UShort_t fRed; ///< red value in range [0,kBIGGEST_RGB_VALUE]
53 UShort_t fGreen; ///< green value
54 UShort_t fBlue; ///< blue value
55 Bool_t fDefined; ///< true if pixel value is defined
57};
58
59class TExMap;
60
61struct XWindow_t;
62
63
64class TGX11 : public TVirtualX {
65
66friend struct XWindow_t;
67
68private:
69 std::unordered_map<Int_t,std::unique_ptr<XWindow_t>> fWindows; // map of windows
70 TExMap *fColors; ///< Hash list of colors
71 Cursor fCursors[kNumCursors]; ///< List of cursors
72 void *fXEvent; ///< Current native (X11) event
73
75 void FindBestVisual();
76 void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems);
77 void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx,
79 UChar_t *image, Drawable_t id);
80 void SetColor(XWindow_t *ctxt, void *gc, Int_t ci);
81 void SetInput(Int_t inp);
82
83 //---- Private methods used for GUI ----
84 void MapGCValues(GCValues_t &gval, ULong_t &xmask, RXGCValues &xgval, Bool_t tox = kTRUE);
86 ULong_t &xmask, RXSetWindowAttributes &xattr);
87 void MapCursor(ECursor cursor, Int_t &xcursor);
88 void MapColorStruct(ColorStruct_t *color, RXColor &xcolor);
90 Bool_t toxpm = kTRUE);
91 void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox = kTRUE);
92
93 // void MapEvent(Event_t &ev, XEvent &xev, Bool_t tox = kTRUE);
94 void MapEvent(Event_t &ev, void *xev, Bool_t tox = kTRUE);
95
96 void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox = kTRUE);
97 void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox = kTRUE);
98
99protected:
100 void *fDisplay; ///< Pointer to display
101 RVisual *fVisual; ///< Pointer to visual used by all windows
102 Drawable fRootWin; ///< Root window used as parent of all windows
103 Drawable fVisRootWin; ///< Root window with fVisual to be used to create GC's and XImages
104 Colormap fColormap; ///< Default colormap, 0 if b/w
105 ULong_t fBlackPixel; ///< Value of black pixel in colormap
106 ULong_t fWhitePixel; ///< Value of white pixel in colormap
107 Int_t fScreenNumber; ///< Screen number
108 Float_t fCharacterUpX; ///< Character Up vector along X
109 Float_t fCharacterUpY; ///< Character Up vector along Y
110 Float_t fTextMagnitude; ///< Text Magnitude
111 Int_t fDepth; ///< Number of color planes
112 Int_t fRedDiv; ///< Red value divider, -1 if no TrueColor visual
113 Int_t fGreenDiv; ///< Green value divider
114 Int_t fBlueDiv; ///< Blue value divider
115 Int_t fRedShift; ///< Bits to left shift red, -1 if no TrueColor visual
116 Int_t fGreenShift; ///< Bits to left shift green
117 Int_t fBlueShift; ///< Bits to left shift blue
118 Bool_t fHasTTFonts; ///< True when TrueType fonts are used
119 Bool_t fHasXft; ///< True when XftFonts are used
120
121 // needed by TGX11TTF
126
127 Bool_t AllocColor(Colormap cmap, RXColor *color);
128 void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors);
129 Window_t GetWindow(WinContext_t wctxt) const;
130 void *GetGCW(WinContext_t wctxt, Int_t which) const;
131 EAlign GetTextAlignW(WinContext_t wctxt) const;
132 const TAttText& GetTextAttW(WinContext_t wctxt) const;
133
134 XColor_t &GetColor(Int_t cid);
135
136 //---- Methods used for old graphics -----
137 void *GetGC(Int_t which) const;
138
139
140 TGX11(TGX11 &&org);
141 TGX11(const TGX11 &org) = delete;
142
143public:
144 TGX11();
145 TGX11(const char *name, const char *title);
146 ~TGX11() override;
147
148 Bool_t Init(void *display) override;
149 void ClearWindow() override;
150 void ClosePixmap() override;
151 void CloseWindow() override;
152 void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override;
153 void GetCharacterUp(Float_t &chupx, Float_t &chupy) override;
154 Int_t GetDoubleBuffer(Int_t wid) override;
155 void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override;
156 const char *DisplayName(const char *dpyName = nullptr) override;
157 Handle_t GetNativeEvent() const override { return (Handle_t) fXEvent; }
158 ULong_t GetPixel(Color_t cindex) override;
159 void GetPlanes(Int_t &nplanes) override;
160 void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override;
162 Window_t GetWindowID(Int_t wid) override;
163 Bool_t HasTTFonts() const override { return fHasTTFonts; }
164 Int_t InitWindow(ULong_t window) override;
165 Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h) override;
166 Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h) override;
167 void RemoveWindow(ULong_t qwid) override;
168 void MoveWindow(Int_t wid, Int_t x, Int_t y) override;
169 Int_t OpenDisplay(void *display);
170 Int_t OpenPixmap(UInt_t w, UInt_t h) override;
171 void QueryPointer(Int_t &ix, Int_t &iy) override;
172 Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id = 0) override;
173 Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override;
174 Int_t RequestString(Int_t x, Int_t y, char *text) override;
175 void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override;
176 Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override;
177 void ResizeWindow(Int_t wid) override;
178 void SelectWindow(Int_t wid) override;
179 void SetCharacterUp(Float_t chupx, Float_t chupy) override;
180 void SetClipOFF(Int_t wid) override;
181 void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
182 void SetCursor(Int_t win, ECursor cursor) override;
183 void SetDoubleBuffer(Int_t wid, Int_t mode) override;
184 void SetDoubleBufferOFF() override;
185 void SetDoubleBufferON() override;
186 void SetDrawMode(EDrawMode mode) override;
187 void Sync(Int_t mode) override;
188 void UpdateWindow(Int_t mode) override;
189 void Warp(Int_t ix, Int_t iy, Window_t id = 0) override;
190 Int_t WriteGIF(char *name) override;
191 void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override;
192 Window_t GetCurrentWindow() const override;
193 Int_t SupportsExtension(const char *ext) const override;
194
195 //---- Methods used for old graphics -----
196 void SetFillColor(Color_t cindex) override;
197 Color_t GetFillColor() const override;
198 void SetFillStyle(Style_t style) override;
199 Style_t GetFillStyle() const override;
200 void SetLineColor(Color_t cindex) override;
201 void SetLineType(Int_t n, Int_t *dash) override;
202 void SetLineStyle(Style_t linestyle) override;
203 Style_t GetLineStyle() const override;
204 void SetLineWidth(Width_t width) override;
205 Width_t GetLineWidth() const override;
206 void SetMarkerColor(Color_t cindex) override;
207 void SetMarkerSize(Float_t markersize) override;
208 void SetMarkerStyle(Style_t markerstyle) override;
209 void SetOpacity(Int_t percent) override;
210 void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override;
211 void SetTextAlign(Short_t talign=11) override;
212 void SetTextColor(Color_t cindex) override;
213 Int_t SetTextFont(char *fontname, ETextSetMode mode) override;
214 void SetTextFont(Font_t fontnumber) override;
215 void SetTextMagnitude(Float_t mgn=1) override { fTextMagnitude = mgn;}
216 void SetTextSize(Float_t textsize) override;
217 void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override;
218 void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic) override;
219 void DrawFillArea(Int_t n, TPoint *xy) override;
220 void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
221 void DrawPolyLine(Int_t n, TPoint *xy) override;
222 void DrawLinesSegments(Int_t n, TPoint *xy) override;
223 void DrawPolyMarker(Int_t n, TPoint *xy) override;
224 void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override;
225 void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const wchar_t *text, ETextMode mode) override;
226 void GetTextExtent(UInt_t &w, UInt_t &h, char *mess) override;
227 void GetTextExtent(UInt_t &w, UInt_t &h, wchar_t *mess) override;
228
229 //---- Methods used for new graphics -----
230 WinContext_t GetWindowContext(Int_t wid) override;
231 void SetAttFill(WinContext_t wctxt, const TAttFill &att) override;
232 void SetAttLine(WinContext_t wctxt, const TAttLine &att) override;
233 void SetAttMarker(WinContext_t wctxt, const TAttMarker &att) override;
234 void SetAttText(WinContext_t wctxt, const TAttText &att) override;
235 void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override;
236 EDrawMode GetDrawModeW(WinContext_t wctxt) override;
237 void ClearWindowW(WinContext_t wctxt) override;
238 void UpdateWindowW(WinContext_t wctxt, Int_t mode) override;
239 void SetOpacityW(WinContext_t wctxt, Int_t percent) override;
240 void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override;
241 Int_t WriteGIFW(WinContext_t wctxt, const char *name) override;
242
243 void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override;
244 void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
245 void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
246 void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
247 void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
248 void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
249 void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override;
250 void DrawTextW(WinContext_t, Int_t, Int_t, Float_t, Float_t, const wchar_t *, ETextMode) override {}
251
252 Bool_t GetTextExtentA(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const char *mess) override;
253 Bool_t GetTextExtentA(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const wchar_t *mess) override;
254
255
256 //---- Methods used for GUI -----
257 void GetWindowAttributes(Window_t id, WindowAttributes_t &attr) override;
258 void MapWindow(Window_t id) override;
259 void MapSubwindows(Window_t id) override;
260 void MapRaised(Window_t id) override;
261 void UnmapWindow(Window_t id) override;
262 void DestroyWindow(Window_t id) override;
263 void DestroySubwindows(Window_t id) override;
264 void RaiseWindow(Window_t id) override;
265 void LowerWindow(Window_t id) override;
266 void MoveWindow(Window_t id, Int_t x, Int_t y) override;
267 void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
268 void ResizeWindow(Window_t id, UInt_t w, UInt_t h) override;
269 void IconifyWindow(Window_t id) override;
270 void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y) override;
271 void SetWindowBackground(Window_t id, ULong_t color) override;
272 void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm) override;
274 UInt_t w, UInt_t h, UInt_t border,
275 Int_t depth, UInt_t clss,
276 void *visual, SetWindowAttributes_t *attr,
277 UInt_t wtype) override;
278 Int_t OpenDisplay(const char *dpyName) override;
279 void CloseDisplay() override;
280 Display_t GetDisplay() const override;
281 Visual_t GetVisual() const override;
282 Int_t GetScreen() const override;
283 Int_t GetDepth() const override;
284 Colormap_t GetColormap() const override;
285 Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override;
286 Window_t GetDefaultRootWindow() const override;
287 Window_t GetParent(Window_t id) const override;
288 FontStruct_t LoadQueryFont(const char *font_name) override;
290 void DeleteFont(FontStruct_t fs) override;
291 GContext_t CreateGC(Drawable_t id, GCValues_t *gval) override;
292 void ChangeGC(GContext_t gc, GCValues_t *gval) override;
293 void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override;
294 void DeleteGC(GContext_t gc) override;
295 Cursor_t CreateCursor(ECursor cursor) override;
296 void SetCursor(Window_t id, Cursor_t curid) override;
298 Pixmap_t CreatePixmap(Drawable_t id, const char *bitmap, UInt_t width,
299 UInt_t height, ULong_t forecolor, ULong_t backcolor,
300 Int_t depth) override;
301 unsigned char *GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0) override;
302 Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override;
303 Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap,
304 UInt_t width, UInt_t height) override;
305 void DeletePixmap(Pixmap_t pmap) override;
306 Bool_t CreatePictureFromFile(Drawable_t id, const char *filename,
307 Pixmap_t &pict, Pixmap_t &pict_mask,
308 PictureAttributes_t &attr) override;
310 Pixmap_t &pict, Pixmap_t &pict_mask,
311 PictureAttributes_t &attr) override;
312 Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override;
313 void DeletePictureData(void *data) override;
314 void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override;
315 Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override;
316 Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color) override;
317 void QueryColor(Colormap_t cmap, ColorStruct_t &color) override;
318 void FreeColor(Colormap_t cmap, ULong_t pixel) override;
319 Int_t EventsPending() override;
320 void NextEvent(Event_t &event) override;
321 void Bell(Int_t percent) override;
322 void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc,
323 Int_t src_x, Int_t src_y, UInt_t width, UInt_t height,
324 Int_t dest_x, Int_t dest_y) override;
326 void ChangeProperty(Window_t id, Atom_t property, Atom_t type,
327 UChar_t *data, Int_t len) override;
328 void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
329 void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
330 Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev) override;
331 void SendEvent(Window_t id, Event_t *ev) override;
332 void WMDeleteNotify(Window_t id) override;
333 void SetKeyAutoRepeat(Bool_t on = kTRUE) override;
334 void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE) override;
335 void GrabButton(Window_t id, EMouseButton button, UInt_t modifier,
336 UInt_t evmask, Window_t confine, Cursor_t cursor,
337 Bool_t grab = kTRUE) override;
338 void GrabPointer(Window_t id, UInt_t evmask, Window_t confine,
339 Cursor_t cursor, Bool_t grab = kTRUE,
340 Bool_t owner_events = kTRUE) override;
341 void SetWindowName(Window_t id, char *name) override;
342 void SetIconName(Window_t id, char *name) override;
343 void SetIconPixmap(Window_t id, Pixmap_t pic) override;
344 void SetClassHints(Window_t id, char *className, char *resourceName) override;
345 void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input) override;
346 void SetWMPosition(Window_t id, Int_t x, Int_t y) override;
347 void SetWMSize(Window_t id, UInt_t w, UInt_t h) override;
348 void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin,
349 UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc) override;
350 void SetWMState(Window_t id, EInitialState state) override;
351 void SetWMTransientHint(Window_t id, Window_t main_id) override;
353 const char *s, Int_t len) override;
354 Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override;
355 void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override;
356 void GetGCValues(GContext_t gc, GCValues_t &gval) override;
358 void FreeFontStruct(FontStruct_t fs) override;
359 void ClearWindow(Window_t id) override;
360 Int_t KeysymToKeycode(UInt_t keysym) override;
362 UInt_t w, UInt_t h) override;
364 UInt_t w, UInt_t h) override;
365 void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg) override;
366 void SelectInput(Window_t id, UInt_t evmask) override;
367 Window_t GetInputFocus() override;
368 void SetInputFocus(Window_t id) override;
370 void SetPrimarySelectionOwner(Window_t id) override;
371 void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when) override;
372 void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override;
373 void GetPasteBuffer(Window_t id, Atom_t atom, TString &text,
374 Int_t &nchar, Bool_t del) override;
375 void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,
376 Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child) override;
377 void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override;
378 void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt) override;
379 void QueryPointer(Window_t id, Window_t &rootw, Window_t &childw,
380 Int_t &root_x, Int_t &root_y, Int_t &win_x,
381 Int_t &win_y, UInt_t &mask) override;
382 void SetForeground(GContext_t gc, ULong_t foreground) override;
383 void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override;
384 void Update(Int_t mode = 0) override;
385 Region_t CreateRegion() override;
386 void DestroyRegion(Region_t reg) override;
387 void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override;
388 Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override;
389 void UnionRegion(Region_t rega, Region_t regb, Region_t result) override;
390 void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override;
391 void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override;
392 void XorRegion(Region_t rega, Region_t regb, Region_t result) override;
393 Bool_t EmptyRegion(Region_t reg) override;
394 Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override;
395 Bool_t EqualRegion(Region_t rega, Region_t regb) override;
396 void GetRegionBox(Region_t reg, Rectangle_t *) override;
397 char **ListFonts(const char *fontname, Int_t max, Int_t &count) override;
398 void FreeFontNames(char **fontlist) override;
399 Drawable_t CreateImage(UInt_t width, UInt_t height) override;
400 void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height) override;
401 void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel) override;
402 void PutImage(Drawable_t id, GContext_t gc, Drawable_t img,
403 Int_t dx, Int_t dy, Int_t x, Int_t y,
404 UInt_t w, UInt_t h) override;
405 void DeleteImage(Drawable_t img) override;
406 void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask) override;
407 UInt_t ScreenWidthMM() const override;
408
409 void DeleteProperty(Window_t, Atom_t&) override;
411 Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**) override;
413 void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&) override;
415 void ChangeProperties(Window_t id, Atom_t property, Atom_t type,
416 Int_t format, UChar_t *data, Int_t len) override;
417 void SetDNDAware(Window_t, Atom_t *) override;
418 void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist) override;
419 Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd) override;
420 Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override;
421
422 ClassDefOverride(TGX11,0) //Interface to X11
423};
424
425#endif
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
const int kNumCursors
Definition GuiTypes.h:372
ROOT::R::TRInterface & r
Definition Object.C:4
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
Definition RtypesCore.h:54
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 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
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
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
EAlign
Definition TGWin32.cxx:123
char name[80]
Definition TGX11.cxx:148
XID Colormap
Definition TGX11.h:37
unsigned long XID
Definition TGX11.h:34
XID Window
Definition TGX11.h:38
XID Drawable
Definition TGX11.h:35
XID Cursor
Definition TGX11.h:36
float xmin
float ymin
float xmax
float ymax
point * points
Definition X3DBuffer.c:22
Color * colors
Definition X3DBuffer.c:21
This class stores a (key,value) pair using an external hash.
Definition TExMap.h:33
This class is the basic interface to the X11 (Xlib) graphics system.
Definition TGX11.h:64
void DrawFillArea(Int_t n, TPoint *xy) override
Fill area described by polygon.
Definition TGX11.cxx:562
void * fDisplay
Pointer to display.
Definition TGX11.h:100
void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box on specified window.
Definition TGX11.cxx:496
void SetTextMagnitude(Float_t mgn=1) override
Sets the current text magnification factor to "mgn".
Definition TGX11.h:215
Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override
Create region for the polygon defined by the points array.
Definition GX11Gui.cxx:2517
const TAttText & GetTextAttW(WinContext_t wctxt) const
Return text attributes for specified window context.
Definition TGX11.cxx:1078
void SetLineColor(Color_t cindex) override
Set color index for lines.
Definition TGX11.cxx:2376
void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draw a filled rectangle. Filling is done according to the gc.
Definition GX11Gui.cxx:2165
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return position and size of window wid.
Definition TGX11.cxx:1106
void SetPrimarySelectionOwner(Window_t id) override
Makes the window id the current owner of the primary selection.
Definition GX11Gui.cxx:2249
Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height) override
Create a bitmap (i.e. pixmap with depth 1) from the bitmap data.
Definition GX11Gui.cxx:1082
Colormap fColormap
Default colormap, 0 if b/w.
Definition TGX11.h:104
void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input) override
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition GX11Gui.cxx:1954
void GetRegionBox(Region_t reg, Rectangle_t *) override
Return smallest enclosing rectangle.
Definition GX11Gui.cxx:2585
std::unordered_map< Int_t, std::unique_ptr< XWindow_t > > fWindows
Definition TGX11.h:69
Window_t GetWindowID(Int_t wid) override
Return the X11 window identifier.
Definition TGX11.cxx:1241
void FreeFontStruct(FontStruct_t fs) override
Free font structure returned by GetFontStruct().
Definition GX11Gui.cxx:2123
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 **) override
Returns the actual type of the property; the actual format of the property; the number of 8-bit,...
Definition GX11Gui.cxx:2705
void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when) override
XConvertSelection() causes a SelectionRequest event to be sent to the current primary selection owner...
Definition GX11Gui.cxx:2267
void MapEvent(Event_t &ev, void *xev, Bool_t tox=kTRUE)
Map Event_t structure to XEvent structure.
Definition GX11Gui.cxx:1483
void ChangeGC(GContext_t gc, GCValues_t *gval) override
Change entries in an existing graphics context, gc, by values from gval.
Definition GX11Gui.cxx:993
Int_t WriteGIF(char *name) override
Writes the current window into GIF file.
Definition TGX11.cxx:2877
void SetFillColor(Color_t cindex) override
Set color index for fill areas.
Definition TGX11.cxx:2305
void ResizeWindow(Int_t wid) override
Resize the current window if necessary.
Definition TGX11.cxx:2052
Bool_t SetSelectionOwner(Window_t, Atom_t &) override
Changes the owner and last-change time for the specified selection.
Definition GX11Gui.cxx:2741
Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h) override
Creates a pixmap of the width and height you specified and returns a pixmap ID that identifies it.
Definition GX11Gui.cxx:1062
void SetTextAlign(Short_t talign=11) override
Set text alignment.
Definition TGX11.cxx:2546
void IconifyWindow(Window_t id) override
Iconify the window.
Definition GX11Gui.cxx:330
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm) override
Set pixmap as window background.
Definition GX11Gui.cxx:360
FontStruct_t LoadQueryFont(const char *font_name) override
Load font and query font.
Definition GX11Gui.cxx:941
void SetWMPosition(Window_t id, Int_t x, Int_t y) override
Tell the window manager the desired window position.
Definition GX11Gui.cxx:1972
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override
Rescale the window wid.
Definition TGX11.cxx:1974
void SetCursor(Int_t win, ECursor cursor) override
Set the cursor.
Definition TGX11.cxx:2211
Int_t fScreenNumber
Screen number.
Definition TGX11.h:107
void DrawTextW(WinContext_t, Int_t, Int_t, Float_t, Float_t, const wchar_t *, ETextMode) override
Draw wtext on specified window.
Definition TGX11.h:250
Window_t GetParent(Window_t id) const override
Return the parent of the window.
Definition GX11Gui.cxx:920
void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return geometry of window (should be called GetGeometry but signature already used).
Definition GX11Gui.cxx:2403
void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t) override
Changes the specified dynamic parameters if the pointer is actively grabbed by the client.
Definition GX11Gui.cxx:2718
void SetInputFocus(Window_t id) override
Set keyboard input focus to window id.
Definition GX11Gui.cxx:2224
TGX11(const TGX11 &org)=delete
void SetWMState(Window_t id, EInitialState state) override
Set the initial state of the window. Either kNormalState or kIconicState.
Definition GX11Gui.cxx:2027
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override
Read picture data from file and store in ret_data.
Definition GX11Gui.cxx:1278
void Sync(Int_t mode) override
Set synchronisation on or off.
Definition TGX11.cxx:2653
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override
create pixmap from RGB data.
Definition TGX11.cxx:3164
WinContext_t GetWindowContext(Int_t wid) override
Returns window context for specified window id Window context is valid until window not closed or des...
Definition TGX11.cxx:3219
TGX11(TGX11 &&org)
Copy constructor. Currently only used by TGX11TTF.
Definition TGX11.cxx:259
unsigned char * GetColorBits(Drawable_t wid, Int_t x=0, Int_t y=0, UInt_t w=0, UInt_t h=0) override
Returns an array of pixels created from a part of drawable (defined by x, y, w, h) in format: b1,...
Definition TGX11.cxx:3151
Int_t WriteGIFW(WinContext_t wctxt, const char *name) override
Writes the specified window into GIF file.
Definition TGX11.cxx:2886
ULong_t fWhitePixel
Value of white pixel in colormap.
Definition TGX11.h:106
Cursor fCursors[kNumCursors]
List of cursors.
Definition TGX11.h:71
void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE) override
Establish passive grab on a certain key.
Definition GX11Gui.cxx:1825
Bool_t AllocColor(Colormap cmap, RXColor *color)
Allocate color in colormap.
Definition TGX11.cxx:344
void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw a text string using current font.
Definition TGX11.cxx:805
void GetWindowAttributes(Window_t id, WindowAttributes_t &attr) override
Get window attributes and return filled in attributes structure.
Definition GX11Gui.cxx:763
Bool_t GetTextExtentA(Font_t font, Double_t size, UInt_t &w, UInt_t &h, const char *mess) override
Return the size of a character string for specified font and size On plain X11 font and size is ignor...
Definition TGX11.cxx:1220
void MapSubwindows(Window_t id) override
Map sub windows.
Definition GX11Gui.cxx:227
void SetDNDAware(Window_t, Atom_t *) override
Add XdndAware property and the list of drag and drop types to the Window win.
Definition GX11Gui.cxx:2764
void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors)
Returns the current RGB value for the pixel in the XColor structure.
Definition TGX11.cxx:361
Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override
Checks if Window win is DND aware, and knows any of the DND formats passed in argument.
Definition GX11Gui.cxx:2853
Int_t fBlueShift
Bits to left shift blue.
Definition TGX11.h:117
void SetMarkerColor(Color_t cindex) override
Set color index for markers.
Definition TGX11.cxx:2455
void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Fill area described by polygon on specified window.
Definition TGX11.cxx:573
void SetIconPixmap(Window_t id, Pixmap_t pic) override
Set pixmap the WM can use when the window is iconized.
Definition GX11Gui.cxx:1925
void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox=kTRUE)
Map event mask to or from X.
Definition GX11Gui.cxx:402
void SetAttText(WinContext_t wctxt, const TAttText &att) override
Set text attributes for specified window.
Definition TGX11.cxx:3838
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override
Set clipping rectangles in graphics context.
Definition GX11Gui.cxx:2470
void LowerWindow(Window_t id) override
Lower window so it lays below all its siblings.
Definition GX11Gui.cxx:287
void DeleteImage(Drawable_t img) override
Destroy XImage img.
Definition GX11Gui.cxx:2665
Int_t KeysymToKeycode(UInt_t keysym) override
Convert a keysym to the appropriate keycode.
Definition GX11Gui.cxx:2154
Int_t GetScreen() const override
Returns screen number (might be useful in some cases where direct X11 manipulation outside of TVirtua...
Definition GX11Gui.cxx:881
Int_t GetDepth() const override
Returns depth of screen (number of bit planes).
Definition GX11Gui.cxx:890
void Warp(Int_t ix, Int_t iy, Window_t id=0) override
Set pointer position.
Definition TGX11.cxx:2818
void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar, Bool_t del) override
Get contents of paste buffer atom into string.
Definition GX11Gui.cxx:2343
void * GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
Definition TGX11.cxx:1022
void SelectInput(Window_t id, UInt_t evmask) override
Defines which input events the window is interested in.
Definition GX11Gui.cxx:2198
void SetOpacityW(WinContext_t wctxt, Int_t percent) override
Set opacity of a specified window.
Definition TGX11.cxx:2714
void MapWindow(Window_t id) override
Map window on screen.
Definition GX11Gui.cxx:217
void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override
Compute the intersection of rega and regb and return result region.
Definition GX11Gui.cxx:2536
Bool_t CreatePictureFromFile(Drawable_t id, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Create a picture pixmap from data on file.
Definition GX11Gui.cxx:1183
Visual_t GetVisual() const override
Returns handle to visual (might be useful in some cases where direct X11 manipulation outside of TVir...
Definition GX11Gui.cxx:861
Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override
Returns true if the point x,y is in the region.
Definition GX11Gui.cxx:2569
void SetClipOFF(Int_t wid) override
Turn off the clipping for the window wid.
Definition TGX11.cxx:2140
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override
Resize a pixmap.
Definition TGX11.cxx:2008
void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox=kTRUE)
Map to and from X key symbols.
Definition GX11Gui.cxx:2303
void SetDoubleBufferOFF() override
Turn double buffer mode off.
Definition TGX11.cxx:2260
void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel) override
Set pixel at specified location in XImage img.
Definition GX11Gui.cxx:2645
void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw a text string using current font on specified window.
Definition TGX11.cxx:839
void SetTextColor(Color_t cindex) override
Set color index for text.
Definition TGX11.cxx:2559
GContext_t CreateGC(Drawable_t id, GCValues_t *gval) override
Create a graphics context using the values set in gval (but only for those entries that are in the ma...
Definition GX11Gui.cxx:971
void UpdateWindow(Int_t mode) override
Update display.
Definition TGX11.cxx:2676
Window_t GetDefaultRootWindow() const override
Return handle to the default root window created when calling XOpenDisplay().
Definition GX11Gui.cxx:912
Bool_t fHasXft
True when XftFonts are used.
Definition TGX11.h:119
Int_t SupportsExtension(const char *ext) const override
Returns 1 if window system server supports extension given by the argument, returns 0 in case extensi...
Definition TGX11.cxx:3205
Int_t InitWindow(ULong_t window) override
Open window and return window number.
Definition TGX11.cxx:1495
void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Move and resize a window.
Definition GX11Gui.cxx:307
Colormap_t GetColormap() const override
Returns handle to colormap (might be useful in some cases where direct X11 manipulation outside of TV...
Definition GX11Gui.cxx:871
void UnmapWindow(Window_t id) override
Unmap window from screen.
Definition GX11Gui.cxx:247
Style_t GetLineStyle() const override
Return current line style.
Definition TGX11.cxx:2420
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override
Copies graphics context from org to dest.
Definition GX11Gui.cxx:1012
Display_t GetDisplay() const override
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
Definition GX11Gui.cxx:851
~TGX11() override
Destructor.
Definition TGX11.cxx:296
void MoveWindow(Int_t wid, Int_t x, Int_t y) override
Move the window wid.
Definition TGX11.cxx:1254
Int_t SetTextFont(char *fontname, ETextSetMode mode) override
Set text font to specified name.
Definition TGX11.cxx:2582
void SetFillStyle(Style_t style) override
Set fill area style.
Definition TGX11.cxx:2334
char ** ListFonts(const char *fontname, Int_t max, Int_t &count) override
Return list of font names matching fontname regexp, like "-*-times-*".
Definition GX11Gui.cxx:2593
UInt_t ScreenWidthMM() const override
Returns the width of the screen in millimeters.
Definition GX11Gui.cxx:2684
void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the specified window.
Definition TGX11.cxx:2797
void MapGCValues(GCValues_t &gval, ULong_t &xmask, RXGCValues &xgval, Bool_t tox=kTRUE)
Map a GCValues_t to a XCGValues structure if tox is true.
Definition GX11Gui.cxx:556
void DestroySubwindows(Window_t id) override
Destroy subwindows of this window.
Definition GX11Gui.cxx:267
Float_t fTextMagnitude
Text Magnitude.
Definition TGX11.h:110
void SetCharacterUp(Float_t chupx, Float_t chupy) override
Set character up vector.
Definition TGX11.cxx:2119
Drawable fRootWin
Root window used as parent of all windows.
Definition TGX11.h:102
void SetWMTransientHint(Window_t id, Window_t main_id) override
Tell window manager that window is a transient window of main.
Definition GX11Gui.cxx:2048
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override
Write the pixmap wid in the bitmap file pxname.
Definition TGX11.cxx:2835
void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw a line through all points on specified window.
Definition TGX11.cxx:633
Window_t GetPrimarySelectionOwner() override
Returns the window id of the current owner of the primary selection.
Definition GX11Gui.cxx:2240
void SetInput(Int_t inp)
Set input on or off.
Definition TGX11.cxx:2357
void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE) override
Establish an active pointer grab.
Definition GX11Gui.cxx:1872
void GetPlanes(Int_t &nplanes) override
Get maximum number of planes.
Definition TGX11.cxx:1164
void ClearWindow() override
Clear current window.
Definition TGX11.cxx:386
void * fXEvent
Current native (X11) event.
Definition TGX11.h:72
Int_t fGreenShift
Bits to left shift green.
Definition TGX11.h:116
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box.
Definition TGX11.cxx:485
void SetWindowName(Window_t id, char *name) override
Set window name.
Definition GX11Gui.cxx:1891
void RaiseWindow(Window_t id) override
Put window on top of window stack.
Definition GX11Gui.cxx:277
void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE) override
Establish passive grab on a certain mouse button.
Definition GX11Gui.cxx:1846
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the current window.
Definition TGX11.cxx:474
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override
Specify a dash pattern.
Definition GX11Gui.cxx:1307
void FreeFontNames(char **fontlist) override
Free list of font names.
Definition GX11Gui.cxx:2605
void SetOpacity(Int_t percent) override
Set opacity of a selected window.
Definition TGX11.cxx:2502
void Bell(Int_t percent) override
Sound bell. Percent is loudness from -100% .. 100%.
Definition GX11Gui.cxx:1675
Style_t GetFillStyle() const override
Return current fill style.
Definition TGX11.cxx:2347
void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y on specified window.
Definition TGX11.cxx:735
Int_t OpenPixmap(UInt_t w, UInt_t h) override
Open a new pixmap.
Definition TGX11.cxx:1454
XColor_t & GetColor(Int_t cid)
Return reference to internal color structure associated to color index cid.
Definition TGX11.cxx:1000
void * GetGCW(WinContext_t wctxt, Int_t which) const
Return X11 Graphics Context for specified window context.
Definition TGX11.cxx:1049
void SetAttMarker(WinContext_t wctxt, const TAttMarker &att) override
Set marker attributes for specified window.
Definition TGX11.cxx:3341
Int_t fBlueDiv
Blue value divider.
Definition TGX11.h:114
void DrawPolyMarker(Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y.
Definition TGX11.cxx:724
void UpdateWindowW(WinContext_t wctxt, Int_t mode) override
Update display for specified window.
Definition TGX11.cxx:2690
void CloseWindow() override
Delete current window.
Definition TGX11.cxx:423
void SetMarkerSize(Float_t markersize) override
Set marker size index.
Definition TGX11.cxx:2472
void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc) override
Give the window manager minimum and maximum size hints.
Definition GX11Gui.cxx:2005
Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev) override
Check if there is for window "id" an event of type "type".
Definition GX11Gui.cxx:1753
void SetAttLine(WinContext_t wctxt, const TAttLine &att) override
Set line attributes for specified window.
Definition TGX11.cxx:3279
Drawable fVisRootWin
Root window with fVisual to be used to create GC's and XImages.
Definition TGX11.h:103
void SetDoubleBufferON() override
Turn double buffer mode on.
Definition TGX11.cxx:2270
void SetColor(XWindow_t *ctxt, void *gc, Int_t ci)
Set the foreground color in GC.
Definition TGX11.cxx:2178
TExMap * fColors
Hash list of colors.
Definition TGX11.h:70
void DrawLinesSegments(Int_t n, TPoint *xy) override
Draws N segments between provided points.
Definition TGX11.cxx:683
Float_t GetTextMagnitude() override
Returns the current font magnification factor.
Definition TGX11.h:161
void SetAttFill(WinContext_t wctxt, const TAttFill &att) override
Set fill attributes for specified window.
Definition TGX11.cxx:3227
void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override
Set window draw mode.
Definition TGX11.cxx:3918
void FreeColor(Colormap_t cmap, ULong_t pixel) override
Free color cell with specified pixel value.
Definition GX11Gui.cxx:1391
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
Definition TGX11.h:112
Int_t fDepth
Number of color planes.
Definition TGX11.h:111
Bool_t HasTTFonts() const override
Returns True when TrueType fonts are used.
Definition TGX11.h:163
Color_t GetFillColor() const override
Return current fill color.
Definition TGX11.cxx:2320
void MapRaised(Window_t id) override
Map window on screen and put on top of all windows.
Definition GX11Gui.cxx:237
Bool_t Init(void *display) override
Initialize X11 system. Returns kFALSE in case of failure.
Definition TGX11.cxx:319
void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height) override
Get size of XImage img.
Definition GX11Gui.cxx:2636
void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &) override
Requests that the specified selection be converted to the specified target type.
Definition GX11Gui.cxx:2732
void ChangeProperties(Window_t id, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len) override
This function alters the property for the specified window and causes the X server to generate a Prop...
Definition GX11Gui.cxx:2751
void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist) override
Add the list of drag and drop types to the Window win.
Definition GX11Gui.cxx:2785
void SetLineType(Int_t n, Int_t *dash) override
Set line type.
Definition TGX11.cxx:2399
void CloseDisplay() override
Close connection to display server.
Definition GX11Gui.cxx:840
void XorRegion(Region_t rega, Region_t regb, Region_t result) override
Calculate the difference between the union and intersection of two regions.
Definition GX11Gui.cxx:2553
Window_t GetWindow(WinContext_t wctxt) const
Return X11 window for specified window context.
Definition TGX11.cxx:1039
void DeleteGC(GContext_t gc) override
Explicitly delete a graphics context.
Definition GX11Gui.cxx:1032
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) override
TranslateCoordinates translates coordinates from the frame of reference of one window to another.
Definition GX11Gui.cxx:2387
void SetWindowBackground(Window_t id, ULong_t color) override
Set the window background color.
Definition GX11Gui.cxx:350
Bool_t EmptyRegion(Region_t reg) override
Return true if the region is empty.
Definition GX11Gui.cxx:2561
void QueryColor(Colormap_t cmap, ColorStruct_t &color) override
Fill in the primary color components for a specific pixel value.
Definition GX11Gui.cxx:1371
void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg) override
Draws multiple line segments. Each line is specified by a pair of points.
Definition GX11Gui.cxx:2185
friend struct XWindow_t
Definition TGX11.h:66
void GetGCValues(GContext_t gc, GCValues_t &gval) override
Get current values from graphics context gc.
Definition GX11Gui.cxx:2090
Cursor_t CreateCursor(ECursor cursor) override
Create cursor handle (just return cursor from cursor pool fCursors).
Definition GX11Gui.cxx:1043
ULong_t fBlackPixel
Value of black pixel in colormap.
Definition TGX11.h:105
void SetTextSize(Float_t textsize) override
Set current text size.
Definition TGX11.cxx:2636
Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd) override
Recursively search in the children of Window for a Window which is at location x, y and is DND aware,...
Definition GX11Gui.cxx:2802
FontStruct_t GetFontStruct(FontH_t fh) override
Retrieve associated font structure once we have the font handle.
Definition GX11Gui.cxx:2111
EAlign
Definition TGX11.h:122
@ kTLeft
Definition TGX11.h:124
@ kMRight
Definition TGX11.h:124
@ kBLeft
Definition TGX11.h:125
@ kMLeft
Definition TGX11.h:124
@ kTCenter
Definition TGX11.h:124
@ kBCenter
Definition TGX11.h:125
@ kAlignNone
Definition TGX11.h:123
@ kBRight
Definition TGX11.h:125
@ kMCenter
Definition TGX11.h:124
@ kTRight
Definition TGX11.h:124
Float_t fCharacterUpX
Character Up vector along X.
Definition TGX11.h:108
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic) override
Draw a cell array.
Definition TGX11.cxx:532
void SetLineStyle(Style_t linestyle) override
Set line style.
Definition TGX11.cxx:2407
void DeleteFont(FontStruct_t fs) override
Explicitly delete font structure obtained with LoadQueryFont().
Definition GX11Gui.cxx:962
Int_t fGreenDiv
Green value divider.
Definition TGX11.h:113
EDrawMode GetDrawModeW(WinContext_t wctxt) override
Returns window draw mode.
Definition TGX11.cxx:3940
void QueryPointer(Int_t &ix, Int_t &iy) override
Query pointer position.
Definition TGX11.cxx:1594
void DestroyWindow(Window_t id) override
Destroy window.
Definition GX11Gui.cxx:257
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override
Return atom handle for atom_name.
Definition GX11Gui.cxx:900
Drawable_t CreateImage(UInt_t width, UInt_t height) override
Create a client-side XImage. Returns handle to XImage.
Definition GX11Gui.cxx:2613
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override
Union of rectangle with a region.
Definition GX11Gui.cxx:2507
Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override
Return length of string in pixels. Size depends on font.
Definition GX11Gui.cxx:2069
void DestroyRegion(Region_t reg) override
Destroy region.
Definition GX11Gui.cxx:2499
void DeletePictureData(void *data) override
Delete picture data created by the function ReadPictureDataFromFile.
Definition GX11Gui.cxx:1292
ULong_t GetPixel(Color_t cindex) override
Return pixel value associated to specified ROOT color number.
Definition TGX11.cxx:1149
void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override
Convert the keycode from the event structure to a key symbol (according to the modifiers specified in...
Definition GX11Gui.cxx:2281
TGX11()
Default constructor.
Definition TGX11.cxx:194
void NextEvent(Event_t &event) override
Copies first pending event from event queue to Event_t structure and removes event from queue.
Definition GX11Gui.cxx:1411
void GetTextExtent(UInt_t &w, UInt_t &h, char *mess) override
Return the size of a character string.
Definition TGX11.cxx:1193
void MapCursor(ECursor cursor, Int_t &xcursor)
void DeletePixmap(Pixmap_t pmap) override
Explicitly delete pixmap resource.
Definition GX11Gui.cxx:1092
void ClosePixmap() override
Delete current pixmap.
Definition TGX11.cxx:415
FontH_t GetFontHandle(FontStruct_t fs) override
Return handle to font described by font structure.
Definition GX11Gui.cxx:950
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
Definition TGX11.h:115
void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Clear a window area to the background color.
Definition GX11Gui.cxx:1741
void MapPictureAttributes(PictureAttributes_t &attr, RXpmAttributes &xpmattr, Bool_t toxpm=kTRUE)
Map a PictureAttributes_t to a XpmAttributes structure.
Definition GX11Gui.cxx:1101
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override
Request Locator position.
Definition TGX11.cxx:1638
Int_t OpenDisplay(void *display)
Open the display. Return -1 if the opening fails, 0 when ok.
Definition TGX11.cxx:1265
void DrawPolyLine(Int_t n, TPoint *xy) override
Draw a line through all points.
Definition TGX11.cxx:622
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Set clipping region for the window wid.
Definition TGX11.cxx:2156
Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h) override
Register pixmap created by gVirtualGL.
Definition TGX11.cxx:3178
void SetIconName(Window_t id, char *name) override
Set window icon name.
Definition GX11Gui.cxx:1908
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override
Set color intensities for given color index.
Definition TGX11.cxx:2513
void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len) override
Draw a string using a specific graphics context in position (x,y).
Definition GX11Gui.cxx:2058
void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y) override
Reparent window to new parent window at position (x,y).
Definition GX11Gui.cxx:340
void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems)
Check if visual is usable, if so set fVisual, fDepth, fColormap, fBlackPixel and fWhitePixel.
Definition TGX11.cxx:939
Bool_t CreatePictureFromData(Drawable_t id, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Create a picture pixmap from data.
Definition GX11Gui.cxx:1236
EAlign GetTextAlignW(WinContext_t wctxt) const
Return text align value for specified window context.
Definition TGX11.cxx:1068
void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask) override
The Nonrectangular Window Shape Extension adds nonrectangular windows to the System.
Definition GX11Gui.cxx:2675
Window_t GetInputFocus() override
Returns the window id of the window having the input focus.
Definition GX11Gui.cxx:2212
void WMDeleteNotify(Window_t id) override
Tell WM to send message when window is closed via WM.
Definition GX11Gui.cxx:1798
void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line on specified window.
Definition TGX11.cxx:604
void GetCharacterUp(Float_t &chupx, Float_t &chupy) override
Return character up vector.
Definition TGX11.cxx:990
void SetDoubleBuffer(Int_t wid, Int_t mode) override
Set the double buffer on/off on window wid.
Definition TGX11.cxx:2226
void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draws N segments between provided points on specified windows.
Definition TGX11.cxx:694
void SetMarkerStyle(Style_t markerstyle) override
Set marker style.
Definition TGX11.cxx:2485
Int_t EventsPending() override
Returns number of pending events.
Definition GX11Gui.cxx:1400
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override
Get rgb values for color "index".
Definition TGX11.cxx:1172
void SetClassHints(Window_t id, char *className, char *resourceName) override
Set the windows class and resource name.
Definition GX11Gui.cxx:1940
Handle_t GetNativeEvent() const override
Returns the current native event handle.
Definition TGX11.h:157
void SendEvent(Window_t id, Event_t *ev) override
Send event ev to window id.
Definition GX11Gui.cxx:1784
void SetWMSize(Window_t id, UInt_t w, UInt_t h) override
Tell the window manager the desired window size.
Definition GX11Gui.cxx:1988
void ClearWindowW(WinContext_t wctxt) override
Clear specified window.
Definition TGX11.cxx:394
Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override
Parse string cname containing color name, like "green" or "#00FF00".
Definition GX11Gui.cxx:1331
Bool_t EqualRegion(Region_t rega, Region_t regb) override
Returns true if two regions are equal.
Definition GX11Gui.cxx:2577
RVisual * fVisual
Pointer to visual used by all windows.
Definition TGX11.h:101
Width_t GetLineWidth() const override
Return current line width.
Definition TGX11.cxx:2445
Region_t CreateRegion() override
Create a new empty region.
Definition GX11Gui.cxx:2491
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line.
Definition TGX11.cxx:593
void ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t *data, Int_t len) override
This function alters the property for the specified window and causes the X server to generate a Prop...
Definition GX11Gui.cxx:1719
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) override
Return handle to newly created X window.
Definition GX11Gui.cxx:370
void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draw a rectangle outline.
Definition GX11Gui.cxx:2175
void SetForeground(GContext_t gc, ULong_t foreground) override
Set foreground color in graphics context (shortcut for ChangeGC with only foreground mask set).
Definition GX11Gui.cxx:2460
void SetKeyAutoRepeat(Bool_t on=kTRUE) override
Turn key auto repeat on or off.
Definition GX11Gui.cxx:1808
Window_t GetCurrentWindow() const override
Return current window pointer.
Definition TGX11.cxx:1013
void RemoveWindow(ULong_t qwid) override
Remove a window created by Qt (like CloseWindow()).
Definition TGX11.cxx:1580
Int_t RequestString(Int_t x, Int_t y, char *text) override
Request a string.
Definition TGX11.cxx:1816
void DeleteProperty(Window_t, Atom_t &) override
Deletes the specified property only if the property was defined on the specified window and causes th...
Definition GX11Gui.cxx:2694
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr) override
Change window attributes.
Definition GX11Gui.cxx:1698
void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt) override
FillPolygon fills the region closed by the specified path.
Definition GX11Gui.cxx:2421
void SetLineWidth(Width_t width) override
Set line width.
Definition TGX11.cxx:2432
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override
Return some font properties.
Definition GX11Gui.cxx:2077
void MapSetWindowAttributes(SetWindowAttributes_t *attr, ULong_t &xmask, RXSetWindowAttributes &xattr)
Map a SetWindowAttributes_t to a XSetWindowAttributes structure.
Definition GX11Gui.cxx:467
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) override
Copy a drawable (i.e.
Definition GX11Gui.cxx:1685
void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx, Int_t ny, Int_t xmin, Int_t ymin, Int_t xmax, Int_t ymax, UChar_t *image, Drawable_t id)
Draw image.
Definition TGX11.cxx:2974
Int_t GetDoubleBuffer(Int_t wid) override
Query the double buffer value for the window wid.
Definition TGX11.cxx:1088
void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox=kTRUE)
Map modifier key state to or from X.
Definition GX11Gui.cxx:1422
void FindBestVisual()
Find best visual, i.e.
Definition TGX11.cxx:871
void SetDrawMode(EDrawMode mode) override
Set the drawing mode.
Definition TGX11.cxx:2297
void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override
Subtract rega from regb.
Definition GX11Gui.cxx:2544
const char * DisplayName(const char *dpyName=nullptr) override
Return hostname on which the display is opened.
Definition TGX11.cxx:1141
Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0) override
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
Definition TGX11.cxx:3045
Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h) override
Register a window created by Qt as a ROOT window (like InitWindow()).
Definition TGX11.cxx:1555
Int_t AddWindowHandle()
Add new window handle Only for private usage.
Definition TGX11.cxx:1400
void MapColorStruct(ColorStruct_t *color, RXColor &xcolor)
Map a ColorStruct_t to a XColor structure.
Definition GX11Gui.cxx:1315
Float_t fCharacterUpY
Character Up vector along Y.
Definition TGX11.h:109
Bool_t fHasTTFonts
True when TrueType fonts are used.
Definition TGX11.h:118
void SelectWindow(Int_t wid) override
Select window to which subsequent output is directed.
Definition TGX11.cxx:2092
void UnionRegion(Region_t rega, Region_t regb, Region_t result) override
Compute the union of rega and regb and return result region.
Definition GX11Gui.cxx:2527
void Update(Int_t mode=0) override
Flush (mode = 0, default) or synchronize (mode = 1) X output buffer.
Definition GX11Gui.cxx:2480
Basic string class.
Definition TString.h:138
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
Description of a X11 color.
Definition TGWin32.h:58
Bool_t fDefined
true if pixel value is defined
Definition TGWin32.h:60
XColor_t()
Definition TGX11.h:56
UShort_t fBlue
blue value
Definition TGX11.h:54
UShort_t fRed
red value in range [0,kBIGGEST_RGB_VALUE]
Definition TGX11.h:52
UShort_t fGreen
green value
Definition TGX11.h:53
ULong_t fPixel
color pixel value
Definition TGX11.h:51
Description of a X11 window.
Definition TGWin32.cxx:133
TCanvas * style()
Definition style.C:1