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
17#if !defined(__CINT__)
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#endif
34
35typedef unsigned long XID;
36typedef XID Drawable;
37typedef XID Cursor;
38typedef XID Colormap;
39typedef XID Window;
40
41struct RXGCValues;
42struct RXColor;
43struct RXImage;
44struct RXPoint;
45struct RXpmAttributes;
46struct RXSetWindowAttributes;
47struct RXVisualInfo;
48struct RVisual;
49
50/// Description of a X11 window.
51struct XWindow_t {
52 Int_t fOpen; ///< 1 if the window is open, 0 if not
53 Int_t fDoubleBuffer; ///< 1 if the double buffer is on, 0 if not
54 Int_t fIsPixmap; ///< 1 if pixmap, 0 if not
55 Drawable fDrawing; ///< drawing area, equal to window or buffer
56 Drawable fWindow; ///< X11 window
57 Drawable fBuffer; ///< pixmap used for double buffer
58 UInt_t fWidth; ///< width of the window
59 UInt_t fHeight; ///< height of the window
60 Int_t fClip; ///< 1 if the clipping is on
61 Int_t fXclip; ///< x coordinate of the clipping rectangle
62 Int_t fYclip; ///< y coordinate of the clipping rectangle
63 UInt_t fWclip; ///< width of the clipping rectangle
64 UInt_t fHclip; ///< height of the clipping rectangle
65 ULong_t *fNewColors; ///< new image colors (after processing)
66 Int_t fNcolors; ///< number of different colors
67 Bool_t fShared; ///< notify when window is shared
68};
69
70/// Description of a X11 color.
71struct XColor_t {
72 ULong_t fPixel; ///< color pixel value
73 UShort_t fRed; ///< red value in range [0,kBIGGEST_RGB_VALUE]
74 UShort_t fGreen; ///< green value
75 UShort_t fBlue; ///< blue value
76 Bool_t fDefined; ///< true if pixel value is defined
78};
79
80class TExMap;
81
82
83class TGX11 : public TVirtualX {
84
85private:
86 Int_t fMaxNumberOfWindows; ///< Maximum number of windows
87 XWindow_t *fWindows; ///< List of windows
88 TExMap *fColors; ///< Hash list of colors
89 Cursor fCursors[kNumCursors]; ///< List of cursors
90 void *fXEvent; ///< Current native (X11) event
91
92 void CloseWindow1();
93 void ClearPixmap(Drawable *pix);
94 void CopyWindowtoPixmap(Drawable *pix, Int_t xpos, Int_t ypos);
95 void FindBestVisual();
96 void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems);
97 void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx,
99 UChar_t *image, Drawable_t id);
100 void RemovePixmap(Drawable *pix);
101 void SetColor(void *gc, Int_t ci);
103 void SetInput(Int_t inp);
104 void SetMarkerType(Int_t type, Int_t n, RXPoint *xy);
105 void CollectImageColors(ULong_t pixel, ULong_t *&orgcolors, Int_t &ncolors,
106 Int_t &maxcolors);
107 void MakeOpaqueColors(Int_t percent, ULong_t *orgcolors, Int_t ncolors);
108 Int_t FindColor(ULong_t pixel, ULong_t *orgcolors, Int_t ncolors);
109 void ImgPickPalette(RXImage *image, Int_t &ncol, Int_t *&R, Int_t *&G, Int_t *&B);
110
111 //---- Private methods used for GUI ----
112 void MapGCValues(GCValues_t &gval, ULong_t &xmask, RXGCValues &xgval, Bool_t tox = kTRUE);
114 ULong_t &xmask, RXSetWindowAttributes &xattr);
115 void MapCursor(ECursor cursor, Int_t &xcursor);
116 void MapColorStruct(ColorStruct_t *color, RXColor &xcolor);
117 void MapPictureAttributes(PictureAttributes_t &attr, RXpmAttributes &xpmattr,
118 Bool_t toxpm = kTRUE);
119 void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox = kTRUE);
120
121 // void MapEvent(Event_t &ev, XEvent &xev, Bool_t tox = kTRUE);
122 void MapEvent(Event_t &ev, void *xev, Bool_t tox = kTRUE);
123
124 void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox = kTRUE);
125 void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox = kTRUE);
126
127protected:
128 void *fDisplay; ///< Pointer to display
129 RVisual *fVisual; ///< Pointer to visual used by all windows
130 Drawable fRootWin; ///< Root window used as parent of all windows
131 Drawable fVisRootWin; ///< Root window with fVisual to be used to create GC's and XImages
132 Colormap fColormap; ///< Default colormap, 0 if b/w
133 ULong_t fBlackPixel; ///< Value of black pixel in colormap
134 ULong_t fWhitePixel; ///< Value of white pixel in colormap
135 Int_t fScreenNumber; ///< Screen number
136 Int_t fTextAlignH; ///< Text Alignment Horizontal
137 Int_t fTextAlignV; ///< Text Alignment Vertical
138 Int_t fTextAlign; ///< Text alignment (set in SetTextAlign)
139 Float_t fCharacterUpX; ///< Character Up vector along X
140 Float_t fCharacterUpY; ///< Character Up vector along Y
141 Float_t fTextMagnitude; ///< Text Magnitude
142 Int_t fDepth; ///< Number of color planes
143 Int_t fRedDiv; ///< Red value divider, -1 if no TrueColor visual
144 Int_t fGreenDiv; ///< Green value divider
145 Int_t fBlueDiv; ///< Blue value divider
146 Int_t fRedShift; ///< Bits to left shift red, -1 if no TrueColor visual
147 Int_t fGreenShift; ///< Bits to left shift green
148 Int_t fBlueShift; ///< Bits to left shift blue
149 Bool_t fHasTTFonts; ///< True when TrueType fonts are used
150 Bool_t fHasXft; ///< True when XftFonts are used
151
152 // needed by TGX11TTF
153 Bool_t AllocColor(Colormap cmap, RXColor *color);
154 void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors);
155 void *GetGC(Int_t which) const;
156 XColor_t &GetColor(Int_t cid);
157
158public:
159 TGX11();
160 TGX11(const TGX11 &org);
161 TGX11(const char *name, const char *title);
162 virtual ~TGX11();
163
164 Bool_t Init(void *display);
165 void ClearWindow();
166 void ClosePixmap();
167 void CloseWindow();
168 void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos);
169 void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode);
170 void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic);
171 void DrawFillArea(Int_t n, TPoint *xy);
172 void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2);
173 void DrawPolyLine(Int_t n, TPoint *xy);
175 virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode);
176 virtual void DrawText(Int_t, Int_t, Float_t, Float_t, const wchar_t *, ETextMode) {}
177 void GetCharacterUp(Float_t &chupx, Float_t &chupy);
179 void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
180 const char *DisplayName(const char *dpyName = 0);
182 ULong_t GetPixel(Color_t cindex);
183 void GetPlanes(Int_t &nplanes);
184 void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b);
185 virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess);
186 virtual void GetTextExtent(UInt_t &, UInt_t &, wchar_t *){}
189 Bool_t HasTTFonts() const { return fHasTTFonts; }
190 Int_t InitWindow(ULong_t window);
193 void RemoveWindow(ULong_t qwid);
194 void MoveWindow(Int_t wid, Int_t x, Int_t y);
195 Int_t OpenDisplay(void *display);
197 void QueryPointer(Int_t &ix, Int_t &iy);
198 Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0);
199 Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y);
201 void RescaleWindow(Int_t wid, UInt_t w, UInt_t h);
203 void ResizeWindow(Int_t wid);
204 void SelectWindow(Int_t wid);
205 void SetCharacterUp(Float_t chupx, Float_t chupy);
206 void SetClipOFF(Int_t wid);
207 void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
208 void SetCursor(Int_t win, ECursor cursor);
209 void SetDoubleBuffer(Int_t wid, Int_t mode);
210 void SetDoubleBufferOFF();
211 void SetDoubleBufferON();
212 void SetDrawMode(EDrawMode mode);
213 void SetFillColor(Color_t cindex);
215 void SetLineColor(Color_t cindex);
216 void SetLineType(Int_t n, Int_t *dash);
217 void SetLineStyle(Style_t linestyle);
219 void SetMarkerColor(Color_t cindex);
220 void SetMarkerSize(Float_t markersize);
221 void SetMarkerStyle(Style_t markerstyle);
222 void SetOpacity(Int_t percent);
223 void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b);
224 void SetTextAlign(Short_t talign=11);
225 void SetTextColor(Color_t cindex);
226 virtual Int_t SetTextFont(char *fontname, ETextSetMode mode);
227 virtual void SetTextFont(Font_t fontnumber);
229 virtual void SetTextSize(Float_t textsize);
230 void Sync(Int_t mode);
231 void UpdateWindow(Int_t mode);
232 void Warp(Int_t ix, Int_t iy, Window_t id = 0);
233 Int_t WriteGIF(char *name);
234 void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname);
236 Int_t SupportsExtension(const char *ext) const;
237
238 //---- Methods used for GUI -----
240 void MapWindow(Window_t id);
241 void MapSubwindows(Window_t id);
242 void MapRaised(Window_t id);
243 void UnmapWindow(Window_t id);
244 void DestroyWindow(Window_t id);
246 void RaiseWindow(Window_t id);
247 void LowerWindow(Window_t id);
248 void MoveWindow(Window_t id, Int_t x, Int_t y);
250 void ResizeWindow(Window_t id, UInt_t w, UInt_t h);
251 void IconifyWindow(Window_t id);
252 void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y);
253 void SetWindowBackground(Window_t id, ULong_t color);
256 UInt_t w, UInt_t h, UInt_t border,
257 Int_t depth, UInt_t clss,
258 void *visual, SetWindowAttributes_t *attr,
259 UInt_t wtype);
260 Int_t OpenDisplay(const char *dpyName);
261 void CloseDisplay();
262 Display_t GetDisplay() const;
263 Visual_t GetVisual() const;
264 Int_t GetScreen() const;
265 Int_t GetDepth() const;
266 Colormap_t GetColormap() const;
267 Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist);
269 Window_t GetParent(Window_t id) const;
270 FontStruct_t LoadQueryFont(const char *font_name);
272 void DeleteFont(FontStruct_t fs);
274 void ChangeGC(GContext_t gc, GCValues_t *gval);
276 void DeleteGC(GContext_t gc);
278 void SetCursor(Window_t id, Cursor_t curid);
280 Pixmap_t CreatePixmap(Drawable_t id, const char *bitmap, UInt_t width,
281 UInt_t height, ULong_t forecolor, ULong_t backcolor,
282 Int_t depth);
283 unsigned char *GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0);
284 Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height);
285 Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap,
286 UInt_t width, UInt_t height);
287 void DeletePixmap(Pixmap_t pmap);
288 Bool_t CreatePictureFromFile(Drawable_t id, const char *filename,
289 Pixmap_t &pict, Pixmap_t &pict_mask,
290 PictureAttributes_t &attr);
292 Pixmap_t &pict, Pixmap_t &pict_mask,
293 PictureAttributes_t &attr);
294 Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data);
295 void DeletePictureData(void *data);
296 void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n);
297 Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color);
299 void QueryColor(Colormap_t cmap, ColorStruct_t &color);
300 void FreeColor(Colormap_t cmap, ULong_t pixel);
302 void NextEvent(Event_t &event);
303 void Bell(Int_t percent);
305 Int_t src_x, Int_t src_y, UInt_t width, UInt_t height,
306 Int_t dest_x, Int_t dest_y);
308 void ChangeProperty(Window_t id, Atom_t property, Atom_t type,
309 UChar_t *data, Int_t len);
310 void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2);
311 void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h);
313 void SendEvent(Window_t id, Event_t *ev);
314 void WMDeleteNotify(Window_t id);
315 void SetKeyAutoRepeat(Bool_t on = kTRUE);
316 void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE);
317 void GrabButton(Window_t id, EMouseButton button, UInt_t modifier,
318 UInt_t evmask, Window_t confine, Cursor_t cursor,
319 Bool_t grab = kTRUE);
320 void GrabPointer(Window_t id, UInt_t evmask, Window_t confine,
321 Cursor_t cursor, Bool_t grab = kTRUE,
322 Bool_t owner_events = kTRUE);
323 void SetWindowName(Window_t id, char *name);
324 void SetIconName(Window_t id, char *name);
325 void SetIconPixmap(Window_t id, Pixmap_t pic);
326 void SetClassHints(Window_t id, char *className, char *resourceName);
327 void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input);
328 void SetWMPosition(Window_t id, Int_t x, Int_t y);
329 void SetWMSize(Window_t id, UInt_t w, UInt_t h);
330 void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin,
331 UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc);
332 void SetWMState(Window_t id, EInitialState state);
333 void SetWMTransientHint(Window_t id, Window_t main_id);
335 const char *s, Int_t len);
336 Int_t TextWidth(FontStruct_t font, const char *s, Int_t len);
337 void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent);
338 void GetGCValues(GContext_t gc, GCValues_t &gval);
341 void ClearWindow(Window_t id);
344 UInt_t w, UInt_t h);
346 UInt_t w, UInt_t h);
347 void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg);
348 void SelectInput(Window_t id, UInt_t evmask);
350 void SetInputFocus(Window_t id);
353 void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when);
354 void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym);
355 void GetPasteBuffer(Window_t id, Atom_t atom, TString &text,
356 Int_t &nchar, Bool_t del);
358 Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child);
359 void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
360 void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt);
361 void QueryPointer(Window_t id, Window_t &rootw, Window_t &childw,
362 Int_t &root_x, Int_t &root_y, Int_t &win_x,
363 Int_t &win_y, UInt_t &mask);
364 void SetForeground(GContext_t gc, ULong_t foreground);
366 void Update(Int_t mode = 0);
368 void DestroyRegion(Region_t reg);
371 void UnionRegion(Region_t rega, Region_t regb, Region_t result);
372 void IntersectRegion(Region_t rega, Region_t regb, Region_t result);
373 void SubtractRegion(Region_t rega, Region_t regb, Region_t result);
374 void XorRegion(Region_t rega, Region_t regb, Region_t result);
378 void GetRegionBox(Region_t reg, Rectangle_t *);
379 char **ListFonts(const char *fontname, Int_t max, Int_t &count);
380 void FreeFontNames(char **fontlist);
382 void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height);
383 void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel);
384 void PutImage(Drawable_t id, GContext_t gc, Drawable_t img,
385 Int_t dx, Int_t dy, Int_t x, Int_t y,
386 UInt_t w, UInt_t h);
387 void DeleteImage(Drawable_t img);
389 UInt_t ScreenWidthMM() const;
390
393 Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**);
397 void ChangeProperties(Window_t id, Atom_t property, Atom_t type,
398 Int_t format, UChar_t *data, Int_t len);
399 void SetDNDAware(Window_t, Atom_t *);
400 void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist);
401 Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd);
402 Bool_t IsDNDAware(Window_t win, Atom_t *typelist);
403
404 ClassDef(TGX11,0) //Interface to X11
405};
406
407#endif
std::string fBuffer
EGEventType
Definition GuiTypes.h:59
Handle_t Cursor_t
Cursor handle.
Definition GuiTypes.h:34
ULong_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
Definition GuiTypes.h:35
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:30
ULong_t Time_t
Event time.
Definition GuiTypes.h:42
EInitialState
Initial window mapping state.
Definition GuiTypes.h:345
Handle_t Drawable_t
Drawable handle.
Definition GuiTypes.h:31
Handle_t Colormap_t
Colormap handle.
Definition GuiTypes.h:33
Handle_t Atom_t
WM token.
Definition GuiTypes.h:37
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
ECursor
Definition GuiTypes.h:372
Handle_t Region_t
Region handle.
Definition GuiTypes.h:32
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:39
EMouseButton
Button names.
Definition GuiTypes.h:214
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
const int kNumCursors
Definition GuiTypes.h:371
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
static const double x2[5]
static const double x1[5]
unsigned short UShort_t
Definition RtypesCore.h:40
int Int_t
Definition RtypesCore.h:45
unsigned char UChar_t
Definition RtypesCore.h:38
unsigned int UInt_t
Definition RtypesCore.h:46
const Bool_t kFALSE
Definition RtypesCore.h:92
unsigned long ULong_t
Definition RtypesCore.h:55
long Long_t
Definition RtypesCore.h:54
short Width_t
Definition RtypesCore.h:82
bool Bool_t
Definition RtypesCore.h:63
short Font_t
Definition RtypesCore.h:79
short Short_t
Definition RtypesCore.h:39
short Color_t
Definition RtypesCore.h:83
short Style_t
Definition RtypesCore.h:80
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassDef(name, id)
Definition Rtypes.h:325
include TDocParser_001 C image html pict1_TDocParser_001 png width
char name[80]
Definition TGX11.cxx:110
int type
Definition TGX11.cxx:121
XPoint xy[kMAXMK]
Definition TGX11.cxx:123
XID Colormap
Definition TGX11.h:38
unsigned long XID
Definition TGX11.h:35
XID Window
Definition TGX11.h:39
XID Drawable
Definition TGX11.h:36
XID Cursor
Definition TGX11.h:37
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:83
void QueryColor(Colormap_t cmap, ColorStruct_t &color)
Fill in the primary color components for a specific pixel value.
Definition GX11Gui.cxx:1376
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:2462
Drawable_t CreateImage(UInt_t width, UInt_t height)
Create a client-side XImage. Returns handle to XImage.
Definition GX11Gui.cxx:2615
void * fDisplay
Pointer to display.
Definition TGX11.h:128
void NextEvent(Event_t &event)
Copies first pending event from event queue to Event_t structure and removes event from queue.
Definition GX11Gui.cxx:1416
void QueryPointer(Int_t &ix, Int_t &iy)
Query pointer position.
Definition TGX11.cxx:1454
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:2974
void SetIconName(Window_t id, char *name)
Set window icon name.
Definition GX11Gui.cxx:1910
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:1336
Colormap fColormap
Default colormap, 0 if b/w.
Definition TGX11.h:132
virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess)
Return the size of a character string.
Definition TGX11.cxx:1048
Window_t GetPrimarySelectionOwner()
Returns the window id of the current owner of the primary selection.
Definition GX11Gui.cxx:2242
void FreeFontNames(char **fontlist)
Free list of font names.
Definition GX11Gui.cxx:2607
void WMDeleteNotify(Window_t id)
Tell WM to send message when window is closed via WM.
Definition GX11Gui.cxx:1803
void ChangeGC(GContext_t gc, GCValues_t *gval)
Change entries in an existing graphics context, gc, by values from gval.
Definition GX11Gui.cxx:998
Int_t GetScreen() const
Returns screen number (might be useful in some cases where direct X11 manipulation outside of TVirtua...
Definition GX11Gui.cxx:886
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:2720
void MapEvent(Event_t &ev, void *xev, Bool_t tox=kTRUE)
Map Event_t structure to XEvent structure.
Definition GX11Gui.cxx:1488
Cursor_t CreateCursor(ECursor cursor)
Create cursor handle (just return cursor from cursor pool fCursors).
Definition GX11Gui.cxx:1048
void CloseDisplay()
Close connection to display server.
Definition GX11Gui.cxx:845
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:2753
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:1188
Int_t fScreenNumber
Screen number.
Definition TGX11.h:135
void SetDoubleBufferOFF()
Turn double buffer mode off.
Definition TGX11.cxx:2124
void SetTextColor(Color_t cindex)
Set color index for text.
Definition TGX11.cxx:3125
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:2060
Window_t GetInputFocus()
Returns the window id of the window having the input focus.
Definition GX11Gui.cxx:2214
void SetWMTransientHint(Window_t id, Window_t main_id)
Tell window manager that window is a transient window of main.
Definition GX11Gui.cxx:2050
void SelectWindow(Int_t wid)
Select window to which subsequent output is directed.
Definition TGX11.cxx:1958
void DrawPolyLine(Int_t n, TPoint *xy)
Draw a line through all points.
Definition TGX11.cxx:624
void SetLineType(Int_t n, Int_t *dash)
Set line type.
Definition TGX11.cxx:2297
void DeleteGC(GContext_t gc)
Explicitly delete a graphics context.
Definition GX11Gui.cxx:1037
Colormap_t GetColormap() const
Returns handle to colormap (might be useful in some cases where direct X11 manipulation outside of TV...
Definition GX11Gui.cxx:876
void DestroyRegion(Region_t reg)
Destroy region.
Definition GX11Gui.cxx:2501
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:2949
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:1067
ULong_t fWhitePixel
Value of white pixel in colormap.
Definition TGX11.h:134
Cursor fCursors[kNumCursors]
List of cursors.
Definition TGX11.h:89
Bool_t AllocColor(Colormap cmap, RXColor *color)
Allocate color in colormap.
Definition TGX11.cxx:366
Int_t fTextAlignV
Text Alignment Vertical.
Definition TGX11.h:137
void SubtractRegion(Region_t rega, Region_t regb, Region_t result)
Subtract rega from regb.
Definition GX11Gui.cxx:2546
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:2734
void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors)
Returns the current RGB value for the pixel in the XColor structure.
Definition TGX11.cxx:383
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:2177
void DeletePixmap(Pixmap_t pmap)
Explicitly delete pixmap resource.
Definition GX11Gui.cxx:1097
FontH_t GetFontHandle(FontStruct_t fs)
Return handle to font described by font structure.
Definition GX11Gui.cxx:955
void MapSubwindows(Window_t id)
Map sub windows.
Definition GX11Gui.cxx:230
Int_t fBlueShift
Bits to left shift blue.
Definition TGX11.h:148
void SetInputFocus(Window_t id)
Set keyboard input focus to window id.
Definition GX11Gui.cxx:2226
void ClosePixmap()
Delete current pixmap.
Definition TGX11.cxx:439
void DeletePictureData(void *data)
Delete picture data created by the function ReadPictureDataFromFile.
Definition GX11Gui.cxx:1297
void SetWMState(Window_t id, EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
Definition GX11Gui.cxx:2029
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest)
Union of rectangle with a region.
Definition GX11Gui.cxx:2509
void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox=kTRUE)
Map event mask to or from X.
Definition GX11Gui.cxx:405
void IconifyWindow(Window_t id)
Iconify the window.
Definition GX11Gui.cxx:333
void SetDoubleBufferON()
Turn double buffer mode on.
Definition TGX11.cxx:2134
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:2647
void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height)
Get size of XImage img.
Definition GX11Gui.cxx:2638
void GetCharacterUp(Float_t &chupx, Float_t &chupy)
Return character up vector.
Definition TGX11.cxx:899
void Warp(Int_t ix, Int_t iy, Window_t id=0)
Set pointer position.
Definition TGX11.cxx:3261
void RaiseWindow(Window_t id)
Put window on top of window stack.
Definition GX11Gui.cxx:280
void SetTextAlign(Short_t talign=11)
Set text alignment.
Definition TGX11.cxx:3068
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h)
Rescale the window wid.
Definition TGX11.cxx:1841
void SetWMPosition(Window_t id, Int_t x, Int_t y)
Tell the window manager the desired window position.
Definition GX11Gui.cxx:1974
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n)
Specify a dash pattern.
Definition GX11Gui.cxx:1312
Window_t GetWindowID(Int_t wid)
Return the X11 window identifier.
Definition TGX11.cxx:1068
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:2529
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:1378
void FreeFontStruct(FontStruct_t fs)
Free font structure returned by GetFontStruct().
Definition GX11Gui.cxx:2125
void SetCursor(Int_t win, ECursor cursor)
Set the cursor.
Definition TGX11.cxx:2076
void Sync(Int_t mode)
Set synchronisation on or off.
Definition TGX11.cxx:3215
Window_t GetParent(Window_t id) const
Return the parent of the window.
Definition GX11Gui.cxx:925
void * GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
Definition TGX11.cxx:931
void MoveWindow(Int_t wid, Int_t x, Int_t y)
Move the window wid.
Definition TGX11.cxx:1080
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:3618
void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox=kTRUE)
Map to and from X key symbols.
Definition GX11Gui.cxx:2305
void SetMarkerSize(Float_t markersize)
Set marker size index.
Definition TGX11.cxx:2395
void SetDrawMode(EDrawMode mode)
Set the drawing mode.
Definition TGX11.cxx:2159
Handle_t GetNativeEvent() const
Returns the current native event handle.
Definition TGX11.h:181
Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h)
Register pixmap created by gVirtualGL.
Definition TGX11.cxx:3645
Bool_t fHasXft
True when XftFonts are used.
Definition TGX11.h:150
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:3278
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:2677
void SetWindowName(Window_t id, char *name)
Set window name.
Definition GX11Gui.cxx:1893
Bool_t EqualRegion(Region_t rega, Region_t regb)
Returns true if two regions are equal.
Definition GX11Gui.cxx:2579
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent)
Return some font properties.
Definition GX11Gui.cxx:2079
Int_t GetDepth() const
Returns depth of screen (number of bit planes).
Definition GX11Gui.cxx:895
Visual_t GetVisual() const
Returns handle to visual (might be useful in some cases where direct X11 manipulation outside of TVir...
Definition GX11Gui.cxx:866
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode)
Draw a box.
Definition TGX11.cxx:525
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:559
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask)
Copies graphics context from org to dest.
Definition GX11Gui.cxx:1017
void ClearPixmap(Drawable *pix)
Clear the pixmap pix.
Definition TGX11.cxx:407
Float_t fTextMagnitude
Text Magnitude.
Definition TGX11.h:141
void SelectInput(Window_t id, UInt_t evmask)
Defines which input events the window is interested in.
Definition GX11Gui.cxx:2200
Window_t GetDefaultRootWindow() const
Return handle to the default root window created when calling XOpenDisplay().
Definition GX11Gui.cxx:917
void FreeColor(Colormap_t cmap, ULong_t pixel)
Free color cell with specified pixel value.
Definition GX11Gui.cxx:1396
void SetCharacterUp(Float_t chupx, Float_t chupy)
Set character up vector.
Definition TGX11.cxx:1983
Drawable fRootWin
Root window used as parent of all windows.
Definition TGX11.h:130
void SetMarkerStyle(Style_t markerstyle)
Set marker style.
Definition TGX11.cxx:2435
Int_t KeysymToKeycode(UInt_t keysym)
Convert a keysym to the appropriate keycode.
Definition GX11Gui.cxx:2156
virtual ~TGX11()
Destructor.
Definition TGX11.cxx:324
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:2804
void DrawFillArea(Int_t n, TPoint *xy)
Fill area described by polygon.
Definition TGX11.cxx:589
void SetInput(Int_t inp)
Set input on or off.
Definition TGX11.cxx:2257
void RemoveWindow(ULong_t qwid)
Remove a window created by Qt (like CloseWindow1()).
Definition TGX11.cxx:1422
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:2020
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:2538
Int_t fTextAlignH
Text Alignment Horizontal.
Definition TGX11.h:136
void * fXEvent
Current native (X11) event.
Definition TGX11.h:90
ULong_t GetPixel(Color_t cindex)
Return pixel value associated to specified ROOT color number.
Definition TGX11.cxx:1004
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:2071
void SetWindowBackground(Window_t id, ULong_t color)
Set the window background color.
Definition GX11Gui.cxx:353
FontStruct_t GetFontStruct(FontH_t fh)
Retrieve associated font structure once we have the font handle.
Definition GX11Gui.cxx:2113
void SetDNDAware(Window_t, Atom_t *)
Add XdndAware property and the list of drag and drop types to the Window win.
Definition GX11Gui.cxx:2766
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr)
Change window attributes.
Definition GX11Gui.cxx:1703
void SetPrimarySelectionOwner(Window_t id)
Makes the window id the current owner of the primary selection.
Definition GX11Gui.cxx:2251
Int_t fGreenShift
Bits to left shift green.
Definition TGX11.h:147
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:2283
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:961
void SetOpacity(Int_t percent)
Set opacity of a window.
Definition TGX11.cxx:2884
void SetFillColor(Color_t cindex)
Set color index for fill areas.
Definition TGX11.cxx:2183
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height)
create pixmap from RGB data.
Definition TGX11.cxx:3631
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:1746
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:1241
Int_t InitWindow(ULong_t window)
Open window and return window number.
Definition TGX11.cxx:1301
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:2571
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:2787
void ClearWindow()
Clear current window.
Definition TGX11.cxx:422
Int_t WriteGIF(char *name)
Writes the current window into GIF file.
Definition TGX11.cxx:3387
XColor_t & GetColor(Int_t cid)
Return reference to internal color structure associated to color index cid.
Definition TGX11.cxx:909
void DeleteFont(FontStruct_t fs)
Explicitly delete font structure obtained with LoadQueryFont().
Definition GX11Gui.cxx:967
Int_t fBlueDiv
Blue value divider.
Definition TGX11.h:145
void CopyWindowtoPixmap(Drawable *pix, Int_t xpos, Int_t ypos)
Copy area of current window in the pixmap pix.
Definition TGX11.cxx:508
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:2167
Int_t EventsPending()
Returns number of pending events.
Definition GX11Gui.cxx:1405
void SetLineStyle(Style_t linestyle)
Set line style.
Definition TGX11.cxx:2323
Drawable fVisRootWin
Root window with fVisual to be used to create GC's and XImages.
Definition TGX11.h:131
void GetPlanes(Int_t &nplanes)
Get maximum number of planes.
Definition TGX11.cxx:1019
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
Set pixmap as window background.
Definition GX11Gui.cxx:363
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:373
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:2007
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:1874
void SetMarkerColor(Color_t cindex)
Set color index for markers.
Definition TGX11.cxx:2381
char ** ListFonts(const char *fontname, Int_t max, Int_t &count)
Return list of font names matching fontname regexp, like "-*-times-*".
Definition GX11Gui.cxx:2595
TExMap * fColors
Hash list of colors.
Definition TGX11.h:88
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:976
void DeleteImage(Drawable_t img)
Destroy XImage img.
Definition GX11Gui.cxx:2667
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:1848
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist)
Return atom handle for atom_name.
Definition GX11Gui.cxx:905
Bool_t EmptyRegion(Region_t reg)
Return true if the region is empty.
Definition GX11Gui.cxx:2563
void DestroySubwindows(Window_t id)
Destroy subwindows of this window.
Definition GX11Gui.cxx:270
Int_t fTextAlign
Text alignment (set in SetTextAlign)
Definition TGX11.h:138
void SetTextMagnitude(Float_t mgn=1)
Sets the current text magnification factor to "mgn".
Definition TGX11.h:228
Window_t GetCurrentWindow() const
Return current window pointer. Protected method used by TGX11TTF.
Definition TGX11.cxx:922
void SetMarkerType(Int_t type, Int_t n, RXPoint *xy)
Set marker type.
Definition TGX11.cxx:2420
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:1724
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
Definition TGX11.h:143
Int_t fDepth
Number of color planes.
Definition TGX11.h:142
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:1956
void ResizeWindow(Int_t wid)
Resize the current window if necessary.
Definition TGX11.cxx:1919
Region_t CreateRegion()
Create a new empty region.
Definition GX11Gui.cxx:2493
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:2707
void CloseWindow()
Delete current window.
Definition TGX11.cxx:447
void UnmapWindow(Window_t id)
Unmap window from screen.
Definition GX11Gui.cxx:250
void CloseWindow1()
Delete current window.
Definition TGX11.cxx:461
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:2389
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:1827
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:343
void SetClassHints(Window_t id, char *className, char *resourceName)
Set the windows class and resource name.
Definition GX11Gui.cxx:1942
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:2472
FontStruct_t LoadQueryFont(const char *font_name)
Load font and query font.
Definition GX11Gui.cxx:946
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:2269
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:3692
ULong_t fBlackPixel
Value of black pixel in colormap.
Definition TGX11.h:133
void GetGCValues(GContext_t gc, GCValues_t &gval)
Get current values from graphics context gc.
Definition GX11Gui.cxx:2092
const char * DisplayName(const char *dpyName=0)
Return hostname on which the display is opened.
Definition TGX11.cxx:996
void SetWMSize(Window_t id, UInt_t w, UInt_t h)
Tell the window manager the desired window size.
Definition GX11Gui.cxx:1990
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:176
Float_t fCharacterUpX
Character Up vector along X.
Definition TGX11.h:139
Int_t fGreenDiv
Green value divider.
Definition TGX11.h:144
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y)
Request Locator position.
Definition TGX11.cxx:1505
void UpdateWindow(Int_t mode)
Update display.
Definition TGX11.cxx:3238
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:751
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:2187
void DestroyWindow(Window_t id)
Destroy window.
Definition GX11Gui.cxx:260
TGX11()
Default constructor.
Definition TGX11.cxx:173
Bool_t Init(void *display)
Initialize X11 system. Returns kFALSE in case of failure.
Definition TGX11.cxx:342
void MapCursor(ECursor cursor, Int_t &xcursor)
void GetWindowAttributes(Window_t id, WindowAttributes_t &attr)
Get window attributes and return filled in attributes structure.
Definition GX11Gui.cxx:766
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:2405
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Draw a line.
Definition TGX11.cxx:608
Display_t GetDisplay() const
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
Definition GX11Gui.cxx:856
Int_t OpenPixmap(UInt_t w, UInt_t h)
Open a new pixmap.
Definition TGX11.cxx:1243
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
Definition TGX11.h:146
void MapPictureAttributes(PictureAttributes_t &attr, RXpmAttributes &xpmattr, Bool_t toxpm=kTRUE)
Map a PictureAttributes_t to a XpmAttributes structure.
Definition GX11Gui.cxx:1106
virtual void SetTextSize(Float_t textsize)
Set current text size.
Definition TGX11.cxx:3203
Int_t OpenDisplay(void *display)
Open the display. Return -1 if the opening fails, 0 when ok.
Definition TGX11.cxx:1091
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:2855
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h)
Resize a pixmap.
Definition TGX11.cxx:1875
UInt_t ScreenWidthMM() const
Returns the width of the screen in millimeters.
Definition GX11Gui.cxx:2686
void Bell(Int_t percent)
Sound bell. Percent is loudness from -100% .. 100%.
Definition GX11Gui.cxx:1680
void LowerWindow(Window_t id)
Lower window so it lays below all its siblings.
Definition GX11Gui.cxx:290
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:496
void Update(Int_t mode=0)
Flush (mode = 0, default) or synchronize (mode = 1) X output buffer.
Definition GX11Gui.cxx:2482
void RemovePixmap(Drawable *pix)
Remove the pixmap pix.
Definition TGX11.cxx:1472
Float_t GetTextMagnitude()
Returns the current font magnification factor.
Definition TGX11.h:187
void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems)
Check if visual is usable, if so set fVisual, fDepth, fColormap, fBlackPixel and fWhitePixel.
Definition TGX11.cxx:848
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:3515
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:2696
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:310
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:1758
Int_t fMaxNumberOfWindows
Maximum number of windows.
Definition TGX11.h:86
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:2519
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:3331
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:559
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:2345
Int_t FindColor(ULong_t pixel, ULong_t *orgcolors, Int_t ncolors)
Returns index in orgcolors (and fNewColors) for pixel.
Definition TGX11.cxx:3019
void SetFillStyleIndex(Int_t style, Int_t fasi)
Set fill area style index.
Definition TGX11.cxx:2214
RVisual * fVisual
Pointer to visual used by all windows.
Definition TGX11.h:129
void SetClipOFF(Int_t wid)
Turn off the clipping for the window wid.
Definition TGX11.cxx:2004
virtual Int_t SetTextFont(char *fontname, ETextSetMode mode)
Set text font to specified name.
Definition TGX11.cxx:3154
void SetIconPixmap(Window_t id, Pixmap_t pic)
Set pixmap the WM can use when the window is iconized.
Definition GX11Gui.cxx:1927
void MapRaised(Window_t id)
Map window on screen and put on top of all windows.
Definition GX11Gui.cxx:240
void SetFillStyle(Style_t style)
Set fill area style.
Definition TGX11.cxx:2202
void SendEvent(Window_t id, Event_t *ev)
Send event ev to window id.
Definition GX11Gui.cxx:1789
void SetLineWidth(Width_t width)
Set line width.
Definition TGX11.cxx:2362
void MapWindow(Window_t id)
Map window on screen.
Definition GX11Gui.cxx:220
void SetKeyAutoRepeat(Bool_t on=kTRUE)
Turn key auto repeat on or off.
Definition GX11Gui.cxx:1813
XWindow_t * fWindows
List of windows.
Definition TGX11.h:87
void MapSetWindowAttributes(SetWindowAttributes_t *attr, ULong_t &xmask, RXSetWindowAttributes &xattr)
Map a SetWindowAttributes_t to a XSetWindowAttributes structure.
Definition GX11Gui.cxx:470
virtual void GetTextExtent(UInt_t &, UInt_t &, wchar_t *)
Returns the size of the specified character string "mess".
Definition TGX11.h:186
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:3450
Bool_t SetSelectionOwner(Window_t, Atom_t &)
Changes the owner and last-change time for the specified selection.
Definition GX11Gui.cxx:2743
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data)
Read picture data from file and store in ret_data.
Definition GX11Gui.cxx:1283
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:2423
void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox=kTRUE)
Map modifier key state to or from X.
Definition GX11Gui.cxx:1427
void FindBestVisual()
Find best visual, i.e.
Definition TGX11.cxx:780
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b)
Set color intensities for given color index.
Definition TGX11.cxx:3035
void SetColor(void *gc, Int_t ci)
Set the foreground color in GC.
Definition TGX11.cxx:2043
void SetDoubleBuffer(Int_t wid, Int_t mode)
Set the double buffer on/off on window wid.
Definition TGX11.cxx:2091
void SetLineColor(Color_t cindex)
Set color index for lines.
Definition TGX11.cxx:2276
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b)
Get rgb values for color "index".
Definition TGX11.cxx:1027
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:1087
Bool_t HasTTFonts() const
Returns True when TrueType fonts are used.
Definition TGX11.h:189
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:1690
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:2555
void MapColorStruct(ColorStruct_t *color, RXColor &xcolor)
Map a ColorStruct_t to a XColor structure.
Definition GX11Gui.cxx:1320
Int_t GetDoubleBuffer(Int_t wid)
Query the double buffer value for the window wid.
Definition TGX11.cxx:943
Float_t fCharacterUpY
Character Up vector along Y.
Definition TGX11.h:140
Bool_t fHasTTFonts
True when TrueType fonts are used.
Definition TGX11.h:149
void GetRegionBox(Region_t reg, Rectangle_t *)
Return smallest enclosing rectangle.
Definition GX11Gui.cxx:2587
void DrawPolyMarker(Int_t n, TPoint *xy)
Draw n markers with the current attributes at position x, y.
Definition TGX11.cxx:676
Int_t RequestString(Int_t x, Int_t y, char *text)
Request a string.
Definition TGX11.cxx:1683
Basic string class.
Definition TString.h:136
Semi-Abstract base class defining a generic interface to the underlying, low level,...
Definition TVirtualX.h:46
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
#define G(x, y, z)
Definition file.py:1
Event structure.
Definition GuiTypes.h:174
Graphics context structure.
Definition GuiTypes.h:224
Point structure (maps to the X11 XPoint structure)
Definition GuiTypes.h:356
Rectangle structure (maps to the X11 XRectangle structure)
Definition GuiTypes.h:361
Used for drawing line segments (maps to the X11 XSegments structure)
Definition GuiTypes.h:351
Attributes that can be used when creating or changing a window.
Definition GuiTypes.h:93
Window attributes that can be inquired.
Definition GuiTypes.h:114
Description of a X11 color.
Definition TGWin32.h:56
Bool_t fDefined
true if pixel value is defined
Definition TGWin32.h:58
XColor_t()
Definition TGX11.h:77
UShort_t fBlue
blue value
Definition TGX11.h:75
UShort_t fRed
red value in range [0,kBIGGEST_RGB_VALUE]
Definition TGX11.h:73
UShort_t fGreen
green value
Definition TGX11.h:74
ULong_t fPixel
color pixel value
Definition TGX11.h:72
TCanvas * style()
Definition style.C:1
#define dest(otri, vertexptr)
Definition triangle.c:1040
#define org(otri, vertexptr)
Definition triangle.c:1037