├── .gitattributes ├── .gitignore ├── HtmlConst.pas ├── HtmlCtrl.pas ├── HtmlDemo.dpr ├── HtmlDemo.res ├── HtmlDll.pas ├── HtmlDom.pas ├── HtmlTypes.pas ├── Unit1.dfm ├── Unit1.pas ├── index.htm ├── readme └── style ├── conv.css ├── main.css ├── tail_l.png ├── tail_r.png └── theme.css /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /HtmlConst.pas: -------------------------------------------------------------------------------- 1 | unit HtmlConst; 2 | 3 | interface 4 | 5 | uses Windows; 6 | 7 | const 8 | HLN_CREATE_CONTROL = $AFF + $01; 9 | HLN_LOAD_DATA = $AFF + $02; 10 | HLN_CONTROL_CREATED = $AFF + $03; 11 | HLN_DATA_LOADED = $AFF + $04; 12 | HLN_DOCUMENT_COMPLETE = $AFF + $05; 13 | HLN_UPDATE_UI = $AFF + $06; 14 | HLN_DESTROY_CONTROL = $AFF + $07; 15 | HLN_ATTACH_BEHAVIOR = $AFF + $08; 16 | HLN_BEHAVIOR_CHANGED = $AFF + $09; 17 | HLN_DIALOG_CREATED = $AFF + $10; 18 | HLN_DIALOG_CLOSE_RQ = $AFF + $0A; 19 | HLN_DOCUMENT_LOADED = $AFF + $0B; 20 | 21 | LOAD_OK = 0; 22 | LOAD_DISCARD = 1; 23 | 24 | HLDOM_OK = 0; 25 | HLDOM_INVALID_HWND = 1; 26 | HLDOM_INVALID_HANDLE = 2; 27 | HLDOM_PASSIVE_HANDLE = 3; 28 | HLDOM_INVALID_PARAMETER = 4; 29 | HLDOM_OPERATION_FAILED = 5; 30 | HLDOM_OK_NOT_HANDLED = -1; 31 | 32 | SIH_REPLACE_CONTENT = 0; 33 | SIH_INSERT_AT_START = 1; 34 | SIH_APPEND_AFTER_LAST = 2; 35 | 36 | SOH_REPLACE = 3; 37 | SOH_INSERT_BEFORE = 4; 38 | SOH_INSERT_AFTER = 5; 39 | 40 | INSERT_AT_END = $7FFFFFF; 41 | 42 | //enum EVENT_GROUPS 43 | HANDLE_INITIALIZATION = $0000; (* attached/detached *) 44 | HANDLE_MOUSE = $0001; (* mouse events *) 45 | HANDLE_KEY = $0002; (* key events *) 46 | HANDLE_FOCUS = $0004; (* focus events, if this flag is set it also means that element it attached to is focusable *) 47 | HANDLE_SCROLL = $0008; (* scroll events *) 48 | HANDLE_TIMER = $0010; (* timer event *) 49 | HANDLE_SIZE = $0020; (* size changed event *) 50 | HANDLE_DRAW = $0040; (* drawing request (event) *) 51 | HANDLE_DATA_ARRIVED = $080; (* requested data () has been delivered *) 52 | HANDLE_BEHAVIOR_EVENT = $0100; (* secondary, synthetic events: 53 | BUTTON_CLICK, HYPERLINK_CLICK, etc., 54 | a.k.a. notifications from intrinsic behaviors *) 55 | HANDLE_METHOD_CALL = $0200; (* behavior specific methods *) 56 | 57 | HANDLE_EXCHANGE = $1000; (* system drag-n-drop *) 58 | HANDLE_GESTURE = $2000; (* touch input events *) 59 | 60 | HANDLE_ALL = $FFFF; (* all of them *) 61 | 62 | DISABLE_INITIALIZATION = $80000000; (* disable INITIALIZATION events to be sent. 63 | normally engine sends 64 | BEHAVIOR_DETACH / BEHAVIOR_ATTACH events unconditionally, 65 | this flag allows to disable this behavior 66 | *) 67 | 68 | type 69 | BehaviorEvents = ( 70 | BUTTON_CLICK = 0, // click on button 71 | BUTTON_PRESS = 1, // mouse down or key down in button 72 | BUTTON_STATE_CHANGED = 2, // checkbox/radio/slider changed its state/value 73 | EDIT_VALUE_CHANGING = 3, // before text change 74 | EDIT_VALUE_CHANGED = 4, // after text change 75 | SELECT_SELECTION_CHANGED = 5, // selection in