Logo ROOT  
Reference Guide
TGX11.cxx File Reference
#include "TROOT.h"
#include "TColor.h"
#include "TGX11.h"
#include "TPoint.h"
#include "TMath.h"
#include "TStorage.h"
#include "TStyle.h"
#include "TExMap.h"
#include "TEnv.h"
#include "TString.h"
#include "TObjString.h"
#include "TObjArray.h"
#include "RStipples.h"
#include "strlcpy.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include <X11/xpm.h>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <unistd.h>
Include dependency graph for TGX11.cxx:

Classes

struct  RVisual
 
struct  RXColor
 
struct  RXGCValues
 
struct  RXImage
 
struct  RXPoint
 
struct  RXVisualInfo
 

Functions

static Int_t DummyX11ErrorHandler (Display *, XErrorEvent *)
 Dummy error handler for X11. Used by FindUsableVisual(). More...
 
static void GetPixel (int y, int width, Byte_t *scline)
 Get pixels in line y and put in array scline. More...
 
int GIFdecode (Byte_t *gifArr, Byte_t *pixArr, int *Width, int *Height, int *Ncols, Byte_t *R, Byte_t *G, Byte_t *B)
  More...
 
long GIFencode (int Width, int Height, Int_t Ncol, Byte_t R[], Byte_t G[], Byte_t B[], Byte_t ScLine[], void(*get_scline)(int, int, Byte_t *), void(*pb)(Byte_t))
  More...
 
int GIFinfo (Byte_t *gifArr, int *Width, int *Height, int *Ncols)
  More...
 
int GIFquantize (UInt_t width, UInt_t height, Int_t *ncol, Byte_t *red, Byte_t *green, Byte_t *blue, Byte_t *outputBuf, Byte_t *outputCmap)
  More...
 
static void PutByte (Byte_t b)
 Put byte b in output stream. More...
 
int XRotDrawAlignedImageString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
 A front end to XRotPaintAlignedString: -does alignment, paints background. More...
 
int XRotDrawAlignedString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
 A front end to XRotPaintAlignedString: -does alignment, no background. More...
 
int XRotDrawImageString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
 A front end to XRotPaintAlignedString: -no alignment, paints background. More...
 
int XRotDrawString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
 A front end to XRotPaintAlignedString: -no alignment, no background. More...
 
void XRotSetBoundingBoxPad (int)
 Set the padding used when calculating bounding boxes. More...
 
void XRotSetMagnification (float)
 Set the font magnification factor for all subsequent operations. More...
 
XPoint * XRotTextExtents (Display *, XFontStruct *, float, int, int, char *, int)
 Calculate the bounding box some text will have when painted. More...
 
float XRotVersion (char *, int)
 Return version/copyright information. More...
 

Variables

static int gCapStyle = CapButt
  More...
 
static Int_t gCurrentFontNumber = 0
  More...
 
static XWindow_tgCws
  More...
 
static int gDashLength = 0
  More...
 
static char gDashList [10]
  More...
 
static int gDashOffset = 0
  More...
 
static int gDashSize = 0
  More...
 
static Int_t gFillHollow
  More...
 
static Pixmap gFillPattern = 0
  More...
 
static struct { ... }  gFont [kMAXFONT]
  More...
 
static GC * gGCdash = &gGClist[5]
  More...
 
static GC gGCecho
  More...
 
static GC * gGCfill = &gGClist[2]
  More...
 
static GC * gGCinvt = &gGClist[4]
  More...
 
static GC * gGCline = &gGClist[0]
  More...
 
static GC gGClist [kMAXGC]
  More...
 
static GC * gGCmark = &gGClist[1]
  More...
 
static GC * gGCpxmp = &gGClist[6]
  More...
 
static GC * gGCtext = &gGClist[3]
  More...
 
static int gJoinStyle = JoinMiter
  More...
 
static ULong_t gKeybdMask
  More...
 
static int gLineStyle = LineSolid
  More...
 
static int gLineWidth = 0
  More...
 
struct {
   int   n
  More...
 
   int   type
  More...
 
   XPoint   xy [kMAXMK]
  More...
 
gMarker
  More...
 
static int gMarkerCapStyle = CapRound
  More...
 
static int gMarkerJoinStyle = JoinRound
  More...
 
static int gMarkerLineStyle = LineSolid
  More...
 
static int gMarkerLineWidth = 0
  More...
 
static ULong_t gMouseMask
  More...
 
static Cursor gNullCursor = 0
  More...
 
static FILE * gOut
  More...
 
static XFontStruct * gTextFont
  More...
 
static XWindow_tgTws
  More...
 
static XImagegXimage = 0
  More...
 
const Int_t kBIGGEST_RGB_VALUE = 65535
  More...
 
const Int_t kMAXFONT = 4
  More...
 
const int kMAXGC = 7
  More...
 
const Int_t kMAXMK = 100
  More...
 
const char null_cursor_bits []
  More...
 

Function Documentation

◆ DummyX11ErrorHandler()

static Int_t DummyX11ErrorHandler ( Display *  ,
XErrorEvent *   
)
static

Dummy error handler for X11. Used by FindUsableVisual().

Definition at line 839 of file TGX11.cxx.

◆ GetPixel()

static void GetPixel ( int  y,
int  width,
Byte_t scline 
)
static

Get pixels in line y and put in array scline.

Definition at line 3308 of file TGX11.cxx.

◆ GIFdecode()

int GIFdecode ( Byte_t gifArr,
Byte_t pixArr,
int *  Width,
int *  Height,
int *  Ncols,
Byte_t R,
Byte_t G,
Byte_t B 
)

Definition at line 149 of file gifdecode.c.

◆ GIFencode()

long GIFencode ( int  Width,
int  Height,
Int_t  Ncol,
Byte_t  R[],
Byte_t  G[],
Byte_t  B[],
Byte_t  ScLine[],
void(*)(int, int, Byte_t *)  get_scline,
void(*)(Byte_t pb 
)

◆ GIFinfo()

int GIFinfo ( Byte_t gifArr,
int *  Width,
int *  Height,
int *  Ncols 
)

Definition at line 80 of file gifdecode.c.

◆ GIFquantize()

int GIFquantize ( UInt_t  width,
UInt_t  height,
Int_t ncol,
Byte_t red,
Byte_t green,
Byte_t blue,
Byte_t outputBuf,
Byte_t outputCmap 
)

◆ PutByte()

static void PutByte ( Byte_t  b)
static

Put byte b in output stream.

Definition at line 3317 of file TGX11.cxx.

◆ XRotDrawAlignedImageString()

int XRotDrawAlignedImageString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  text,
int  align 
)

A front end to XRotPaintAlignedString: -does alignment, paints background.

Definition at line 325 of file Rotated.cxx.

◆ XRotDrawAlignedString()

int XRotDrawAlignedString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  text,
int  align 
)

A front end to XRotPaintAlignedString: -does alignment, no background.

Definition at line 314 of file Rotated.cxx.

◆ XRotDrawImageString()

int XRotDrawImageString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  str 
)

A front end to XRotPaintAlignedString: -no alignment, paints background.

Definition at line 303 of file Rotated.cxx.

◆ XRotDrawString()

int XRotDrawString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  str 
)

A front end to XRotPaintAlignedString: -no alignment, no background.

Definition at line 292 of file Rotated.cxx.

◆ XRotSetBoundingBoxPad()

void XRotSetBoundingBoxPad ( int  p)

Set the padding used when calculating bounding boxes.

Definition at line 257 of file Rotated.cxx.

◆ XRotSetMagnification()

void XRotSetMagnification ( float  m)

Set the font magnification factor for all subsequent operations.

Definition at line 248 of file Rotated.cxx.

◆ XRotTextExtents()

XPoint* XRotTextExtents ( Display *  ,
XFontStruct *  font,
float  angle,
int  x,
int  y,
char *  text,
int  align 
)

Calculate the bounding box some text will have when painted.

Definition at line 1350 of file Rotated.cxx.

◆ XRotVersion()

float XRotVersion ( char *  str,
int  n 
)

Return version/copyright information.

Definition at line 238 of file Rotated.cxx.

Variable Documentation

◆ gCapStyle

int gCapStyle = CapButt
static

Definition at line 135 of file TGX11.cxx.

◆ gCurrentFontNumber

Int_t gCurrentFontNumber = 0
static

Definition at line 114 of file TGX11.cxx.

◆ gCws

XWindow_t* gCws
static

Definition at line 81 of file TGX11.cxx.

◆ gDashLength

int gDashLength = 0
static

Definition at line 138 of file TGX11.cxx.

◆ gDashList

char gDashList[10]
static

Definition at line 137 of file TGX11.cxx.

◆ gDashOffset

int gDashOffset = 0
static

Definition at line 139 of file TGX11.cxx.

◆ gDashSize

int gDashSize = 0
static

Definition at line 140 of file TGX11.cxx.

◆ gFillHollow

Int_t gFillHollow
static

Definition at line 101 of file TGX11.cxx.

◆ gFillPattern

Pixmap gFillPattern = 0
static

Definition at line 102 of file TGX11.cxx.

◆ 

struct { ... } gFont[kMAXFONT]

◆ gGCdash

GC* gGCdash = &gGClist[5]
static

Definition at line 96 of file TGX11.cxx.

◆ gGCecho

GC gGCecho
static

Definition at line 99 of file TGX11.cxx.

◆ gGCfill

GC* gGCfill = &gGClist[2]
static

Definition at line 93 of file TGX11.cxx.

◆ gGCinvt

GC* gGCinvt = &gGClist[4]
static

Definition at line 95 of file TGX11.cxx.

◆ gGCline

GC* gGCline = &gGClist[0]
static

Definition at line 91 of file TGX11.cxx.

◆ gGClist

GC gGClist[kMAXGC]
static

Definition at line 90 of file TGX11.cxx.

◆ gGCmark

GC* gGCmark = &gGClist[1]
static

Definition at line 92 of file TGX11.cxx.

◆ gGCpxmp

GC* gGCpxmp = &gGClist[6]
static

Definition at line 97 of file TGX11.cxx.

◆ gGCtext

GC* gGCtext = &gGClist[3]
static

Definition at line 94 of file TGX11.cxx.

◆ gJoinStyle

int gJoinStyle = JoinMiter
static

Definition at line 136 of file TGX11.cxx.

◆ gKeybdMask

ULong_t gKeybdMask
static
Initial value:
= ButtonPressMask | KeyPressMask |
EnterWindowMask | LeaveWindowMask

Definition at line 149 of file TGX11.cxx.

◆ gLineStyle

int gLineStyle = LineSolid
static

Definition at line 134 of file TGX11.cxx.

◆ gLineWidth

int gLineWidth = 0
static

Definition at line 133 of file TGX11.cxx.

◆ 

struct { ... } gMarker

◆ gMarkerCapStyle

int gMarkerCapStyle = CapRound
static

Definition at line 127 of file TGX11.cxx.

◆ gMarkerJoinStyle

int gMarkerJoinStyle = JoinRound
static

Definition at line 128 of file TGX11.cxx.

◆ gMarkerLineStyle

int gMarkerLineStyle = LineSolid
static

Definition at line 126 of file TGX11.cxx.

◆ gMarkerLineWidth

int gMarkerLineWidth = 0
static

Definition at line 125 of file TGX11.cxx.

◆ gMouseMask

ULong_t gMouseMask
static
Initial value:
= ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask |
PointerMotionMask | KeyPressMask |
KeyReleaseMask

Definition at line 145 of file TGX11.cxx.

◆ gNullCursor

Cursor gNullCursor = 0
static

Definition at line 159 of file TGX11.cxx.

◆ gOut

FILE* gOut
static

Definition at line 3293 of file TGX11.cxx.

◆ gTextFont

XFontStruct* gTextFont
static

Definition at line 113 of file TGX11.cxx.

◆ gTws

XWindow_t* gTws
static

Definition at line 82 of file TGX11.cxx.

◆ gXimage

XImage* gXimage = 0
static

Definition at line 3294 of file TGX11.cxx.

◆ kBIGGEST_RGB_VALUE

const Int_t kBIGGEST_RGB_VALUE = 65535

Definition at line 84 of file TGX11.cxx.

◆ kMAXFONT

const Int_t kMAXFONT = 4

Definition at line 107 of file TGX11.cxx.

◆ kMAXGC

const int kMAXGC = 7

Definition at line 89 of file TGX11.cxx.

◆ kMAXMK

const Int_t kMAXMK = 100

Definition at line 119 of file TGX11.cxx.

◆ n

int n

Definition at line 122 of file TGX11.cxx.

◆ null_cursor_bits

const char null_cursor_bits[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}

Definition at line 155 of file TGX11.cxx.

◆ type

int type

Definition at line 121 of file TGX11.cxx.

◆ xy

XPoint xy[kMAXMK]

Definition at line 123 of file TGX11.cxx.