ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef ROOT_TVirtualX
16 #include "TVirtualX.h"
17 #endif
18 
19 #if !defined(__CINT__)
20 
21 #ifdef Status
22 // Convert Status from a CPP macro to a typedef:
23 typedef Status X11Status_t;
24 #undef Status
25 typedef X11Status_t Status;
26 #endif
27 
28 #ifdef None
29 // Convert None from a CPP macro to a static const int:
30 static const unsigned long gX11None = None;
31 #undef None
32 static const unsigned long None = gX11None;
33 #endif
34 
35 #endif
36 
37 typedef unsigned long XID;
38 typedef XID Drawable;
39 typedef XID Cursor;
40 typedef XID Colormap;
41 typedef XID Window;
42 
43 struct RXGCValues;
44 struct RXColor;
45 struct RXImage;
46 struct RXPoint;
47 struct RXpmAttributes;
48 struct RXSetWindowAttributes;
49 struct RXVisualInfo;
50 struct RVisual;
51 
52 /// Description of a X11 window.
53 struct XWindow_t {
54  Int_t fOpen; ///< 1 if the window is open, 0 if not
55  Int_t fDoubleBuffer; ///< 1 if the double buffer is on, 0 if not
56  Int_t fIsPixmap; ///< 1 if pixmap, 0 if not
57  Drawable fDrawing; ///< drawing area, equal to window or buffer
58  Drawable fWindow; ///< X11 window
59  Drawable fBuffer; ///< pixmap used for double buffer
60  UInt_t fWidth; ///< width of the window
61  UInt_t fHeight; ///< height of the window
62  Int_t fClip; ///< 1 if the clipping is on
63  Int_t fXclip; ///< x coordinate of the clipping rectangle
64  Int_t fYclip; ///< y coordinate of the clipping rectangle
65  UInt_t fWclip; ///< width of the clipping rectangle
66  UInt_t fHclip; ///< height of the clipping rectangle
67  ULong_t *fNewColors; ///< new image colors (after processing)
68  Int_t fNcolors; ///< number of different colors
69  Bool_t fShared; ///< notify when window is shared
70 };
71 
72 /// Description of a X11 color.
73 struct XColor_t {
74  ULong_t fPixel; ///< color pixel value
75  UShort_t fRed; ///< red value in range [0,kBIGGEST_RGB_VALUE]
76  UShort_t fGreen; ///< green value
77  UShort_t fBlue; ///< blue value
78  Bool_t fDefined; ///< true if pixel value is defined
79  XColor_t() { fPixel = 0; fRed = fGreen = fBlue = 0; fDefined = kFALSE; }
80 };
81 
82 class TExMap;
83 
84 
85 class TGX11 : public TVirtualX {
86 
87 private:
88  Int_t fMaxNumberOfWindows; ///< Maximum number of windows
89  XWindow_t *fWindows; ///< List of windows
90  TExMap *fColors; ///< Hash list of colors
91  Cursor fCursors[kNumCursors]; ///< List of cursors
92  void *fXEvent; ///< Current native (X11) event
93 
94  void CloseWindow1();
95  void ClearPixmap(Drawable *pix);
96  void CopyWindowtoPixmap(Drawable *pix, Int_t xpos, Int_t ypos);
97  void FindBestVisual();
98  void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems);
99  void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx,
101  UChar_t *image, Drawable_t id);
102  void RemovePixmap(Drawable *pix);
103  void SetColor(void *gc, Int_t ci);
104  void SetFillStyleIndex(Int_t style, Int_t fasi);
105  void SetInput(Int_t inp);
106  void SetMarkerType(Int_t type, Int_t n, RXPoint *xy);
107  void CollectImageColors(ULong_t pixel, ULong_t *&orgcolors, Int_t &ncolors,
108  Int_t &maxcolors);
109  void MakeOpaqueColors(Int_t percent, ULong_t *orgcolors, Int_t ncolors);
110  Int_t FindColor(ULong_t pixel, ULong_t *orgcolors, Int_t ncolors);
111  void ImgPickPalette(RXImage *image, Int_t &ncol, Int_t *&R, Int_t *&G, Int_t *&B);
112 
113  //---- Private methods used for GUI ----
114  void MapGCValues(GCValues_t &gval, ULong_t &xmask, RXGCValues &xgval, Bool_t tox = kTRUE);
116  ULong_t &xmask, RXSetWindowAttributes &xattr);
117  void MapCursor(ECursor cursor, Int_t &xcursor);
118  void MapColorStruct(ColorStruct_t *color, RXColor &xcolor);
119  void MapPictureAttributes(PictureAttributes_t &attr, RXpmAttributes &xpmattr,
120  Bool_t toxpm = kTRUE);
121  void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox = kTRUE);
122 
123  // void MapEvent(Event_t &ev, XEvent &xev, Bool_t tox = kTRUE);
124  void MapEvent(Event_t &ev, void *xev, Bool_t tox = kTRUE);
125 
126  void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox = kTRUE);
127  void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox = kTRUE);
128 
129 protected:
130  void *fDisplay; ///< Pointer to display
131  RVisual *fVisual; ///< Pointer to visual used by all windows
132  Drawable fRootWin; ///< Root window used as parent of all windows
133  Drawable fVisRootWin; ///< Root window with fVisual to be used to create GC's and XImages
134  Colormap fColormap; ///< Default colormap, 0 if b/w
135  ULong_t fBlackPixel; ///< Value of black pixel in colormap
136  ULong_t fWhitePixel; ///< Value of white pixel in colormap
137  Int_t fScreenNumber; ///< Screen number
138  Int_t fTextAlignH; ///< Text Alignment Horizontal
139  Int_t fTextAlignV; ///< Text Alignment Vertical
140  Int_t fTextAlign; ///< Text alignment (set in SetTextAlign)
141  Float_t fCharacterUpX; ///< Character Up vector along X
142  Float_t fCharacterUpY; ///< Character Up vector along Y
143  Float_t fTextMagnitude; ///< Text Magnitude
144  Int_t fDepth; ///< Number of color planes
145  Int_t fRedDiv; ///< Red value divider, -1 if no TrueColor visual
146  Int_t fGreenDiv; ///< Green value divider
147  Int_t fBlueDiv; ///< Blue value divider
148  Int_t fRedShift; ///< Bits to left shift red, -1 if no TrueColor visual
149  Int_t fGreenShift; ///< Bits to left shift green
150  Int_t fBlueShift; ///< Bits to left shift blue
151  Bool_t fHasTTFonts; ///< True when TrueType fonts are used
152  Bool_t fHasXft; ///< True when XftFonts are used
153 
154  // needed by TGX11TTF
155  Bool_t AllocColor(Colormap cmap, RXColor *color);
156  void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors);
157  void *GetGC(Int_t which) const;
158  XColor_t &GetColor(Int_t cid);
159 
160 public:
161  TGX11();
162  TGX11(const TGX11 &org);
163  TGX11(const char *name, const char *title);
164  virtual ~TGX11();
165 
166  Bool_t Init(void *display);
167  void ClearWindow();
168  void ClosePixmap();
169  void CloseWindow();
170  void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos);
171  void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode);
172  void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic);
173  void DrawFillArea(Int_t n, TPoint *xy);
174  void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2);
175  void DrawPolyLine(Int_t n, TPoint *xy);
176  void DrawPolyMarker(Int_t n, TPoint *xy);
177  virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode);
178  virtual void DrawText(Int_t, Int_t, Float_t, Float_t, const wchar_t *, ETextMode) {}
179  void GetCharacterUp(Float_t &chupx, Float_t &chupy);
181  void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
182  const char *DisplayName(const char *dpyName = 0);
183  Handle_t GetNativeEvent() const { return (Handle_t) fXEvent; }
184  ULong_t GetPixel(Color_t cindex);
185  void GetPlanes(Int_t &nplanes);
186  void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b);
187  virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess);
188  virtual void GetTextExtent(UInt_t &, UInt_t &, wchar_t *){}
191  Bool_t HasTTFonts() const { return fHasTTFonts; }
195  void RemoveWindow(ULong_t qwid);
196  void MoveWindow(Int_t wid, Int_t x, Int_t y);
197  Int_t OpenDisplay(void *display);
199  void QueryPointer(Int_t &ix, Int_t &iy);
200  Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0);
201  Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y);
202  Int_t RequestString(Int_t x, Int_t y, char *text);
203  void RescaleWindow(Int_t wid, UInt_t w, UInt_t h);
205  void ResizeWindow(Int_t wid);
206  void SelectWindow(Int_t wid);
207  void SetCharacterUp(Float_t chupx, Float_t chupy);
208  void SetClipOFF(Int_t wid);
209  void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
210  void SetCursor(Int_t win, ECursor cursor);
211  void SetDoubleBuffer(Int_t wid, Int_t mode);
212  void SetDoubleBufferOFF();
213  void SetDoubleBufferON();
214  void SetDrawMode(EDrawMode mode);
215  void SetFillColor(Color_t cindex);
216  void SetFillStyle(Style_t style);
217  void SetLineColor(Color_t cindex);
218  void SetLineType(Int_t n, Int_t *dash);
219  void SetLineStyle(Style_t linestyle);
220  void SetLineWidth(Width_t width);
221  void SetMarkerColor(Color_t cindex);
222  void SetMarkerSize(Float_t markersize);
223  void SetMarkerStyle(Style_t markerstyle);
224  void SetOpacity(Int_t percent);
225  void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b);
226  void SetTextAlign(Short_t talign=11);
227  void SetTextColor(Color_t cindex);
228  virtual Int_t SetTextFont(char *fontname, ETextSetMode mode);
229  virtual void SetTextFont(Font_t fontnumber);
231  virtual void SetTextSize(Float_t textsize);
232  void Sync(Int_t mode);
233  void UpdateWindow(Int_t mode);
234  void Warp(Int_t ix, Int_t iy, Window_t id = 0);
235  Int_t WriteGIF(char *name);
236  void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname);
237  Window_t GetCurrentWindow() const;
238  Int_t SupportsExtension(const char *ext) const;
239 
240  //---- Methods used for GUI -----
242  void MapWindow(Window_t id);
243  void MapSubwindows(Window_t id);
244  void MapRaised(Window_t id);
245  void UnmapWindow(Window_t id);
246  void DestroyWindow(Window_t id);
247  void DestroySubwindows(Window_t id);
248  void RaiseWindow(Window_t id);
249  void LowerWindow(Window_t id);
250  void MoveWindow(Window_t id, Int_t x, Int_t y);
252  void ResizeWindow(Window_t id, UInt_t w, UInt_t h);
253  void IconifyWindow(Window_t id);
254  void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y);
255  void SetWindowBackground(Window_t id, ULong_t color);
258  UInt_t w, UInt_t h, UInt_t border,
259  Int_t depth, UInt_t clss,
260  void *visual, SetWindowAttributes_t *attr,
261  UInt_t wtype);
262  Int_t OpenDisplay(const char *dpyName);
263  void CloseDisplay();
264  Display_t GetDisplay() const;
265  Visual_t GetVisual() const;
266  Int_t GetScreen() const;
267  Int_t GetDepth() const;
268  Colormap_t GetColormap() const;
269  Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist);
271  Window_t GetParent(Window_t id) const;
272  FontStruct_t LoadQueryFont(const char *font_name);
274  void DeleteFont(FontStruct_t fs);
276  void ChangeGC(GContext_t gc, GCValues_t *gval);
277  void CopyGC(GContext_t org, GContext_t dest, Mask_t mask);
278  void DeleteGC(GContext_t gc);
279  Cursor_t CreateCursor(ECursor cursor);
280  void SetCursor(Window_t id, Cursor_t curid);
282  Pixmap_t CreatePixmap(Drawable_t id, const char *bitmap, UInt_t width,
283  UInt_t height, ULong_t forecolor, ULong_t backcolor,
284  Int_t depth);
285  unsigned char *GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0);
286  Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height);
287  Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap,
288  UInt_t width, UInt_t height);
289  void DeletePixmap(Pixmap_t pmap);
291  Pixmap_t &pict, Pixmap_t &pict_mask,
293  Bool_t CreatePictureFromData(Drawable_t id, char **data,
294  Pixmap_t &pict, Pixmap_t &pict_mask,
296  Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data);
297  void DeletePictureData(void *data);
298  void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n);
299  Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color);
301  void QueryColor(Colormap_t cmap, ColorStruct_t &color);
302  void FreeColor(Colormap_t cmap, ULong_t pixel);
304  void NextEvent(Event_t &event);
305  void Bell(Int_t percent);
307  Int_t src_x, Int_t src_y, UInt_t width, UInt_t height,
308  Int_t dest_x, Int_t dest_y);
310  void ChangeProperty(Window_t id, Atom_t property, Atom_t type,
311  UChar_t *data, Int_t len);
312  void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2);
313  void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
315  void SendEvent(Window_t id, Event_t *ev);
316  void WMDeleteNotify(Window_t id);
317  void SetKeyAutoRepeat(Bool_t on = kTRUE);
318  void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE);
319  void GrabButton(Window_t id, EMouseButton button, UInt_t modifier,
320  UInt_t evmask, Window_t confine, Cursor_t cursor,
321  Bool_t grab = kTRUE);
322  void GrabPointer(Window_t id, UInt_t evmask, Window_t confine,
323  Cursor_t cursor, Bool_t grab = kTRUE,
324  Bool_t owner_events = kTRUE);
325  void SetWindowName(Window_t id, char *name);
326  void SetIconName(Window_t id, char *name);
327  void SetIconPixmap(Window_t id, Pixmap_t pic);
328  void SetClassHints(Window_t id, char *className, char *resourceName);
329  void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input);
330  void SetWMPosition(Window_t id, Int_t x, Int_t y);
331  void SetWMSize(Window_t id, UInt_t w, UInt_t h);
332  void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin,
333  UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc);
334  void SetWMState(Window_t id, EInitialState state);
335  void SetWMTransientHint(Window_t id, Window_t main_id);
336  void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
337  const char *s, Int_t len);
338  Int_t TextWidth(FontStruct_t font, const char *s, Int_t len);
339  void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent);
340  void GetGCValues(GContext_t gc, GCValues_t &gval);
342  void FreeFontStruct(FontStruct_t fs);
343  void ClearWindow(Window_t id);
344  Int_t KeysymToKeycode(UInt_t keysym);
346  UInt_t w, UInt_t h);
348  UInt_t w, UInt_t h);
349  void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg);
350  void SelectInput(Window_t id, UInt_t evmask);
352  void SetInputFocus(Window_t id);
355  void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when);
356  void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym);
357  void GetPasteBuffer(Window_t id, Atom_t atom, TString &text,
358  Int_t &nchar, Bool_t del);
360  Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child);
361  void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
362  void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt);
363  void QueryPointer(Window_t id, Window_t &rootw, Window_t &childw,
364  Int_t &root_x, Int_t &root_y, Int_t &win_x,
365  Int_t &win_y, UInt_t &mask);
366  void SetForeground(GContext_t gc, ULong_t foreground);
368  void Update(Int_t mode = 0);
370  void DestroyRegion(Region_t reg);
373  void UnionRegion(Region_t rega, Region_t regb, Region_t result);
374  void IntersectRegion(Region_t rega, Region_t regb, Region_t result);
375  void SubtractRegion(Region_t rega, Region_t regb, Region_t result);
376  void XorRegion(Region_t rega, Region_t regb, Region_t result);
379  Bool_t EqualRegion(Region_t rega, Region_t regb);
381  char **ListFonts(const char *fontname, Int_t max, Int_t &count);
382  void FreeFontNames(char **fontlist);
383  Drawable_t CreateImage(UInt_t width, UInt_t height);
384  void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height);
385  void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel);
386  void PutImage(Drawable_t id, GContext_t gc, Drawable_t img,
387  Int_t dx, Int_t dy, Int_t x, Int_t y,
388  UInt_t w, UInt_t h);
389  void DeleteImage(Drawable_t img);
390  void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask);
391  UInt_t ScreenWidthMM() const;
392 
395  Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**);
399  void ChangeProperties(Window_t id, Atom_t property, Atom_t type,
400  Int_t format, UChar_t *data, Int_t len);
401  void SetDNDAware(Window_t, Atom_t *);
402  void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist);
403  Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd);
404  Bool_t IsDNDAware(Window_t win, Atom_t *typelist);
405 
406  ClassDef(TGX11,0) //Interface to X11
407 };
408 
409 #endif
const int nx
Definition: kalman.C:16
void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar, Bool_t del)
Get contents of paste buffer atom into string.
Definition: GX11Gui.cxx:2354
void GetGCValues(GContext_t gc, GCValues_t &gval)
Get current values from graphics context gc.
Definition: GX11Gui.cxx:2101
Handle_t GetNativeEvent() const
Returns the current native event handle.
Definition: TGX11.h:183
void ImgPickPalette(RXImage *image, Int_t &ncol, Int_t *&R, Int_t *&G, Int_t *&B)
Returns in R G B the ncol colors of the palette used by the image.
Definition: TGX11.cxx:3078
void * fDisplay
Pointer to display.
Definition: TGX11.h:130
Handle_t FontStruct_t
Definition: GuiTypes.h:40
void MapRaised(Window_t id)
Map window on screen and put on top of all windows.
Definition: GX11Gui.cxx:249
void MapEvent(Event_t &ev, void *xev, Bool_t tox=kTRUE)
Map Event_t structure to XEvent structure.
Definition: GX11Gui.cxx:1497
void SetWMPosition(Window_t id, Int_t x, Int_t y)
Tell the window manager the desired window position.
Definition: GX11Gui.cxx:1983
void SendEvent(Window_t id, Event_t *ev)
Send event ev to window id.
Definition: GX11Gui.cxx:1798
static double B[]
Int_t GetScreen() const
Returns screen number (might be useful in some cases where direct X11 manipulation outside of TVirtua...
Definition: GX11Gui.cxx:895
Int_t fBlueDiv
Blue value divider.
Definition: TGX11.h:147
Int_t GetDepth() const
Returns depth of screen (number of bit planes).
Definition: GX11Gui.cxx:904
Int_t fMaxNumberOfWindows
Maximum number of windows.
Definition: TGX11.h:88
Semi-Abstract base class defining a generic interface to the underlying, low level, native graphics backend (X11, Win32, MacOS, OpenGL...).
Definition: TVirtualX.h:70
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n)
Specify a dash pattern.
Definition: GX11Gui.cxx:1321
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)
Return handle to newly created X window.
Definition: GX11Gui.cxx:382
void RemovePixmap(Drawable *pix)
Remove the pixmap pix.
Definition: TGX11.cxx:1467
void SetMarkerColor(Color_t cindex)
Set color index for markers.
Definition: TGX11.cxx:2375
float xmin
Definition: THbookFile.cxx:93
XID Drawable
Definition: TGX11.h:38
void ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t *data, Int_t len)
This function alters the property for the specified window and causes the X server to generate a Prop...
Definition: GX11Gui.cxx:1733
void DeleteFont(FontStruct_t fs)
Explicitly delete font structure obtained with LoadQueryFont().
Definition: GX11Gui.cxx:976
void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE)
Establish passive grab on a certain key.
Definition: GX11Gui.cxx:1836
void ClearPixmap(Drawable *pix)
Clear the pixmap pix.
Definition: TGX11.cxx:402
void SetLineStyle(Style_t linestyle)
Set line style.
Definition: TGX11.cxx:2317
void MapColorStruct(ColorStruct_t *color, RXColor &xcolor)
Map a ColorStruct_t to a XColor structure.
Definition: GX11Gui.cxx:1329
void DeletePictureData(void *data)
Delete picture data created by the function ReadPictureDataFromFile.
Definition: GX11Gui.cxx:1306
EInitialState
Definition: GuiTypes.h:346
short Style_t
Definition: RtypesCore.h:76
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data)
Read picture data from file and store in ret_data.
Definition: GX11Gui.cxx:1292
void SetTextMagnitude(Float_t mgn=1)
Sets the current text magnification factor to "mgn".
Definition: TGX11.h:230
void GetPlanes(Int_t &nplanes)
Get maximum number of planes.
Definition: TGX11.cxx:1014
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:3197
Colormap_t GetColormap() const
Returns handle to colormap (might be useful in some cases where direct X11 manipulation outside of TV...
Definition: GX11Gui.cxx:885
FontStruct_t GetFontStruct(FontH_t fh)
Retrieve associated font structure once we have the font handle.
Definition: GX11Gui.cxx:2122
void SetDNDAware(Window_t, Atom_t *)
Add XdndAware property and the list of drag and drop types to the Window win.
Definition: GX11Gui.cxx:2775
char ** ListFonts(const char *fontname, Int_t max, Int_t &count)
Return list of font names matching fontname regexp, like "-*-times-*".
Definition: GX11Gui.cxx:2604
float Float_t
Definition: RtypesCore.h:53
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height)
create pixmap from RGB data.
Definition: TGX11.cxx:3378
UShort_t fBlue
blue value
Definition: TGX11.h:77
UInt_t Mask_t
Definition: GuiTypes.h:42
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Draw a line.
Definition: TGX11.cxx:603
void SetWindowBackground(Window_t id, ULong_t color)
Set the window background color.
Definition: GX11Gui.cxx:362
Float_t fCharacterUpX
Character Up vector along X.
Definition: TGX11.h:141
tuple offset
Definition: tree.py:93
float ymin
Definition: THbookFile.cxx:93
void SetColor(void *gc, Int_t ci)
Set the foreground color in GC.
Definition: TGX11.cxx:2038
Bool_t Init(void *display)
Initialize X11 system. Returns kFALSE in case of failure.
Definition: TGX11.cxx:337
Bool_t fHasXft
True when XftFonts are used.
Definition: TGX11.h:152
UShort_t fGreen
green value
Definition: TGX11.h:76
void Update(Int_t mode=0)
Flush (mode = 0, default) or synchronize (mode = 1) X output buffer.
Definition: GX11Gui.cxx:2491
Int_t fScreenNumber
Screen number.
Definition: TGX11.h:137
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos)
Copy the pixmap wid at the position xpos, ypos in the current window.
Definition: TGX11.cxx:491
void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Return geometry of window (should be called GetGeometry but signature already used).
Definition: GX11Gui.cxx:2414
XID Cursor
Definition: TGX11.h:39
void DrawPolyMarker(Int_t n, TPoint *xy)
Draw n markers with the current attributes at position x, y.
Definition: TGX11.cxx:671
unsigned short UShort_t
Definition: RtypesCore.h:36
ULong_t Time_t
Definition: GuiTypes.h:43
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname)
Write the pixmap wid in the bitmap file pxname.
Definition: TGX11.cxx:3025
void SetLineWidth(Width_t width)
Set line width.
Definition: TGX11.cxx:2356
TH1 * h
Definition: legend2.C:5
Description of a X11 color.
Definition: TGWin32.h:72
Int_t RequestString(Int_t x, Int_t y, char *text)
Request a string.
Definition: TGX11.cxx:1678
void CloseWindow()
Delete current window.
Definition: TGX11.cxx:442
void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE)
Establish an active pointer grab.
Definition: GX11Gui.cxx:1883
EGEventType
Definition: GuiTypes.h:60
Handle_t Cursor_t
Definition: GuiTypes.h:35
virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess)
Return the size of a character string.
Definition: TGX11.cxx:1043
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest)
Union of rectangle with a region.
Definition: GX11Gui.cxx:2518
void SetDrawMode(EDrawMode mode)
Set the drawing mode.
Definition: TGX11.cxx:2154
static const char * filename()
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic)
Draw a cell array.
Definition: TGX11.cxx:554
Handle_t GContext_t
Definition: GuiTypes.h:39
Window_t GetPrimarySelectionOwner()
Returns the window id of the current owner of the primary selection.
Definition: GX11Gui.cxx:2251
void SetClassHints(Window_t id, char *className, char *resourceName)
Set the windows class and resource name.
Definition: GX11Gui.cxx:1951
void ChangeGC(GContext_t gc, GCValues_t *gval)
Change entries in an existing graphics context, gc, by values from gval.
Definition: GX11Gui.cxx:1007
Basic string class.
Definition: TString.h:137
Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg)
Returns true if the point x,y is in the region.
Definition: GX11Gui.cxx:2580
Int_t EventsPending()
Returns number of pending events.
Definition: GX11Gui.cxx:1414
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding)
Create region for the polygon defined by the points array.
Definition: GX11Gui.cxx:2528
const Bool_t kFALSE
Definition: Rtypes.h:92
void RaiseWindow(Window_t id)
Put window on top of window stack.
Definition: GX11Gui.cxx:289
Window_t GetDefaultRootWindow() const
Return handle to the default root window created when calling XOpenDisplay().
Definition: GX11Gui.cxx:926
Handle_t Drawable_t
Definition: GuiTypes.h:32
Cursor fCursors[kNumCursors]
List of cursors.
Definition: TGX11.h:91
void DrawPolyLine(Int_t n, TPoint *xy)
Draw a line through all points.
Definition: TGX11.cxx:619
void CollectImageColors(ULong_t pixel, ULong_t *&orgcolors, Int_t &ncolors, Int_t &maxcolors)
Collect in orgcolors all different original image colors.
Definition: TGX11.cxx:2696
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n)
Set clipping rectangles in graphics context.
Definition: GX11Gui.cxx:2481
Float_t fCharacterUpY
Character Up vector along Y.
Definition: TGX11.h:142
void SelectWindow(Int_t wid)
Select window to which subsequent output is directed.
Definition: TGX11.cxx:1953
void QueryColor(Colormap_t cmap, ColorStruct_t &color)
Fill in the primary color components for a specific pixel value.
Definition: GX11Gui.cxx:1385
static std::string format(double x, double y, int digits, int width)
ECursor
Definition: TVirtualX.h:56
Int_t WriteGIF(char *name)
Writes the current window into GIF file.
Definition: TGX11.cxx:3134
short Font_t
Definition: RtypesCore.h:75
void MapSubwindows(Window_t id)
Map sub windows.
Definition: GX11Gui.cxx:239
XID Colormap
Definition: TGX11.h:40
Int_t fTextAlign
Text alignment (set in SetTextAlign)
Definition: TGX11.h:140
Handle_t Display_t
Definition: GuiTypes.h:28
void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y)
Reparent window to new parent window at position (x,y).
Definition: GX11Gui.cxx:352
void SetCursor(Int_t win, ECursor cursor)
Set the cursor.
Definition: TGX11.cxx:2071
tuple window
Definition: gui_ex.py:57
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h)
Resize a pixmap.
Definition: TGX11.cxx:1870
#define G(x, y, z)
Bool_t EqualRegion(Region_t rega, Region_t regb)
Returns true if two regions are equal.
Definition: GX11Gui.cxx:2588
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode)
Draw a box.
Definition: TGX11.cxx:520
void SetWindowName(Window_t id, char *name)
Set window name.
Definition: GX11Gui.cxx:1902
Handle_t FontH_t
Definition: GuiTypes.h:36
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist)
Return atom handle for atom_name.
Definition: GX11Gui.cxx:914
void DeleteImage(Drawable_t img)
Destroy XImage img.
Definition: GX11Gui.cxx:2676
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Return position and size of window wid.
Definition: TGX11.cxx:956
Int_t fGreenDiv
Green value divider.
Definition: TGX11.h:146
virtual Int_t SetTextFont(char *fontname, ETextSetMode mode)
Set text font to specified name.
Definition: TGX11.cxx:2901
void DrawFillArea(Int_t n, TPoint *xy)
Fill area described by polygon.
Definition: TGX11.cxx:584
void SetMarkerStyle(Style_t markerstyle)
Set marker style.
Definition: TGX11.cxx:2429
void GetRegionBox(Region_t reg, Rectangle_t *)
Return smallest enclosing rectangle.
Definition: GX11Gui.cxx:2596
Int_t OpenDisplay(void *display)
Open the display. Return -1 if the opening fails, 0 when ok.
Definition: TGX11.cxx:1086
void * GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
Definition: TGX11.cxx:926
void CloseWindow1()
Delete current window.
Definition: TGX11.cxx:456
void UnionRegion(Region_t rega, Region_t regb, Region_t result)
Compute the union of rega and regb and return result region.
Definition: GX11Gui.cxx:2538
static const double x2[5]
void SetFillStyleIndex(Int_t style, Int_t fasi)
Set fill area style index.
Definition: TGX11.cxx:2209
Double_t x[n]
Definition: legend1.C:17
void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt)
FillPolygon fills the region closed by the specified path.
Definition: GX11Gui.cxx:2432
Bool_t SetSelectionOwner(Window_t, Atom_t &)
Changes the owner and last-change time for the specified selection.
Definition: GX11Gui.cxx:2752
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b)
Get rgb values for color "index".
Definition: TGX11.cxx:1022
TBonjourRegistrar * reg
Definition: hserv2bonj.C:28
Window_t GetCurrentWindow() const
Return current window pointer. Protected method used by TGX11TTF.
Definition: TGX11.cxx:917
void DestroySubwindows(Window_t id)
Destroy subwindows of this window.
Definition: GX11Gui.cxx:279
Drawable fVisRootWin
Root window with fVisual to be used to create GC's and XImages.
Definition: TGX11.h:133
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
Set pixmap as window background.
Definition: GX11Gui.cxx:372
TExMap * fColors
Hash list of colors.
Definition: TGX11.h:90
ULong_t fWhitePixel
Value of white pixel in colormap.
Definition: TGX11.h:136
Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t, Atom_t *, Int_t *, ULong_t *, ULong_t *, unsigned char **)
Returns the actual type of the property; the actual format of the property; the number of 8-bit...
Definition: GX11Gui.cxx:2716
const int ny
Definition: kalman.C:17
void ResizeWindow(Int_t wid)
Resize the current window if necessary.
Definition: TGX11.cxx:1914
Region_t CreateRegion()
Create a new empty region.
Definition: GX11Gui.cxx:2502
void RemoveWindow(ULong_t qwid)
Remove a window created by Qt (like CloseWindow1()).
Definition: TGX11.cxx:1417
Handle_t Atom_t
Definition: GuiTypes.h:38
void Bell(Int_t percent)
Sound bell. Percent is loudness from -100% .. 100%.
Definition: GX11Gui.cxx:1689
XWindow_t * fWindows
List of windows.
Definition: TGX11.h:89
UShort_t fRed
red value in range [0,kBIGGEST_RGB_VALUE]
Definition: TGX11.h:75
void DestroyWindow(Window_t id)
Destroy window.
Definition: GX11Gui.cxx:269
XColor_t()
Definition: TGX11.h:79
void ClearWindow()
Clear current window.
Definition: TGX11.cxx:417
Visual_t GetVisual() const
Returns handle to visual (might be useful in some cases where direct X11 manipulation outside of TVir...
Definition: GX11Gui.cxx:875
void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym)
Convert the keycode from the event structure to a key symbol (according to the modifiers specified in...
Definition: GX11Gui.cxx:2292
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b)
Set color intensities for given color index.
Definition: TGX11.cxx:2782
Colormap fColormap
Default colormap, 0 if b/w.
Definition: TGX11.h:134
void SetKeyAutoRepeat(Bool_t on=kTRUE)
Turn key auto repeat on or off.
Definition: GX11Gui.cxx:1822
Bool_t CreatePictureFromFile(Drawable_t id, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr)
Create a picture pixmap from data on file.
Definition: GX11Gui.cxx:1197
void SetDoubleBufferOFF()
Turn double buffer mode off.
Definition: TGX11.cxx:2119
tuple np
Definition: multifit.py:30
ClassDef(TAttLine, 2)
void SetMarkerSize(Float_t markersize)
Set marker size index.
Definition: TGX11.cxx:2389
void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw a rectangle outline.
Definition: GX11Gui.cxx:2186
unsigned long XID
Definition: TGX11.h:37
Float_t GetTextMagnitude()
Returns the current font magnification factor.
Definition: TGX11.h:189
void Sync(Int_t mode)
Set synchronisation on or off.
Definition: TGX11.cxx:2962
UInt_t ScreenWidthMM() const
Returns the width of the screen in millimeters.
Definition: GX11Gui.cxx:2695
void SetForeground(GContext_t gc, ULong_t foreground)
Set foreground color in graphics context (shortcut for ChangeGC with only foreground mask set)...
Definition: GX11Gui.cxx:2471
void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors)
Returns the current RGB value for the pixel in the XColor structure.
Definition: TGX11.cxx:378
ULong_t GetPixel(Color_t cindex)
Return pixel value associated to specified ROOT color number.
Definition: TGX11.cxx:999
void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel)
Set pixel at specified location in XImage img.
Definition: GX11Gui.cxx:2656
void IconifyWindow(Window_t id)
Iconify the window.
Definition: GX11Gui.cxx:342
void WMDeleteNotify(Window_t id)
Tell WM to send message when window is closed via WM.
Definition: GX11Gui.cxx:1812
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask)
Copies graphics context from org to dest.
Definition: GX11Gui.cxx:1026
short Color_t
Definition: RtypesCore.h:79
void SetTextColor(Color_t cindex)
Set color index for text.
Definition: TGX11.cxx:2872
void SubtractRegion(Region_t rega, Region_t regb, Region_t result)
Subtract rega from regb.
Definition: GX11Gui.cxx:2555
Int_t fDepth
Number of color planes.
Definition: TGX11.h:144
void SetTextAlign(Short_t talign=11)
Set text alignment.
Definition: TGX11.cxx:2815
Definition: TPoint.h:33
Int_t GetDoubleBuffer(Int_t wid)
Query the double buffer value for the window wid.
Definition: TGX11.cxx:938
void Warp(Int_t ix, Int_t iy, Window_t id=0)
Set pointer position.
Definition: TGX11.cxx:3008
void UpdateWindow(Int_t mode)
Update display.
Definition: TGX11.cxx:2985
void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &)
Requests that the specified selection be converted to the specified target type.
Definition: GX11Gui.cxx:2743
#define None
Definition: TGWin32.h:68
point * points
Definition: X3DBuffer.c:20
void * fXEvent
Current native (X11) event.
Definition: TGX11.h:92
void SelectInput(Window_t id, UInt_t evmask)
Defines which input events the window is interested in.
Definition: GX11Gui.cxx:2209
Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h)
Register pixmap created by gVirtualGL.
Definition: TGX11.cxx:3392
void QueryPointer(Int_t &ix, Int_t &iy)
Query pointer position.
Definition: TGX11.cxx:1449
void GetWindowAttributes(Window_t id, WindowAttributes_t &attr)
Get window attributes and return filled in attributes structure.
Definition: GX11Gui.cxx:775
void SetWMSize(Window_t id, UInt_t w, UInt_t h)
Tell the window manager the desired window size.
Definition: GX11Gui.cxx:1999
float ymax
Definition: THbookFile.cxx:93
XColor_t & GetColor(Int_t cid)
Return reference to internal color structure associated to color index cid.
Definition: TGX11.cxx:904
Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev)
Check if there is for window "id" an event of type "type".
Definition: GX11Gui.cxx:1767
Int_t fTextAlignH
Text Alignment Horizontal.
Definition: TGX11.h:138
void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist)
Add the list of drag and drop types to the Window win.
Definition: GX11Gui.cxx:2796
Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h)
Creates a pixmap of the width and height you specified and returns a pixmap ID that identifies it...
Definition: GX11Gui.cxx:1076
void SetDoubleBufferON()
Turn double buffer mode on.
Definition: TGX11.cxx:2129
EMouseButton
Definition: GuiTypes.h:215
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent)
Return some font properties.
Definition: GX11Gui.cxx:2088
virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode)
Draw a text string using current font.
Definition: TGX11.cxx:746
ROOT::R::TRInterface & r
Definition: Object.C:4
void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t)
Changes the specified dynamic parameters if the pointer is actively grabbed by the client...
Definition: GX11Gui.cxx:2729
Int_t OpenPixmap(UInt_t w, UInt_t h)
Open a new pixmap.
Definition: TGX11.cxx:1238
void UnmapWindow(Window_t id)
Unmap window from screen.
Definition: GX11Gui.cxx:259
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
Window_t GetWindowID(Int_t wid)
Return the X11 window identifier.
Definition: TGX11.cxx:1063
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
ULong_t fPixel
color pixel value
Definition: TGX11.h:74
FontH_t GetFontHandle(FontStruct_t fs)
Return handle to font described by font structure.
Definition: GX11Gui.cxx:964
Handle_t Visual_t
Definition: GuiTypes.h:29
Bool_t HasTTFonts() const
Returns True when TrueType fonts are used.
Definition: TGX11.h:191
Drawable_t CreateImage(UInt_t width, UInt_t height)
Create a client-side XImage. Returns handle to XImage.
Definition: GX11Gui.cxx:2624
Int_t InitWindow(ULong_t window)
Open window and return window number.
Definition: TGX11.cxx:1296
Int_t fTextAlignV
Text Alignment Vertical.
Definition: TGX11.h:139
void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len)
Draw a string using a specific graphics context in position (x,y).
Definition: GX11Gui.cxx:2069
FontStruct_t LoadQueryFont(const char *font_name)
Load font and query font.
Definition: GX11Gui.cxx:955
Display_t GetDisplay() const
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
Definition: GX11Gui.cxx:865
void SetDoubleBuffer(Int_t wid, Int_t mode)
Set the double buffer on/off on window wid.
Definition: TGX11.cxx:2086
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)
TranslateCoordinates translates coordinates from the frame of reference of one window to another...
Definition: GX11Gui.cxx:2398
unsigned int UInt_t
Definition: RtypesCore.h:42
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: `b1...
Definition: TGX11.cxx:3365
void DeleteProperty(Window_t, Atom_t &)
Deletes the specified property only if the property was defined on the specified window and causes th...
Definition: GX11Gui.cxx:2705
Int_t FindColor(ULong_t pixel, ULong_t *orgcolors, Int_t ncolors)
Returns index in orgcolors (and fNewColors) for pixel.
Definition: TGX11.cxx:2766
void DeletePixmap(Pixmap_t pmap)
Explicitly delete pixmap resource.
Definition: GX11Gui.cxx:1106
Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0)
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
Definition: TGX11.cxx:3262
void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg)
Draws multiple line segments. Each line is specified by a pair of points.
Definition: GX11Gui.cxx:2196
Int_t fGreenShift
Bits to left shift green.
Definition: TGX11.h:149
void SetFillStyle(Style_t style)
Set fill area style.
Definition: TGX11.cxx:2197
Bool_t fHasTTFonts
True when TrueType fonts are used.
Definition: TGX11.h:151
void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask)
The Nonrectangular Window Shape Extension adds nonrectangular windows to the System.
Definition: GX11Gui.cxx:2686
tuple w
Definition: qtexample.py:51
void MoveWindow(Int_t wid, Int_t x, Int_t y)
Move the window wid.
Definition: TGX11.cxx:1075
void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: GX11Gui.cxx:1965
short Short_t
Definition: RtypesCore.h:35
void NextEvent(Event_t &event)
Copies first pending event from event queue to Event_t structure and removes event from queue...
Definition: GX11Gui.cxx:1425
const char * DisplayName(const char *dpyName=0)
Return hostname on which the display is opened.
Definition: TGX11.cxx:991
GContext_t CreateGC(Drawable_t id, GCValues_t *gval)
Create a graphics context using the values set in gval (but only for those entries that are in the ma...
Definition: GX11Gui.cxx:985
void FreeFontStruct(FontStruct_t fs)
Free font structure returned by GetFontStruct().
Definition: GX11Gui.cxx:2134
float xmax
Definition: THbookFile.cxx:93
void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Clear a window area to the background color.
Definition: GX11Gui.cxx:1755
void DestroyRegion(Region_t reg)
Destroy region.
Definition: GX11Gui.cxx:2510
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h)
Set clipping region for the window wid.
Definition: TGX11.cxx:2015
Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd)
Recursively search in the children of Window for a Window which is at location x, y and is DND aware...
Definition: GX11Gui.cxx:2813
void MakeOpaqueColors(Int_t percent, ULong_t *orgcolors, Int_t ncolors)
Get RGB values for orgcolors, add percent neutral to the RGB and allocate fNewColors.
Definition: TGX11.cxx:2721
void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize a window.
Definition: GX11Gui.cxx:319
Handle_t Colormap_t
Definition: GuiTypes.h:34
short Width_t
Definition: RtypesCore.h:78
This class is the basic interface to the X11 (Xlib) graphics system.
Definition: TGX11.h:85
Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height)
Create a bitmap (i.e. pixmap with depth 1) from the bitmap data.
Definition: GX11Gui.cxx:1096
virtual void DrawText(Int_t, Int_t, Float_t, Float_t, const wchar_t *, ETextMode)
Draws a text string using current font.
Definition: TGX11.h:178
XID Window
Definition: TGX11.h:41
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr)
Change window attributes.
Definition: GX11Gui.cxx:1712
long Long_t
Definition: RtypesCore.h:50
Color * colors
Definition: X3DBuffer.c:19
void FindBestVisual()
Find best visual, i.e.
Definition: TGX11.cxx:775
void GetCharacterUp(Float_t &chupx, Float_t &chupy)
Return character up vector.
Definition: TGX11.cxx:894
virtual void SetTextSize(Float_t textsize)
Set current text size.
Definition: TGX11.cxx:2950
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h)
Rescale the window wid.
Definition: TGX11.cxx:1836
static const double x1[5]
void MapPictureAttributes(PictureAttributes_t &attr, RXpmAttributes &xpmattr, Bool_t toxpm=kTRUE)
Map a PictureAttributes_t to a XpmAttributes structure.
Definition: GX11Gui.cxx:1115
void MapSetWindowAttributes(SetWindowAttributes_t *attr, ULong_t &xmask, RXSetWindowAttributes &xattr)
Map a SetWindowAttributes_t to a XSetWindowAttributes structure.
Definition: GX11Gui.cxx:479
tuple file
Definition: fildir.py:20
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:568
TText * text
void FreeColor(Colormap_t cmap, ULong_t pixel)
Free color cell with specified pixel value.
Definition: GX11Gui.cxx:1405
void FreeFontNames(char **fontlist)
Free list of font names.
Definition: GX11Gui.cxx:2616
const int kNumCursors
Definition: TVirtualX.h:55
void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE)
Establish passive grab on a certain mouse button.
Definition: GX11Gui.cxx:1857
Bool_t EmptyRegion(Region_t reg)
Return true if the region is empty.
Definition: GX11Gui.cxx:2572
int type
Definition: TGX11.cxx:120
void LowerWindow(Window_t id)
Lower window so it lays below all its siblings.
Definition: GX11Gui.cxx:299
void ClosePixmap()
Delete current pixmap.
Definition: TGX11.cxx:434
unsigned long ULong_t
Definition: RtypesCore.h:51
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
Bool_t AllocColor(Colormap cmap, RXColor *color)
Allocate color in colormap.
Definition: TGX11.cxx:361
void SetLineColor(Color_t cindex)
Set color index for lines.
Definition: TGX11.cxx:2271
void SetIconPixmap(Window_t id, Pixmap_t pic)
Set pixmap the WM can use when the window is iconized.
Definition: GX11Gui.cxx:1936
void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
Definition: GX11Gui.cxx:2016
void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems)
Check if visual is usable, if so set fVisual, fDepth, fColormap, fBlackPixel and fWhitePixel.
Definition: TGX11.cxx:843
Int_t fBlueShift
Bits to left shift blue.
Definition: TGX11.h:150
Bool_t CreatePictureFromData(Drawable_t id, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr)
Create a picture pixmap from data.
Definition: GX11Gui.cxx:1250
void SetLineType(Int_t n, Int_t *dash)
Set line type.
Definition: TGX11.cxx:2292
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Definition: vector.h:440
void DeleteGC(GContext_t gc)
Explicitly delete a graphics context.
Definition: GX11Gui.cxx:1046
#define name(a, b)
Definition: linkTestLib0.cpp:5
#define org(otri, vertexptr)
Definition: triangle.c:1037
void XorRegion(Region_t rega, Region_t regb, Region_t result)
Calculate the difference between the union and intersection of two regions.
Definition: GX11Gui.cxx:2564
void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox=kTRUE)
Map to and from X key symbols.
Definition: GX11Gui.cxx:2314
Float_t fTextMagnitude
Text Magnitude.
Definition: TGX11.h:143
void SetInputFocus(Window_t id)
Set keyboard input focus to window id.
Definition: GX11Gui.cxx:2235
Handle_t Window_t
Definition: GuiTypes.h:30
virtual void GetTextExtent(UInt_t &, UInt_t &, wchar_t *)
Returns the size of the specified character string "mess".
Definition: TGX11.h:188
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y)
Request Locator position.
Definition: TGX11.cxx:1500
void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height)
Get size of XImage img.
Definition: GX11Gui.cxx:2647
virtual ~TGX11()
Destructor.
Definition: TGX11.cxx:319
void IntersectRegion(Region_t rega, Region_t regb, Region_t result)
Compute the intersection of rega and regb and return result region.
Definition: GX11Gui.cxx:2547
void SetPrimarySelectionOwner(Window_t id)
Makes the window id the current owner of the primary selection.
Definition: GX11Gui.cxx:2260
void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when)
XConvertSelection() causes a SelectionRequest event to be sent to the current primary selection owner...
Definition: GX11Gui.cxx:2278
#define dest(otri, vertexptr)
Definition: triangle.c:1040
RVisual * fVisual
Pointer to visual used by all windows.
Definition: TGX11.h:131
void MapWindow(Window_t id)
Map window on screen.
Definition: GX11Gui.cxx:229
Bool_t IsDNDAware(Window_t win, Atom_t *typelist)
Checks if Window win is DND aware, and knows any of the DND formats passed in argument.
Definition: GX11Gui.cxx:2864
Handle_t Region_t
Definition: GuiTypes.h:33
void SetOpacity(Int_t percent)
Set opacity of a window.
Definition: TGX11.cxx:2631
Handle_t Pixmap_t
Definition: GuiTypes.h:31
void SetWMState(Window_t id, EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
Definition: GX11Gui.cxx:2038
void SetMarkerType(Int_t type, Int_t n, RXPoint *xy)
Set marker type.
Definition: TGX11.cxx:2414
Window_t GetInputFocus()
Returns the window id of the window having the input focus.
Definition: GX11Gui.cxx:2223
void SetWMTransientHint(Window_t id, Window_t main_id)
Tell window manager that window is a transient window of main.
Definition: GX11Gui.cxx:2059
void SetFillColor(Color_t cindex)
Set color index for fill areas.
Definition: TGX11.cxx:2178
Bool_t fDefined
true if pixel value is defined
Definition: TGWin32.h:74
Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color)
Parse string cname containing color name, like "green" or "#00FF00".
Definition: GX11Gui.cxx:1345
Drawable fRootWin
Root window used as parent of all windows.
Definition: TGX11.h:132
void CopyWindowtoPixmap(Drawable *pix, Int_t xpos, Int_t ypos)
Copy area of current window in the pixmap pix.
Definition: TGX11.cxx:503
Int_t KeysymToKeycode(UInt_t keysym)
Convert a keysym to the appropriate keycode.
Definition: GX11Gui.cxx:2165
void SetIconName(Window_t id, char *name)
Set window icon name.
Definition: GX11Gui.cxx:1919
void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw a filled rectangle. Filling is done according to the gc.
Definition: GX11Gui.cxx:2176
double result[121]
unsigned char UChar_t
Definition: RtypesCore.h:34
void SetCharacterUp(Float_t chupx, Float_t chupy)
Set character up vector.
Definition: TGX11.cxx:1978
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
Definition: TGX11.h:145
Cursor_t CreateCursor(ECursor cursor)
Create cursor handle (just return cursor from cursor pool fCursors).
Definition: GX11Gui.cxx:1057
void MapCursor(ECursor cursor, Int_t &xcursor)
void SetInput(Int_t inp)
Set input on or off.
Definition: TGX11.cxx:2252
const Bool_t kTRUE
Definition: Rtypes.h:91
float value
Definition: math.cpp:443
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)
Copy a drawable (i.e.
Definition: GX11Gui.cxx:1699
Window_t GetParent(Window_t id) const
Return the parent of the window.
Definition: GX11Gui.cxx:934
Int_t TextWidth(FontStruct_t font, const char *s, Int_t len)
Return length of string in pixels. Size depends on font.
Definition: GX11Gui.cxx:2080
ULong_t fBlackPixel
Value of black pixel in colormap.
Definition: TGX11.h:135
Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h)
Register a window created by Qt as a ROOT window (like InitWindow()).
Definition: TGX11.cxx:1373
const Int_t n
Definition: legend1.C:16
void SetClipOFF(Int_t wid)
Turn off the clipping for the window wid.
Definition: TGX11.cxx:1999
TRandom3 R
a TMatrixD.
Definition: testIO.cxx:28
void ChangeProperties(Window_t id, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len)
This function alters the property for the specified window and causes the X server to generate a Prop...
Definition: GX11Gui.cxx:2762
This class stores a (key,value) pair using an external hash.
Definition: TExMap.h:35
void CloseDisplay()
Close connection to display server.
Definition: GX11Gui.cxx:854
void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox=kTRUE)
Map event mask to or from X.
Definition: GX11Gui.cxx:414
Int_t SupportsExtension(const char *ext) const
Returns 1 if window system server supports extension given by the argument, returns 0 in case extensi...
Definition: TGX11.cxx:3439
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
Definition: TGX11.h:148
void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox=kTRUE)
Map modifier key state to or from X.
Definition: GX11Gui.cxx:1436
const char Int_t const char * image
Definition: TXSlave.cxx:46
ULong_t Handle_t
Definition: GuiTypes.h:27