ROOT  6.06/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:

Go to the source code of this file.

Macros

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

Enumerations

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

Functions

 ClassImp (TGFont) ClassImp(TGFontPool) ClassImp(TGTextLayout) struct LayoutChunk_t
 
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 const FontStateMap_t gWeightMap []
 
static const FontStateMap_t gSlantMap []
 
static const FontStateMap_t gUnderlineMap []
 
static const FontStateMap_t gOverstrikeMap []
 
static const FontStateMap_t gXlfdgWeightMap []
 
static const FontStateMap_t gXlfdSlantMap []
 
static const FontStateMap_t gXlfdSetwidthMap []
 
static const FontStateMap_t gXlfdCharsetMap []
 
static char gHexChars [] = "0123456789abcdefxtnvr\\"
 
static char gMapChars []
 

Macro Definition Documentation

#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

Referenced by TGFontPool::ParseXLFD().

#define XLFD_AVERAGE_WIDTH   11
#define XLFD_ENCODING   13

Referenced by TGFontPool::ParseXLFD().

#define XLFD_FAMILY   1

Referenced by TGFontPool::ParseXLFD().

#define XLFD_FOUNDRY   0

Referenced by TGFontPool::ParseXLFD().

#define XLFD_NUMFIELDS   14

Referenced by TGFontPool::ParseXLFD().

#define XLFD_PIXEL_SIZE   6
#define XLFD_POINT_SIZE   7

Referenced by TGFontPool::ParseXLFD().

#define XLFD_REGISTRY   12
#define XLFD_RESOLUTION_X   8
#define XLFD_RESOLUTION_Y   9
#define XLFD_SETWIDTH   4

Referenced by TGFontPool::ParseXLFD().

#define XLFD_SLANT   3

Referenced by TGFontPool::ParseXLFD().

#define XLFD_SPACING   10
#define XLFD_WEIGHT   2

Referenced by TGFontPool::ParseXLFD().

Enumeration Type Documentation

enum ECharType
Enumerator
kCharNormal 
kCharReplace 
kCharSkip 

Definition at line 177 of file TGFont.cxx.

Enumerator
kFontCSNormal 
kFontCSSymbol 
kFontCSOther 

Definition at line 159 of file TGFont.cxx.

Enumerator
kFontSWNormal 
kFontSWCondence 
kFontSWExpand 
kFontSWUnknown 

Definition at line 154 of file TGFont.cxx.

Enumerator
kFontProportional 
kFontFixed 
kFontMono 
kFontCharcell 

Definition at line 149 of file TGFont.cxx.

Function Documentation

ClassImp ( TGFont  )

Definition at line 52 of file TGFont.cxx.

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.

Referenced by TGFont::DrawCharsExp(), and TGFontPool::MakeFont().

static char* GetToken ( char *  str)
static

Definition at line 1885 of file TGFont.cxx.

Referenced by TGFontPool::ParseFontName().

Variable Documentation

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

Definition at line 247 of file TGFont.cxx.

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.

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

Definition at line 203 of file TGFont.cxx.

const FontStateMap_t gSlantMap[]
static
Initial value:

Definition at line 192 of file TGFont.cxx.

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

Definition at line 198 of file TGFont.cxx.

const FontStateMap_t gWeightMap[]
static
Initial value:

Definition at line 186 of file TGFont.cxx.

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

Definition at line 237 of file TGFont.cxx.

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.

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

Definition at line 229 of file TGFont.cxx.

const FontStateMap_t gXlfdSlantMap[]
static
Initial value:

Definition at line 222 of file TGFont.cxx.