File: iphtmltypes.pas

package info (click to toggle)
lazarus 4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 275,760 kB
  • sloc: pascal: 2,341,904; xml: 509,420; makefile: 348,726; cpp: 93,608; sh: 3,387; java: 609; perl: 297; sql: 222; ansic: 137
file content (156 lines) | stat: -rw-r--r-- 3,383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
unit IpHtmlTypes;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Types;

const
  MAXINTS = 4096; {buffer size - this should be way more than needed}
  TINTARRGROWFACTOR = 64;
  IPMAXFRAMES = 256; {maximum number of frames in a single frameset}
  DEFAULT_PRINTMARGIN = 0.5; {inches}
  FONTSIZESVALUESARRAY : array[0..6] of integer = (8,10,12,14,18,24,36);
  MAXWORDS = 65536;
  DEFAULT_LINKS_UNDERLINED = false;

  ZOOM_TO_FIT = 0;
  ZOOM_TO_FIT_WIDTH = -1;
  ZOOM_TO_FIT_HEIGHT = -2;

  ShyChar = #1; {character used to represent soft-hyphen in strings}
  NbspChar = #2; {character used to represent no-break space in strings}
  NAnchorChar = #3 ; {character used to represent an Anchor }
  NbspUtf8 = #194#160;  {utf8 code of no-break space character}
  
  LF = #10;
  CR = #13;
  
// Many enums are part of records which are compared and moved around. Use less memory.
{$minEnumSize 1}

type
  TElementType = (
    etWord, etObject, etSoftLF, etHardLF, etClearLeft, etClearRight, 
    etClearBoth, etIndent, etOutdent, etSoftHyphen
  );
  
  TIpHtmlAlign = (
    haDefault, haLeft, haCenter, haRight, haJustify, haChar, haUnknown
  );
  
  TIpHtmlBreakClear = (
    hbcNone, hbcLeft, hbcRight, hbcAll
  );

  TIpHtmlButtonType = (
    hbtSubmit, hbtReset, hbtButton
  );

  TIpHtmlCellScope = (
    hcsUnspec, hcsRow, hcsCol, hcsRowGroup, hcsColGroup
  );

  TIpHtmlDirection = (
    hdNone, hdLTR, hdRTL
  );

  TIpHtmlElemMarginStyle = (
    hemsAuto, // use default
    hemsPx    // pixel
    );

  TIpHtmlFontStyles = (
    hfsTT, hfsI, hfsB, hfsU, hfsSTRIKE, hfsS, hfsBIG, hfsSMALL, hfsSUB, hfsSUP
  );

  TIpHtmlFormMethod = (
    hfmGet, hfmPost
  );

  TIpHtmlFrameProp = (
    hfVoid, hfAbove, hfBelow, hfHSides, hfLhs, hfRhs, hfvSides, hfBox, hfBorder
  );

  TIpHtmlFrameScrolling = (
    hfsAuto, hfsYes, hfsNo
  );
  
  TIpHtmlHeaderSize = 1..6;

  TIpHtmlImageAlign = (
    hiaTop, hiaMiddle, hiaBottom, hiaLeft, hiaRight, hiaCenter
  );
  
  TIpHtmlInputType = (
    hitText, hitPassword, hitCheckbox, hitRadio, hitSubmit, hitReset, 
    hitFile, hitHidden, hitImage, hitButton
  );

  TIpHtmlLengthType = (
    hlUndefined, hlAbsolute, hlPercent
  );
  
  TIpHtmlMapShape = (
    hmsDefault, hmsRect, hmsCircle, hmsPoly
  );
  
  TIpHtmlOLStyle = (
    olArabic, olLowerAlpha, olUpperAlpha, olLowerRoman, olUpperRoman
  );
  
  TIpHtmlPhraseStyle = (
    hpsEM, hpsSTRONG, hpsDFN, hpsCODE, hpsSAMP, hpsKBD, hpsVAR, hpsCITE, 
    hpsABBR, hpsACRONYM
  );

  TIpHtmlObjectValueType = (
    hovtData, hovtRef, hovtObject
  );
  
  TIpHtmlPixelsType = (
    hpUndefined, hpAbsolute
  );
  
  TIpHtmlRenderDevice = (
    rdScreen, rdPrinter, rdPreview
  );

  TIpHtmlRules = (
    hrNone, hrGroups, hrRows, hrCols, hrAll
  );
  
  TIpHtmlULType = (
    ulUndefined, ulDisc, ulSquare, ulCircle
  );
  
  TIpHtmlVAlign = (
    hvaTop, hvaMiddle, hvaBottom
  );
  
  TIpHtmlVAlign3 = (
    hva3Top, hva3Middle, hva3Bottom, hva3Baseline, hva3Default
  );
  
  TIpHtmlVAlignment2 = (
    hva2Top, hva2Bottom, hva2Left, hva2Right
  );
  
  TIpScrollAction = (
    hsaHome, hsaEnd, hsaPgUp, hsaPgDn, hsaLeft, hsaRight, hsaUp, hsaDown
  );
  
  
var
  // true during print preview only, public to let print preview unit access it
  ScaleBitmaps: Boolean = False;
  ScaleFonts : Boolean = False;
  Aspect: Double = 1.0;
  BWPrinter: Boolean;
  
implementation

end.