Logo ROOT   6.08/07
Reference Guide
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);
115  void MapSetWindowAttributes(SetWindowAttributes_t *attr,
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);
180  Int_t GetDoubleBuffer(Int_t wid);
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 *){}
189  Float_t GetTextMagnitude() { return fTextMagnitude; }
190  Window_t GetWindowID(Int_t wid);
191  Bool_t HasTTFonts() const { return fHasTTFonts; }
192  Int_t InitWindow(ULong_t window);
193  Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h);
194  Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h);
195  void RemoveWindow(ULong_t qwid);
196  void MoveWindow(Int_t wid, Int_t x, Int_t y);
197  Int_t OpenDisplay(void *display);
198  Int_t OpenPixmap(UInt_t w, UInt_t h);
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);
204  Int_t ResizePixmap(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);
230  void SetTextMagnitude(Float_t mgn=1) { fTextMagnitude = mgn;}
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);
251  void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
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);
256  void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm);
257  Window_t CreateWindow(Window_t parent, Int_t x, Int_t y,
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);
270  Window_t GetDefaultRootWindow() const;
271  Window_t GetParent(Window_t id) const;
272  FontStruct_t LoadQueryFont(const char *font_name);
273  FontH_t GetFontHandle(FontStruct_t fs);
274  void DeleteFont(FontStruct_t fs);
275  GContext_t CreateGC(Drawable_t id, GCValues_t *gval);
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);
281  Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h);
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);
290  Bool_t CreatePictureFromFile(Drawable_t id, const char *filename,
291  Pixmap_t &pict, Pixmap_t &pict_mask,
292  PictureAttributes_t &attr);
293  Bool_t CreatePictureFromData(Drawable_t id, char **data,
294  Pixmap_t &pict, Pixmap_t &pict_mask,
295  PictureAttributes_t &attr);
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);
300  Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color);
301  void QueryColor(Colormap_t cmap, ColorStruct_t &color);
302  void FreeColor(Colormap_t cmap, ULong_t pixel);
303  Int_t EventsPending();
304  void NextEvent(Event_t &event);
305  void Bell(Int_t percent);
306  void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc,
307  Int_t src_x, Int_t src_y, UInt_t width, UInt_t height,
308  Int_t dest_x, Int_t dest_y);
309  void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr);
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);
314  Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev);
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);
341  FontStruct_t GetFontStruct(FontH_t fh);
342  void FreeFontStruct(FontStruct_t fs);
343  void ClearWindow(Window_t id);
344  Int_t KeysymToKeycode(UInt_t keysym);
345  void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
346  UInt_t w, UInt_t h);
347  void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y,
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);
351  Window_t GetInputFocus();
352  void SetInputFocus(Window_t id);
353  Window_t GetPrimarySelectionOwner();
354  void SetPrimarySelectionOwner(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);
359  void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,
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);
367  void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n);
368  void Update(Int_t mode = 0);
369  Region_t CreateRegion();
370  void DestroyRegion(Region_t reg);
371  void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest);
372  Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding);
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);
377  Bool_t EmptyRegion(Region_t reg);
378  Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg);
379  Bool_t EqualRegion(Region_t rega, Region_t regb);
380  void GetRegionBox(Region_t reg, Rectangle_t *);
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 
393  void DeleteProperty(Window_t, Atom_t&);
394  Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t,
395  Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**);
396  void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t);
397  void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&);
398  Bool_t SetSelectionOwner(Window_t, Atom_t&);
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 * fDisplay
Pointer to display.
Definition: TGX11.h:130
Handle_t FontStruct_t
Definition: GuiTypes.h:40
static double B[]
Int_t fBlueDiv
Blue value divider.
Definition: TGX11.h:147
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
float xmin
Definition: THbookFile.cxx:93
XID Drawable
Definition: TGX11.h:38
EInitialState
Definition: GuiTypes.h:346
short Style_t
Definition: RtypesCore.h:76
void SetTextMagnitude(Float_t mgn=1)
Sets the current text magnification factor to "mgn".
Definition: TGX11.h:230
void GetWindowAttributes(NSObject< X11Window > *window, WindowAttributes_t *dst)
float Float_t
Definition: RtypesCore.h:53
UShort_t fBlue
blue value
Definition: TGX11.h:77
UInt_t Mask_t
Definition: GuiTypes.h:42
th1 SetTextAlign(11)
Float_t fCharacterUpX
Character Up vector along X.
Definition: TGX11.h:141
float ymin
Definition: THbookFile.cxx:93
Bool_t fHasXft
True when XftFonts are used.
Definition: TGX11.h:152
UShort_t fGreen
green value
Definition: TGX11.h:76
Int_t fScreenNumber
Screen number.
Definition: TGX11.h:137
XID Cursor
Definition: TGX11.h:39
unsigned short UShort_t
Definition: RtypesCore.h:36
ULong_t Time_t
Definition: GuiTypes.h:43
TH1 * h
Definition: legend2.C:5
Description of a X11 color.
Definition: TGWin32.h:63
EGEventType
Definition: GuiTypes.h:60
Handle_t Cursor_t
Definition: GuiTypes.h:35
pt SetTextColor(4)
Handle_t GContext_t
Definition: GuiTypes.h:39
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Handle_t Drawable_t
Definition: GuiTypes.h:32
Float_t fCharacterUpY
Character Up vector along Y.
Definition: TGX11.h:142
static std::string format(double x, double y, int digits, int width)
ECursor
Definition: TVirtualX.h:56
short Font_t
Definition: RtypesCore.h:75
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
#define G(x, y, z)
Handle_t FontH_t
Definition: GuiTypes.h:36
Int_t fGreenDiv
Green value divider.
Definition: TGX11.h:146
Handle_t GetNativeEvent() const
Returns the current native event handle.
Definition: TGX11.h:183
static const double x2[5]
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
Drawable fVisRootWin
Root window with fVisual to be used to create GC&#39;s and XImages.
Definition: TGX11.h:133
NSPoint TranslateCoordinates(NSView< X11Window > *fromView, NSView< X11Window > *toView, NSPoint sourcePoint)
TExMap * fColors
Hash list of colors.
Definition: TGX11.h:90
ULong_t fWhitePixel
Value of white pixel in colormap.
Definition: TGX11.h:136
const int ny
Definition: kalman.C:17
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:119
Handle_t Atom_t
Definition: GuiTypes.h:38
XWindow_t * fWindows
List of windows.
Definition: TGX11.h:89
void SetLineType(CGContextRef ctx, Int_t n, Int_t *dash)
Definition: QuartzLine.mm:50
UShort_t fRed
red value in range [0,kBIGGEST_RGB_VALUE]
Definition: TGX11.h:75
XColor_t()
Definition: TGX11.h:79
Bool_t HasTTFonts() const
Returns True when TrueType fonts are used.
Definition: TGX11.h:191
Colormap fColormap
Default colormap, 0 if b/w.
Definition: TGX11.h:134
unsigned long XID
Definition: TGX11.h:37
Float_t GetTextMagnitude()
Returns the current font magnification factor.
Definition: TGX11.h:189
m SetMarkerColor(kBlue)
lv SetLineColor(kBlue)
short Color_t
Definition: RtypesCore.h:79
Int_t fDepth
Number of color planes.
Definition: TGX11.h:144
void DrawPolyLine(CGContextRef ctx, Int_t n, TPoint *xy)
Definition: QuartzLine.mm:135
Definition: TPoint.h:33
#define None
Definition: TGWin32.h:59
point * points
Definition: X3DBuffer.c:20
void * fXEvent
Current native (X11) event.
Definition: TGX11.h:92
float ymax
Definition: THbookFile.cxx:93
Int_t fTextAlignH
Text Alignment Horizontal.
Definition: TGX11.h:138
EMouseButton
Definition: GuiTypes.h:215
TRandom2 r(17)
th1 SetTextSize(0.12)
void DrawFillArea(CGContextRef ctx, Int_t n, TPoint *xy, Bool_t drawShadow)
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
ULong_t fPixel
color pixel value
Definition: TGX11.h:74
pt SetTextFont(42)
a SetFillStyle(0)
Handle_t Visual_t
Definition: GuiTypes.h:29
Int_t fTextAlignV
Text Alignment Vertical.
Definition: TGX11.h:139
h1 SetFillColor(kGreen)
unsigned int UInt_t
Definition: RtypesCore.h:42
m SetMarkerStyle(20)
gr SetMarkerSize(1.3)
Int_t fGreenShift
Bits to left shift green.
Definition: TGX11.h:149
Bool_t fHasTTFonts
True when TrueType fonts are used.
Definition: TGX11.h:151
void DrawPolyMarker(CGContextRef ctx, const std::vector< TPoint > &marker, Size_t markerSize, Style_t markerStyle)
short Short_t
Definition: RtypesCore.h:35
f1 SetLineWidth(4)
float xmax
Definition: THbookFile.cxx:93
lv DrawLine(0.33, 0.0, 0.33, 1.0)
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
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
long Long_t
Definition: RtypesCore.h:50
Color * colors
Definition: X3DBuffer.c:19
static const double x1[5]
TText * text
const int kNumCursors
Definition: TVirtualX.h:55
int type
Definition: TGX11.cxx:120
unsigned long ULong_t
Definition: RtypesCore.h:51
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
static void GetPixel(int y, int width, Byte_t *scline)
Get pixels in line y and put in array scline.
Definition: TGWin32.cxx:4051
Int_t fBlueShift
Bits to left shift blue.
Definition: TGX11.h:150
NSCursor * CreateCursor(ECursor currentCursor)
#define org(otri, vertexptr)
Definition: triangle.c:1037
Float_t fTextMagnitude
Text Magnitude.
Definition: TGX11.h:143
void GetColor(Float_t v, Float_t vmin, Float_t vmax, Int_t type, Float_t *rgba)
This function creates color for parametric surface&#39;s vertex, using its &#39;u&#39; value. ...
Definition: TGLUtil.cxx:3844
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
lv SetLineStyle(3)
Definition: file.py:1
void DrawBox(CGContextRef ctx, Int_t x1, Int_t y1, Int_t x2, Int_t y2, bool hollow)
#define dest(otri, vertexptr)
Definition: triangle.c:1040
RVisual * fVisual
Pointer to visual used by all windows.
Definition: TGX11.h:131
Handle_t Region_t
Definition: GuiTypes.h:33
Handle_t Pixmap_t
Definition: GuiTypes.h:31
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
Drawable fRootWin
Root window used as parent of all windows.
Definition: TGX11.h:132
double result[121]
unsigned char UChar_t
Definition: RtypesCore.h:34
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
Definition: TGX11.h:145
const Bool_t kTRUE
Definition: Rtypes.h:91
ULong_t fBlackPixel
Value of black pixel in colormap.
Definition: TGX11.h:135
const Int_t n
Definition: legend1.C:16
TRandom3 R
a TMatrixD.
Definition: testIO.cxx:28
char name[80]
Definition: TGX11.cxx:109
This class stores a (key,value) pair using an external hash.
Definition: TExMap.h:35
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
Definition: TGX11.h:148
ULong_t Handle_t
Definition: GuiTypes.h:27