Logo ROOT   6.10/09
Reference Guide
Macros | Enumerations | Functions | Variables
TGFont.cxx File Reference
#include "TGFont.h"
#include "TGClient.h"
#include "THashTable.h"
#include "TVirtualX.h"
#include "TObjString.h"
#include "TGWidget.h"
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include "Riostream.h"
#include "TROOT.h"
#include "TError.h"
#include "TMath.h"
Include dependency graph for TGFont.cxx:

Macros

#define FONT_FAMILY   0
 
#define FONT_NUMFIELDS   6
 
#define FONT_OVERSTRIKE   5
 
#define FONT_SIZE   1
 
#define FONT_SLANT   3
 
#define FONT_UNDERLINE   4
 
#define FONT_WEIGHT   2
 
#define MAX_LINES   50
 
#define MAXUSE   128
 
#define XLFD_ADD_STYLE   5
 
#define XLFD_AVERAGE_WIDTH   11
 
#define XLFD_ENCODING   13
 
#define XLFD_FAMILY   1
 
#define XLFD_FOUNDRY   0
 
#define XLFD_NUMFIELDS   14
 
#define XLFD_PIXEL_SIZE   6
 
#define XLFD_POINT_SIZE   7
 
#define XLFD_REGISTRY   12
 
#define XLFD_RESOLUTION_X   8
 
#define XLFD_RESOLUTION_Y   9
 
#define XLFD_SETWIDTH   4
 
#define XLFD_SLANT   3
 
#define XLFD_SPACING   10
 
#define XLFD_WEIGHT   2
 

Enumerations

enum  ECharType { kCharNormal, kCharReplace, kCharSkip }
 
enum  EFontCharset { kFontCSNormal = 0, kFontCSSymbol = 1, kFontCSOther = 2 }
 
enum  EFontSetWidth { kFontSWNormal = 0, kFontSWCondence = 1, kFontSWExpand = 2, kFontSWUnknown = 3 }
 
enum  EFontSpacing { kFontProportional = 0, kFontFixed = 1, kFontMono = 1, kFontCharcell = 2 }
 

Functions

static int GetControlCharSubst (Int_t c, char buf[4])
 When displaying text in a widget, a backslashed escape sequence is substituted for control characters that occur in the text. More...
 
static char * GetToken (char *str)
 

Variables

static char gHexChars [] = "0123456789abcdefxtnvr\\"
 
static char gMapChars []
 
static const FontStateMap_t gOverstrikeMap []
 
static const FontStateMap_t gSlantMap []
 
static const FontStateMap_t gUnderlineMap []
 
static const FontStateMap_t gWeightMap []
 
static const FontStateMap_t gXlfdCharsetMap []
 
static const FontStateMap_t gXlfdgWeightMap []
 
static const FontStateMap_t gXlfdSetwidthMap []
 
static const FontStateMap_t gXlfdSlantMap []
 

Macro Definition Documentation

◆ FONT_FAMILY

#define FONT_FAMILY   0

Definition at line 56 of file TGFont.cxx.

◆ FONT_NUMFIELDS

#define FONT_NUMFIELDS   6

Definition at line 62 of file TGFont.cxx.

◆ FONT_OVERSTRIKE

#define FONT_OVERSTRIKE   5

Definition at line 61 of file TGFont.cxx.

◆ FONT_SIZE

#define FONT_SIZE   1

Definition at line 57 of file TGFont.cxx.

◆ FONT_SLANT

#define FONT_SLANT   3

Definition at line 59 of file TGFont.cxx.

◆ FONT_UNDERLINE

#define FONT_UNDERLINE   4

Definition at line 60 of file TGFont.cxx.

◆ FONT_WEIGHT

#define FONT_WEIGHT   2

Definition at line 58 of file TGFont.cxx.

◆ MAX_LINES

#define MAX_LINES   50

◆ MAXUSE

#define MAXUSE   128

◆ XLFD_ADD_STYLE

#define XLFD_ADD_STYLE   5

Definition at line 72 of file TGFont.cxx.

◆ XLFD_AVERAGE_WIDTH

#define XLFD_AVERAGE_WIDTH   11

Definition at line 78 of file TGFont.cxx.

◆ XLFD_ENCODING

#define XLFD_ENCODING   13

Definition at line 80 of file TGFont.cxx.

◆ XLFD_FAMILY

#define XLFD_FAMILY   1

Definition at line 68 of file TGFont.cxx.

◆ XLFD_FOUNDRY

#define XLFD_FOUNDRY   0

Definition at line 67 of file TGFont.cxx.

◆ XLFD_NUMFIELDS

#define XLFD_NUMFIELDS   14

Definition at line 81 of file TGFont.cxx.

◆ XLFD_PIXEL_SIZE

#define XLFD_PIXEL_SIZE   6

Definition at line 73 of file TGFont.cxx.

◆ XLFD_POINT_SIZE

#define XLFD_POINT_SIZE   7

Definition at line 74 of file TGFont.cxx.

◆ XLFD_REGISTRY

#define XLFD_REGISTRY   12

Definition at line 79 of file TGFont.cxx.

◆ XLFD_RESOLUTION_X

#define XLFD_RESOLUTION_X   8

Definition at line 75 of file TGFont.cxx.

◆ XLFD_RESOLUTION_Y

#define XLFD_RESOLUTION_Y   9

Definition at line 76 of file TGFont.cxx.

◆ XLFD_SETWIDTH

#define XLFD_SETWIDTH   4

Definition at line 71 of file TGFont.cxx.

◆ XLFD_SLANT

#define XLFD_SLANT   3

Definition at line 70 of file TGFont.cxx.

◆ XLFD_SPACING

#define XLFD_SPACING   10

Definition at line 77 of file TGFont.cxx.

◆ XLFD_WEIGHT

#define XLFD_WEIGHT   2

Definition at line 69 of file TGFont.cxx.

Enumeration Type Documentation

◆ ECharType

enum ECharType
Enumerator
kCharNormal 
kCharReplace 
kCharSkip 

Definition at line 177 of file TGFont.cxx.

◆ EFontCharset

Enumerator
kFontCSNormal 
kFontCSSymbol 
kFontCSOther 

Definition at line 159 of file TGFont.cxx.

◆ EFontSetWidth

Enumerator
kFontSWNormal 
kFontSWCondence 
kFontSWExpand 
kFontSWUnknown 

Definition at line 154 of file TGFont.cxx.

◆ EFontSpacing

Enumerator
kFontProportional 
kFontFixed 
kFontMono 
kFontCharcell 

Definition at line 149 of file TGFont.cxx.

Function Documentation

◆ GetControlCharSubst()

static Int_t GetControlCharSubst ( Int_t  c,
char  buf[4] 
)
static

When displaying text in a widget, a backslashed escape sequence is substituted for control characters that occur in the text.

Given a control character, fill in a buffer with the replacement string that should be displayed.

The return value is the length of the substitute string, buf is filled with the substitute string; it is not '\0' terminated.

c – The control character to be replaced. buf – Buffer that gets replacement string. It only needs to be 4 characters long.

Definition at line 2722 of file TGFont.cxx.

◆ GetToken()

static char* GetToken ( char *  str)
static

Definition at line 1885 of file TGFont.cxx.

Variable Documentation

◆ gHexChars

char gHexChars[] = "0123456789abcdefxtnvr\\"
static

Definition at line 247 of file TGFont.cxx.

◆ gMapChars

char gMapChars[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 'a', 'b', 't', 'n', 'v', 'f', 'r', 0
}

Definition at line 254 of file TGFont.cxx.

◆ gOverstrikeMap

const FontStateMap_t gOverstrikeMap[]
static
Initial value:
= {
{ 1, "overstrike" },
{ 0, 0 }
}

Definition at line 203 of file TGFont.cxx.

◆ gSlantMap

const FontStateMap_t gSlantMap[]
static
Initial value:

Definition at line 192 of file TGFont.cxx.

◆ gUnderlineMap

const FontStateMap_t gUnderlineMap[]
static
Initial value:
= {
{ 1, "underline" },
{ 0, 0 }
}

Definition at line 198 of file TGFont.cxx.

◆ gWeightMap

const FontStateMap_t gWeightMap[]
static
Initial value:

Definition at line 186 of file TGFont.cxx.

◆ gXlfdCharsetMap

const FontStateMap_t gXlfdCharsetMap[]
static
Initial value:
= {
{ kFontCSNormal, "iso8859" },
{ kFontCSSymbol, "adobe" },
{ kFontCSSymbol, "sun" },
{ kFontCSOther, 0 }
}

Definition at line 237 of file TGFont.cxx.

◆ gXlfdgWeightMap

const FontStateMap_t gXlfdgWeightMap[]
static
Initial value:
= {
{ kFontWeightNormal, "normal" },
{ kFontWeightNormal, "medium" },
{ kFontWeightNormal, "book" },
{ kFontWeightNormal, "light" },
{ kFontWeightBold, "bold" },
{ kFontWeightBold, "demi" },
{ kFontWeightBold, "demibold" },
}

Definition at line 211 of file TGFont.cxx.

◆ gXlfdSetwidthMap

const FontStateMap_t gXlfdSetwidthMap[]
static
Initial value:
= {
{ kFontSWNormal, "normal" },
{ kFontSWCondence, "narrow" },
{ kFontSWCondence, "semicondensed" },
{ kFontSWCondence, "condensed" },
}

Definition at line 229 of file TGFont.cxx.

◆ gXlfdSlantMap

const FontStateMap_t gXlfdSlantMap[]
static
Initial value:

Definition at line 222 of file TGFont.cxx.