📄 globalparams.h
字号:
//========================================================================//// GlobalParams.h//// Copyright 2001-2003 Glyph & Cog, LLC////========================================================================#ifndef GLOBALPARAMS_H#define GLOBALPARAMS_H#include <aconf.h>#ifdef USE_GCC_PRAGMAS#pragma interface#endif#include <stdio.h>#include "gtypes.h"#include "CharTypes.h"#if MULTITHREADED#include "GMutex.h"#endifclass GString;class GList;class GHash;class NameToCharCode;class CharCodeToUnicode;class CharCodeToUnicodeCache;class UnicodeMap;class UnicodeMapCache;class CMap;class CMapCache;struct XpdfSecurityHandler;class GlobalParams;#ifdef WIN32class WinFontList;#endif//------------------------------------------------------------------------// The global parameters object.extern GlobalParams *globalParams;//------------------------------------------------------------------------enum DisplayFontParamKind { displayFontT1, displayFontTT};struct DisplayFontParamT1 { GString *fileName;};struct DisplayFontParamTT { GString *fileName;};class DisplayFontParam {public: GString *name; // font name for 8-bit fonts and named // CID fonts; collection name for // generic CID fonts DisplayFontParamKind kind; union { DisplayFontParamT1 t1; DisplayFontParamTT tt; }; DisplayFontParam(GString *nameA, DisplayFontParamKind kindA); virtual ~DisplayFontParam();};//------------------------------------------------------------------------class PSFontParam {public: GString *pdfFontName; // PDF font name for 8-bit fonts and // named 16-bit fonts; char collection // name for generic 16-bit fonts int wMode; // writing mode (0=horiz, 1=vert) for // 16-bit fonts GString *psFontName; // PostScript font name GString *encoding; // encoding, for 16-bit fonts only PSFontParam(GString *pdfFontNameA, int wModeA, GString *psFontNameA, GString *encodingA); ~PSFontParam();};//------------------------------------------------------------------------enum PSLevel { psLevel1, psLevel1Sep, psLevel2, psLevel2Sep, psLevel3, psLevel3Sep};//------------------------------------------------------------------------enum EndOfLineKind { eolUnix, // LF eolDOS, // CR+LF eolMac // CR};//------------------------------------------------------------------------enum ScreenType { screenUnset, screenDispersed, screenClustered, screenStochasticClustered};//------------------------------------------------------------------------class KeyBinding {public: int code; // 0x20 .. 0xfe = ASCII, // >=0x10000 = special keys, mouse buttons, // etc. (xpdfKeyCode* symbols) int mods; // modifiers (xpdfKeyMod* symbols, or-ed // together) int context; // context (xpdfKeyContext* symbols, or-ed // together) GList *cmds; // list of commands [GString] KeyBinding(int codeA, int modsA, int contextA, char *cmd0); KeyBinding(int codeA, int modsA, int contextA, char *cmd0, char *cmd1); KeyBinding(int codeA, int modsA, int contextA, GList *cmdsA); ~KeyBinding();};#define xpdfKeyCodeTab 0x1000#define xpdfKeyCodeReturn 0x1001#define xpdfKeyCodeEnter 0x1002#define xpdfKeyCodeBackspace 0x1003#define xpdfKeyCodeInsert 0x1004#define xpdfKeyCodeDelete 0x1005#define xpdfKeyCodeHome 0x1006#define xpdfKeyCodeEnd 0x1007#define xpdfKeyCodePgUp 0x1008#define xpdfKeyCodePgDn 0x1009#define xpdfKeyCodeLeft 0x100a#define xpdfKeyCodeRight 0x100b#define xpdfKeyCodeUp 0x100c#define xpdfKeyCodeDown 0x100d#define xpdfKeyCodeF1 0x1100#define xpdfKeyCodeF35 0x1122#define xpdfKeyCodeMousePress1 0x2001#define xpdfKeyCodeMousePress2 0x2002#define xpdfKeyCodeMousePress3 0x2003#define xpdfKeyCodeMousePress4 0x2004#define xpdfKeyCodeMousePress5 0x2005#define xpdfKeyCodeMousePress6 0x2006#define xpdfKeyCodeMousePress7 0x2007#define xpdfKeyCodeMouseRelease1 0x2101#define xpdfKeyCodeMouseRelease2 0x2102#define xpdfKeyCodeMouseRelease3 0x2103#define xpdfKeyCodeMouseRelease4 0x2104#define xpdfKeyCodeMouseRelease5 0x2105#define xpdfKeyCodeMouseRelease6 0x2106#define xpdfKeyCodeMouseRelease7 0x2107#define xpdfKeyModNone 0#define xpdfKeyModShift (1 << 0)#define xpdfKeyModCtrl (1 << 1)#define xpdfKeyModAlt (1 << 2)#define xpdfKeyContextAny 0#define xpdfKeyContextFullScreen (1 << 0)#define xpdfKeyContextWindow (2 << 0)#define xpdfKeyContextContinuous (1 << 2)#define xpdfKeyContextSinglePage (2 << 2)#define xpdfKeyContextOverLink (1 << 4)#define xpdfKeyContextOffLink (2 << 4)#define xpdfKeyContextOutline (1 << 6)#define xpdfKeyContextMainWin (2 << 6)#define xpdfKeyContextScrLockOn (1 << 8)#define xpdfKeyContextScrLockOff (2 << 8)//------------------------------------------------------------------------class GlobalParams {public: // Initialize the global parameters by attempting to read a config // file. GlobalParams(char *cfgFileName); ~GlobalParams(); void setBaseDir(char *dir); void setupBaseFonts(char *dir); void parseLine(char *buf, GString *fileName, int line); //----- accessors CharCode getMacRomanCharCode(char *charName); GString *getBaseDir(); Unicode mapNameToUnicode(char *charName); UnicodeMap *getResidentUnicodeMap(GString *encodingName); FILE *getUnicodeMapFile(GString *encodingName); FILE *findCMapFile(GString *collection, GString *cMapName); FILE *findToUnicodeFile(GString *name); DisplayFontParam *getDisplayFont(GString *fontName); DisplayFontParam *getDisplayCIDFont(GString *fontName, GString *collection); GString *getPSFile(); int getPSPaperWidth(); int getPSPaperHeight(); void getPSImageableArea(int *llx, int *lly, int *urx, int *ury); GBool getPSDuplex(); GBool getPSCrop(); GBool getPSExpandSmaller(); GBool getPSShrinkLarger(); GBool getPSCenter(); PSLevel getPSLevel(); PSFontParam *getPSFont(GString *fontName); PSFontParam *getPSFont16(GString *fontName, GString *collection, int wMode); GBool getPSEmbedType1(); GBool getPSEmbedTrueType(); GBool getPSEmbedCIDPostScript();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -