Compare commits

..

272 commits

Author SHA1 Message Date
Alexander Koblov
0b8ba38384 UPD: WinGet Releaser version
(cherry picked from commit a7c2148857)
2023-04-02 14:16:10 +03:00
iglezz
c1785922df fix Ctrl+WheelUp bug when font size = MinValue (#898)
(cherry picked from commit f2556401eb)
2023-04-02 14:01:10 +03:00
Alexander Koblov
ebf4142948 ADD: Lua - show error when script file not found
ADD: Lua - setenv/unsetenv functions (patch by NorbertJh)
2023-03-17 22:18:48 +03:00
Alexander Koblov
2f75d651ed ADD: DialogAPI - TDirectoryEdit control
(cherry picked from commit 5d35beec40)
2023-03-17 21:32:08 +03:00
Alexander Koblov
7ebc7cbe36 ADD: DialogAPI - DM_GETTEXT/DM_SETTEXT for TCheckBox
(cherry picked from commit 615823d2e8)
2023-03-17 21:31:55 +03:00
Alexander Koblov
fd247eff2a UPD: DialogAPI - refactoring
(cherry picked from commit 3b0cb68bae)
2023-03-17 21:31:39 +03:00
Alexander Koblov
2f4f8428e1 ADD: DialogAPI - timer component
(cherry picked from commit 9aa7dda9a4)
2023-03-17 21:31:27 +03:00
Alexander Koblov
f462b65ba3 ADD: DialogAPI - DM_LISTCLEAR message 2023-03-17 21:30:51 +03:00
Alexander Koblov
f468e20db5 ADD: DialogAPI - DM_SETPASSWORDCHAR message
(cherry picked from commit d739808f0c)
2023-03-17 21:29:00 +03:00
Mansur
eae57c455c UPD: Auto shortcuts in the tree view (#854)
(cherry picked from commit bdd2e71bf7)
2023-03-17 21:23:30 +03:00
Alexander Koblov
b74ed59ed6 UPD: TComboBoxAutoWidth - width calculation algorithm
(cherry picked from commit b188817eed)
2023-03-17 21:23:19 +03:00
Alexander Koblov
ecca68beed ADD: AudioInfo - bit depth field
(cherry picked from commit d4fc718f8f)
2023-03-17 21:23:19 +03:00
Alexander Koblov
7490fb959d FIX: Find files - find text in the drive root (issue #839)
(cherry picked from commit 25ec33e563)
2023-03-17 21:20:48 +03:00
Alexander Koblov
b29753ce8c ADD: DialogAPI - send DN_CLOSE message
(cherry picked from commit a30b7c5793)
2023-03-17 21:20:37 +03:00
Alexander Koblov
5b653c1332 ADD: Zip - .tzst extension
(cherry picked from commit 13bd3ce79b)
2023-03-17 21:20:21 +03:00
Alexander Koblov
cb7439743c UPD: AudioInfo - return empty string instead ft_fieldempty
(cherry picked from commit 2150343460)
2023-03-17 21:20:08 +03:00
Alexander Koblov
99d8dfed0c FIX: WFX-API functions prototypes
(cherry picked from commit 864652b8f3)
2023-03-17 21:19:24 +03:00
Alexander Koblov
cd1d9e8347 UPD: Optimize resource strings translation 2023-03-05 18:51:23 +03:00
Alexander Koblov
84a862d722 FIX: DC ignores WDX plugin file detection string when searching (fixes #833)
(cherry picked from commit 0f01e5e19a)
2023-03-05 18:48:40 +03:00
Alexander Koblov
e32f2a912f FIX: Zip - crash on compression when libzstd not found
(cherry picked from commit b50740cef7)
2023-03-05 12:01:01 +03:00
Alexander Koblov
df1b6b27f2 FIX: AudioInfo - read ID3v2.4 with UTF-16 encoding
(cherry picked from commit 47680a5cc6)
2023-03-05 12:00:40 +03:00
Alexander Koblov
75009e20ab FIX: Locked tabs - reuse existing tab when possible (with archive)
(cherry picked from commit 6361f6577b)
2023-03-05 11:58:55 +03:00
Alexander Koblov
441ce780e6 FIX: Incorrect .tar.gz archive reading: same directory appears multiple time (fixes #809)
(cherry picked from commit 4c027c42a9)
2023-03-05 11:58:09 +03:00
Alexander Koblov
1538255b22 ADD: FTP - capability to create connection copy
(cherry picked from commit 9825c04bdc)
2023-03-05 11:57:49 +03:00
Alexander Koblov
f943538641 UPD: Allow to use icon from pixmaps.txt for .ico
(cherry picked from commit f09c9de84e)
2023-02-23 14:18:33 +03:00
Alexander Koblov
94cc42cabe FIX: Unpacking file from zip with entering empty destination (fixes #826)
(cherry picked from commit 09762d955d)
2023-02-23 14:18:08 +03:00
Alexander Koblov
df335ced59 UPD: Build script 2023-02-12 20:01:43 +03:00
Alexander Koblov
adce914beb UPD: Version number 2023-02-12 19:58:17 +03:00
Peter Marquardt
9e2e2ee3d4 ADD: Support parsing of /etc/os-release (#804)
(cherry picked from commit 8b056faaa6)
2023-02-12 19:53:21 +03:00
Alexander Koblov
217a1f1047 FIX: Combine Files - problems with combining to archive or the same folder (issue #800)
(cherry picked from commit 87b3f26dc7)
2023-02-12 19:53:08 +03:00
Alexander Koblov
73c435acc9 UPD: Optimize WEBP loading speed
(cherry picked from commit 893456c914)
2023-02-12 19:52:28 +03:00
Alexander Koblov
2e2456d78b FIX: Unconditional file overwrite on Shift + F4 when name has trailing whitespace (fixes #786)
(cherry picked from commit 0c6273c3cf)
2023-02-12 19:49:27 +03:00
Alexander Koblov
b0ca10d89b FIX: Viewer - Slow case insensitive backward search with single byte encoding
(cherry picked from commit cb9b79a26d)
2023-02-12 19:47:51 +03:00
Alexander Koblov
d00f8b7b7c FIX: FPC 3.3 compatibility (#385) 2023-01-21 12:05:23 +03:00
Alexander Koblov
5bac92d740 FIX: Warning message about not enough space when copying to ramfs (fixes #753) 2023-01-21 11:35:59 +03:00
Alexander Koblov
28ea809388 UPD: Check file name on the local file system only (fixes #709) 2023-01-15 14:07:18 +03:00
Alexander Koblov
85a086424b UPD: Version number 2023-01-15 12:44:37 +03:00
Alexander Koblov
2232d58e91 FIX: DC appearance in Windows Task Manager (fixes #714) 2023-01-15 12:37:35 +03:00
Alexander Koblov
b81bb31aad UPD: Optimize SVG rendering speed
(cherry picked from commit b8e13477b0)
2023-01-15 12:34:19 +03:00
Alexander Koblov
9b4bfe551e UPD: Copyright year 2023-01-15 12:27:01 +03:00
Alexander Koblov
3d4cdea77d FIX: Editor - update encoding name in the status bar 2023-01-15 12:25:30 +03:00
Alexander Koblov
760704ef61 FIX: Viewer - TWinControl.CreateWnd creating Handle during loading 2023-01-15 12:19:31 +03:00
Alexander Koblov
e60ecc4715 FIX: Extract files with zero UNIX time
(cherry picked from commit 49f29d47a3)
2022-12-25 12:35:24 +03:00
Alexander Koblov
a44742c37a FIX: Range check error
(cherry picked from commit 45046c24b7)
2022-12-25 12:35:24 +03:00
Alexander Koblov
64fd0712ef UPD: Use TWfxFileTime
(cherry picked from commit 3e12228de9)
2022-12-25 12:35:24 +03:00
Alexander Koblov
120578c7e0 FIX: Bug [0002644] Closing an unavailable FTP connection not possible
(cherry picked from commit 81e1cee3b8)
2022-12-25 12:35:23 +03:00
Alexander Koblov
989a3ff520 ADD: About dialog window MinWidth/MinHeight size (issue #450)
(cherry picked from commit 585536e1bc)
2022-12-25 12:35:23 +03:00
Alexander Koblov
b78af243e3 FIX: Restore focus when open virtual file system list
(cherry picked from commit 624872ea0d)
2022-12-25 12:35:23 +03:00
Alexander Koblov
65bb0d8432 FIX: Viewer does not display KOI8 (fixes #726)
(cherry picked from commit b3bd295976)
2022-12-25 12:32:48 +03:00
Alexander Koblov
0c40b156af FIX: AudioInfo - read IDv2.4 with UTF-8 encoding (fixes #723)
(cherry picked from commit d660b14965)
2022-12-25 12:32:48 +03:00
Alexander Koblov
a844456e49 ADD: FTP - save private key passphrase to cache (issue #697)
(cherry picked from commit faee14c230)
2022-12-03 11:17:32 +03:00
Alexander Koblov
f4b618334b DEL: Obsolete doublecmd.ext.example
(cherry picked from commit bf76a5e357)
2022-12-01 20:51:41 +03:00
Alexander Koblov
d0532ef243 FIX: Zip - open small Gzip archive
(cherry picked from commit a193935b47)
2022-11-29 22:18:06 +03:00
Alexander Koblov
5caf988b12 UPD: DoCreatePreviewText - speed optimization
(cherry picked from commit 81243371f8)
2022-11-29 22:17:54 +03:00
Alexander Koblov
325763648c FIX: Error when browsing folder with Exif date 0-0-0 (fixes #693)
(cherry picked from commit e1653703aa)
2022-11-29 22:17:27 +03:00
Alexander Koblov
43d029a5da FIX: Remove symlink to directory directly when move to trash failed (fixes #686)
(cherry picked from commit c7dce345a0)
2022-11-29 22:17:15 +03:00
rich2014
58c0d8487d FIX: QuickView: Not exiting PluginMode when receiving empty string in TfrmViewer.LoadFile() (#683)
(cherry picked from commit 8d21868557)
2022-11-29 22:16:47 +03:00
Alexander Koblov
249133688a FIX: Compiler directives 2022-11-23 18:53:00 +03:00
Alexander Koblov
4a8a5a6f5c FIX: Button Help is truncated (fixes #630)
(cherry picked from commit 8291f84b0b)
2022-11-23 18:48:59 +03:00
Alexander Koblov
c35c9a3183 FIX: Don't load the unversioned libcrypto under macOS (issue #674)
(cherry picked from commit 559b0f6719)
2022-11-23 18:48:59 +03:00
Alexander Koblov
013fc32ae1 FIX: Crash on add attributes (Lazarus 2.3)
(cherry picked from commit 6c0ce761c4)
2022-11-23 18:48:59 +03:00
Alexander Koblov
0a15654e73 UPD: OpenSSL library versions (issue #674)
(cherry picked from commit 3232137533)
2022-11-23 18:48:59 +03:00
Alexander Koblov
075bb220bc ADD: TKASButtonPanel - SameWidth and SameHeight properties
(cherry picked from commit 0bcb9b1d7c)
2022-11-23 18:48:58 +03:00
Alexander Koblov
5220e14f81 UPD: Show splash form on primary monitor
(cherry picked from commit 58b831f3c8)
2022-11-23 18:48:02 +03:00
Alexander Koblov
6681768462 FIX: Confirmation dialog appears on the wrong display in a multi monitor config (fixes #633)
(cherry picked from commit d39cb6dfcb)
2022-11-23 18:48:02 +03:00
Alexander Koblov
508adfcefb UPD: Greek translation 2022-11-21 21:22:36 +03:00
Alexander Koblov
9233057f4f FIX: Field "100" in this form is not fit by width (fixes #631)
(cherry picked from commit 9a2ffad84e)
2022-11-07 18:21:43 +03:00
Alexander Koblov
1266be234c ADD: Feature [0002299] Access to WSL directory in Win 1903
(cherry picked from commit 8c95a30424)
2022-11-07 18:21:43 +03:00
Alexander Koblov
f7674f4e58 FIX: Viewer - draw last line (issue #652)
(cherry picked from commit 6d8420b479)
2022-11-07 18:21:42 +03:00
Alexander Koblov
22c256c62c FIX: Viewer - dribbling of lowest line when window height is resized (fixes #652)
(cherry picked from commit 35498b579e)
2022-11-07 18:21:42 +03:00
Alexander Koblov
af6c4ed14d ADD: Show progress when open inner archive from archive
(cherry picked from commit a0bd0ad760)
2022-10-30 13:02:25 +03:00
Alexander Koblov
288c803f39 FIX: Load default text encoding 2022-10-30 12:54:33 +03:00
Alexander Koblov
227d8c22b7 UPD: Version number 2022-10-30 12:48:23 +03:00
Alexander Koblov
b64b716bad UPD: ExtractDlg - improve the layout (fixes #628)
(cherry picked from commit 5fdcad2fec)
2022-10-30 12:45:55 +03:00
Skif-off
01e634045a UPD: uWDXModule: List of language codes (translation support). (#650)
(cherry picked from commit 085a2e1e87)
2022-10-30 12:45:55 +03:00
Alexander Koblov
fb0b9d3c4d FIX: Restore plugin operator in the search templates (fixes #644)
(cherry picked from commit 61807cc96d)
2022-10-21 19:52:43 +03:00
Alexander Koblov
1ca8eac42d FIX: Remove UseConfigInProgramDir from doublecmd.xml
(cherry picked from commit 12dde068bc)
2022-10-21 19:52:29 +03:00
Alexander Koblov
efa95e1b58 UPD: Differ - move auto-compare option to doublecmd.xml (fixes #607)
(cherry picked from commit c612db2577)
2022-10-21 19:51:52 +03:00
Alexander Koblov
220bd2ec55 FIX: Lazarus 2.3 compatibility
(cherry picked from commit f588cc1d17)
2022-10-21 19:51:34 +03:00
Vedant
d272e36a2d Update winget.yml (#613)
(cherry picked from commit 5113c698f6)
2022-10-21 19:51:34 +03:00
Alexander Koblov
752459d65a ADD: Tools - load 32x32 toolbar icons
(cherry picked from commit 8bbaf929ae)
2022-10-21 19:51:33 +03:00
Vedant
ee1f44b3ce Create winget.yml (#487)
(cherry picked from commit d6ac8c7bdb)
2022-09-18 12:03:06 +03:00
Alexander Koblov
a10df2f68b ADD: Zip - show bzip2/zstd/xz compression/decompression progress
(cherry picked from commit c3f0f99774)
2022-09-18 12:02:52 +03:00
Alexander Koblov
9aec6075db UPD: SevenZip - refactoring
(cherry picked from commit d3669d5c32)
2022-09-17 14:10:07 +03:00
Alexander Koblov
8e83d8ea8b FIX: SevenZip - update password visibility on "show password" change
(cherry picked from commit 181997bf08)
2022-09-17 14:10:07 +03:00
Alexander Koblov
7c33c64c07 FIX: Zip - gzip unpack progress
(cherry picked from commit 6011f09b10)
2022-09-17 11:32:39 +03:00
Alexander Koblov
b16c3ce409 UPD: Speed up gzip-archive creation/modification
(cherry picked from commit 82b6f6ec0b)
2022-09-17 11:32:39 +03:00
Alexander Koblov
bc5a9fda5e FIX: Zip - slow gzip-file opening
(cherry picked from commit 8cd00f4a05)
2022-09-16 19:01:52 +03:00
Alexander Koblov
8e8460b5cb UPD: Version number 2022-09-15 22:54:52 +03:00
Alexander Koblov
cab264cfad UPD: Duplicate highlighters - better naming scheme
(cherry picked from commit 2f916f9b6d)
2022-09-15 22:50:05 +03:00
Alexander Koblov
08251735e5 ADD: Show duplicate external highlighters
(cherry picked from commit bb3a0d5ee3)
2022-09-15 21:28:53 +03:00
Alexander Koblov
086b468cfa ADD: Zip - show gzip compression progress
(cherry picked from commit 952ceb722e)
2022-09-15 21:28:52 +03:00
Alexander Koblov
2e16e1c166 FIX: Zip - extract concatenated gzip archive
UPD: Zip - use fast CRC32 function

(cherry picked from commit c2c6590ae4)
2022-09-14 19:16:13 +03:00
Alexander Koblov
01267bc754 UPD: CRC32 - use static constant array
(cherry picked from commit 633bccdba1)
2022-09-14 19:16:13 +03:00
BLUEnLIVE
710e2e0d59 Update doublecmd.ko.po (#583)
Translation was partly missing.

(cherry picked from commit e4c8ecdbbf)
2022-09-14 19:16:12 +03:00
Alexander Koblov
0425317579 FIX: Drives bar right click properties missing functions (fixes #580)
(cherry picked from commit 664c3a32a5)
2022-09-13 21:14:50 +03:00
Alexander Koblov
354226175f FIX: External and internal highlighter name conflict
(cherry picked from commit 37f25c86ef)
2022-09-13 21:14:49 +03:00
Alexander Koblov
6089526461 FIX: ANSI encoding in the file list % variables
(cherry picked from commit 7914bc89be)
2022-09-11 22:56:17 +03:00
Alexander Koblov
3ebf1727df DEL: Unneeded patches
(cherry picked from commit a09f62e6dd)
2022-09-11 22:56:17 +03:00
Alexander Koblov
78120eb2f3 ADD: Default single-byte text encoding option 2022-09-11 22:54:51 +03:00
Alexander Koblov
0eb417d153 UPD: Enable native Wayland support (Qt5, Lazarus >= 2.2.0)
(cherry picked from commit 178f2bf71b)
2022-09-10 22:35:24 +03:00
Alexander Koblov
fdb07b3b5b ADD: SFTP - Show used encryption methods
(cherry picked from commit 4ed7362c07)
2022-09-10 22:25:27 +03:00
Alexander Koblov
ee4893a22c UPD: Hash verification - skip '#' comments
(cherry picked from commit e41241b8bd)
2022-09-10 22:25:27 +03:00
Alexander Koblov
01daa52beb UPD: Zip - project file
(cherry picked from commit c6c5fbaed7)
2022-09-10 12:27:55 +03:00
Alexander Koblov
3d80a6ad9a FIX: Zip - unpack encrypted (AES) archive
(cherry picked from commit b858e33b17)
2022-09-10 12:27:55 +03:00
Alexander Koblov
7a4aa3cd71 FIX: Zip - unpack progress (file > 2 GB)
(cherry picked from commit 199450b197)
2022-09-10 12:27:55 +03:00
Alexander Koblov
2254d53e43 UPD: MultiArc configuration file
(cherry picked from commit 7c73897c15)
2022-09-07 21:21:00 +03:00
Alexander Koblov
fcf3635fcb ADD: MultiArc - ZPAQ archiver (fixes #447)
(cherry picked from commit 239299b0ce)
2022-09-07 21:20:59 +03:00
Alexander Koblov
a92542047d FIX: Controls autosize
(cherry picked from commit d8725969ff)
2022-09-07 21:20:09 +03:00
Alexander Koblov
9f3bc40097 FIX: TShellFolder.EnumObjects
(cherry picked from commit 556253d4b3)
2022-09-07 21:20:09 +03:00
Alexander Koblov
21ffa7b2c0 ADD: Show context menu for multiple objects from different path
(cherry picked from commit 5464a345c3)
2022-09-07 21:20:09 +03:00
Alexander Koblov
48f2d4cf09 FIX: Commit forgotten file
(cherry picked from commit 626dec1239)
2022-09-03 11:26:28 +03:00
Alexander Koblov
02913857ab ADD: Editor - show bookmarks
(cherry picked from commit 8e619273a4)
2022-09-03 11:26:28 +03:00
Alexander Koblov
1d60637432 FIX: Process running state
(cherry picked from commit e2aecba435)
2022-09-03 11:25:51 +03:00
Alexander Koblov
0a70db43e5 UPD: Bevel style
(cherry picked from commit b22ac36b40)
2022-09-03 11:25:51 +03:00
Alexander Koblov
7fb0454687 FIX: Process running state
(cherry picked from commit f6e99c46c6)
2022-08-28 14:35:00 +03:00
Alexander Koblov
113d6ef518 FIX: Packer name lost
(cherry picked from commit d3547ad222)
2022-08-28 12:46:49 +03:00
Alexander Koblov
e537770a28 ADD: Context menu - always show "New->Directory" and "New->File" menu items (fixes #559)
(cherry picked from commit ec855c4d0f)
2022-08-23 18:33:07 +03:00
Alexander Koblov
30d7b8a80c FIX: Deleting of last picture file in QuickView mode (fixes #546)
(cherry picked from commit 5fa5fb0ae3)
2022-08-23 18:32:57 +03:00
Alexander Koblov
b7c83fb25c FIX: SevenZip - create 7-Zip archive with PPMd compression method
(cherry picked from commit 1d3ba73af4)
2022-08-20 14:34:37 +03:00
Alexander Koblov
5deb4e99e3 FIX: SevenZip - MessageBox text encoding
(cherry picked from commit c13c40bd32)
2022-08-20 14:34:36 +03:00
Alexander Koblov
2f97288d7c FIX: Error change filename in copy operation (fixes #503)
(cherry picked from commit 6fc22a2bff)
2022-08-20 14:34:36 +03:00
Alexander Koblov
2c15917a14 FIX: Zip - update time extra fields (fixes #492)
(cherry picked from commit 29cea47087)
2022-08-09 18:53:57 +03:00
Alexander Koblov
7b85aa6445 ADD: Show in the properties dialog which addon/plugin used to open archive
(cherry picked from commit cb21bfedb8)
2022-08-09 18:53:47 +03:00
Alexander Koblov
419553ab31 FIX: Remove UseConfigInProgramDir from doublecmd.xml
(cherry picked from commit c1e9164dc1)
2022-08-06 13:19:19 +03:00
Alexander Koblov
b645fe668b FIX: DC_CONFIG_PATH value 2022-08-06 13:17:18 +03:00
Alexander Koblov
d4e956b46e UPD: Project file
(cherry picked from commit 8d01d3cd10)
2022-08-06 13:01:18 +03:00
Alexander Koblov
861c5b61c2 FIX: Extract encrypted RAR archive when password contains non-ASCII characters
(cherry picked from commit 6ea44db451)
2022-08-06 13:01:18 +03:00
Alexander Koblov
3fa5525d1a FIX: Abort FileSourceOperation
(cherry picked from commit aca79a3b30)
2022-08-06 13:01:02 +03:00
Alexander Koblov
b49e5f44eb FIX: Select duplicates dialog (wrong selection in the last group)
(cherry picked from commit cd3db6e871)
2022-08-06 13:01:02 +03:00
Alexander Koblov
0d464d30e2 FIX: SevenZip - Create .zip archives
(cherry picked from commit 38342adcc2)
2022-08-06 13:01:01 +03:00
Alexander Koblov
4e03c743f1 FIX: Command line parameter '--debug-log' (Lazarus >= 2.2)
(cherry picked from commit 6995fe0c30)
2022-08-06 13:00:18 +03:00
Alexander Koblov
d93b70f8ed FIX: Unrar - don't rewrite configuration file
(cherry picked from commit 00ea415c48)
2022-08-06 13:00:18 +03:00
Alexander Koblov
efb78948f4 UPD: Disable create archive inside other archive (function not supported)
(cherry picked from commit 0c49b02fb2)
2022-08-06 12:59:58 +03:00
Alexander Koblov
d241666742 FIX: SevenZip - save configuration when path contains non ASCII characters
(cherry picked from commit 9d468c8aca)
2022-07-14 23:11:55 +03:00
Alexander Koblov
65c94ff8ba FIX: Unrar - save configuration when path contains non ASCII characters
(cherry picked from commit cb5357bf45)
2022-07-14 23:11:54 +03:00
Alexander Koblov
d453644a48 FIX: Error Access Violation in "Directory Hotlist" (fixes #491)
(cherry picked from commit 710c2d6cc2)
2022-07-10 12:23:30 +03:00
Alexander Koblov
e6e15e7e84 FIX: Error Access Violation in "Directory Hotlist" (fixes #491)
(cherry picked from commit 7164b4edac)
2022-07-10 12:23:29 +03:00
Alexander Koblov
aedf74a507 FIX: Zip - extract file with long name (> 100) from .tar archive in the pax format
(cherry picked from commit 03e6a989d9)
2022-07-05 19:24:50 +03:00
Alexander Koblov
8824b665ad FIX: Rename file on copy
(cherry picked from commit 0f8f9f3563)
2022-07-05 19:24:36 +03:00
Alexander Koblov
c1982daff0 FIX: Viewer - hang on view corrupted .gif
(cherry picked from commit c44d56ace6)
2022-07-05 19:24:35 +03:00
Alexander Koblov
8c23edb71f FIX: Tree view menu height (exclude task bar)
(cherry picked from commit 7b23ccf8a9)
2022-07-05 19:24:35 +03:00
Alexander Koblov
ae0e12fac0 FIX: ExcludeBackPathDelimiter with drive root
(cherry picked from commit ff2732ac56)
2022-06-18 16:00:15 +03:00
Alexander Koblov
38e32dae79 UPD: Use tilde symbol as revision delimiter 2022-06-12 15:48:22 +03:00
Alexander Koblov
6093e1aa57 FIX: FPC 3.0.4 compatibility 2022-06-12 15:32:54 +03:00
Alexander Koblov
012607073e FIX: Range check error
(cherry picked from commit 4aaa48f26e)
2022-06-12 15:24:10 +03:00
Alexander Koblov
b8795bb97d UPD: More compact main window title 2022-06-12 13:18:07 +03:00
Alexander Koblov
2845d264d2 FIX: Viewer - double toolbar border (issue #463) 2022-06-11 23:37:17 +03:00
Alexander Koblov
798ebf6ea4 ADD: Auto-detect default terminal emulator 2022-06-05 11:20:35 +03:00
Alexander Koblov
0e543bd728 UPD: Splash screen icon 2022-06-05 11:19:00 +03:00
Alexander Koblov
1c3fc8dabd UPD: Version number 2022-06-05 11:15:38 +03:00
Alexander Koblov
976d0bb0b7 UPD: Version number 2022-06-05 11:15:00 +03:00
Alexander Koblov
b1d0f2f15e UPD: About dialog icon (fixes #444)
(cherry picked from commit 3d6a63cb79)
2022-06-03 18:42:47 +03:00
Alexander Koblov
7da4137a73 ADD: BSD reversed mode checksum file format (fixes #349)
(cherry picked from commit 55ec158a2d)
2022-05-27 18:43:32 +03:00
WhiteChairFromIkea
22b53326a6 FIX: Reset filter field everytime when gaining focus (fixes #274)
Co-authored-by: WhiteChairFromIkea <dainius.mazuika@gmailcom>
(cherry picked from commit b636e42eea)
2022-05-27 18:43:31 +03:00
Alexander Koblov
1afb3ad023 FIX: Template submenu - skip misconfigured path (fixes #431)
(cherry picked from commit 2780c2f874)
2022-05-17 22:07:49 +03:00
Alexander Koblov
3a2619384c UPD: Viewer - set stretch only large by default on
(cherry picked from commit dc16e3da04)
2022-05-07 15:46:48 +03:00
Alexander Koblov
0d65407394 UPD: Version number 2022-05-07 15:45:14 +03:00
Graham Inggs
36aa1be761 FIX: TUnixTime and TUnixMode for MIPS and PowerPC (#427) 2022-05-07 15:43:01 +03:00
Alexander Koblov
f77a2eac54 FIX: Copy dialog - controls spacing 2022-05-07 15:42:27 +03:00
Alexander Koblov
63895bcc3b FIX: Hide service mount points 2022-05-07 15:42:27 +03:00
Alexander Koblov
9624ce1218 FIX: Zip - save Unix file attributes (fixes #424) 2022-05-07 15:42:27 +03:00
Alexander Koblov
97041103d3 FIX: SynEdit gutter separator colors 2022-05-07 15:42:26 +03:00
Nick Korotysh
6232e752c1 ADD: GenericName key to .desktop file (#414) 2022-05-07 15:42:26 +03:00
Alexander Koblov
e49684af6b UPD: Start button glyph 2022-05-07 15:42:26 +03:00
Alexander Koblov
3cf34c9a9f FIX: Reserve space for second and the rest files (Linux)
(cherry picked from commit 3f3343856c)
2022-05-07 15:40:57 +03:00
Alexander Koblov
200a718538 UPD: Component address
(cherry picked from commit 4363a1eb9b)
2022-05-07 15:40:57 +03:00
Alexander Koblov
5f4fa564a7 DEL: Wrong hint
(cherry picked from commit 9dff11c0be)
2022-05-07 15:40:57 +03:00
Alexander Koblov
c02347051f FIX: FTP - long delay with some ftps servers
(cherry picked from commit 78d28932af)
2022-04-09 11:27:45 +03:00
Alexander Koblov
c9767b6e68 FIX: Long delay with locked network path
(cherry picked from commit 7d90b0852f)
2022-04-09 11:21:11 +03:00
Alexander Koblov
c522743f98 FIX: A non-Latin folder name is not shown correctly in the title bar (fixes #354)
(cherry picked from commit 5f0ae995a5)
2022-04-09 11:21:10 +03:00
Alexander Koblov
5c22ec3b74 ADD: Don't allow rename file to the name with a dot at the end (Windows)
(cherry picked from commit 811266e6c3)
2022-04-02 15:31:09 +03:00
Alexander Koblov
3100aa02c9 FIX: Issue [0002028] Narrow tabs and shorten titles if too many tabs
(cherry picked from commit 1418d99735)
2022-04-02 15:31:09 +03:00
Alexander Koblov
9885358914 UPD: Version number 2022-03-27 15:18:15 +03:00
Skif-off
b12ae242ab ADD: Lua - GetAbsolutePath, GetRelativePath functions (#382)
(cherry picked from commit c265df60f0)
2022-03-27 15:10:30 +03:00
Alexander Koblov
f6e09040e3 FIX: Find files - use correct regular expression engine
(cherry picked from commit 9b479b805d)
2022-03-27 15:10:30 +03:00
Alexander Koblov
c842cc7d83 ADD: RegExp - Unicode categories support
(cherry picked from commit 69f755015d)
2022-03-27 15:10:30 +03:00
Alexander Koblov
1597fb4eca UPD: Set display version (fixes #384) 2022-03-27 11:58:59 +03:00
Alexander Koblov
1acbe04b14 ADD: TAR - read mtime from PAX headers
(cherry picked from commit 2a69adfc53)
2022-03-06 23:55:52 +03:00
Alexander Koblov
3b56004a06 FIX: Poorly adjusted columns in Synchronize Directories (fixes #371)
(cherry picked from commit 8d57c7cc58)
2022-03-06 23:52:07 +03:00
Alexander Koblov
a7d176ca38 ADD: Determine Windows 11 by build number (fixes #367)
(cherry picked from commit b6e156e88c)
2022-03-06 23:52:07 +03:00
Alexander Koblov
ada9ada758 UPD: Allow zero (default) font size
(cherry picked from commit f6a40943ec)
2022-02-23 18:25:34 +03:00
Alexander Koblov
a45d5f0b7b FIX: Invalid library in the uses clause
(cherry picked from commit c6204e1a60)
2022-02-23 18:25:01 +03:00
Alexander Koblov
367d5d4d83 FIX: Range check error 2022-02-23 18:24:25 +03:00
Alexander Koblov
410fbfd484 FIX: Renaming/deletion a file in a smb:// location brings cursor to the top of file list (issue #350) 2022-02-23 18:24:25 +03:00
Alexander Koblov
5b951aa8d5 FIX: IContextMenu::InvokeCommand ignore E_FAIL return code (fixes #345)
(cherry picked from commit 3f4f630332)
2022-02-23 18:22:14 +03:00
Alexander Koblov
763185f6f0 FIX: Viewer - folder view text color
(cherry picked from commit 8558e73836)
2022-02-23 18:22:14 +03:00
Alexander Koblov
1f27c6a884 FIX: Extract operation progress
(cherry picked from commit 29d0510f1a)
2022-02-23 18:22:14 +03:00
Alexander Koblov
a1d58d4ddc FIX: Changing the case in FAT32 filesystem (fixes #327)
(cherry picked from commit 410984ed20)
2022-02-04 22:43:30 +03:00
Alexander Koblov
c6e12ac43e FIX: Viewer - selection when text is scrolled horizontally
(cherry picked from commit fd7348ca23)
2022-02-04 22:43:30 +03:00
Alexander Koblov
d558f929a6 FIX: Wrong file selected after rename (fixes #339)
(cherry picked from commit b0289a6f0e)
2022-02-04 22:43:29 +03:00
Alexander Koblov
1b677500b4 UPD: Replace ExtraLineSpacing by ExtraLineSpan for uniformity
(cherry picked from commit 197679f8e6)
2022-02-04 22:43:29 +03:00
Alexander Koblov
86644c3990 FIX: Viewer - selection invisible characters in the text mode
(cherry picked from commit dd75f9103c)
2022-02-04 22:43:28 +03:00
Alexander Koblov
fe41de0fbd FIX: Compiling under 64 bit
(cherry picked from commit 65df20cb4b)
2022-02-04 22:43:28 +03:00
Alexander Koblov
4221336461 ADD: Viewer - load options LeftMargin and ExtraLineSpacing from configuration file (issue #338)
(cherry picked from commit b4664cf31f)
2022-02-04 22:43:28 +03:00
Alexander Koblov
4153c217ed ADD: Viewer - left margin option (issue #338)
(cherry picked from commit 69579d4625)
2022-02-04 22:43:27 +03:00
Alexander Koblov
78a126fcb3 FIX: Viewer - double byte text can have only even position (issue #338)
(cherry picked from commit 96f858f9ae)
2022-02-04 22:43:27 +03:00
Alexander Koblov
afe532a963 ADD: Viewer - ExtraLineSpacing option (issue #338)
(cherry picked from commit 778a5b0530)
2022-02-04 22:43:26 +03:00
Alexander Koblov
55758f0ad9 FIX: cm_ReloadFavoriteTabs Crash (fixes #236)
(cherry picked from commit 98bdde4e1f)
2022-02-04 22:43:26 +03:00
Alexander Koblov
24645a4924 UPD: Version number 2022-01-30 13:05:51 +03:00
Alexander Koblov
9f6ac077f6 FIX: Different rightclick behaviour 0.9.10 and 1.0.0 alpha (fixes #105)
(cherry picked from commit 840312d5f7)
2022-01-30 13:01:30 +03:00
Alexander Koblov
a778da9010 FIX: Zip - use GMT time if available when extract
(cherry picked from commit d2b2920c29)
2022-01-30 13:01:29 +03:00
Alexander Koblov
378c2275de FIX: Viewer - auto-reload using internal view mode only
(cherry picked from commit fe7d3d64d7)
2022-01-30 13:01:29 +03:00
Alexander Koblov
b0e43b7ade FIX: Replace file in the TAR archive
(cherry picked from commit e663163af2)
2022-01-30 13:01:29 +03:00
Alexander Koblov
b3740938db UPD: Version number 2022-01-05 16:13:17 +03:00
Alexander Koblov
25f731263a FIX: Deleting a Favorite can produce a "is not a valid GUID value" (fixes #315)
(cherry picked from commit 06eeed2ba3)
2022-01-05 15:21:10 +03:00
Alexander Koblov
a69e315e07 FIX: Lazarus 2.3 compatibility
(cherry picked from commit de65d29811)
2022-01-05 15:21:09 +03:00
Alexander Koblov
e9a4a29c02 UPD: Greek translation
(cherry picked from commit 2632f5ef8a)
2022-01-05 15:21:09 +03:00
Alexander Koblov
0f7624b96f FIX: Zero-length file comparison does not end (fixes #301)
(cherry picked from commit de6ea6c013)
2022-01-05 15:21:08 +03:00
Alexander Koblov
7dd1451a6f FIX: Multi-rename - refresh replace test on preset change 2021-12-11 12:46:21 +03:00
Alexander Koblov
3ce407b582 FIX: Copy window size wrong on Linux (fixes #261)
(cherry picked from commit d1b749b2a7)
2021-12-10 19:10:31 +03:00
Jongpil Kim
4a0a7031d4 UPD: Korean translation (#285)
* UPD: Korean translation

* UPD: Korean translation

Co-authored-by: Jongpil Kim <jongpil.kim@mt-solution.net>
(cherry picked from commit 569f6fde89)
2021-12-10 19:10:30 +03:00
Alexander Koblov
624fb20515 FIX: Show columns sets from current and general file systems only
(cherry picked from commit 44292fdacc)
2021-12-10 19:10:30 +03:00
Alexander Koblov
b1a12d5bd3 FIX: XMLConfig - preserve white space
(cherry picked from commit fe39bff758)
2021-12-05 13:34:34 +03:00
Alexander Koblov
26406eaf5f FIX: Wrong data size when drag & drop text to file panel
(cherry picked from commit 44121c1b32)
2021-12-05 13:34:33 +03:00
Alexander Koblov
be71e4a4b5 UPD: Version number 2021-12-03 22:40:03 +03:00
Alexander Koblov
3c0087eb6b FIX: Command cm_SrcOpenDrives does not work
(cherry picked from commit 341b6a7c4d)
2021-12-03 22:31:51 +03:00
Alexander Koblov
88f53e941c FIX: Bad icon rendering
(cherry picked from commit fb3812bf5b)
2021-12-03 22:31:50 +03:00
Jongpil Kim
e59225dbb0 UPD: Korean translation (#279)
Co-authored-by: Jongpil Kim <jongpil.kim@mt-solution.net>
(cherry picked from commit 58b149c68d)
2021-12-03 22:31:50 +03:00
Alexander Koblov
47a1ca2066 FIX: Error when sending search results of duplicate files to the listbox (fixes #273)
(cherry picked from commit c131611fef)
2021-12-03 22:31:50 +03:00
Alexander Koblov
e1f94cbb4d UPD: Slovak translation
(cherry picked from commit 6aef9f423a)
2021-12-03 22:31:49 +03:00
Alexander Koblov
a8f322bb5b FIX: Changing the icons theme does not work on doublecmd-qt5 in archlinux (fixes #264)
(cherry picked from commit 740b7143f4)
2021-12-03 22:31:49 +03:00
Skif-off
875ec687b3 ADD: pixmaps.txt: Office Open XML (docx, xlsx) (#267)
(cherry picked from commit 29f2e6b640)
2021-12-03 22:31:48 +03:00
Alexander Koblov
582c349c83 FIX: Crash on disable drive panels
(cherry picked from commit 93eab094c6)
2021-12-03 22:31:48 +03:00
Alexander Koblov
7a8950c593 FIX: Don't use UTF8Decode/UTF8Encode functions (fixes #245)
(cherry picked from commit c9baafdb36)
2021-12-03 22:31:48 +03:00
Alexander Koblov
824de51e1a FIX: Don't use UTF8Decode/UTF8Encode functions (issue #245)
(cherry picked from commit 57ba2a297f)
2021-12-03 22:31:47 +03:00
Alexander Koblov
12f47430d7 ADD: WMP plugin - .wma and .wmv extensions
(cherry picked from commit 7a7454fbfb)
2021-11-28 12:26:03 +03:00
Alexander Koblov
82f9a739a2 FIX: Drive free space label/indicator blinking
(cherry picked from commit 9b7b9c0bbf)
2021-11-28 12:26:03 +03:00
Alexander Koblov
a79f945444 ADD: Install script - aarch64 support
(cherry picked from commit 6634673d7e)
2021-11-28 12:26:03 +03:00
Alexander Koblov
cc6481296b FIX: Compiling with Free Pascal 3.0.4 and Windows
(cherry picked from commit 60033ba0dd)
2021-11-28 12:26:02 +03:00
Alexander Koblov
2f6c2c5f38 ADD: Support *.svg icons when load from standard theme (issue #246)
(cherry picked from commit 6bc914cbb3)
2021-11-28 12:26:02 +03:00
Alexander Koblov
53a3088434 UPD: Change shortcut "Alt+`" to "Alt+0" for the "cm_ActivateTabByIndex"
(cherry picked from commit 4053f55e49)
2021-11-28 12:26:01 +03:00
Alexander Koblov
a0fd299da8 FIX: Multi-rename presets button width
(cherry picked from commit 94b7e95ac0)
2021-11-28 12:26:01 +03:00
Alexander Koblov
60e9f5cf67 ADD: Glyph support to TKASButton
(cherry picked from commit b3302a594d)
2021-11-28 12:26:01 +03:00
Alexander Koblov
0e3e514db9 ADD: Determine KDE also by "plasma" session
(cherry picked from commit 137c2af384)
2021-11-28 12:26:00 +03:00
Alexander Koblov
a40b642242 FIX: Read icon theme from ~ / .kde4 for backward compatibility
(cherry picked from commit 540aaddc54)
2021-11-28 12:26:00 +03:00
Alexander Koblov
a6181298b5 FIX: Erratic behaviour with cm_syncchangedir in toolbar (fixes #238)
(cherry picked from commit 62220e1b98)
2021-11-28 12:26:00 +03:00
Alexander Koblov
10850f10f6 FIX: Don't remove only SevenZipDlg.res (fixes #234)
(cherry picked from commit 72c9708cfa)
2021-10-31 11:29:51 +03:00
Alexander Koblov
0aba9be501 FIX: File mode
(cherry picked from commit 554a216fa3)
2021-10-31 11:29:51 +03:00
Alexander Koblov
7615ae031b UPD: Controls alignment
(cherry picked from commit c4fcd808e3)
2021-10-31 11:29:51 +03:00
Alexander Koblov
9e53886212 UPD: Rearrange buttons
(cherry picked from commit 6200919152)
2021-10-31 11:29:50 +03:00
Alexander Koblov
c68af22f12 UPD: Hungarian translation (fixes #233)
(cherry picked from commit 68c9d3e35e)
2021-10-30 22:40:03 +03:00
Alexander Koblov
00b302707d UPD: INSTALL.txt
(cherry picked from commit 282cdc710d)
2021-10-30 22:40:03 +03:00
Alexander Koblov
61ba8c96e2 FIX: Default button height
(cherry picked from commit 0b5d0c917e)
2021-10-30 22:40:03 +03:00
Alexander Koblov
93306f5157 FIX: Dialogue needs to resize for multirename (fixes #228)
(cherry picked from commit 0871a92aef)
2021-10-30 15:09:21 +03:00
Alexander Koblov
96b19fbd81 UPD: Version number 2021-10-29 23:05:17 +03:00
Alexander Koblov
650576b64d FIX: Build under linux-arm
(cherry picked from commit e763ccc916)
2021-10-29 18:27:50 +03:00
Alexander Koblov
2d3d31c6fc FIX: Double Commander 1.0.0_beta (Qt5) failed to launch: Exception=Duplicate icon format (fixes #206)
(cherry picked from commit 93942be43b)
2021-10-29 18:27:50 +03:00
Alexander Koblov
60e14a610d FIX: Autorename source and target shortcut key conflict (fixes #223)
(cherry picked from commit 2226f12be6)
2021-10-29 18:27:49 +03:00
Alexander Koblov
d190bc3b63 FIX: Push correct window handle to plugins (Qt5)
(cherry picked from commit 72ca6065fd)
2021-10-29 18:27:48 +03:00
Alexander Koblov
bc29e0e0a6 FIX: Ignore floating point division by zero (fixes #224)
(cherry picked from commit 7eb9ce780f)
2021-10-29 18:27:48 +03:00
Alexander Koblov
ce98266df2 UPD: Default title style
(cherry picked from commit 4a3442ca80)
2021-10-29 18:27:48 +03:00
Alexander Koblov
80b80482f1 DEL: KDE4 specific code
(cherry picked from commit fa1ebb7e80)
2021-10-29 18:27:47 +03:00
Alexander Koblov
2a7b6c7b76 UPD: Default fonts size
(cherry picked from commit 707b77a43e)
2021-10-29 18:27:47 +03:00
Alexander Koblov
8d1ad60597 UPD: Optimization
(cherry picked from commit 9cececd39b)
2021-10-29 18:27:46 +03:00
GitHub42p
018d556bd9 FIX: Sort order in "Synchronize dirs" (fixes #173)
(cherry picked from commit 0633ceaaca)
2021-10-29 18:27:46 +03:00
Alexander Koblov
6e51697be9 FIX: FTP modified files are stored with unchanged date (fixes #218)
(cherry picked from commit b1269ed4d0)
2021-10-29 18:25:29 +03:00
Alexander Koblov
450c6b4102 FIX: Elevation does not work under standard user account (fixes #217)
(cherry picked from commit ff7d514f15)
2021-10-29 18:25:29 +03:00
Alexander Koblov
e69e797f58 FIX: FTP - use mbFileExists function and TFileStreamEx class (fixes #213)
(cherry picked from commit 4e3a509e8e)
2021-10-29 18:25:29 +03:00
Ars Masiuk
ee4cffd98f Update doublecmd.uk.po (#216)
Typo fixed

(cherry picked from commit d250e256f6)
2021-10-29 18:25:28 +03:00
Alexander Koblov
348e8a2c93 FIX: Don't use flock function with all Samba variants (fixes #213)
(cherry picked from commit 59f8237282)
2021-10-29 18:25:28 +03:00
Alexander Koblov
547c314dad FIX: Context menu parent (fixes #208)
(cherry picked from commit f79147d9a9)
2021-10-29 18:25:27 +03:00
Alexander Koblov
f07d132ac9 FIX: Use fmCreate when rewrite file
(cherry picked from commit aa9b6fc691)
2021-10-17 11:03:05 +03:00
Alexander Koblov
c0ce7ff06e UPD: Project file 2021-10-16 23:17:12 +03:00
Alexander Koblov
b7f285366d UPD: Install script
(cherry picked from commit a9f34dcb7b)
2021-10-16 19:50:23 +03:00
Alexander Koblov
a116ac810c UPD: Patch file
(cherry picked from commit ab0ffc4f72)
2021-10-16 19:50:22 +03:00
Alexander Koblov
3adbbc2f5d FIX: Remove temporary file
(cherry picked from commit 6fd35a5209)
2021-10-16 19:50:22 +03:00
Alexander Koblov
59bbffaf24 UPD: Default plugins
(cherry picked from commit e38d7eeadf)
2021-10-16 19:50:22 +03:00
Alexander Koblov
beba631a94 UPD: Default option value
(cherry picked from commit 9abafa32f7)
2021-10-16 19:50:21 +03:00
Alexander Koblov
48a7500188 UPD: Install scripts
(cherry picked from commit c16eaa1e43)
2021-10-16 19:50:21 +03:00
Alexander Koblov
883fb71d52 ADD: Count the revision number from branch start 2021-10-15 20:40:12 +03:00
Alexander Koblov
b5f68e8f0a FIX: Disable tooltip edit with empty file type list 2021-10-15 19:58:09 +03:00
1678 changed files with 239242 additions and 305325 deletions

4
.gitattributes vendored
View file

@ -1,4 +1,2 @@
*.sh text eol=lf
*.bat -text
language/*.po text eol=lf
*.bat text eol=crlf

View file

@ -1,34 +0,0 @@
name: "Bug report"
labels: [bug]
description: Report a bug or unexpected behavior
body:
- type: markdown
attributes:
value: |
Before filling a new bug, please use the [search form](https://doublecmd.sourceforge.io/mantisbt/view_all_bug_page.php) to try to locate similar bugs at the old bug tracker.
See [Making a bug report](https://github.com/doublecmd/doublecmd/wiki/Making-a-bug-report) page for guidelines on how to make a good bug report.
- type: textarea
attributes:
label: Version
placeholder: |
Double Commander
Version: 1.0.9
Revision: 222
Commit: a844456e4
Build date: 2022/12/03
Lazarus: 2.2.5.0
FPC: 3.2.2
Platform: x86_64-Win64-win32/win64
OS version: Windows 10 22H2 x86_64
description: |
Choose `Menu → Help → About` to find out.
validations:
required: true
- type: textarea
attributes:
label: Description
placeholder: Detailed description
validations:
required: true

View file

@ -1,9 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Feature request
url: https://github.com/doublecmd/doublecmd/discussions/categories/suggestions
about: Please use GitHub Discussions to suggest a new feature or improvement
- name: I have a question about Double Commander
url: https://github.com/doublecmd/doublecmd/discussions/categories/general
about: Please use GitHub Discussions to ask questions

View file

@ -1,7 +0,0 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View file

@ -1,112 +0,0 @@
#!/bin/bash
# The new package will be saved here
PACK_DIR=$PWD/doublecmd-release
# Temp dir for creating *.dmg package
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Save revision number
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
# Read version number
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
# Set widgetset
export lcl=cocoa
mkdir -p $PACK_DIR
# Update application bundle version
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleShortVersionString $DC_VER
plutil -convert xml1 $(pwd)/doublecmd.app/Contents/Info.plist
chmod 644 $(pwd)/doublecmd.app/Contents/Info.plist
build_unrar()
{
DEST_DIR=$(pwd)/install/darwin/lib/$CPU_TARGET
pushd /tmp/unrar
make clean lib CXXFLAGS+="-std=c++14 -DSILENT --target=$TARGET" LDFLAGS+="-dylib --target=$TARGET"
mkdir -p $DEST_DIR && mv libunrar.so $DEST_DIR/libunrar.dylib
popd
}
build_doublecmd()
{
# Build all components of Double Commander
./build.sh release
# Copy libraries
cp -a install/darwin/lib/$CPU_TARGET/*.dylib ./
# Prepare *.dmg package
mkdir -p $BUILD_PACK_DIR
install/darwin/install.sh $BUILD_PACK_DIR
pushd $BUILD_PACK_DIR
mv doublecmd.app 'Double Commander.app'
codesign --deep --force --verify --verbose --sign '-' 'Double Commander.app'
popd
# Create *.dmg package
HDI_TRY=1
while [ $HDI_TRY -le 5 ]; do
echo "Try to create a package $HDI_TRY ..."
# Bug: https://github.com/actions/runner-images/issues/7522
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true;
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done;
install/darwin/create-dmg/create-dmg \
--volname "Double Commander" \
--volicon "$BUILD_PACK_DIR/.VolumeIcon.icns" \
--background "$BUILD_PACK_DIR/.background/bg.jpg" \
--window-pos 200 200 \
--window-size 680 366 \
--text-size 16 \
--icon-size 128 \
--icon "Double Commander.app" 110 120 \
--app-drop-link 360 120 \
--icon "install.txt" 566 123 \
--icon ".background" 100 500 \
"$PACK_DIR/doublecmd-$DC_VER.$lcl.$CPU_TARGET.dmg" \
"$BUILD_PACK_DIR/"
if [ $? -eq 0 ]; then
break
fi
HDI_TRY=$((HDI_TRY+1))
sleep 10
done
# Clean DC build dir
./clean.sh
rm -f *.dylib
rm -rf $BUILD_PACK_DIR
}
# Set processor architecture
export CPU_TARGET=aarch64
export TARGET=arm64-apple-darwin
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=11.0
build_unrar
build_doublecmd
# Set processor architecture
export CPU_TARGET=x86_64
export TARGET=x86_64-apple-darwin
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=11.0
build_unrar
build_doublecmd

View file

@ -1,70 +0,0 @@
rem The new package will be created from here
set BUILD_PACK_DIR=%TEMP%\doublecmd-release
rem The new package will be saved here
set PACK_DIR=%CD%\doublecmd-release
rem Prepare target dir
mkdir %PACK_DIR%
rem Get revision number
call src\platform\git2revisioninc.exe.cmd %CD%
echo %REVISION%> %PACK_DIR%\revision.txt
rem Read version number
for /f tokens^=2delims^=^" %%a in ('findstr "MajorVersionNr" src\doublecmd.lpi') do (set DC_MAJOR=%%a)
for /f tokens^=2delims^=^" %%a in ('findstr "MinorVersionNr" src\doublecmd.lpi') do (set DC_MINOR=%%a)
for /f tokens^=2delims^=^" %%a in ('findstr "RevisionNr" src\doublecmd.lpi') do (set DC_MICRO=%%a)
if [%DC_MINOR%] == [] set DC_MINOR=0
if [%DC_MICRO%] == [] set DC_MICRO=0
set DC_VER=%DC_MAJOR%.%DC_MINOR%.%DC_MICRO%
rem Change log
git log -n 10 --format="%%h %%al %%ai%%n%%s%%n" > %PACK_DIR%\changelog.txt
rem Get libraries
pushd install
curl -o windows.7z -L https://github.com/doublecmd/external/raw/main/windows.7z
"%ProgramFiles%\7-Zip\7z.exe" x windows.7z
del /Q windows.7z
popd
rem Set processor architecture
set CPU_TARGET=i386
set OS_TARGET=win32
call :doublecmd
rem Set processor architecture
set CPU_TARGET=x86_64
set OS_TARGET=win64
call :doublecmd
GOTO:EOF
:doublecmd
rem Build all components of Double Commander
call build.bat darkwin
rem Copy libraries
copy install\windows\lib\%CPU_TARGET%\*.dll %CD%\
copy install\windows\lib\%CPU_TARGET%\winpty-agent.exe %CD%\
rem Prepare install dir
mkdir %BUILD_PACK_DIR%
rem Prepare install files
call install\windows\install.bat
rem Create *.7z archive
"%ProgramFiles%\7-Zip\7z.exe" a -mx9 %PACK_DIR%\doublecmd-%DC_VER%.r%REVISION%.%CPU_TARGET%-%OS_TARGET%.7z %DC_INSTALL_DIR%\*
rem Clean
del /Q *.dll
del /Q *.exe
call clean.bat
rm -rf %BUILD_PACK_DIR%
GOTO:EOF

View file

@ -1,55 +0,0 @@
#!/bin/bash
# The new package will be saved here
PACK_DIR=$PWD/doublecmd-release
# Temp dir for creating *.tar.xz package
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Save revision number
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
# Read version number
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
# Get libraries
pushd install
wget https://github.com/doublecmd/external/raw/main/linux.tar.gz
tar xzf linux.tar.gz
rm -f linux.tar.gz
popd
# Set widgetset
export lcl=gtk3
# Set processor architecture
export CPU_TARGET=$(fpc -iTP)
build_doublecmd()
{
# Build all components of Double Commander
./build.sh release
# Copy libraries
cp -a install/linux/lib/$CPU_TARGET/*.so ./
# Create *.tar.xz package
mkdir -p $BUILD_PACK_DIR
install/linux/install.sh --portable-prefix=$BUILD_PACK_DIR
pushd $BUILD_PACK_DIR
# Set run-time library search path
patchelf --set-rpath '$ORIGIN' doublecmd/doublecmd
tar -cJf $PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.tar.xz doublecmd
popd
# Clean DC build dir
./clean.sh
rm -rf $BUILD_PACK_DIR
}
mkdir -p $PACK_DIR
build_doublecmd

View file

@ -1,112 +0,0 @@
#!/bin/bash
# The new package will be saved here
PACK_DIR=$PWD/doublecmd-release
# Temp dir for creating *.dmg package
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Save revision number
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
# Read version number
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
# Get libraries
pushd install
wget https://github.com/doublecmd/external/raw/main/darwin.tar.gz
tar xzf darwin.tar.gz
rm -f darwin.tar.gz
popd
# Set widgetset
export lcl=cocoa
# Update application bundle version
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleShortVersionString $DC_VER
plutil -convert xml1 $(pwd)/doublecmd.app/Contents/Info.plist
chmod 644 $(pwd)/doublecmd.app/Contents/Info.plist
build_doublecmd()
{
# Build all components of Double Commander
./build.sh release
# Copy libraries
cp -a install/darwin/lib/$CPU_TARGET/*.dylib ./
# Prepare *.dmg package
mkdir -p $BUILD_PACK_DIR
install/darwin/install.sh $BUILD_PACK_DIR
pushd $BUILD_PACK_DIR
mv doublecmd.app 'Double Commander.app'
codesign --deep --force --verify --verbose --sign '-' 'Double Commander.app'
popd
# Create *.dmg package
HDI_TRY=0
HDI_MAX=5
while true; do
HDI_TRY=$((HDI_TRY+1))
echo "Try to create a package $HDI_TRY ..."
# Bug: https://github.com/actions/runner-images/issues/7522
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true;
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done;
sudo install/darwin/create-dmg/create-dmg \
--volname "Double Commander" \
--volicon "$BUILD_PACK_DIR/.VolumeIcon.icns" \
--background "$BUILD_PACK_DIR/.background/bg.jpg" \
--window-pos 200 200 \
--window-size 680 366 \
--text-size 16 \
--icon-size 128 \
--icon "Double Commander.app" 110 120 \
--app-drop-link 360 120 \
--icon "install.txt" 566 123 \
--icon ".background" 100 500 \
"$PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.dmg" \
"$BUILD_PACK_DIR/"
if [ $? -eq 0 ]; then
break
fi
if [ $HDI_TRY -eq $HDI_MAX ]; then
break
fi
sleep 10
done
# Clean DC build dir
./clean.sh
rm -rf $BUILD_PACK_DIR
}
mkdir -p $PACK_DIR
echo $DC_REVISION > $PACK_DIR/revision.php
# Set processor architecture
export CPU_TARGET=aarch64
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=11.0
build_doublecmd
# Set processor architecture
export CPU_TARGET=x86_64
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=11.0
build_doublecmd

View file

@ -1,32 +0,0 @@
#!/bin/bash
echo $OSTYPE
echo "$SSH_PRIVATE_KEY" > ssh_key
echo "cd /home/project-web/doublecmd/htdocs/snapshots" > upload_snapshot.txt
echo "lcd doublecmd-release" >> upload_snapshot.txt
if [[ "$OSTYPE" == "msys" ]]; then
icacls.exe ssh_key //inheritance:r
echo "-rm *.7z" >> upload_snapshot.txt
echo "put *.7z" >> upload_snapshot.txt
echo "put *.txt" >> upload_snapshot.txt
else
chmod 0600 ssh_key
echo "-rm *.dmg" >> upload_snapshot.txt
echo "put *.dmg" >> upload_snapshot.txt
echo "put *.php" >> upload_snapshot.txt
fi
echo "quit" >> upload_snapshot.txt
sftp -o StrictHostKeyChecking=no -i ssh_key -b upload_snapshot.txt $REMOTE_USER@$REMOTE_HOST
rm -f ssh_key upload_snapshot.txt

View file

@ -1,58 +0,0 @@
name: build-release
on:
workflow_dispatch:
release:
types: [prereleased, released]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-mac:
runs-on: macos-14
steps:
- name: Install Free Pascal
uses: doublecmd/lazarus-install@mac
with:
lazarus-version: "stable"
- name: Get Lazarus source
uses: actions/checkout@v6
with:
repository: 'fpc/Lazarus'
ref: 'fixes_4'
- name: Build and install Lazarus
run: |
make all
sudo make install
- name: Create Lazarus config
run: |
sudo mkdir -p /etc/lazarus
sudo cp tools/install/macosx/environmentoptions.xml /etc/lazarus/environmentoptions.xml
sudo sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" /etc/lazarus/environmentoptions.xml
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download unrar source code
run: wget https://www.rarlab.com/rar/unrarsrc-7.2.3.tar.gz -O /tmp/unrarsrc.tar.gz
- name: Extract unrar source code
run: cd /tmp && tar xzf unrarsrc.tar.gz
- name: Build packages
run: ./.github/scripts/create_release.sh
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: doublecmd-release/doublecmd*.dmg
tag: ${{ github.ref }}
overwrite: true
file_glob: true

View file

@ -1,155 +0,0 @@
name: build-snapshot
on:
workflow_dispatch:
push:
paths:
- 'components/**'
- 'plugins/**'
- 'sdk/**'
- 'src/**'
branches:
- master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-mac:
runs-on: macos-14
steps:
- name: Install Free Pascal
uses: doublecmd/lazarus-install@mac
with:
lazarus-version: "stable"
- name: Get Lazarus source
uses: actions/checkout@v6
with:
repository: 'fpc/Lazarus'
- name: Build and install Lazarus
run: |
make all
sudo make install
- name: Create Lazarus config
run: |
mkdir -p $HOME/.lazarus
cp tools/install/macosx/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Prepare source
run: sed -i -e "s|BOX_CLIENT_SECRET = '\*'|BOX_CLIENT_SECRET = '$BOX_CLIENT_SECRET'|g" plugins/wfx/MacCloud/src/drivers/oauth2/box/uboxclient.pas
env:
BOX_CLIENT_SECRET: ${{ secrets.BOX_CLIENT_SECRET }}
- name: Build packages
run: ./.github/scripts/create_snapshot.sh
- name: Share data between jobs
uses: actions/upload-artifact@v7
with:
name: snapshot-mac
retention-days: 1
compression-level: 0
path: doublecmd-release/doublecmd*.dmg
build-win:
runs-on: windows-latest
steps:
- name: Install Lazarus
uses: doublecmd/lazarus-install@win
with:
lazarus-version: "stable"
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v2
- name: Build packages
run: ./.github/scripts/create_snapshot.bat
- name: Share data between jobs
uses: actions/upload-artifact@v7
with:
name: snapshot-win
retention-days: 1
compression-level: 0
path: doublecmd-release/*
build-lin:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install fpc patchelf libgtk-3-dev libdbus-1-dev
- name: Get Lazarus source
uses: actions/checkout@v6
with:
repository: 'fpc/Lazarus'
- name: Build and install Lazarus
run: |
make all
sudo make install
- name: Create Lazarus config
run: |
mkdir -p $HOME/.lazarus
cp tools/install/linux/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
sed -i -e "s|__LAZARUSDIR__|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build packages
run: ./.github/scripts/create_snapshot.lnx
- name: Share data between jobs
uses: actions/upload-artifact@v7
with:
name: snapshot-lin
retention-days: 1
compression-level: 0
path: doublecmd-release/doublecmd*.tar.xz
upload:
needs: [build-win, build-mac, build-lin]
runs-on: ubuntu-latest
environment: snapshots
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
merge-multiple: true
- name: Save revision number
run: echo "REVISION=$(cat revision.txt)" >> "$GITHUB_ENV"
shell: bash
- name: Upload binaries to snapshots
uses: svenstaro/upload-release-action@v2
with:
repo_name: doublecmd/snapshots
repo_token: ${{ secrets.SNAPSHOTS }}
file: ./*
release_name: Revision ${{ env.REVISION }}
tag: ${{ env.REVISION }}
body: ${{ vars.BODY }}
overwrite: true
file_glob: true

View file

@ -4,10 +4,10 @@ on:
types: [released]
jobs:
publish:
runs-on: ubuntu-latest
runs-on: windows-latest # action can only be run on windows
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: alexx2000.DoubleCommander
installers-regex: '\.msi$'
installers-regex: '.(exe|msi)$'
token: ${{ secrets.WINGET_TOKEN }}

3
.gitignore vendored
View file

@ -15,8 +15,6 @@
*.dsx
*.w?x
units/
/doublecmd
tools/extractdwrflnfo
# Lazarus autogenerated files (duplicated info)
*.rst
@ -33,4 +31,3 @@ lib/
# Application bundle for Mac OS
*.app/
.DS_Store

View file

@ -1,361 +0,0 @@
### GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
### Preamble
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on,
we want its recipients to know that what they have is not the
original, so that any problems introduced by others will not reflect
on the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at
all.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
**0.** This License applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work
based on the Program" means either the Program or any derivative work
under copyright law: that is to say, a work containing the Program or
a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is
included without limitation in the term "modification".) Each licensee
is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the Program
(independent of having been made by running the Program). Whether that
is true depends on what the Program does.
**1.** You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a
fee.
**2.** You may modify your copy or copies of the Program or any
portion of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
**a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
**b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.
**c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
including an appropriate copyright notice and a notice that there is
no warranty (or else, saying that you provide a warranty) and that
users may redistribute the program under these conditions, and telling
the user how to view a copy of this License. (Exception: if the
Program itself is interactive but does not normally print such an
announcement, your work based on the Program is not required to print
an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
**3.** You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
**a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
**b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the
terms of Sections 1 and 2 above on a medium customarily used for
software interchange; or,
**c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the
program in object code or executable form with such an offer, in
accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
**4.** You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt otherwise
to copy, modify, sublicense or distribute the Program is void, and
will automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
**5.** You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
**6.** Each time you redistribute the Program (or any work based on
the Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
**7.** If, as a consequence of a court judgment or allegation of
patent infringement or for any other reason (not limited to patent
issues), conditions are imposed on you (whether by court order,
agreement or otherwise) that contradict the conditions of this
License, they do not excuse you from the conditions of this License.
If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations,
then as a consequence you may not distribute the Program at all. For
example, if a patent license would not permit royalty-free
redistribution of the Program by all those who receive copies directly
or indirectly through you, then the only way you could satisfy both it
and this License would be to refrain entirely from distribution of the
Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
**8.** If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
**9.** The Free Software Foundation may publish revised and/or new
versions of the General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Program does not specify a
version number of this License, you may choose any version ever
published by the Free Software Foundation.
**10.** If you wish to incorporate parts of the Program into other
free programs whose distribution conditions are different, write to
the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation;
we sometimes make exceptions for this. Our decision will be guided by
the two goals of preserving the free status of all derivatives of our
free software and of promoting the sharing and reuse of software
generally.
**NO WARRANTY**
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
### END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper
mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands \`show w' and \`show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than \`show w' and
\`show c'; they could even be mouse-clicks or menu items--whatever
suits your program.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library,
you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
[GNU Lesser General Public
License](https://www.gnu.org/licenses/lgpl.html) instead of this
License.

View file

@ -1,29 +1,37 @@
**Double Commander** is a [free](https://www.gnu.org/philosophy/free-sw.html) cross-platform open source file manager with two panels side by side (or one above the other). It is inspired by Total Commander and features some innovative new ideas.
**Double Commander** is a [free](https://www.gnu.org/philosophy/free-sw.html) cross platform open source file manager with two panels side by side. It is inspired by Total Commander and features some new ideas.
Double Commander can be run on several platforms and operating systems.
It supports 32-bit and 64-bit processors. See [Supported platforms](https://github.com/doublecmd/doublecmd/wiki/Supported-platforms)
for a complete list.
See Double Commander in action in the [Screenshot Gallery](https://doublecmd.sourceforge.io/gallery).
See Double Commander in action in the [Gallery](https://doublecmd.sourceforge.io/gallery).
## Where to start
### Download
- Download
Go to the [Double Commander download page](https://sourceforge.net/p/doublecmd/wiki/Download) to download the latest release.
Go to [Double Commander download page](https://sourceforge.net/p/doublecmd/wiki/Download) to download the latest release.
<!-- -->
You can check the latest version on the [Versions](https://github.com/doublecmd/doublecmd/wiki/Versions) page.
See if Double Commander is supported for your platform on the [Supported
platforms](https://github.com/doublecmd/doublecmd/wiki/Supported-platforms) page.
### Develop
- Develop
For more information on the development of Double Commander,
see the [Development](https://github.com/doublecmd/doublecmd/wiki/Development) page.
### Discuss
Go to our [forum](https://doublecmd.h1n.ru) for discussions. There are English and Russian sections.
If you want to get more information on development of Double Commander
see [Development](https://github.com/doublecmd/doublecmd/wiki/Development) page.
If you want to stay up-to-date with the project, you can check out the available [news feeds](https://github.com/doublecmd/doublecmd/wiki/News-feeds).
- Discuss
Go to our [forum](https://doublecmd.h1n.ru) for discussions. There are English and Russian
sections.
Also check out the various [news feeds](https://github.com/doublecmd/doublecmd/wiki/News-feeds) that are available, if you
want to stay up-to-date with the project.

179
build.bat
View file

@ -1,98 +1,81 @@
@echo off
rem Add Lazarus installation to path
if [%LAZARUS_HOME%] == [] set LAZARUS_HOME=D:\Alexx\Prog\FreePascal\Lazarus
set PATH=%LAZARUS_HOME%;%PATH%
rem You can execute this script with different parameters:
rem components - compiling components needed for doublecmd
rem doublecmd - compiling doublecmd only (release mode)
rem plugins - compiling all doublecmd plugins
rem debug - compiling components, plugins and doublecmd (debug mode)
rem release - compile in release mode (using by default)
if not "%OS_TARGET%" == "" (
set DC_ARCH=%DC_ARCH% --os=%OS_TARGET%
)
if not "%CPU_TARGET%" == "" (
set DC_ARCH=%DC_ARCH% --cpu=%CPU_TARGET%
)
if not "%LCL_PLATFORM%" == "" (
set DC_ARCH=%DC_ARCH% --ws=%LCL_PLATFORM%
)
if "%1"=="components" ( call :components
) else (
if "%1"=="plugins" ( call :plugins
) else (
if "%1"=="beta" ( call :release
) else (
if "%1"=="doublecmd" ( call :doublecmd
) else (
if "%1"=="release" ( call :release
) else (
if "%1"=="darkwin" ( call :darkwin
) else (
if "%1"=="debug" ( call :debug
) else (
if "%1"=="" ( call :release
) else (
echo ERROR: Mode not defined: %1
echo Available modes: components, plugins, doublecmd, release, darkwin, debug
))))))))
GOTO:EOF
:components
call components\build.bat
GOTO:EOF
:plugins
call plugins\build.bat
GOTO:EOF
:release
call :components
call :plugins
call :doublecmd
GOTO:EOF
:debug
call :components
call :plugins
rem Build Double Commander
call :replace_old
lazbuild src\doublecmd.lpi --bm=debug %DC_ARCH%
GOTO:EOF
:doublecmd
rem Build Double Commander
call :replace_old
lazbuild src\doublecmd.lpi --bm=release %DC_ARCH%
call :extract
GOTO:EOF
:darkwin
call :components
call :plugins
rem Build Double Commander
call :replace_old
lazbuild src\doublecmd.lpi --bm=darkwin %DC_ARCH%
call :extract
GOTO:EOF
:extract
rem Build Dwarf LineInfo Extractor
lazbuild tools\extractdwrflnfo.lpi
rem Extract debug line info
tools\extractdwrflnfo doublecmd.dbg
GOTO:EOF
:replace_old
del /Q doublecmd.exe.old
ren doublecmd.exe doublecmd.exe.old
GOTO:EOF
@echo off
rem Add Lazarus installation to path
if [%LAZARUS_HOME%] == [] set LAZARUS_HOME=D:\Alexx\Prog\FreePascal\Lazarus
set PATH=%LAZARUS_HOME%;%PATH%
rem You can execute this script with different parameters:
rem components - compiling components needed for doublecmd
rem doublecmd - compiling doublecmd only (release mode)
rem plugins - compiling all doublecmd plugins
rem debug - compiling components, plugins and doublecmd (debug mode)
rem release - compile in release mode (using by default)
if not "%OS_TARGET%" == "" (
set DC_ARCH=%DC_ARCH% --os=%OS_TARGET%
)
if not "%CPU_TARGET%" == "" (
set DC_ARCH=%DC_ARCH% --cpu=%CPU_TARGET%
)
if not "%LCL_PLATFORM%" == "" (
set DC_ARCH=%DC_ARCH% --ws=%LCL_PLATFORM%
)
if "%1"=="components" ( call :components
) else (
if "%1"=="plugins" ( call :plugins
) else (
if "%1"=="beta" ( call :release
) else (
if "%1"=="doublecmd" ( call :doublecmd
) else (
if "%1"=="release" ( call :release
) else (
if "%1"=="debug" ( call :debug
) else (
if "%1"=="" ( call :release
) else (
echo ERROR: Mode not defined: %1
echo Available modes: components, plugins, doublecmd, release, debug
)))))))
GOTO:EOF
:components
call components\build.bat
GOTO:EOF
:plugins
call plugins\build.bat
GOTO:EOF
:release
call :components
call :plugins
call :doublecmd
GOTO:EOF
:debug
call :components
call :plugins
rem Build Double Commander
call :replace_old
lazbuild src\doublecmd.lpi --bm=debug %DC_ARCH%
GOTO:EOF
:doublecmd
rem Build Double Commander
call :replace_old
lazbuild src\doublecmd.lpi --bm=release %DC_ARCH%
rem Build Dwarf LineInfo Extractor
lazbuild tools\extractdwrflnfo.lpi
rem Extract debug line info
tools\extractdwrflnfo doublecmd.dbg
GOTO:EOF
:replace_old
del /Q doublecmd.exe.old
ren doublecmd.exe doublecmd.exe.old
GOTO:EOF

124
clean.bat
View file

@ -1,61 +1,65 @@
@echo Clean up output directory
@del /Q /S units\i386-win32-win32\*.*
@del /Q /S units\x86_64-win64-win32\*.*
@del /Q src\*.*~
@del /Q src\*.~*
@del /Q doublecmd.dbg
@del /Q doublecmd.zdli
@del /Q doublecmd*.exe
@del /Q doublecmd*.old
@echo Remove generated help files
@del /Q doc\en\dev-help\*.*
@echo Clean up tools output directories
@del /Q /S tools\lib\*.*
@del /Q tools\extractdwrflnfo.exe
@echo Clean up plugins output directories
@del /Q /S plugins\*.dsx
@del /Q /S plugins\*.w?x
@del /Q /S plugins\dsx\DSXLocate\lib\*.*
@del /Q /S plugins\wcx\base64\lib\*.*
@del /Q /S plugins\wcx\cpio\lib\*.*
@del /Q /S plugins\wcx\deb\lib\*.*
@del /Q /S plugins\wcx\rpm\lib\*.*
@del /Q /S plugins\wcx\sevenzip\lib\*.*
@del /Q /S plugins\wcx\torrent\lib\*.*
@del /Q /S plugins\wcx\unrar\lib\*.*
@del /Q /S plugins\wcx\zip\lib\*.*
@del /Q /S plugins\wdx\deb_wdx\lib\*.*
@del /Q /S plugins\wdx\rpm_wdx\lib\*.*
@del /Q /S plugins\wdx\audioinfo\lib\*.*
@del /Q /S plugins\wfx\ftp\lib\*.*
@del /Q /S plugins\wfx\sample\lib\*.*
@del /Q /S plugins\wlx\preview\lib\*.*
@del /Q /S plugins\wlx\richview\lib\*.*
@del /Q /S plugins\wlx\simplewlx\lib\*.*
@del /Q /S plugins\wlx\wmp\lib\*.*
@echo Remove backup files
@del /Q /S plugins\*.*~
@del /Q /S plugins\*.bak
@echo Clean up components output directories
@del /Q /S components\chsdet\lib\*.*
@del /Q /S components\kascrypt\lib\*.*
@del /Q /S components\doublecmd\lib\*.*
@del /Q /S components\gifanim\lib\*.*
@del /Q /S components\KASToolBar\lib\*.*
@del /Q /S components\multithreadprocs\lib\*.*
@del /Q /S components\viewer\lib\*.*
@del /Q /S components\synunihighlighter\lib\*.*
@del /Q /S components\virtualterminal\lib\*.*
@echo Clean up output directory
@del /Q /S units\i386-win32-win32\*.*
@del /Q /S units\x86_64-win64-win32\*.*
@del /Q src\*.*~
@del /Q src\*.~*
@del /Q doublecmd.dbg
@del /Q doublecmd.zdli
@del /Q doublecmd*.exe
@del /Q doublecmd*.old
@echo Remove generated help files
@del /Q doc\en\dev-help\*.*
@echo Clean up tools output directories
@del /Q /S tools\lib\*.*
@del /Q tools\extractdwrflnfo.exe
@echo Clean up plugins output directories
@del /Q /S plugins\*.dsx
@del /Q /S plugins\*.w?x
@del /Q /S plugins\dsx\DSXLocate\lib\*.*
@del /Q /S plugins\wcx\cpio\lib\*.*
@del /Q /S plugins\wcx\deb\lib\*.*
@del /Q /S plugins\wcx\lzma\lib\*.*
@del /Q /S plugins\wcx\rpm\lib\*.*
@del /Q /S plugins\wcx\sevenzip\lib\*.*
@del /Q /S plugins\wcx\torrent\lib\*.*
@del /Q /S plugins\wcx\unbz2\lib\*.*
@del /Q /S plugins\wcx\unrar\lib\*.*
@del /Q /S plugins\wcx\zip\lib\*.*
@del /Q /S plugins\wdx\deb_wdx\lib\*.*
@del /Q /S plugins\wdx\rpm_wdx\lib\*.*
@del /Q /S plugins\wdx\svn_wdx\lib\*.*
@del /Q /S plugins\wdx\xpi_wdx\lib\*.*
@del /Q /S plugins\wdx\audioinfo\lib\*.*
@del /Q /S plugins\wfx\ftp\lib\*.*
@del /Q /S plugins\wfx\gvfs\lib\*.*
@del /Q /S plugins\wfx\samba\lib\*.*
@del /Q /S plugins\wfx\sample\lib\*.*
@del /Q /S plugins\wlx\preview\lib\*.*
@del /Q /S plugins\wlx\simplewlx\lib\*.*
@del /Q /S plugins\wlx\WlxMplayer\lib\*.*
@echo Remove backup files
@del /Q /S plugins\*.*~
@del /Q /S plugins\*.bak
@echo Clean up components output directories
@del /Q /S components\chsdet\lib\*.*
@del /Q /S components\CmdLine\lib\*.*
@del /Q /S components\dcpcrypt\lib\*.*
@del /Q /S components\doublecmd\lib\*.*
@del /Q /S components\gifanim\lib\*.*
@del /Q /S components\KASToolBar\lib\*.*
@del /Q /S components\multithreadprocs\lib\*.*
@del /Q /S components\viewer\lib\*.*
@del /Q /S components\synunihighlighter\lib\*.*
@echo Done.

View file

@ -5,15 +5,14 @@ rm -f units/*/*
# Clean up components output directories
rm -rf components/chsdet/lib/*
rm -rf components/kascrypt/lib/*
rm -rf components/CmdLine/lib/*
rm -rf components/dcpcrypt/lib/*
rm -rf components/doublecmd/lib/*
rm -rf components/gifanim/lib/*
rm -rf components/Image32/lib/*
rm -rf components/KASToolBar/lib/*
rm -rf components/multithreadprocs/lib/*
rm -rf components/viewer/lib/*
rm -rf components/synunihighlighter/lib/*
rm -rf components/virtualterminal/lib/*
# Clean up all temporary files
find . -iname '*.compiled' -delete
@ -27,12 +26,9 @@ find plugins -iname '*.a' -delete
rm -f src/doublecmd.res doublecmd
rm -f tools/extractdwrflnfo
rm -f plugins/wcx/unrar/lib/rarconfdlg.lfm
rm -f plugins/wcx/unrar/lib/rarlng.rsj
rm -f plugins/wcx/zip/lib/ZipConfDlg.lfm
rm -f plugins/wcx/zip/lib/ZipLng.rsj
rm -f plugins/wcx/zip/lib/abresstring.rs?
rm -f plugins/wfx/ftp/lib/FtpConfDlg.lfm
rm -f plugins/wfx/ftp/lib/ftppropdlg.lfm
rm -f plugins/wfx/samba/lib/smbauthdlg.lfm
# Remove debug files

674
components/CmdLine/COPYING Normal file
View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View file

@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View file

@ -0,0 +1,201 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="6"/>
<General>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="1"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="8">
<Unit0>
<Filename Value="CmdLineExample.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="CmdLineExample"/>
<CursorPos X="27" Y="11"/>
<TopLine Value="1"/>
<UsageCount Value="148"/>
</Unit0>
<Unit1>
<Filename Value="wnmainform.pas"/>
<ComponentName Value="WMainForm"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="wnmainform.lrs"/>
<UnitName Value="wnmainform"/>
<CursorPos X="63" Y="113"/>
<TopLine Value="63"/>
<EditorIndex Value="0"/>
<UsageCount Value="148"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\ucmdline.pas"/>
<UnitName Value="ucmdline"/>
<CursorPos X="48" Y="1083"/>
<TopLine Value="146"/>
<UsageCount Value="4"/>
</Unit2>
<Unit3>
<Filename Value="wnmainform.lfm"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="46"/>
<SyntaxHighlighter Value="LFM"/>
</Unit3>
<Unit4>
<Filename Value="tcmdbox.lrs"/>
<CursorPos X="17" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="13"/>
</Unit4>
<Unit5>
<Filename Value="ucmdline.pas"/>
<UnitName Value="ucmdline"/>
<CursorPos X="8" Y="30"/>
<TopLine Value="1"/>
<UsageCount Value="30"/>
</Unit5>
<Unit6>
<Filename Value="..\uflowcharteditor.pas"/>
<UnitName Value="uflowcharteditor"/>
<CursorPos X="25" Y="1039"/>
<TopLine Value="1015"/>
<UsageCount Value="16"/>
</Unit6>
<Unit7>
<Filename Value="ucmdbox.pas"/>
<UnitName Value="uCmdBox"/>
<CursorPos X="45" Y="1488"/>
<TopLine Value="1448"/>
<EditorIndex Value="1"/>
<UsageCount Value="48"/>
<Loaded Value="True"/>
</Unit7>
</Units>
<JumpHistory Count="17" HistoryIndex="16">
<Position1>
<Filename Value="ucmdbox.pas"/>
<Caret Line="994" Column="6" TopLine="964"/>
</Position1>
<Position2>
<Filename Value="ucmdbox.pas"/>
<Caret Line="309" Column="26" TopLine="278"/>
</Position2>
<Position3>
<Filename Value="ucmdbox.pas"/>
<Caret Line="229" Column="66" TopLine="203"/>
</Position3>
<Position4>
<Filename Value="ucmdbox.pas"/>
<Caret Line="1349" Column="47" TopLine="1312"/>
</Position4>
<Position5>
<Filename Value="ucmdbox.pas"/>
<Caret Line="1532" Column="69" TopLine="1495"/>
</Position5>
<Position6>
<Filename Value="ucmdbox.pas"/>
<Caret Line="1557" Column="68" TopLine="1520"/>
</Position6>
<Position7>
<Filename Value="ucmdbox.pas"/>
<Caret Line="2159" Column="45" TopLine="2122"/>
</Position7>
<Position8>
<Filename Value="ucmdbox.pas"/>
<Caret Line="2160" Column="48" TopLine="2123"/>
</Position8>
<Position9>
<Filename Value="ucmdbox.pas"/>
<Caret Line="2162" Column="50" TopLine="2125"/>
</Position9>
<Position10>
<Filename Value="ucmdbox.pas"/>
<Caret Line="2174" Column="31" TopLine="2144"/>
</Position10>
<Position11>
<Filename Value="ucmdbox.pas"/>
<Caret Line="2181" Column="34" TopLine="2144"/>
</Position11>
<Position12>
<Filename Value="ucmdbox.pas"/>
<Caret Line="308" Column="1" TopLine="271"/>
</Position12>
<Position13>
<Filename Value="ucmdbox.pas"/>
<Caret Line="174" Column="93" TopLine="159"/>
</Position13>
<Position14>
<Filename Value="ucmdbox.pas"/>
<Caret Line="1491" Column="34" TopLine="1454"/>
</Position14>
<Position15>
<Filename Value="ucmdbox.pas"/>
<Caret Line="86" Column="1" TopLine="49"/>
</Position15>
<Position16>
<Filename Value="ucmdbox.pas"/>
<Caret Line="165" Column="32" TopLine="128"/>
</Position16>
<Position17>
<Filename Value="ucmdbox.pas"/>
<Caret Line="850" Column="20" TopLine="829"/>
</Position17>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<CodeGeneration>
<Checks>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
</Checks>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking>
<Debugging>
<StripSymbols Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="2">
<Item1>
<Name Value="ECodetoolError"/>
</Item1>
<Item2>
<Name Value="EFOpenError"/>
</Item2>
</Exceptions>
</Debugging>
</CONFIG>

View file

@ -0,0 +1,18 @@
program CmdLineExample;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms
{ add your units here }, wnmainform;
begin
Application.Initialize;
Application.CreateForm(TWMainForm, WMainForm);
Application.Run;
end.

View file

@ -0,0 +1,47 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="cmdbox"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="C:\Dokumente und Einstellungen\Nilius\Desktop\laz\CmdLine\"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="1">
<Item1>
<Filename Value="ucmdbox.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="uCmdBox"/>
</Item1>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="LCL"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -0,0 +1,21 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit cmdbox;
interface
uses
uCmdBox, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('uCmdBox', @uCmdBox.Register);
end;
initialization
RegisterPackage('cmdbox', @Register);
end.

View file

@ -0,0 +1,59 @@
Hello
This is a little Demo for TCmdBox
You can type commands while this text is written here !
Available commands :
* help : Short list for all commands
* stop : Stops me from reading this text...
* pause : Interrupts me
* resume : Continues at the last position pause was called...
* start : Restarts reading this text..
* clear : Clears the output buffer
* clearhistory : clears history buffer for previous input
* exit : Exits the program
A few details to TCmdBox...
To put TCmdBox into Inputmode use (example)
CmdBox.StartRead(clRed,clBlack,'>',clSilver,clBlack);
If you give a string parameter to StartRead, it will be displayed directly before the input and will follow it.
Input is received through an Event called OnInput.
Changes can be watched by the programm by OnInputChange.
To keep TCmdBox in Inputmode just call StartRead in OnInput again.
If you resize the application or use splitter in the middle you notice lines are wrapped, there is no fixed or limited line width.
Input is also saved in a history list with limited to HistoryMax entries including current input.
Output content by using:
CmdBox.Write('Text');
or
CmdBox.Writeln('Text...');
These calls are supposed to be Threadsafe !
You can use all font and background colors possible on the Operating System, for example
CmdBox.TextColor(clRed);
CmdBox.TextBackGround(clSilver);
or
CmdBox.TextColors(clRed,clSilver);
The background color of the last character in a line determines the background color of the rest of the line.
The component should be able to show correct UTF8 codes of any kind (up to the whole 21 bits), therefore:
€, ä, ö,ü
should be correctly written as Euro, Ae, Oe, Ue (the last three are german) if you have selected a UTF8 capable Font and LCL-Interface.
I hope you can use the component, if you find bugs or have suggestions contact me by email : kccmp@gmx.de

View file

@ -0,0 +1,19 @@
LazarusResources.Add('TCmdBox','XPM',[
'/* XPM */'#13#10'static char *tcmdbox[] = {'#13#10'/* width height num_color'
+'s chars_per_pixel */'#13#10'" 24 24 8 1",'#13#10'/*'
+' colors */'#13#10'"` c #C0C0C0",'#13#10'". c #000000",'#13#10'"# c #000000"'
+','#13#10'"a c #000000",'#13#10'"b c #000000",'#13#10'"c c #000000",'#13#10
+'"d c #000000",'#13#10'"e c #000000",'#13#10'/* pixels */'#13#10'"``````````'
+'``````````````",'#13#10'"`......................`",'#13#10'"`..`...`....`..'
+'``...``.`",'#13#10'"`.`..`.`....`..`.`.`...`",'#13#10'"`.`.....`..```.``..`'
+'...`",'#13#10'"`.`..`..`..`.`.`.`.`...`",'#13#10'"`..`.....`.`.`.``...``.`"'
+','#13#10'"`......................`",'#13#10'"`......................`",'#13
+#10'"`......................`",'#13#10'"`......................`",'#13#10'"`'
+'......................`",'#13#10'"`.````.................`",'#13#10'"`.....'
+'.................`",'#13#10'"`......................`",'#13#10'"`..........'
+'............`",'#13#10'"`......................`",'#13#10'"`...............'
+'.......`",'#13#10'"`......................`",'#13#10'"`....................'
+'..`",'#13#10'"`......................`",'#13#10'"`......................`",'
+#13#10'"`......................`",'#13#10'"````````````````````````"'#13#10
+'};'#13#10
]);

View file

@ -0,0 +1,39 @@
/* XPM */
static char *tcmdbox[] = {
/* width height num_colors chars_per_pixel */
" 24 24 8 1",
/* colors */
"` c #C0C0C0",
". c #000000",
"# c #000000",
"a c #000000",
"b c #000000",
"c c #000000",
"d c #000000",
"e c #000000",
/* pixels */
"````````````````````````",
"`......................`",
"`..`...`....`..``...``.`",
"`.`..`.`....`..`.`.`...`",
"`.`.....`..```.``..`...`",
"`.`..`..`..`.`.`.`.`...`",
"`..`.....`.`.`.``...``.`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`.````.................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"`......................`",
"````````````````````````"
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,137 @@
object WMainForm: TWMainForm
Left = 319
Height = 480
Top = 337
Width = 720
ActiveControl = CmdBox
Caption = 'TCmdBox Example Application'
ClientHeight = 480
ClientWidth = 720
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
LCLVersion = '0.9.25'
object RightPanel: TPanel
Left = 579
Height = 480
Width = 141
Align = alRight
ClientHeight = 480
ClientWidth = 141
TabOrder = 0
object Label1: TLabel
Left = 16
Height = 14
Top = 8
Width = 35
Caption = 'History'
ParentColor = False
end
object Button1: TButton
Left = 16
Height = 25
Top = 440
Width = 109
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.InnerBorder = 4
Caption = 'End Programm'
OnClick = Button1Click
TabOrder = 0
end
object HistoryList: TListBox
Left = 16
Height = 285
Top = 24
Width = 109
Anchors = [akTop, akLeft, akRight, akBottom]
TabOrder = 1
end
object Button2: TButton
Left = 16
Height = 25
Top = 315
Width = 109
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.InnerBorder = 4
Caption = 'Clear'
OnClick = Button2Click
TabOrder = 2
end
object CbSetCaret: TComboBox
Left = 16
Height = 21
Top = 397
Width = 109
Anchors = [akLeft, akRight, akBottom]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 13
ItemIndex = 0
Items.Strings = (
'Caret-Line'
'Caret-Sub-Bar'
'Caret-Big-Bar'
)
OnChange = CbSetCaretChange
Style = csDropDownList
TabOrder = 3
Text = 'Caret-Line'
end
object Button3: TButton
Left = 16
Height = 25
Top = 353
Width = 109
Anchors = [akLeft, akRight, akBottom]
Caption = 'Process'
OnClick = Button3Click
TabOrder = 4
end
end
object Splitter1: TSplitter
Left = 574
Height = 480
Width = 5
Align = alRight
Beveled = True
ResizeAnchor = akRight
end
object CmdBox: TCmdBox
Height = 480
Width = 574
Align = alClient
CaretColor = 33023
CaretType = cartUser
CaretWidth = 1
CaretHeight = 13
CaretYShift = 3
OnInput = CmdBoxInput
LineCount = 1000
Font.CharSet = ANSI_CHARSET
Font.Color = clSilver
Font.Height = -16
Font.Name = 'Arial'
Font.Pitch = fpVariable
BackGroundColor = clNavy
TabWidth = 60
PassWordChar = '*'
HistoryMax = 10
InputSelColor = clPurple
InputSelBackGround = clSilver
CaretInterval = 500
GraphicalCharacterWidth = 10
AutoFollow = True
end
object ReaderTimer: TTimer
Interval = 700
OnTimer = ReaderTimerTimer
left = 66
top = 75
end
object ProcessTimer: TTimer
Enabled = False
Interval = 100
OnTimer = ProcessTimerTimer
left = 104
top = 75
end
end

View file

@ -0,0 +1,81 @@
{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
LazarusResources.Add('TWMainForm','FORMDATA',[
'TPF0'#10'TWMainForm'#9'WMainForm'#4'Left'#3'?'#1#6'Height'#3#224#1#3'Top'#3
+'Q'#1#5'Width'#3#208#2#13'ActiveControl'#7#6'CmdBox'#7'Caption'#6#27'TCmdBox'
+' Example Application'#12'ClientHeight'#3#224#1#11'ClientWidth'#3#208#2#8'On'
+'Create'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#8'Position'#7#14'po'
+'ScreenCenter'#10'LCLVersion'#6#6'0.9.25'#0#6'TPanel'#10'RightPanel'#4'Left'
+#3'C'#2#6'Height'#3#224#1#5'Width'#3#141#0#5'Align'#7#7'alRight'#12'ClientHe'
+'ight'#3#224#1#11'ClientWidth'#3#141#0#8'TabOrder'#2#0#0#6'TLabel'#6'Label1'
+#4'Left'#2#16#6'Height'#2#14#3'Top'#2#8#5'Width'#2'#'#7'Caption'#6#7'History'
+#11'ParentColor'#8#0#0#7'TButton'#7'Button1'#4'Left'#2#16#6'Height'#2#25#3'T'
+'op'#3#184#1#5'Width'#2'm'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0
+#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#12'End Programm'#7'OnClick'#7
+#12'Button1Click'#8'TabOrder'#2#0#0#0#8'TListBox'#11'HistoryList'#4'Left'#2
+#16#6'Height'#3#29#1#3'Top'#2#24#5'Width'#2'm'#7'Anchors'#11#5'akTop'#6'akLe'
+'ft'#7'akRight'#8'akBottom'#0#8'TabOrder'#2#1#0#0#7'TButton'#7'Button2'#4'Le'
+'ft'#2#16#6'Height'#2#25#3'Top'#3';'#1#5'Width'#2'm'#7'Anchors'#11#6'akLeft'
+#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#5'C'
+'lear'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#2#0#0#9'TComboBox'#10'CbS'
+'etCaret'#4'Left'#2#16#6'Height'#2#21#3'Top'#3#141#1#5'Width'#2'm'#7'Anchors'
+#11#6'akLeft'#7'akRight'#8'akBottom'#0#16'AutoCompleteText'#11#22'cbactEndOf'
+'LineComplete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#13#9'ItemIndex'#2
+#0#13'Items.Strings'#1#6#10'Caret-Line'#6#13'Caret-Sub-Bar'#6#13'Caret-Big-B'
+'ar'#0#8'OnChange'#7#16'CbSetCaretChange'#5'Style'#7#14'csDropDownList'#8'Ta'
+'bOrder'#2#3#4'Text'#6#10'Caret-Line'#0#0#7'TButton'#7'Button3'#4'Left'#2#16
+#6'Height'#2#25#3'Top'#3'a'#1#5'Width'#2'm'#7'Anchors'#11#6'akLeft'#7'akRigh'
+'t'#8'akBottom'#0#7'Caption'#6#7'Process'#7'OnClick'#7#12'Button3Click'#8'Ta'
+'bOrder'#2#4#0#0#0#9'TSplitter'#9'Splitter1'#4'Left'#3'>'#2#6'Height'#3#224#1
+#5'Width'#2#5#5'Align'#7#7'alRight'#7'Beveled'#9#12'ResizeAnchor'#7#7'akRigh'
+'t'#0#0#7'TCmdBox'#6'CmdBox'#6'Height'#3#224#1#5'Width'#3'>'#2#5'Align'#7#8
+'alClient'#10'CaretColor'#4#255#128#0#0#9'CaretType'#7#8'cartUser'#10'CaretW'
+'idth'#2#1#11'CaretHeight'#2#13#11'CaretYShift'#2#3#7'OnInput'#7#11'CmdBoxIn'
+'put'#9'LineCount'#3#232#3#12'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Color'
+#7#8'clSilver'#11'Font.Height'#2#240#9'Font.Name'#6#5'Arial'#10'Font.Pitch'#7
+#10'fpVariable'#15'BackGroundColor'#7#6'clNavy'#8'TabWidth'#2'<'#12'PassWord'
+'Char'#6#1'*'#10'HistoryMax'#2#10#13'InputSelColor'#7#8'clPurple'#18'InputSe'
+'lBackGround'#7#8'clSilver'#13'CaretInterval'#3#244#1#23'GraphicalCharacterW'
+'idth'#2#10#10'AutoFollow'#9#0#0#6'TTimer'#11'ReaderTimer'#8'Interval'#3#188
+#2#7'OnTimer'#7#16'ReaderTimerTimer'#4'left'#2'B'#3'top'#2'K'#0#0#6'TTimer'
+#12'ProcessTimer'#7'Enabled'#8#8'Interval'#2'd'#7'OnTimer'#7#17'ProcessTimer'
+'Timer'#4'left'#2'h'#3'top'#2'K'#0#0#0#10'TWMainForm'#9'WMainForm'#4'Left'#3
+'?'#1#6'Height'#3#224#1#3'Top'#3'Q'#1#5'Width'#3#208#2#13'ActiveControl'#7#6
+'CmdBox'#7'Caption'#6#27'TCmdBox Example Application'#12'ClientHeight'#3#224
+#1#11'ClientWidth'#3#208#2#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'Fo'
+'rmDestroy'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.25'#0#6
+'TPanel'#10'RightPanel'#4'Left'#3'C'#2#6'Height'#3#224#1#5'Width'#3#141#0#5
+'Align'#7#7'alRight'#12'ClientHeight'#3#224#1#11'ClientWidth'#3#141#0#8'TabO'
+'rder'#2#0#0#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'#2#14#3'Top'#2#8#5'Wi'
+'dth'#2'#'#7'Caption'#6#7'History'#11'ParentColor'#8#0#0#7'TButton'#7'Button'
+'1'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#184#1#5'Width'#2'm'#7'Anchors'#11#6
+'akLeft'#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
+'n'#6#12'End Programm'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#0#0#0#8'T'
+'ListBox'#11'HistoryList'#4'Left'#2#16#6'Height'#3#29#1#3'Top'#2#24#5'Width'
+#2'm'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabOrder'#2
+#1#0#0#7'TButton'#7'Button2'#4'Left'#2#16#6'Height'#2#25#3'Top'#3';'#1#5'Wid'
+'th'#2'm'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#25'BorderSpacing.'
+'InnerBorder'#2#4#7'Caption'#6#5'Clear'#7'OnClick'#7#12'Button2Click'#8'TabO'
+'rder'#2#2#0#0#9'TComboBox'#10'CbSetCaret'#4'Left'#2#16#6'Height'#2#21#3'Top'
+#3#141#1#5'Width'#2'm'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#16'A'
+'utoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10
+'ItemHeight'#2#13#9'ItemIndex'#2#0#13'Items.Strings'#1#6#10'Caret-Line'#6#13
+'Caret-Sub-Bar'#6#13'Caret-Big-Bar'#0#8'OnChange'#7#16'CbSetCaretChange'#5'S'
+'tyle'#7#14'csDropDownList'#8'TabOrder'#2#3#4'Text'#6#10'Caret-Line'#0#0#7'T'
+'Button'#7'Button3'#4'Left'#2#16#6'Height'#2#25#3'Top'#3'a'#1#5'Width'#2'm'#7
+'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6#7'Process'#7'On'
+'Click'#7#12'Button3Click'#8'TabOrder'#2#4#0#0#0#9'TSplitter'#9'Splitter1'#4
,'Left'#3'>'#2#6'Height'#3#224#1#5'Width'#2#5#5'Align'#7#7'alRight'#7'Beveled'
+#9#12'ResizeAnchor'#7#7'akRight'#0#0#7'TCmdBox'#6'CmdBox'#6'Height'#3#224#1#5
+'Width'#3'>'#2#5'Align'#7#8'alClient'#10'CaretColor'#4#255#128#0#0#9'CaretTy'
+'pe'#7#8'cartUser'#10'CaretWidth'#2#1#11'CaretHeight'#2#13#11'CaretYShift'#2
+#3#7'OnInput'#7#11'CmdBoxInput'#9'LineCount'#3#232#3#12'Font.CharSet'#7#12'A'
+'NSI_CHARSET'#10'Font.Color'#7#8'clSilver'#11'Font.Height'#2#240#9'Font.Name'
+#6#5'Arial'#10'Font.Pitch'#7#10'fpVariable'#15'BackGroundColor'#7#6'clNavy'#8
+'TabWidth'#2'<'#12'PassWordChar'#6#1'*'#10'HistoryMax'#2#10#13'InputSelColor'
+#7#8'clPurple'#18'InputSelBackGround'#7#8'clSilver'#13'CaretInterval'#3#244#1
+#23'GraphicalCharacterWidth'#2#10#10'AutoFollow'#9#0#0#6'TTimer'#11'ReaderTi'
+'mer'#8'Interval'#3#188#2#7'OnTimer'#7#16'ReaderTimerTimer'#4'left'#2'B'#3't'
+'op'#2'K'#0#0#6'TTimer'#12'ProcessTimer'#7'Enabled'#8#8'Interval'#2'd'#7'OnT'
+'imer'#7#17'ProcessTimerTimer'#4'left'#2'h'#3'top'#2'K'#0#0#0
]);

View file

@ -0,0 +1,239 @@
{ Copyright (C) 2007 Julian Schutsch
This source is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option)
any later version.
This code is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
A copy of the GNU General Public License is available on the World Wide Web
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
This Software is GPL, not LGPL as the libary it uses !
Changelog
10.8.2007 : Added "Buttons" Unit to avoid "TButton" missing error on 0.9.22 (Linux)
}
unit wnmainform;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Graphics, Dialogs, ExtCtrls,LCLType,
ucmdbox, StdCtrls, Controls, Buttons;
type
{ TWMainForm }
TWMainForm = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
CmdBox: TCmdBox;
CbSetCaret: TComboBox;
Label1: TLabel;
HistoryList: TListBox;
RightPanel: TPanel;
Splitter1: TSplitter;
ReaderTimer: TTimer;
ProcessTimer: TTimer;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure CmdBoxInput(ACmdBox: TCmdBox; Input: String);
procedure CbSetCaretChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ProcessTimerTimer(Sender: TObject);
procedure ReaderTimerTimer(Sender: TObject);
private
TextPosition : Integer;
DText : TStringList;
Rdpw : Boolean;
FProcess : Integer;
end;
var WMainForm: TWMainForm;
implementation
{ TWMainForm }
procedure TWMainForm.ReaderTimerTimer(Sender: TObject);
var i:Integer;
begin
CmdBox.TextColors(clRed,clNavy);
for i:=0 to 0 do
begin
if TextPosition<DText.Count then
begin
CmdBox.ClearLine;
CmdBox.Writeln(DText[TextPosition]);
Inc(TextPosition);
end;
if TextPosition>=DText.Count then
begin
CmdBox.ClearLine;
CmdBox.TextColor(clYellow);
CmdBox.Writeln(#27#10#196);
TextPosition := 0;
ReaderTimer.Enabled := False;
end;
end;
end;
procedure TWMainForm.FormCreate(Sender: TObject);
begin
DoubleBuffered := True;
DText := TStringList.Create;
if FileExists('demotext.txt') then DText.LoadFromFile('demotext.txt');
CmdBox.StartRead(clRed,clNavy,'>',clYellow,clNavy);
CmdBox.TextColors(clWhite,clNavy);
CmdBox.Writeln(#27#218#27#10#191);
CmdBox.Writeln(#27#179'Type "help" to see a short list of available commands.'#27#10#179);
CmdBox.Writeln(#27#217#27#10#217);
end;
procedure TWMainForm.CmdBoxInput(ACmdBox: TCmdBox; Input: String);
var i:Integer;
begin
if rdpw then
begin
CmdBox.TextColors(clLime,clBlue);
CmdBox.Writeln('Your Secret Password : '+Input);
CmdBox.TextColors(clSilver,clNavy);
rdpw:=false;
end
else
begin
rdpw:=false;
Input:=LowerCase(Input);
if Input='help' then
begin
CmdBox.TextColors(clLime,clNavy);
CmdBox.Writeln(#27#218#27#197#128#0#27#194#27#10#191);
CmdBox.Writeln(#27#179' Command'#27#33#128#0#27#179' Explanation'#27#10#179);
CmdBox.Writeln(#27#195#27#197#128#0#27#198#27#10#180);
CmdBox.Writeln(#27#179' help'#27#33#128#0#27#179' Gives this list of Commands'#27#10#179);
CmdBox.Writeln(#27#179' clear'#27#33#128#0#27#179' Clears the Content of CmdBox'#27#10#179);
CmdBox.Writeln(#27#179' start'#27#33#128#0#27#179' Outputs the Content of Demotext.txt from the beginning'#27#10#179);
CmdBox.Writeln(#27#179' stop'#27#33#128#0#27#179' Stops output and resets to Start'#27#10#179);
CmdBox.Writeln(#27#179' pause'#27#33#128#0#27#179' Interrupts output'#27#10#179);
CmdBox.Writeln(#27#179' resume'#27#33#128#0#27#179' Resumes output from the last position'#27#10#179);
CmdBox.Writeln(#27#179' clearhistory'#27#33#128#0#27#179' Clears all history entries'#27#10#179);
CmdBox.Writeln(#27#179' readpwd'#27#33#128#0#27#179' Read a Password (just as a test)'#27#10#179);
CmdBox.Writeln(#27#179' exit'#27#33#128#0#27#179' Exit program'#27#10#179);
CmdBox.Writeln(#27#217#27#197#128#0#27#193#27#10#217);
CmdBox.TextColor(clSilver);
end else
if Input='readpwd' then
begin
rdpw:=true;
end else
if Input='clearhistory' then
begin
CmdBox.TextColor(clYellow);
CmdBox.Writeln('Clear History...');
CmdBox.TextColor(clSilver);
CmdBox.ClearHistory;
end else
if Input='start' then
begin
TextPosition:=0;
ReaderTimer.Enabled:=true;
CmdBox.TextColors(clLime,clBlue);
CmdBox.Writeln('Start...');
end else if Input='stop' then
begin
TextPosition:=0;
ReaderTimer.Enabled:=false;
CmdBox.TextColors(clRed,clBlue);
CmdBox.Writeln('Stop...');
end else if Input='pause' then
begin
ReaderTimer.Enabled:=false;
CmdBox.TextColors(clPurple,clBlue);
CmdBox.Writeln('Pause...');
end else if Input='resume' then
begin
ReaderTimer.Enabled:=true;
CmdBox.TextColors(clGreen,clBlue);
CmdBox.Writeln('Continue...');
end else if Input='clear' then
begin
CmdBox.Clear;
end else if Input='exit' then close else
begin
CmdBox.TextColors(clYellow,ClRed);
CmdBox.Writeln('Invalid Command!');
end;
end;
if rdpw then CmdBox.StartReadPassWord(clYellow,clNavy,'Pwd:',clLime,clNavy) else
CmdBox.StartRead(clRed,clNavy,'>',clYellow,clNavy);
HistoryList.Clear;
for i:=0 to CmdBox.HistoryCount-1 do HistoryList.Items.Add(CmdBox.History[i]);
end;
procedure TWMainForm.CbSetCaretChange(Sender: TObject);
begin
case cbSetCaret.ItemIndex of
0:CmdBox.CaretType := cartLine;
1:CmdBox.CaretType := cartSubBar;
2:CmdBox.CaretType := cartBigBar;
end;
CmdBox.SetFocus;
end;
procedure TWMainForm.Button2Click(Sender: TObject);
begin
CmdBox.ClearHistory;
HistoryList.Clear;
end;
procedure TWMainForm.Button3Click(Sender: TObject);
begin
FProcess:=0;
ProcessTimer.Enabled:=True;
end;
procedure TWMainForm.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TWMainForm.FormDestroy(Sender: TObject);
begin
DText.Free;
end;
procedure TWMainForm.ProcessTimerTimer(Sender: TObject);
begin
if FProcess=100 then
begin
CmdBox.ClearLine;
ProcessTimer.Enabled:=False;
end
else
begin
CmdBox.TextColors(clRed,clBlue);
CmdBox.Write('Processing ['+IntToStr(FProcess)+'%]'#13);
end;
Inc(FProcess);
end;
initialization
{$I wnmainform.lrs}
end.

View file

@ -1,134 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="5">
<Name Value="Image32"/>
<Author Value="Angus Johnson"/>
<AutoUpdate Value="Manually"/>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="source;source/Clipper2"/>
<OtherUnitFiles Value="source;source/Clipper2"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Conditionals Value="if (TargetCPU &lt;> &apos;arm&apos;) then
begin
CustomOptions += &apos;-fPIC&apos;;
UsageCustomOptions += &apos;-fPIC&apos;;
end"/>
</CompilerOptions>
<Description Value="Image32 is a comprehensive 2D graphics library written entirely in Delphi Pascal, and without dependencies on other libraries. It provides an extensive range of image manipulation and drawing functions that includes text rendering through native parsing of truetype font files."/>
<License Value="Boost Software License - Version 1.0"/>
<Version Major="4" Minor="8" Release="1"/>
<Files>
<Item>
<Filename Value="source/Img32.Draw.pas"/>
<UnitName Value="Img32.Draw"/>
</Item>
<Item>
<Filename Value="source/Img32.Extra.pas"/>
<UnitName Value="Img32.Extra"/>
</Item>
<Item>
<Filename Value="source/Img32.Fmt.SVG.pas"/>
<UnitName Value="Img32.Fmt.SVG"/>
</Item>
<Item>
<Filename Value="source/Img32.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Img32.pas"/>
<UnitName Value="Img32"/>
</Item>
<Item>
<Filename Value="source/Img32.Resamplers.pas"/>
<UnitName Value="Img32.Resamplers"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.Core.pas"/>
<UnitName Value="Img32.SVG.Core"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.HashConsts.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.HtmlColorConsts.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.HtmlHashConsts.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.HtmlValues.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.Path.pas"/>
<UnitName Value="Img32.SVG.Path"/>
</Item>
<Item>
<Filename Value="source/Img32.SVG.Reader.pas"/>
<UnitName Value="Img32.SVG.Reader"/>
</Item>
<Item>
<Filename Value="source/Img32.Text.pas"/>
<UnitName Value="Img32.Text"/>
</Item>
<Item>
<Filename Value="source/Img32.Transform.pas"/>
<UnitName Value="Img32.Transform"/>
</Item>
<Item>
<Filename Value="source/Img32.Vector.pas"/>
<UnitName Value="Img32.Vector"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Core.pas"/>
<UnitName Value="Clipper.Core"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Engine.pas"/>
<UnitName Value="Clipper.Engine"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Minkowski.pas"/>
<UnitName Value="Clipper.Minkowski"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Offset.pas"/>
<UnitName Value="Clipper.Offset"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.pas"/>
<UnitName Value="Clipper"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.RectClip.pas"/>
<UnitName Value="Clipper.RectClip"/>
</Item>
</Files>
<RequiredPkgs>
<Item>
<PackageName Value="LCL"/>
</Item>
<Item>
<PackageName Value="FCL"/>
</Item>
</RequiredPkgs>
<UsageOptions>
<IncludePath Value="source"/>
<UnitPath Value="$(PkgOutDir);source;source/Clipper2"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -1,18 +0,0 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit Image32;
{$warn 5023 off : no warning about unused units}
interface
uses
Img32.Draw, Img32.Extra, Img32.Fmt.SVG, Img32, Img32.Resamplers,
Img32.SVG.Core, Img32.SVG.Path, Img32.SVG.Reader, Img32.Text,
Img32.Transform, Img32.Vector, Clipper.Core, Clipper.Engine,
Clipper.Minkowski, Clipper.Offset, Clipper, Clipper.RectClip;
implementation
end.

View file

@ -1,23 +0,0 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View file

@ -1,9 +0,0 @@
# Image32
A 2D graphics library written in Delphi Pascal
https://github.com/AngusJohnson/Image32
Version: 4.8.1 (2025/01/18)
Author: Angus Johnson

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,133 +0,0 @@
unit Clipper.Minkowski;
(*******************************************************************************
* Author : Angus Johnson *
* Date : 21 December 2023 *
* Copyright : Angus Johnson 2010-2022 *
* Purpose : Minkowski Addition and Difference *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
{$I Clipper.inc}
interface
uses
Classes, Math, Clipper.Core;
function MinkowskiSum(const Pattern, Path: TPath64;
PathIsClosed: Boolean): TPaths64; overload;
function MinkowskiSum(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer = 2): TPathsD; overload;
function MinkowskiDiff(const path1, path2: TPath64): TPaths64; overload;
function MinkowskiDiff(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer): TPathsD; overload;
implementation
uses
Clipper;
function AddPoints(val1, val2: TPoint64): TPoint64;
{$IFDEF INLINING} inline; {$ENDIF}
begin
Result.X := val1.X + val2.X;
Result.Y := val1.Y + val2.Y;
end;
//------------------------------------------------------------------------------
function SubtractPoints(val1, val2: TPoint64): TPoint64;
{$IFDEF INLINING} inline; {$ENDIF}
begin
Result.X := val1.X - val2.X;
Result.Y := val1.Y - val2.Y;
end;
//------------------------------------------------------------------------------
function Minkowski(const Base, Path: TPath64;
IsSum: Boolean; IsClosed: Boolean): TPaths64;
var
i,j,k,g,h, delta, baseLen, pathLen: integer;
tmp: TPaths64;
quad: TPath64;
begin
delta := Iif(IsClosed, 0 , 1);
baseLen := Length(Base);
pathLen := Length(Path);
setLength(tmp, pathLen);
for i := 0 to pathLen -1 do
begin
setLength(tmp[i], baseLen);
if IsSum then
for j := 0 to baseLen -1 do
tmp[i][j] := AddPoints(Path[i], Base[j])
else
for j := 0 to baseLen -1 do
tmp[i][j] := SubtractPoints(Path[i], Base[j]);
end;
SetLength(quad, 4);
SetLength(Result, (pathLen - delta) * baseLen);
g := Iif(IsClosed, pathLen - 1, 0);
for i := delta to pathLen - 1 do
begin
h := baseLen - 1;
k := (i - delta) * baseLen;
for j := 0 to baseLen - 1 do
begin
quad[0] := tmp[g][h];
quad[1] := tmp[i][h];
quad[2] := tmp[i][(j)];
quad[3] := tmp[g][(j)];
if not IsPositive(quad) then
Result[k + j] := ReversePath(quad) else
Result[k + j] := copy(quad, 0, 4);
h := j;
end;
g := i;
end;
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const Pattern, Path: TPath64; PathIsClosed: Boolean): TPaths64;
begin
Result := Union( Minkowski(Pattern, Path, true, PathIsClosed), frNonZero);
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer): TPathsD;
var
tmp: TPaths64;
scale: double;
begin
scale := Power(10, decimalPlaces);
tmp := Union( Minkowski(ScalePath(Pattern, scale),
ScalePath(Path, scale), true, PathIsClosed), frNonZero);
Result := ScalePathsD(tmp, 1/scale);
end;
//------------------------------------------------------------------------------
function MinkowskiDiff(const path1, path2: TPath64): TPaths64;
begin
Result := Union( Minkowski(path1, path2, false, true), frNonZero);
end;
//------------------------------------------------------------------------------
function MinkowskiDiff(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer): TPathsD;
var
tmp: TPaths64;
scale: double;
begin
scale := Power(10, decimalPlaces);
tmp := Union( Minkowski(ScalePath(Pattern, scale),
ScalePath(Path, scale), false, PathIsClosed), frNonZero);
Result := ScalePathsD(tmp, 1/scale);
end;
//------------------------------------------------------------------------------
end.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,39 +0,0 @@
///////////////////////////////////////////////////////////////////////////////
//USER DEFINED PREPROCESSOR DIRECTIVES
///////////////////////////////////////////////////////////////////////////////
//For user defined Z-coordinates, defined in Clipper's 'SetZ' callback event
{.$DEFINE USINGZ}
///////////////////////////////////////////////////////////////////////////////
//COMPILER DIFINED PREPROCESSOR DIRECTIVES (ie. do not touch ;))
///////////////////////////////////////////////////////////////////////////////
{$IFDEF FPC}
{$DEFINE INLINING}
{$MODE DELPHI}
{$ELSE}
{$IF COMPILERVERSION < 14}
Requires Delphi version 6 or above.
{$IFEND}
{$IF COMPILERVERSION >= 18} //Delphi 2007
{$DEFINE RECORD_METHODS}
{$DEFINE STRICT}
{$IF COMPILERVERSION >= 19} //Delphi 2009
//While "inlining" is supported from D2005, it's buggy (see QC41166) until D2009
{$DEFINE INLINING}
{$IF COMPILERVERSION >= 23} //Delphi XE2+
{$DEFINE XPLAT_GENERICS}
{$DEFINE ROUNDINGMODE}
{$IF COMPILERVERSION >= 24} //Delphi XE3+
{$LEGACYIFEND ON}
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$ENDIF}
{$IFDEF DEBUG}
{$UNDEF INLINING}
{$ENDIF}

View file

@ -1,972 +0,0 @@
unit Clipper;
(*******************************************************************************
* Author : Angus Johnson *
* Date : 7 May 2024 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2010-2024 *
* Purpose : This module provides a simple interface to the Clipper Library *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
interface
{$I Clipper.inc}
uses
Math, SysUtils, Classes,
Clipper.Core, Clipper.Engine, Clipper.Offset, Clipper.RectClip;
// A number of structures defined in other units are redeclared here
// so those units won't also need to be declared in your own units clauses.
type
TClipper = Clipper.Engine.TClipper64;
TClipper64 = Clipper.Engine.TClipper64;
TPoint64 = Clipper.Core.TPoint64;
TRect64 = Clipper.Core.TRect64;
TPath64 = Clipper.Core.TPath64;
TPaths64 = Clipper.Core.TPaths64;
TPointD = Clipper.Core.TPointD;
TRectD = Clipper.Core.TRectD;
TPathD = Clipper.Core.TPathD;
TPathsD = Clipper.Core.TPathsD;
TFillRule = Clipper.Core.TFillRule;
TPolyTree64 = Clipper.Engine.TPolyTree64;
TPolyTreeD = Clipper.Engine.TPolyTreeD;
TJoinType = Clipper.Offset.TJoinType;
TEndType = Clipper.Offset.TEndType;
TArrayOfInt64 = array of Int64;
const
frEvenOdd = Clipper.Core.frEvenOdd;
frNonZero = Clipper.Core.frNonZero;
frPositive = Clipper.Core.frPositive;
frNegative = Clipper.Core.frNegative;
jtBevel = Clipper.Offset.jtBevel;
jtSquare = Clipper.Offset.jtSquare;
jtRound = Clipper.Offset.jtRound;
jtMiter = Clipper.Offset.jtMiter;
etPolygon = Clipper.Offset.etPolygon;
etJoined = Clipper.Offset.etJoined;
etButt = Clipper.Offset.etButt;
etSquare = Clipper.Offset.etSquare;
etRound = Clipper.Offset.etRound;
ctNone = Clipper.Core.ctNoClip;
ctIntersection = Clipper.Core.ctIntersection;
ctUnion = Clipper.Core.ctUnion;
ctDifference = Clipper.Core.ctDifference;
ctXor = Clipper.Core.ctXor;
function BooleanOp(clipType: TClipType;
const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64; overload;
function BooleanOp(clipType: TClipType; const subjects, clips:
TPathsD; fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
procedure BooleanOp(clipType: TClipType; const subjects, clips: TPaths64;
fillRule: TFillRule; polytree: TPolyTree64); overload;
function Intersect(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Union(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Union(const subjects: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Difference(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function XOR_(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Intersect(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function Union(const subjects: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function Union(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function Difference(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function XOR_(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function InflatePaths(const paths: TPaths64; delta: Double;
jt: TJoinType = jtRound; et: TEndType = etPolygon;
MiterLimit: double = 2.0; ArcTolerance: double = 0.0): TPaths64; overload;
function InflatePaths(const paths: TPathsD; delta: Double;
jt: TJoinType = jtRound; et: TEndType = etPolygon;
miterLimit: double = 2.0; precision: integer = 2;
ArcTolerance: double = 0.0): TPathsD; overload;
// RectClip: for closed paths only (otherwise use RectClipLines)
function RectClip(const rect: TRect64; const path: TPath64): TPath64; overload;
function RectClip(const rect: TRect64; const paths: TPaths64): TPaths64; overload;
function RectClip(const rect: TRectD; const path: TPathD; precision: integer = 2): TPathD; overload;
function RectClip(const rect: TRectD; const paths: TPathsD; precision: integer = 2): TPathsD; overload;
function RectClipLines(const rect: TRect64;
const path: TPath64): TPaths64; overload;
function RectClipLines(const rect: TRect64;
const paths: TPaths64): TPaths64; overload;
function RectClipLines(const rect: TRectD; const path: TPathD;
precision: integer = 2): TPathsD; overload;
function RectClipLines(const rect: TRectD; const paths: TPathsD;
precision: integer = 2): TPathsD; overload;
function TranslatePath(const path: TPath64; dx, dy: Int64): TPath64; overload;
function TranslatePath(const path: TPathD; dx, dy: double): TPathD; overload;
function TranslatePaths(const paths: TPaths64; dx, dy: Int64): TPaths64; overload;
function TranslatePaths(const paths: TPathsD; dx, dy: double): TPathsD; overload;
function MinkowskiSum(const pattern, path: TPath64;
pathIsClosed: Boolean): TPaths64; overload;
function MinkowskiSum(const pattern, path: TPathD;
pathIsClosed: Boolean): TPathsD; overload;
function PolyTreeToPaths64(PolyTree: TPolyTree64): TPaths64;
function PolyTreeToPathsD(PolyTree: TPolyTreeD): TPathsD;
function PathToString(const p: TPath64;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
function PathToString(const p: TPathD; decimals: integer;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
function PathsToString(const p: TPaths64;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
function PathsToString(const p: TPathsD; decimals: integer;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
//ShowPolyTreeStructure: only useful when debugging
procedure ShowPolyTreeStructure(polytree: TPolyTree64; strings: TStrings); overload;
procedure ShowPolyTreeStructure(polytree: TPolyTreeD; strings: TStrings); overload;
function MakePath(const ints: array of Int64): TPath64; overload;
function MakePathD(const dbls: array of double): TPathD; overload;
function TrimCollinear(const p: TPath64;
isOpenPath: Boolean = false): TPath64; overload;
function TrimCollinear(const path: TPathD;
precision: integer; isOpenPath: Boolean = false): TPathD; overload;
function PointInPolygon(const pt: TPoint64; const polygon: TPath64):
TPointInPolygonResult;
function SimplifyPath(const path: TPath64;
shapeTolerance: double; isClosedPath: Boolean = true): TPath64; overload;
function SimplifyPaths(const paths: TPaths64;
shapeTolerance: double; isClosedPath: Boolean = true): TPaths64; overload;
function SimplifyPath(const path: TPathD; shapeTolerance: double;
isClosedPath: Boolean = true; decimalPrecision: integer = 2): TPathD; overload;
function SimplifyPaths(const paths: TPathsD; shapeTolerance: double;
isClosedPath: Boolean = true; decimalPrecision: integer = 2): TPathsD; overload;
implementation
uses
Clipper.Minkowski;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{$IFDEF USINGZ}
function MakePath(const ints: array of Int64): TPath64;
var
i, len: integer;
begin
len := length(ints) div 3;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := ints[i*3];
Result[i].Y := ints[i*3 +1];
Result[i].z := ints[i*3 +2];
end;
end;
//------------------------------------------------------------------------------
function MakePathD(const dbls: array of double): TPathD; overload;
var
i, len: integer;
begin
len := length(dbls) div 3;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := dbls[i*3];
Result[i].Y := dbls[i*3 +1];
Result[i].Z := Round(dbls[i*3 +2]);
end;
end;
//------------------------------------------------------------------------------
{$ELSE}
function MakePath(const ints: array of Int64): TPath64;
var
i, len: integer;
begin
len := length(ints) div 2;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := ints[i*2];
Result[i].Y := ints[i*2 +1];
end;
end;
//------------------------------------------------------------------------------
function MakePathD(const dbls: array of double): TPathD; overload;
var
i, len: integer;
begin
len := length(dbls) div 2;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := dbls[i*2];
Result[i].Y := dbls[i*2 +1];
end;
end;
//------------------------------------------------------------------------------
{$ENDIF}
procedure AddPolyNodeToPaths(Poly: TPolyPath64; var Paths: TPaths64);
var
i: Integer;
begin
if (Length(Poly.Polygon) > 0) then
begin
i := Length(Paths);
SetLength(Paths, i +1);
Paths[i] := Poly.Polygon;
end;
for i := 0 to Poly.Count - 1 do
AddPolyNodeToPaths(Poly[i], Paths);
end;
//------------------------------------------------------------------------------
function PolyTreeToPaths64(PolyTree: TPolyTree64): TPaths64;
begin
Result := nil;
AddPolyNodeToPaths(PolyTree, Result);
end;
//------------------------------------------------------------------------------
procedure AddPolyNodeToPathsD(Poly: TPolyPathD; var Paths: TPathsD);
var
i: Integer;
begin
if (Length(Poly.Polygon) > 0) then
begin
i := Length(Paths);
SetLength(Paths, i +1);
Paths[i] := Poly.Polygon;
end;
for i := 0 to Poly.Count - 1 do
AddPolyNodeToPathsD(Poly[i], Paths);
end;
//------------------------------------------------------------------------------
function PolyTreeToPathsD(PolyTree: TPolyTreeD): TPathsD;
begin
Result := nil;
AddPolyNodeToPathsD(PolyTree, Result);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function BooleanOp(clipType: TClipType;
const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
with TClipper64.Create do
try
AddSubject(subjects);
AddClip(clips);
Execute(clipType, fillRule, Result);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function BooleanOp(clipType: TClipType; const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
with TClipperD.Create(decimalPrec) do
try
AddSubject(subjects);
AddClip(clips);
Execute(clipType, fillRule, Result);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
procedure BooleanOp(clipType: TClipType; const subjects, clips: TPaths64;
fillRule: TFillRule; polytree: TPolyTree64);
var
dummy: TPaths64;
begin
with TClipper64.Create do
try
AddSubject(subjects);
AddClip(clips);
Execute(clipType, fillRule, polytree, dummy);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function Intersect(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctIntersection, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function Union(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctUnion, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function Union(const subjects: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctUnion, subjects, nil, fillRule);
end;
//------------------------------------------------------------------------------
function Difference(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctDifference, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function XOR_(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctXor, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function Intersect(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctIntersection, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function Union(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctUnion, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function Union(const subjects: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctUnion, subjects, nil, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function Difference(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctDifference, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function XOR_(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctXor, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function InflatePaths(const paths: TPaths64; delta: Double;
jt: TJoinType; et: TEndType; MiterLimit: double;
ArcTolerance: double): TPaths64;
var
co: TClipperOffset;
begin
co := TClipperOffset.Create(MiterLimit, ArcTolerance);
try
co.AddPaths(paths, jt, et);
co.Execute(delta, Result);
finally
co.free;
end;
end;
//------------------------------------------------------------------------------
function InflatePaths(const paths: TPathsD; delta: Double;
jt: TJoinType; et: TEndType; miterLimit: double;
precision: integer; ArcTolerance: double): TPathsD;
var
pp: TPaths64;
scale, invScale: double;
begin
CheckPrecisionRange(precision);
scale := Power(10, precision);
invScale := 1/scale;
pp := ScalePaths(paths, scale, scale);
with TClipperOffset.Create(miterLimit, ArcTolerance) do
try
AddPaths(pp, jt, et);
Execute(delta * scale, pp); // reuse pp to receive the solution.
finally
free;
end;
Result := ScalePathsD(pp, invScale, invScale);
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRect64;
const path: TPath64): TPath64;
var
paths: TPaths64;
begin
SetLength(paths, 1);
paths[0] := path;
paths := RectClip(rect, paths);
if Assigned(paths) then
Result := paths[0] else
Result := nil;
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRect64; const paths: TPaths64): TPaths64;
begin
Result := nil;
if rect.IsEmpty then Exit;
with TRectClip64.Create(rect) do
try
Result := Execute(paths);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRectD; const path: TPathD; precision: integer): TPathD;
var
scale: double;
tmpPath: TPath64;
rec: TRect64;
begin
Result := nil;
if not rect.Intersects(GetBounds(path)) then Exit;
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPath := ScalePath(path, scale);
tmpPath := RectClip(rec, tmpPath);
Result := ScalePathD(tmpPath, 1/scale);
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRectD; const paths: TPathsD; precision: integer): TPathsD;
var
scale: double;
tmpPaths: TPaths64;
rec: TRect64;
begin
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPaths := ScalePaths(paths, scale);
with TRectClip64.Create(rec) do
try
tmpPaths := Execute(tmpPaths);
finally
Free;
end;
Result := ScalePathsD(tmpPaths, 1/scale);
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRect64; const path: TPath64): TPaths64;
var
tmp: TPaths64;
begin
Result := nil;
SetLength(tmp, 1);
tmp[0] := path;
with TRectClipLines64.Create(rect) do
try
Result := Execute(tmp);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRect64; const paths: TPaths64): TPaths64;
begin
Result := nil;
if rect.IsEmpty then Exit;
with TRectClipLines64.Create(rect) do
try
Result := Execute(paths);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRectD;
const path: TPathD; precision: integer): TPathsD;
var
scale: double;
tmpPath: TPath64;
tmpPaths: TPaths64;
rec: TRect64;
begin
Result := nil;
if not rect.Intersects(GetBounds(path)) then Exit;
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPath := ScalePath(path, scale);
tmpPaths := RectClipLines(rec, tmpPath);
Result := ScalePathsD(tmpPaths, 1/scale);
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRectD; const paths: TPathsD;
precision: integer = 2): TPathsD;
var
scale: double;
tmpPaths: TPaths64;
rec: TRect64;
begin
Result := nil;
if rect.IsEmpty then Exit;
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPaths := ScalePaths(paths, scale);
with TRectClipLines64.Create(rec) do
try
tmpPaths := Execute(tmpPaths);
finally
Free;
end;
Result := ScalePathsD(tmpPaths, 1/scale);
end;
//------------------------------------------------------------------------------
function TranslatePath(const path: TPath64; dx, dy: Int64): TPath64;
var
i, len: integer;
begin
len := length(path);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i].x := path[i].x + dx;
result[i].y := path[i].y + dy;
end;
end;
//------------------------------------------------------------------------------
function TranslatePath(const path: TPathD; dx, dy: double): TPathD;
var
i, len: integer;
begin
len := length(path);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i].x := path[i].x + dx;
result[i].y := path[i].y + dy;
end;
end;
//------------------------------------------------------------------------------
function TranslatePaths(const paths: TPaths64; dx, dy: Int64): TPaths64;
var
i, len: integer;
begin
len := length(paths);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i] := TranslatePath(paths[i], dx, dy);
end;
end;
//------------------------------------------------------------------------------
function TranslatePaths(const paths: TPathsD; dx, dy: double): TPathsD;
var
i, len: integer;
begin
len := length(paths);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i] := TranslatePath(paths[i], dx, dy);
end;
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const pattern, path: TPath64;
pathIsClosed: Boolean): TPaths64;
begin
Result := Clipper.Minkowski.MinkowskiSum(pattern, path, pathIsClosed);
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const pattern, path: TPathD;
pathIsClosed: Boolean): TPathsD;
begin
Result := Clipper.Minkowski.MinkowskiSum(pattern, path, pathIsClosed);
end;
//------------------------------------------------------------------------------
function PathToString(const p: TPath64;
indentSpaces: integer; pointsPerRow: integer): string;
var
i, highI: Integer;
spaces: string;
begin
spaces := StringOfChar(' ', indentSpaces);
Result := spaces;
highI := high(p);
if highI < 0 then Exit;
for i := 0 to highI -1 do
begin
Result := Result + format('%d,%d, ',[p[i].X,p[i].Y]);
if (pointsPerRow > 0) and ((i + 1) mod pointsPerRow = 0) then
Result := Result + #10 + spaces;
end;
Result := Result + format('%d,%d',[p[highI].X,p[highI].Y]);
end;
//------------------------------------------------------------------------------
function PathToString(const p: TPathD; decimals: integer;
indentSpaces: integer; pointsPerRow: integer): string;
var
i, highI: Integer;
spaces: string;
begin
spaces := StringOfChar(' ', indentSpaces);
Result := '';
highI := high(p);
if highI < 0 then Exit;
for i := 0 to highI -1 do
Result := Result + format('%1.*n,%1.*n, ',
[decimals, p[i].X, decimals, p[i].Y]);
Result := Result + format('%1.*n,%1.*n',[
decimals, p[highI].X, decimals, p[highI].Y]);
end;
//------------------------------------------------------------------------------
function PathsToString(const p: TPaths64;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string;
var
i: integer;
begin
Result := '';
for i := 0 to High(p) do
Result := Result + PathToString(p[i], indentSpaces, pointsPerRow) + #10#10;
end;
//------------------------------------------------------------------------------
function PathsToString(const p: TPathsD; decimals: integer;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string;
var
i: integer;
begin
Result := '';
for i := 0 to High(p) do
Result := Result + PathToString(p[i], indentSpaces, pointsPerRow) + #10#10;
end;
//------------------------------------------------------------------------------
procedure ShowPolyPathStructure64(pp: TPolyPath64; level: integer;
strings: TStrings);
var
i: integer;
spaces, plural: string;
begin
spaces := StringOfChar(' ', level * 2);
if pp.Count = 1 then plural := '' else plural := 's';
if pp.IsHole then
strings.Add(Format('%sA hole containing %d polygon%s', [spaces, pp.Count, plural]))
else
strings.Add(Format('%sA polygon containing %d hole%s', [spaces, pp.Count, plural]));
for i := 0 to pp.Count -1 do
if pp.child[i].Count> 0 then
ShowPolyPathStructure64(pp.child[i], level + 1, strings);
end;
//------------------------------------------------------------------------------
procedure ShowPolyTreeStructure(polytree: TPolyTree64; strings: TStrings);
var
i: integer;
begin
if polytree.Count = 1 then
strings.Add('Polytree with just 1 polygon.') else
strings.Add(Format('Polytree with just %d polygons.', [polytree.Count]));
for i := 0 to polytree.Count -1 do
if polytree[i].Count > 0 then
ShowPolyPathStructure64(polytree[i], 1, strings);
end;
//------------------------------------------------------------------------------
procedure ShowPolyPathStructureD(pp: TPolyPathD; level: integer; strings: TStrings);
var
i: integer;
spaces, plural: string;
begin
spaces := StringOfChar(' ', level * 2);
if pp.Count = 1 then plural := '' else plural := 's';
if pp.IsHole then
strings.Add(Format('%sA hole containing %d polygon%s', [spaces, pp.Count, plural]))
else
strings.Add(Format('%sA polygon containing %d hole%s', [spaces, pp.Count, plural]));
for i := 0 to pp.Count -1 do
if pp.child[i].Count> 0 then
ShowPolyPathStructureD(pp.child[i], level + 1, strings);
end;
//------------------------------------------------------------------------------
procedure ShowPolyTreeStructure(polytree: TPolyTreeD; strings: TStrings);
var
i: integer;
begin
if polytree.Count = 1 then
strings.Add('Polytree with just 1 polygon.') else
strings.Add(Format('Polytree with just %d polygons.', [polytree.Count]));
for i := 0 to polytree.Count -1 do
if polytree[i].Count > 0 then
ShowPolyPathStructureD(polytree[i], 1, strings);
end;
//------------------------------------------------------------------------------
function TrimCollinear(const p: TPath64; isOpenPath: Boolean = false): TPath64;
var
i,j, len: integer;
begin
len := Length(p);
i := 0;
if not isOpenPath then
begin
while (i < len -1) and
IsCollinear(p[len -1], p[i], p[i+1]) do inc(i);
while (i < len -1) and
IsCollinear(p[len -2], p[len -1], p[i]) do dec(len);
end;
if (len - i < 3) then
begin
if not isOpenPath or (len < 2) or PointsEqual(p[0], p[1]) then
Result := nil else
Result := p;
Exit;
end;
SetLength(Result, len -i);
Result[0] := p[i];
j := 0;
for i := i+1 to len -2 do
if not IsCollinear(result[j], p[i], p[i+1]) then
begin
inc(j);
result[j] := p[i];
end;
if isOpenPath then
begin
inc(j);
result[j] := p[len-1];
end
else if not IsCollinear(result[j], p[len-1], result[0]) then
begin
inc(j);
result[j] := p[len-1];
end else
begin
while (j > 1) and
IsCollinear(result[j-1], result[j], result[0]) do dec(j);
if j < 2 then j := -1;
end;
SetLength(Result, j +1);
end;
//------------------------------------------------------------------------------
function TrimCollinear(const path: TPathD;
precision: integer; isOpenPath: Boolean = false): TPathD;
var
p: TPath64;
scale: double;
begin
scale := power(10, precision);
p := ScalePath(path, scale);
p := TrimCollinear(p, isOpenPath);
Result := ScalePathD(p, 1/scale);
end;
//------------------------------------------------------------------------------
function PointInPolygon(const pt: TPoint64;
const polygon: TPath64): TPointInPolygonResult;
begin
Result := Clipper.Core.PointInPolygon(pt, polygon);
end;
//------------------------------------------------------------------------------
function DistanceSqrd(const pt1, pt2: TPoint64): double;
{$IFDEF INLINE} inline; {$ENDIF}
var
x1,y1,x2,y2: double;
begin
// nb: older versions of Delphi don't allow explicit typcasting
x1 := pt1.X; y1 := pt1.Y;
x2 := pt2.X; y2 := pt2.Y;
result := Sqr(x1 - x2) + Sqr(y1 - y2);
end;
//------------------------------------------------------------------------------
function PerpendicDistSqrd(const pt, line1, line2: TPoint64): double;
{$IFDEF INLINE} inline; {$ENDIF}
var
a,b,c,d: double;
begin
a := pt.X - line1.X;
b := pt.Y - line1.Y;
c := line2.X - line1.X;
d := line2.Y - line1.Y;
result := Iif((c = 0) and (d = 0),
0, Sqr(a * d - c * b) / (c * c + d * d));
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
type
PSimplifyRec = ^TSimplifyRec;
TSimplifyRec = record
pt : TPoint64;
pdSqrd : double;
prev : PSimplifyRec;
next : PSimplifyRec;
//isEnd : Boolean;
end;
function SimplifyPath(const path: TPath64;
shapeTolerance: double; isClosedPath: Boolean): TPath64;
var
i, highI, minHigh: integer;
tolSqrd: double;
srArray: array of TSimplifyRec;
first, last: PSimplifyRec;
begin
Result := nil;
highI := High(path);
minHigh := Iif(isClosedPath, 2, 1);
if highI < minHigh then Exit;
SetLength(srArray, highI +1);
with srArray[0] do
begin
pt := path[0];
prev := @srArray[highI];
next := @srArray[1];
pdSqrd := Iif(isClosedPath,
PerpendicDistSqrd(path[0], path[highI], path[1]), invalidD);
end;
with srArray[highI] do
begin
pt := path[highI];
prev := @srArray[highI-1];
next := @srArray[0];
pdSqrd := Iif(isClosedPath,
PerpendicDistSqrd(path[highI], path[highI-1], path[0]), invalidD);
end;
for i := 1 to highI -1 do
with srArray[i] do
begin
pt := path[i];
prev := @srArray[i-1];
next := @srArray[i+1];
pdSqrd := PerpendicDistSqrd(path[i], path[i-1], path[i+1]);
end;
first := @srArray[0];
last := first.prev;
tolSqrd := Sqr(shapeTolerance);
while first <> last do
begin
if (first.pdSqrd > tolSqrd) or
(first.next.pdSqrd < first.pdSqrd) then
begin
first := first.next;
Continue;
end;
dec(highI);
first.prev.next := first.next;
first.next.prev := first.prev;
last := first.prev;
first := last.next;
if first.next = first.prev then break;
last.pdSqrd := PerpendicDistSqrd(last.pt, last.prev.pt, first.pt);
first.pdSqrd := PerpendicDistSqrd(first.pt, last.pt, first.next.pt);
end;
if highI < minHigh then Exit;
if not isClosedPath then first := @srArray[0];
SetLength(Result, highI +1);
for i := 0 to HighI do
begin
Result[i] := first.pt;
first := first.next;
end;
end;
//------------------------------------------------------------------------------
function SimplifyPaths(const paths: TPaths64;
shapeTolerance: double; isClosedPath: Boolean): TPaths64;
var
i, len: integer;
begin
len := Length(paths);
SetLength(Result, len);
for i := 0 to len -1 do
result[i] := SimplifyPath(paths[i], shapeTolerance, isClosedPath);
end;
//------------------------------------------------------------------------------
function SimplifyPath(const path: TPathD; shapeTolerance: double;
isClosedPath: Boolean; decimalPrecision: integer): TPathD;
var
p: TPath64;
scale: double;
begin
scale := power(10, decimalPrecision);
p := ScalePath(path, scale);
p := SimplifyPath(p, shapeTolerance, isClosedPath);
Result := ScalePathD(p, 1/scale);
end;
//------------------------------------------------------------------------------
function SimplifyPaths(const paths: TPathsD; shapeTolerance: double;
isClosedPath: Boolean; decimalPrecision: integer): TPathsD;
var
pp: TPaths64;
scale: double;
begin
scale := power(10, decimalPrecision);
pp := ScalePaths(paths, scale);
pp := SimplifyPaths(pp, shapeTolerance, isClosedPath);
Result := ScalePathsD(pp, 1/scale);
end;
//------------------------------------------------------------------------------
end.

View file

@ -1,197 +0,0 @@
unit Img32.Clipper2;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.7 *
* Date : 6 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2025 *
* Purpose : Wrapper module for the Clipper library *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
interface
uses
Img32, Img32.Draw, Img32.Vector, Clipper.Offset;
//nb: InflatePath assumes that there's consistent winding where
//outer paths wind in one direction and inner paths in the other
type
TClipperEndType = Clipper.Offset.TEndType;
function ClipperEndType(endStyle: TEndStyle): TClipperEndType;
function InflatePath(const path: TPathD; delta: Double;
joinStyle: TJoinStyle = jsAuto; endType: TClipperEndType = etPolygon;
miterLimit: double = 2.0; arcTolerance: double = 0.0;
minEdgeLength: double = 0.25): TPathsD;
function InflatePaths(const paths: TPathsD; delta: Double;
joinStyle: TJoinStyle = jsAuto; endType: TClipperEndType = etPolygon;
miterLimit: double = 2.0; arcTolerance: double = 0.0;
minEdgeLength: double = 0): TPathsD;
//UnionPolygon: removes self-intersections
function UnionPolygon(const polygon: TPathD;
fillRule: TFillRule): TPathsD;
function UnionPolygons(const polygons: TPathsD;
fillRule: TFillRule): TPathsD; overload;
function UnionPolygons(const polygon1, polygon2: TPathD;
fillRule: TFillRule): TPathsD; overload;
function UnionPolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD; overload;
function IntersectPolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
function DifferencePolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
const
etPolygon = Clipper.Offset.etPolygon;
etJoined = Clipper.Offset.etJoined;
etButt = Clipper.Offset.etButt;
etSquare = Clipper.Offset.etSquare;
etRound = Clipper.Offset.etRound;
implementation
uses Clipper, Clipper.Core, Clipper.Engine;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function ClipperEndType(endStyle: TEndStyle): TClipperEndType;
begin
case endStyle of
esPolygon: Result := etJoined;
esButt: Result := etButt;
esSquare: Result := etSquare;
else Result := etRound;
end;
end;
//------------------------------------------------------------------------------
function InflatePath(const path: Img32.TPathD;
delta: Double; joinStyle: TJoinStyle; endType: TClipperEndType;
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
var
paths: Img32.TPathsD;
begin
setLength(paths, 1);
paths[0] := path;
Result := InflatePaths(paths, delta, joinStyle, endType,
miterLimit, arcTolerance, minEdgeLength);
end;
//------------------------------------------------------------------------------
function InflatePaths(const paths: Img32.TPathsD;
delta: Double; joinStyle: TJoinStyle; endType: TClipperEndType;
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
var
jt: Clipper.Offset.TJoinType;
begin
case joinStyle of
jsSquare : jt := jtSquare;
jsButt : jt := jtBevel;
jsMiter : jt := jtMiter;
jsRound : jt := jtRound;
else if endType = etRound then jt := jtRound
else jt := jtSquare;
end;
Result := Img32.TPathsD(Clipper.InflatePaths(
Clipper.Core.TPathsD(paths), delta, jt, endType));
end;
//------------------------------------------------------------------------------
function UnionPolygon(const polygon: Img32.TPathD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathD(polygon));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function UnionPolygons(const polygons: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function UnionPolygons(const polygon1, polygon2: Img32.TPathD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathD(polygon1));
AddClip(Clipper.Core.TPathD(polygon2));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function UnionPolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons1));
AddClip(Clipper.Core.TPathsD(polygons2));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function IntersectPolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons1));
AddClip(Clipper.Core.TPathsD(polygons2));
Execute(ctIntersection,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function DifferencePolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons1));
AddClip(Clipper.Core.TPathsD(polygons2));
Execute(ctDifference,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
end.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,477 +0,0 @@
unit Img32.Fmt.SVG;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.7 *
* Date : 6 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2025 *
* Purpose : SVG file format extension for TImage32 *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
interface
{$I Img32.inc}
uses
{$IFDEF MSWINDOWS} Windows, {$ENDIF}
{$IF NOT DEFINED(NEWPOSFUNC) OR DEFINED(FPC)} StrUtils, {$IFEND}
{$IFDEF UNICODE} AnsiStrings, {$ENDIF}
SysUtils, Classes, Math,
{$IFDEF XPLAT_GENERICS} Generics.Collections, Generics.Defaults, {$ENDIF}
Img32, Img32.Vector, Img32.SVG.Core, Img32.SVG.Reader
{$IF DEFINED(USING_LCL)}, Types{$IFEND}
;
type
TImageFormat_SVG = class(TImageFormat)
public
class function IsValidImageStream(stream: TStream): Boolean; override;
function LoadFromStream(stream: TStream;
img32: TImage32; imgIndex: integer = 0): Boolean; override;
// SaveToStream: not implemented for SVG streams
procedure SaveToStream(stream: TStream;
img32: TImage32; quality: integer = 0); override;
class function CanCopyToClipboard: Boolean; override;
class function CopyToClipboard(img32: TImage32): Boolean; override;
class function CanPasteFromClipboard: Boolean; override;
class function PasteFromClipboard(img32: TImage32): Boolean; override;
end;
TSvgListObject = class
xml : string;
name : string;
end;
TSvgImageList32 = class(TInterfacedObj, INotifySender)
private
fReader : TSvgReader;
{$IFDEF XPLAT_GENERICS}
fList : TList<TSvgListObject>;
{$ELSE}
fList : TList;
{$ENDIF}
fDefWidth : integer;
fDefHeight : integer;
fRecipientList : TRecipients;
fUpdateCnt : integer;
{$IFDEF MSWINDOWS}
fResName : string;
procedure SetResName(const resName: string);
{$ENDIF}
procedure SetDefWidth(value: integer);
procedure SetDefHeight(value: integer);
protected
procedure Changed; virtual;
procedure BeginUpdate;
procedure EndUpdate;
procedure NotifyRecipients(notifyFlag: TImg32Notification);
public
constructor Create;
destructor Destroy; override;
procedure Clear;
function Count: integer;
function Find(const aName: string): integer;
procedure AddRecipient(recipient: INotifyRecipient);
procedure DeleteRecipient(recipient: INotifyRecipient);
function CreateImage(index: integer): TImage32;
procedure GetImage(index: integer; image: TImage32); overload;
procedure GetImage(index: integer; image: TImage32; out aName: string); overload;
procedure Add(const aName, xml: string);
procedure AddFromFile(const aName, filename: string);
procedure AddFromResource(const aName, resName: string; resType: PChar);
procedure Insert(index: integer; const name, xml: string);
procedure Move(currentIndex, newIndex: integer);
procedure Delete(index: integer);
property DefaultWidth: integer read fDefWidth write SetDefWidth;
property DefaultHeight: integer read fDefHeight write SetDefHeight;
{$IFDEF MSWINDOWS}
property ResourceName: string read fResName write SetResName;
{$ENDIF}
end;
implementation
//------------------------------------------------------------------------------
// Three routines used to enumerate a resource type
//------------------------------------------------------------------------------
function Is_IntResource(lpszType: PChar): Boolean;
begin
Result := NativeUInt(lpszType) shr 16 = 0;
end;
//------------------------------------------------------------------------------
function ResourceNameToString(lpszName: PChar): string;
begin
if Is_IntResource(lpszName) then
Result := '#' + IntToStr(NativeUInt(lpszName)) else
Result := lpszName;
end;
//------------------------------------------------------------------------------
function EnumResNameProc(hModule: HMODULE; lpszType, lpszName: PChar;
lParam: NativeInt): Boolean; stdcall;
var
n: string;
begin
n:= ResourceNameToString(lpszName);
TSvgImageList32(lParam).AddFromResource(n, n, lpszType);
Result := true;
end;
//------------------------------------------------------------------------------
// TSvgImageList32
//------------------------------------------------------------------------------
constructor TSvgImageList32.Create;
begin
fReader := TSvgReader.Create;
{$IFDEF XPLAT_GENERICS}
fList := TList<TSvgListObject>.Create;
{$ELSE}
fList := TList.Create;
{$ENDIF}
end;
//------------------------------------------------------------------------------
destructor TSvgImageList32.Destroy;
begin
NotifyRecipients(inDestroy);
Clear;
fList.Free;
fReader.Free;
inherited;
end;
//------------------------------------------------------------------------------
{$IFDEF MSWINDOWS}
procedure TSvgImageList32.SetResName(const resName: string);
begin
if fResName = resName then Exit;
fResName := resName;
BeginUpdate;
try
Clear;
EnumResourceNames(HInstance, PChar(resName), @EnumResNameProc, lParam(self));
finally
EndUpdate;
end;
end;
//------------------------------------------------------------------------------
{$ENDIF}
function TSvgImageList32.Count: integer;
begin
result := fList.Count;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.Clear;
var
i: integer;
begin
for i := 0 to fList.Count -1 do
TSvgListObject(fList[i]).Free;
fList.Clear;
Changed;
end;
//------------------------------------------------------------------------------
function TSvgImageList32.Find(const aName: string): integer;
var
i: integer;
begin
for i := 0 to fList.Count -1 do
with TSvgListObject(fList[i]) do
if SameText(name, aName) then
begin
Result := i;
Exit;
end;
Result := -1;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.GetImage(index: integer; image: TImage32; out aName: string);
begin
if not Assigned(image) or (index < 0) or (index >= count) then Exit;
if image.IsEmpty then
image.SetSize(fDefWidth, fDefHeight);
with TSvgListObject(fList[index]) do
begin
fReader.LoadFromString(xml);
aName := name;
end;
fReader.DrawImage(image, true);
end;
//------------------------------------------------------------------------------
function TSvgImageList32.CreateImage(index: integer): TImage32;
begin
Result := TImage32.Create(DefaultWidth, DefaultHeight);
GetImage(index, Result);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.GetImage(index: integer; image: TImage32);
var
dummy: string;
begin
GetImage(index, image, dummy);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.Add(const aName, xml: string);
begin
Insert(count, aName, xml);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.AddFromFile(const aName, filename: string);
begin
if not FileExists(filename) then Exit;
with TStringList.Create do
try
LoadFromFile(filename);
Self.Insert(Self.Count, aName, Text);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.AddFromResource(const aName, resName: string; resType: PChar);
var
rs: TResourceStream;
ansi: AnsiString;
begin
rs := TResourceStream.Create(hInstance, resName, resType);
try
SetLength(ansi, rs.Size);
rs.Read(ansi[1], rs.Size);
Self.Insert(Self.Count, aName, string(ansi));
finally
rs.Free;
end;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.Insert(index: integer; const name, xml: string);
var
lo: TSvgListObject;
begin
if index < 0 then index := 0
else if index > Count then index := Count;
lo := TSvgListObject.Create;
lo.name := name;
lo.xml := xml;
fList.Insert(index, lo);
Changed;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.Move(currentIndex, newIndex: integer);
begin
fList.Move(currentIndex, newIndex);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.Delete(index: integer);
begin
TSvgListObject(fList[index]).Free;
fList.Delete(index);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.BeginUpdate;
begin
inc(fUpdateCnt);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.EndUpdate;
begin
dec(fUpdateCnt);
if fUpdateCnt = 0 then Changed;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.Changed;
begin
if (fUpdateCnt = 0) then
NotifyRecipients(inStateChange);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.SetDefWidth(value: integer);
begin
if fDefWidth = value then Exit;
fDefWidth := value;
Changed;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.SetDefHeight(value: integer);
begin
if fDefHeight = value then Exit;
fDefHeight := value;
Changed;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.AddRecipient(recipient: INotifyRecipient);
var
len: integer;
begin
len := Length(fRecipientList);
SetLength(fRecipientList, len+1);
fRecipientList[len] := Recipient;
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.DeleteRecipient(recipient: INotifyRecipient);
var
i, highI: integer;
begin
highI := High(fRecipientList);
i := highI;
while (i >= 0) and (fRecipientList[i] <> Recipient) do dec(i);
if i < 0 then Exit;
if i < highI then
System.Move(fRecipientList[i+1], fRecipientList[i],
(highI - i) * SizeOf(INotifyRecipient));
SetLength(fRecipientList, highI);
end;
//------------------------------------------------------------------------------
procedure TSvgImageList32.NotifyRecipients(notifyFlag: TImg32Notification);
var
i: integer;
begin
if fUpdateCnt > 0 then Exit;
for i := High(fRecipientList) downto 0 do
try
//when destroying in a finalization section
//it's possible for recipients to have been destroyed
//without their destructors being called.
fRecipientList[i].ReceiveNotification(self, notifyFlag);
except
end;
end;
//------------------------------------------------------------------------------
// Loading (reading) SVG images from file ...
//------------------------------------------------------------------------------
function TImageFormat_SVG.LoadFromStream(stream: TStream;
img32: TImage32; imgIndex: integer = 0): Boolean;
var
r: TRectWH;
sx: double;
begin
with TSvgReader.Create do
try
Result := LoadFromStream(stream);
if not Result then Exit;
r := RootElement.viewboxWH;
img32.BeginUpdate;
try
if img32.IsEmpty then
begin
with RootElement do
if Width.IsValid and Height.IsValid then
img32.SetSize(
Round(Width.GetValue(defaultSvgWidth, 0)),
Round(Height.GetValue(defaultSvgHeight, 0)))
else if not r.IsEmpty then
img32.SetSize(Round(r.Width), Round(r.Height))
else
img32.SetSize(defaultSvgWidth, defaultSvgHeight);
end
else if not r.IsEmpty then
begin
// scale the SVG to best fit the image dimensions
sx := GetScaleForBestFit(r.Width, r.Height, img32.Width, img32.Height);
img32.SetSize(Round(r.Width * sx), Round(r.Height * sx));
end;
//draw the SVG image to fit inside the canvas
DrawImage(img32, True);
finally
img32.EndUpdate;
end;
finally
Free;
end;
end;
//------------------------------------------------------------------------------
// Saving (writing) SVG images to file (not currently implemented) ...
//------------------------------------------------------------------------------
class function TImageFormat_SVG.IsValidImageStream(stream: TStream): Boolean;
var
i, savedPos, len: integer;
buff: array [1..1024] of AnsiChar;
begin
Result := false;
savedPos := stream.Position;
len := Min(1024, stream.Size - savedPos);
stream.Read(buff[1], len);
stream.Position := savedPos;
for i := 1 to len -4 do
begin
if buff[i] < #9 then Exit
else if (buff[i] = '<') and
(buff[i +1] = 's') and
(buff[i +2] = 'v') and
(buff[i +3] = 'g') then
begin
Result := true;
break;
end;
end;
end;
//------------------------------------------------------------------------------
procedure TImageFormat_SVG.SaveToStream(stream: TStream;
img32: TImage32; quality: integer);
begin
//not enabled
end;
//------------------------------------------------------------------------------
class function TImageFormat_SVG.CanCopyToClipboard: Boolean;
begin
Result := false;
end;
//------------------------------------------------------------------------------
class function TImageFormat_SVG.CopyToClipboard(img32: TImage32): Boolean;
begin
Result := false;
end;
//------------------------------------------------------------------------------
class function TImageFormat_SVG.CanPasteFromClipboard: Boolean;
begin
Result := false;
end;
//------------------------------------------------------------------------------
class function TImageFormat_SVG.PasteFromClipboard(img32: TImage32): Boolean;
begin
Result := false;
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
initialization
TImage32.RegisterImageFormatClass('SVG', TImageFormat_SVG, cpLow);
end.

View file

@ -1,863 +0,0 @@
unit Img32.Resamplers;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.8 *
* Date : 10 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2025 *
* Purpose : For image transformations (scaling, rotating etc.) *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
interface
{$I Img32.inc}
uses
SysUtils, Classes, Math, Img32;
// Premultiplies the alpha channel into the color channels from pSrc and stores
// it into pDst. pSrc and pDst can be the same pointer.
procedure PremultiplyAlpha(pSrc, pDst: PARGB; count: nativeint); overload;
// BoxDownSampling: As the name implies, is only intended for image
// down-sampling (ie shrinking images) where it performs a little better
// than other resamplers which tend toward pixelation. Nevertheless, this
// routine is inferior to other resamplers when performing other
// types of transformations (ie when enlarging, rotating, and skewing images),
// so BoxDownSampling should not be used as a general purpose resampler.
procedure BoxDownSampling(Image: TImage32; scale: double); overload;
procedure BoxDownSampling(Image: TImage32; scaleX, scaleY: double); overload;
procedure BoxDownSampling(Image: TImage32; newWidth, newHeight: Integer); overload;
procedure BoxDownSampling(Image, TargetImage: TImage32; scale: double); overload;
procedure BoxDownSampling(Image, TargetImage: TImage32; scaleX, scaleY: double); overload;
procedure BoxDownSampling(Image, TargetImage: TImage32; newWidth, newHeight: Integer); overload;
procedure NearestNeighborResize(Image: TImage32; newWidth, newHeight: Integer); overload;
procedure NearestNeighborResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer); overload;
procedure ResamplerResize(Image: TImage32; newWidth, newHeight: Integer); overload;
procedure ResamplerResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer); overload;
// The following general purpose resamplers are registered below:
// function NearestResampler(img: TImage32; x, y: double): TColor32;
// function BilinearResample(img: TImage32; x, y: double): TColor32;
// function BicubicResample (img: TImage32; x, y: double): TColor32;
// function WeightedBilinear(img: TImage32; x, y: double): TColor32;
implementation
uses
Img32.Transform;
var
sinWeighted: array [0..255] of Cardinal;
//------------------------------------------------------------------------------
// NearestNeighbor resampler
//------------------------------------------------------------------------------
function NearestResampler(img: TImage32; x, y: double): TColor32;
var
xi, yi: integer;
begin
xi := Round(x); yi := Round(y);
if (xi < 0) or (yi < 0) or (xi >= img.Width) or (yi >= img.Height) then
Result := clNone32 else
Result := img.Pixels[xi + yi * img.Width];
end;
//------------------------------------------------------------------------------
// BiLinear resampler
//------------------------------------------------------------------------------
function BilinearResample(img: TImage32; x, y: double): TColor32;
var
iw, ih: integer;
xx, yy, xR, yB: integer;
weight: integer;
pixels: TArrayOfColor32;
weightedColor: TWeightedColor;
xf, yf: double;
begin
iw := img.Width;
ih := img.Height;
pixels := img.Pixels;
if (x < 0) then
begin
if (x < -0.5) then
begin
xf := -x;
end else
begin
x := 0;
xf := 0;
end;
xx := 0;
xR := 0;
end else
begin
xf := 1-frac(x);
if x >= iw -1 then
begin
xx := iw -1;
xR := xx;
end else
begin
xx := Trunc(x);
xR := xx +1;
end;
end;
if (y < 0) then
begin
if (y < -0.5) then
begin
yf := -y;
end else
begin
y := 0;
yf := 0;
end;
yy := 0;
yB := 0;
end else
begin
yf := 1-frac(y);
if y >= ih -1 then
begin
yy := ih -1;
yB := yy;
end else
begin
yy := Trunc(y);
yB := yy +1;
end;
end;
weightedColor.Reset;
weight := Round(xf * yf * 255); //top-left
if weight > 0 then
begin
if (x < 0) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yy * iw], weight);
end;
weight := Round((1-xf) * yf * 255); //top-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yy * iw], weight);
end;
weight := Round(xf * (1-yf) * 255); //bottom-left
if weight > 0 then
begin
if (x < 0) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yB * iw], weight);
end;
weight := Round((1-xf) * (1-yf) * 255); //bottom-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yB * iw], weight);
end;
Result := weightedColor.Color;
end;
//------------------------------------------------------------------------------
// WeightedBilinearResample: A modified bilinear resampler that's
// less blurry but also a little more pixelated.
function WeightedBilinearResample(img: TImage32; x, y: double): TColor32;
var
iw, ih: integer;
xx, yy, xR, yB: integer;
weight: integer;
pixels: TArrayOfColor32;
weightedColor: TWeightedColor;
xf, yf: double;
begin
iw := img.Width;
ih := img.Height;
pixels := img.Pixels;
if (x < 0) then
begin
if (x < -0.5) then
begin
xf := -x;
end else
begin
x := 0;
xf := 0;
end;
xx := 0;
xR := 0;
end else
begin
xf := 1-frac(x);
if x >= iw -1 then
begin
xx := iw -1;
xR := xx;
end else
begin
xx := Trunc(x);
xR := xx +1;
end;
end;
if (y < 0) then
begin
if (y < -0.5) then
begin
yf := -y;
end else
begin
y := 0;
yf := 0;
end;
yy := 0;
yB := 0;
end else
begin
yf := 1-frac(y);
if y >= ih -1 then
begin
yy := ih -1;
yB := yy;
end else
begin
yy := Trunc(y);
yB := yy +1;
end;
end;
weightedColor.Reset;
weight := sinWeighted[Round(xf * yf * 255)]; //top-left
if weight > 0 then
begin
if (x < 0) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yy * iw], weight);
end;
weight := sinWeighted[Round((1-xf) * yf * 255)]; //top-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yy * iw], weight);
end;
weight := sinWeighted[Round(xf * (1-yf) * 255)]; //bottom-left
if weight > 0 then
begin
if (x < 0) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yB * iw], weight);
end;
weight := sinWeighted[Round((1-xf) * (1-yf) * 255)]; //bottom-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yB * iw], weight);
end;
Result := weightedColor.Color;
end;
//------------------------------------------------------------------------------
// BiCubic resampler
//------------------------------------------------------------------------------
type
TBiCubicEdgeAdjust = (eaCenterFill,
eaPreStart, eaStart, eaPostStart, eaEnd, eaPostEnd);
var
byteFrac: array [0..255] of double;
byteFracSq: array [0..255] of double;
byteFracCubed: array [0..255] of double;
//------------------------------------------------------------------------------
function CubicInterpolate(aclr: PColor32;
t: Byte; bce: TBiCubicEdgeAdjust): TColor32;
var
a,b,c,d: PARGB;
q: TARGB;
aa, bb, m0, m1: double;
t1, t2, t3: double;
res: TARGB absolute Result;
const
clTrans: TColor32 = clNone32;
begin
case bce of
eaPreStart:
begin
a := @clTrans;
b := @clTrans;
c := PARGB(aclr);
d := c;
end;
eaStart:
begin
Result := aclr^;
Exit;
end;
eaPostStart:
begin
a := PARGB(aclr);
b := a;
Inc(aclr);
c := PARGB(aclr);
d := c;
end;
eaEnd:
begin
Inc(aclr);
Result := aclr^;
Exit;
end;
eaPostEnd:
begin
Inc(aclr);
a := PARGB(aclr);
b := a;
c := @clTrans;
d := @clTrans;
end;
else
begin
a := PARGB(aclr);
Inc(aclr);
b := PARGB(aclr);
Inc(aclr);
c := PARGB(aclr);
Inc(aclr);
d := PARGB(aclr);
end;
end;
if (b.A = 0) and (c.A = 0) then
begin
result := clNone32;
Exit;
end
else if (b = c) then
begin
result := b.Color;
Exit;
end
else if b.A = 0 then
begin
// ignore differences between b & c's color channels
q := c^;
q.A := 0;
b := @q;
end;
if c.A = 0 then
begin
// ignore differences between b & c's color channels
q := b^;
q.A := 0;
c := @q;
end;
t1 := byteFrac[t];
t2 := byteFracSq[t];
t3 := byteFracCubed[t];
// find piecewise bicubic interpolation between pixel_b and pixel_c
// at point 't' (as byte div 255) ...
// given parametric equation aa(t^3) + bb(t^2) + cc(t)+ dd = 0
// where t(0) = pixel_b and t(1) = pixel_c
// let m1 = slope at pixel_b (using slope of pixel_c - pixel_a)
// let m2 = slope at pixel_c (using slope of pixel_d - pixel_b)
// then t(0) = aa(0^3) + bb(0^2) + cc(0) + dd = dd
// then t(1) = aa(1^3) + bb(1^2) + cc(1) + dd = aa + bb + cc + dd
// differentiating parametic equation at t'(0) and t'(1) ...
// t'(0) = m0 = 3*aa(0^2) + 2*bb(0) + cc = cc
// t'(1) = m1 = 3*aa(1^2) + 2*bb(1) + cc = 3*aa + 2*bb + cc
// t(0) = dd ::EQ1
// t(1) = aa+bb+cc+dd ::EQ2
// t'(0) = cc ::EQ3
// t'(1) = 3*aa + 2*bb + cc ::EQ4
// solving simultaneous equations
// aa = 2*t(0) -2*t(1) +t'(0) +t'(1)
// bb = 3*t(1) -3*t(0) -2*t'(0) -t'(1)
// cc = m0
// dd = t(0)
m0 {aka t'(0)} := (c.A - a.A) /2;
m1 {aka t'(1)} := (d.A - b.A) /2;
aa := 2*b.A - 2*c.A + m0 + m1;
bb := 3*c.A -3*b.A -2*m0 - m1;
Res.A := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.A);
m0 := (c.R - a.R) /2;
m1 := (d.R - b.R) /2;
aa := 2*b.R - 2*c.R + m0 + m1;
bb := 3*c.R -3*b.R -2*m0 - m1;
Res.R := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.R);
m0 := (c.G - a.G) /2;
m1 := (d.G - b.G) /2;
aa := 2*b.G - 2*c.G + m0 + m1;
bb := 3*c.G -3*b.G -2*m0 - m1;
Res.G := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.G);
m0 := (c.B - a.B) /2;
m1 := (d.B - b.B) /2;
aa := 2*b.B - 2*c.B + m0 + m1;
bb := 3*c.B -3*b.B -2*m0 - m1;
Res.B := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.B);
end;
//------------------------------------------------------------------------------
function BicubicResample(img: TImage32; x, y: double): TColor32;
var
i, pi, iw, ih, last: Integer;
c: array[0..3] of TColor32;
xFrac, yFrac: byte;
bceX, bceY: TBiCubicEdgeAdjust;
begin
iw := img.Width;
ih := img.Height;
last := iw * ih -1;
if x < 1 then
begin
if x < -0.5 then
begin
xFrac := Round((1+x) *255);
bceX := eaPreStart;
end
else if (x < 0) or
((iw = 1) and (x < 0.5)) then
begin
x := 0;
xFrac := 0;
bceX := eaStart;
end
else if (iw = 1) and (x > 0.5) then
begin
// the following is a workaround to avoid the increment in eaPostEnd
bceX := eaPreStart; // ie anti-aliase but without increment
xFrac := Round((1-x) *127); // reversed because 'end' not 'start'
end else
begin
xFrac := Round(frac(x) *255);
bceX := eaPostStart;
end;
end else
begin
xFrac := Round(frac(x) *255);
if x > iw - 1 then
begin
if x > iw - 0.5 then bceX := eaPostEnd
else bceX := eaEnd
end
else
bceX := eaCenterFill;
end;
if y < 1 then
begin
if y < -0.5 then
begin
yFrac := Round((1+y) *255);
bceY := eaPreStart;
end
else if (y < 0) or
((ih = 1) and (y < 0.5)) then
begin
y := 0;
yFrac := 0;
bceY := eaStart;
end
else if (ih = 1) and (y > 0.5) then
begin
// the following is a workaround to avoid the increment in eaPostEnd
bceY := eaPreStart; // ie anti-aliase but without increment
yFrac := Round((1-y) *127); // reversed because 'end' not 'start'
end else
begin
yFrac := Round(frac(y) *255);
bceY := eaPostStart;
end;
end else
begin
yFrac := Round(frac(y) *255);
if y > ih - 1 then
begin
if y > ih - 0.5 then bceY := eaPostEnd
else bceY := eaEnd
end
else
bceY := eaCenterFill;
end;
x := Max(0, Min(iw -1, x -1));
y := Max(0, Min(ih -1, y -1));
pi := Trunc(y) * iw + Trunc(x);
for i := 0 to 3 do
begin
c[i] := CubicInterpolate(@img.Pixels[pi], xFrac, bceX);
inc(pi, iw);
if pi > last then break;
end;
Result := CubicInterpolate(@c[0], yFrac, bceY);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{$RANGECHECKS OFF} // negative index usage for Delphi 7-2007
procedure PremultiplyAlpha(pSrc, pDst: PARGB; count: nativeint);
var
a: byte;
tab: PByteArray;
c: TColor32;
s, d: PColor32Array;
begin
if count = 0 then exit;
// Use negative index trick
inc(pSrc, count);
inc(pDst, count);
count := -count;
// This function is optmized with the assumption that if a pixel has a certain
// alpha channel, then the propability that the following pixels have the same
// alpha channel, is very high.
c := PColor32Array(pSrc)[count];
a := c shr 24;
while True do
begin
case a of
0: // Special handling for 0 => color becomes black
begin
// Win32: Load stack variable into CPU register
s := PColor32Array(pSrc);
d := PColor32Array(pDst);
while True do
begin
d[count] := 0;
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if a <> 0 then break;
end;
end;
255: // Special handling for 255 => no color change
begin
// Win32: Load stack variable into CPU register
s := PColor32Array(pSrc);
d := PColor32Array(pDst);
if s = d then // if source=dest, we can skip writing to d
begin
while True do
begin
//d[count] := c; // skip the write
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if a <> 255 then break;
end;
end
else
begin
while True do
begin
d[count] := c;
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if a <> 255 then break;
end;
end;
end;
else
// Premultiply the alpha channel
// Win32: Load stack variable into CPU register
s := PColor32Array(pSrc);
// Win32: This line "breaks" Delphi's register allocator
//d := PColor32Array(pDst);
while True do
begin
tab := @MulTable[a];
c := (c and $FF000000) or
(tab[Byte(c shr 16)] shl 16) or
(tab[Byte(c shr 8)] shl 8) or
(tab[Byte(c )] );
//d[count] := c;
PColor32Array(pDst)[count] := c;
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if (a = 0) or (a = 255) then break;
end;
end;
end;
end;
{$IFDEF RANGECHECKS_ENABLED}
{$RANGECHECKS ON}
{$ENDIF RANGECHECKS_ENABLED}
//------------------------------------------------------------------------------
// BoxDownSampling and related functions
//------------------------------------------------------------------------------
function GetWeightedColor(const srcBits: TArrayOfColor32;
x256, y256, xx256, yy256, maxX: Integer): TColor32;
var
i, j, xi, yi, xxi, yyi, weight: Integer;
xf, yf, xxf, yyf: cardinal;
color: TWeightedColor;
begin
//This function performs 'box sampling' and differs from GetWeightedPixel
//(bilinear resampling) in one important aspect - it accommodates weighting
//any number of pixels (rather than just adjacent pixels) and this produces
//better image quality when significantly downsizing.
//Note: there's no range checking here, so the precondition is that the
//supplied boundary values are within the bounds of the srcBits array.
color.Reset;
xi := x256 shr 8; xf := x256 and $FF;
yi := y256 shr 8; yf := y256 and $FF;
xxi := xx256 shr 8; xxf := xx256 and $FF;
yyi := yy256 shr 8; yyf := yy256 and $FF;
//1. average the corners ...
weight := (($100 - xf) * ($100 - yf)) shr 8;
color.Add(srcBits[xi + yi * maxX], weight);
weight := (xxf * ($100 - yf)) shr 8;
if (weight <> 0) then color.Add(srcBits[xxi + yi * maxX], weight);
weight := (($100 - xf) * yyf) shr 8;
if (weight <> 0) then color.Add(srcBits[xi + yyi * maxX], weight);
weight := (xxf * yyf) shr 8;
if (weight <> 0) then color.Add(srcBits[xxi + yyi * maxX], weight);
//2. average the edges
if (yi +1 < yyi) then
begin
xf := $100 - xf;
for i := yi + 1 to yyi - 1 do
color.Add(srcBits[xi + i * maxX], xf);
if (xxf <> 0) then
for i := yi + 1 to yyi - 1 do
color.Add(srcBits[xxi + i * maxX], xxf);
end;
if (xi + 1 < xxi) then
begin
yf := $100 - yf;
for i := xi + 1 to xxi - 1 do
color.Add(srcBits[i + yi * maxX], yf);
if (yyf <> 0) then
for i := xi + 1 to xxi - 1 do
color.Add(srcBits[i + yyi * maxX], yyf);
end;
//3. average the non-fractional pixel 'internals' ...
for i := xi + 1 to xxi - 1 do
for j := yi + 1 to yyi - 1 do
color.Add(srcBits[i + j * maxX], $100);
//4. finally get the weighted color ...
if color.AddCount = 0 then
Result := srcBits[xi + yi * maxX] else
Result := color.Color;
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image: TImage32; scaleX, scaleY: double);
begin
BoxDownSampling(Image, Image, scaleX, scaleY);
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image: TImage32; scale: double);
begin
BoxDownSampling(Image, Image, scale);
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image: TImage32; newWidth, newHeight: Integer);
begin
BoxDownSampling(Image, Image, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image, TargetImage: TImage32; scaleX, scaleY: double);
begin
BoxDownSampling(Image, TargetImage,
Max(1, Integer(Round(Image.Width * scaleX))),
Max(1, Integer(Round(Image.Height * scaleY))));
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image, TargetImage: TImage32; scale: double);
begin
BoxDownSampling(Image, TargetImage,
Max(1, Integer(Round(Image.Width * scale))),
Max(1, Integer(Round(Image.Height * scale))));
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image, TargetImage: TImage32; newWidth, newHeight: Integer);
var
x,y, x256,y256,xx256,yy256: Integer;
sx,sy: double;
tmp: TArrayOfColor32;
pc: PColor32;
scaledX: TArrayOfInteger;
begin
sx := Image.Width/newWidth * 256;
sy := Image.Height/newHeight * 256;
NewColor32Array(tmp, newWidth * newHeight, True);
NewIntegerArray(scaledX, newWidth, True);
for x := 0 to newWidth -1 do
scaledX[x] := Round((x+1) * sx);
y256 := 0;
pc := @tmp[0];
for y := 0 to newHeight - 1 do
begin
x256 := 0;
yy256 := Round((y+1) * sy);
for x := 0 to newWidth - 1 do
begin
xx256 := scaledX[x];
pc^ := GetWeightedColor(Image.Pixels,
x256, y256, xx256, yy256, Image.Width);
x256 := xx256;
inc(pc);
end;
y256 := yy256;
end;
TargetImage.AssignPixelArray(tmp, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure NearestNeighborResize(Image: TImage32; newWidth, newHeight: Integer);
begin
NearestNeighborResize(Image, Image, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure NearestNeighborResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer);
var
x, y, offset: Integer;
scaledXi, scaledYiOffset: TArrayOfInteger;
tmp: TArrayOfColor32;
pc: PColor32;
pixels: TArrayOfColor32;
begin
//this NearestNeighbor code is slightly more efficient than
//the more general purpose one in Img32.Resamplers
if (newWidth = Image.Width) and (newHeight = Image.Height) then
begin
if TargetImage <> Image then TargetImage.Assign(Image);
Exit;
end;
NewColor32Array(tmp, newWidth * newHeight, True);
//get scaled X & Y values once only (storing them in lookup arrays) ...
NewIntegerArray(scaledXi, newWidth, True);
for x := 0 to newWidth -1 do
scaledXi[x] := (x * Image.Width) div newWidth;
NewIntegerArray(scaledYiOffset, newHeight, True);
SetLength(scaledYiOffset, newHeight);
for y := 0 to newHeight -1 do
//scaledYiOffset[y] := Round(y * Image.Height / newHeight) * Image.Width;
scaledYiOffset[y] := ((y * Image.Height) div newHeight) * Image.Width;
pc := @tmp[0];
pixels := Image.Pixels;
for y := 0 to newHeight - 1 do
begin
offset := scaledYiOffset[y];
for x := 0 to newWidth - 1 do
begin
pc^ := pixels[scaledXi[x] + offset];
inc(pc);
end;
end;
TargetImage.AssignPixelArray(tmp, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure ResamplerResize(Image: TImage32; newWidth, newHeight: Integer);
begin
ResamplerResize(Image, Image, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure ResamplerResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer);
var
mat: TMatrixD;
begin
mat := IdentityMatrix;
MatrixScale(mat, newWidth/Image.Width, newHeight/Image.Height);
AffineTransformImage(Image, TargetImage, mat);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
procedure InitByteExponents;
var
i: integer;
const
inv255 : double = 1/255;
inv255sqrd : double = 1/(255*255);
inv255cubed: double = 1/(255*255*255);
piDiv256 : double = Pi / 256;
begin
for i := 0 to 255 do
begin
byteFrac[i] := i *inv255;
byteFracSq[i] := i*i *inv255sqrd;
byteFracCubed[i] := i*i*i *inv255cubed;
sinWeighted[i] := Round((Sin(i * piDiv256 - Pi/2) +1) /2 * 255);
end;
end;
//------------------------------------------------------------------------------
initialization
InitByteExponents;
rNearestResampler := RegisterResampler(NearestResampler, 'NearestNeighbor');
rBilinearResampler := RegisterResampler(BilinearResample, 'Bilinear');
rBicubicResampler := RegisterResampler(BicubicResample, 'HermiteBicubic');
rWeightedBilinear := RegisterResampler(WeightedBilinearResample, 'WeightedBilinear');
DefaultResampler := rBilinearResampler;
end.

File diff suppressed because it is too large Load diff

View file

@ -1,205 +0,0 @@
const
hAmplitude = $DA119D26; // Amplitude
hArial = $EC47D4A0; // Arial
harithmetic = $978C7D6F; // arithmetic
hAtop = $7655315D; // Atop
hauto_045_start_045_reverse = $EE4545A2; // auto-start-reverse
hBackgroundAlpha = $DA55EB83; // BackgroundAlpha
hBackgroundImage = $0313D8C9; // BackgroundImage
hBaseline = $C7461648; // Baseline
hbaseline_045_shift = $56FA5107; // baseline-shift
hBevel = $BF36E150; // Bevel
hBold = $2F420533; // Bold
hBolder = $9C928BF1; // Bolder
hButt = $B619E60B; // Butt
hCDATA = $FF50BB67; // CDATA
hCircle = $C6AE4953; // Circle
hClass = $E45C07DD; // Class
hClip_045_path = $B6C7D97A; // Clip-path
hClippath = $241B0E0D; // Clippath
hcollapse = $22A7B0EC; // collapse
hColor = $E953FD29; // Color
hCurrentColor = $5B8F31B0; // CurrentColor
hCx = $B5177A89; // Cx
hCy = $A6DCDE14; // Cy
hD = $2350C685; // D
hDarken = $3DD2B17F; // Darken
hDefs = $A819FE18; // Defs
hdiffuseConstant = $08AD9D7D; // diffuseConstant
hDiscrete = $ECBBCCA1; // Discrete
hDisplay = $17D82A47; // Display
hDx = $6798DE45; // Dx
hDy = $776B7DEA; // Dy
hEllipse = $30C7994A; // Ellipse
hEnd = $B0C485D7; // End
hEntity = $395039A9; // Entity
hExponent = $D8013FFD; // Exponent
hfeBlend = $751904B9; // feBlend
hfeColorMatrix = $C0C4CF02; // feColorMatrix
hfeComponentTransfer = $8B01CCC8; // feComponentTransfer
hfeComposite = $E652E33C; // feComposite
hfeDefuseLighting = $D9F6C722; // feDefuseLighting
hfeDropShadow = $16269B00; // feDropShadow
hfeFlood = $0B6C5F4E; // feFlood
hfeFuncA = $2EA47C9E; // feFuncA
hfeFuncB = $1C5DD811; // feFuncB
hfeFuncG = $E45FE81A; // feFuncG
hfeFuncR = $F8BB10C8; // feFuncR
hfeGaussianBlur = $B2225552; // feGaussianBlur
hfeImage = $905096A0; // feImage
hfeMerge = $A2C358C0; // feMerge
hfeMergeNode = $F5F1E90F; // feMergeNode
hfeOffset = $04493A72; // feOffset
hfePointLight = $D3FFCCA4; // fePointLight
hfeSpecularLighting = $577C6E4B; // feSpecularLighting
hFill = $A3AAAB69; // Fill
hFill_045_Opacity = $18000C02; // Fill-Opacity
hFill_045_Rule = $5264679F; // Fill-Rule
hFilter = $49DC73B3; // Filter
hflood_045_color = $4E87F3B3; // flood-color
hflood_045_opacity = $691CCD42; // flood-opacity
hFlowRegion = $822E901A; // FlowRegion
hFlowRoot = $A802ADFD; // FlowRoot
hFont = $21461EC6; // Font
hFont_045_Family = $371C9BE4; // Font-Family
hFont_045_Size = $8BFECA77; // Font-Size
hFont_045_Style = $4CBDA7BE; // Font-Style
hFont_045_Weight = $EF7234B4; // Font-Weight
hFx = $D6733A04; // Fx
hFy = $A4AD5675; // Fy
hG = $3593EB0B; // G
hGradientTransform = $5B6A9CF7; // GradientTransform
hGradientUnits = $07DD34B6; // GradientUnits
hGramma = $302368DC; // Gramma
hHeight = $52FDF336; // Height
hhidden = $4C4D777D; // hidden
hHref = $8E926F4B; // Href
hId = $1B60404D; // Id
hImage = $D58C8637; // Image
hIn = $4D5FA44B; // In
hIn2 = $FBFE02B1; // In2
hIntercept = $7CBB607F; // Intercept
hItalic = $F07E7786; // Italic
hJustify = $13E85AB8; // Justify
hK1 = $33176D43; // K1
hK2 = $DD11C139; // K2
hK3 = $CF4B25AC; // K3
hK4 = $77CCF6AD; // K4
hkernelUnitLength = $3B25E980; // kernelUnitLength
hletter_045_spacing = $5130BCF5; // letter-spacing
hLighten = $85E826DE; // Lighten
hLighter = $CCEDB4E8; // Lighter
hlighting_045_color = $B4114C27; // lighting-color
hLine = $7A6D718F; // Line
hline_045_through = $1C703CCD; // line-through
hLinear = $39327DA3; // Linear
hLinearGradient = $C16E9BCD; // LinearGradient
hMarker = $72660BE9; // Marker
hMarker_045_End = $B06101FD; // Marker-End
hMarker_045_Mid = $FD95C733; // Marker-Mid
hMarker_045_Start = $CF854A0E; // Marker-Start
hMarkerHeight = $10360978; // MarkerHeight
hMarkerWidth = $EF8DF427; // MarkerWidth
hMask = $FAF8F32F; // Mask
hMatrix = $31E3AD46; // Matrix
hMiddle = $80732990; // Middle
hMiter = $33868A3B; // Miter
hMode = $68155C83; // Mode
hMonospace = $049AE941; // Monospace
hMultiply = $9110BAC4; // Multiply
hNone = $1D632BA1; // None
hNormal = $4F485502; // Normal
hObjectBoundingBox = $3D4B4519; // ObjectBoundingBox
hOffset = $A13C79EF; // Offset
hOpacity = $D9394F28; // Opacity
hOperator = $AA661628; // Operator
hOrient = $EFF6C65A; // Orient
hOut = $12067E90; // Out
hOver = $C9B82D21; // Over
hOverflow_045_Wrap = $C0B6980D; // Overflow-Wrap
hOverlay = $383BEA5E; // Overlay
hPad = $4A0CAD48; // Pad
hPath = $AD8A7AB5; // Path
hPattern = $FF0BFA79; // Pattern
hPatternContentUnits = $C6D9BCA5; // PatternContentUnits
hPatternTransform = $7051BE8C; // PatternTransform
hPatternUnits = $2FDF622C; // PatternUnits
hPoints = $87F41B44; // Points
hPolygon = $509667FD; // Polygon
hPolyline = $58B3D280; // Polyline
hR = $26014BE2; // R
hRadialGradient = $B0D7E1F9; // RadialGradient
hRect = $FA3BCBEA; // Rect
hReflect = $98BC393E; // Reflect
hRefX = $00C1DE46; // RefX
hRefY = $480CECDB; // RefY
hRepeat = $FF80069D; // Repeat
hResult = $47CD519F; // Result
hRotate = $E8A48E19; // Rotate
hRound = $323B0E24; // Round
hRx = $3ABF70F3; // Rx
hRy = $0C7D9470; // Ry
hSans = $DE5518F6; // Sans
hSans_045_Serif = $95106804; // Sans-Serif
hScreen = $207A08BB; // Screen
hSerif = $B88D4332; // Serif
hSlope = $4774735C; // Slope
hSourceAlpha = $F891B958; // SourceAlpha
hSourceGraphic = $A4DB1DC2; // SourceGraphic
hspace = $488AD9F6; // space
hspecularExponent = $93D520E8; // specularExponent
hSpreadMethod = $A08CEB57; // SpreadMethod
hSquare = $20E48144; // Square
hStart = $84DC271F; // Start
hStartOffset = $688E51A0; // StartOffset
hstdDeviation = $00D13F6A; // stdDeviation
hStop = $930CA7F2; // Stop
hStop_045_Color = $9FD6E0BE; // Stop-Color
hStop_045_Opacity = $FC7751F2; // Stop-Opacity
hStroke = $E04ABDF3; // Stroke
hStroke_045_DashArray = $795F2D78; // Stroke-DashArray
hStroke_045_DashOffset = $A418B357; // Stroke-DashOffset
hstroke_045_linecap = $29D0178F; // stroke-linecap
hstroke_045_linejoin = $79642287; // stroke-linejoin
hstroke_045_miterlimit = $16C29890; // stroke-miterlimit
hStroke_045_Opacity = $D237C6B5; // Stroke-Opacity
hStroke_045_Width = $AFF671ED; // Stroke-Width
hStyle = $A9473AB4; // Style
hSub = $1B3C1FFA; // Sub
hSuper = $9C5EE034; // Super
hsurfaceScale = $EA29CC4F; // surfaceScale
hSvg = $ED67C37E; // Svg
hSwitch = $D60E64BB; // Switch
hSymbol = $07754611; // Symbol
hTable = $AB55E184; // Table
hTableValues = $2F999AD9; // TableValues
hText = $7F3B51AB; // Text
hText_045_Anchor = $D0D82FE8; // Text-Anchor
hText_045_Decoration = $3BC20862; // Text-Decoration
hTextArea = $0A75EDBF; // TextArea
hTextLength = $DA75EDC0; // TextLength
hTextPath = $18F2748E; // TextPath
hTimes = $FF0E1FBE; // Times
hTransform = $A0930B32; // Transform
hTSpan = $33C1F865; // TSpan
hType = $3165B05D; // Type
hUnderline = $70D1B303; // Underline
hUrl = $BC113F8C; // Url
hUse = $65736EEA; // Use
hUserSpaceOnUse = $3D19F8A4; // UserSpaceOnUse
hValues = $33429E55; // Values
hViewbox = $AEF665C8; // Viewbox
hVisibility = $9F832B01; // Visibility
hvisible = $96C79D31; // visible
hWhite_045_Space = $0A1C0679; // White-Space
hWidth = $96BEECA0; // Width
hWord_045_Break = $A99E7C27; // Word-Break
hX = $9303A5E5; // X
hX1 = $74A7DE27; // X1
hX2 = $168E21F1; // X2
hXlink_058_Href = $2BDA798B; // Xlink:Href
hXor = $4D86273A; // Xor
hY = $80950108; // Y
hY1 = $7F247680; // Y1
hY2 = $6DE3D3FF; // Y2
hZ = $B6606C9E; // Z

View file

@ -1,150 +0,0 @@
const
ColorConsts: array[0..147] of TColorConst = (
(ColorName: 'aliceblue'; ColorValue: $FFF0F8FF),
(ColorName: 'antiquewhite'; ColorValue: $FFFAEBD7),
(ColorName: 'aqua'; ColorValue: $FF00FFFF),
(ColorName: 'aquamarine'; ColorValue: $FF7FFFD4),
(ColorName: 'azure'; ColorValue: $FFF0FFFF),
(ColorName: 'beige'; ColorValue: $FFF5F5DC),
(ColorName: 'bisque'; ColorValue: $FFFFE4C4),
(ColorName: 'black'; ColorValue: $FF000000),
(ColorName: 'blanchedalmond'; ColorValue: $FFFFEBCD),
(ColorName: 'blue'; ColorValue: $FF0000FF),
(ColorName: 'blueviolet'; ColorValue: $FF8A2BE2),
(ColorName: 'brown'; ColorValue: $FFA52A2A),
(ColorName: 'burlywood'; ColorValue: $FFDEB887),
(ColorName: 'cadetblue'; ColorValue: $FF5F9EA0),
(ColorName: 'chartreuse'; ColorValue: $FF7FFF00),
(ColorName: 'chocolate'; ColorValue: $FFD2691E),
(ColorName: 'coral'; ColorValue: $FFFF7F50),
(ColorName: 'cornflowerblue'; ColorValue: $FF6495ED),
(ColorName: 'cornsilk'; ColorValue: $FFFFF8DC),
(ColorName: 'crimson'; ColorValue: $FFDC143C),
(ColorName: 'currentcolor'; ColorValue: $00010002),
(ColorName: 'cyan'; ColorValue: $FF00FFFF),
(ColorName: 'darkblue'; ColorValue: $FF00008B),
(ColorName: 'darkcyan'; ColorValue: $FF008B8B),
(ColorName: 'darkgoldenrod'; ColorValue: $FFB8860B),
(ColorName: 'darkgray'; ColorValue: $FFA9A9A9),
(ColorName: 'darkgreen'; ColorValue: $FF006400),
(ColorName: 'darkgrey'; ColorValue: $FFA9A9A9),
(ColorName: 'darkkhaki'; ColorValue: $FFBDB76B),
(ColorName: 'darkmagenta'; ColorValue: $FF8B008B),
(ColorName: 'darkolivegreen'; ColorValue: $FF556B2F),
(ColorName: 'darkorange'; ColorValue: $FFFF8C00),
(ColorName: 'darkorchid'; ColorValue: $FF9932CC),
(ColorName: 'darkred'; ColorValue: $FF8B0000),
(ColorName: 'darksalmon'; ColorValue: $FFE9967A),
(ColorName: 'darkseagreen'; ColorValue: $FF8FBC8F),
(ColorName: 'darkslateblue'; ColorValue: $FF483D8B),
(ColorName: 'darkslategray'; ColorValue: $FF2F4F4F),
(ColorName: 'darkslategrey'; ColorValue: $FF2F4F4F),
(ColorName: 'darkturquoise'; ColorValue: $FF00CED1),
(ColorName: 'darkviolet'; ColorValue: $FF9400D3),
(ColorName: 'deeppink'; ColorValue: $FFFF1493),
(ColorName: 'deepskyblue'; ColorValue: $FF00BFFF),
(ColorName: 'dimgray'; ColorValue: $FF696969),
(ColorName: 'dimgrey'; ColorValue: $FF696969),
(ColorName: 'dodgerblue'; ColorValue: $FF1E90FF),
(ColorName: 'firebrick'; ColorValue: $FFB22222),
(ColorName: 'floralwhite'; ColorValue: $FFFFFAF0),
(ColorName: 'forestgreen'; ColorValue: $FF228B22),
(ColorName: 'fuchsia'; ColorValue: $FFFF00FF),
(ColorName: 'gainsboro'; ColorValue: $FFDCDCDC),
(ColorName: 'ghostwhite'; ColorValue: $FFF8F8FF),
(ColorName: 'gold'; ColorValue: $FFFFD700),
(ColorName: 'goldenrod'; ColorValue: $FFDAA520),
(ColorName: 'gray'; ColorValue: $FF808080),
(ColorName: 'green'; ColorValue: $FF008000),
(ColorName: 'greenyellow'; ColorValue: $FFADFF2F),
(ColorName: 'grey'; ColorValue: $FF808080),
(ColorName: 'honeydew'; ColorValue: $FFF0FFF0),
(ColorName: 'hotpink'; ColorValue: $FFFF69B4),
(ColorName: 'indianred'; ColorValue: $FFCD5C5C),
(ColorName: 'indigo'; ColorValue: $FF4B0082),
(ColorName: 'ivory'; ColorValue: $FFFFFFF0),
(ColorName: 'khaki'; ColorValue: $FFF0E68C),
(ColorName: 'lavender'; ColorValue: $FFE6E6FA),
(ColorName: 'lavenderblush'; ColorValue: $FFFFF0F5),
(ColorName: 'lawngreen'; ColorValue: $FF7CFC00),
(ColorName: 'lemonchiffon'; ColorValue: $FFFFFACD),
(ColorName: 'lightblue'; ColorValue: $FFADD8E6),
(ColorName: 'lightcoral'; ColorValue: $FFF08080),
(ColorName: 'lightcyan'; ColorValue: $FFE0FFFF),
(ColorName: 'lightgoldenrodyellow'; ColorValue: $FFFAFAD2),
(ColorName: 'lightgray'; ColorValue: $FFD3D3D3),
(ColorName: 'lightgreen'; ColorValue: $FF90EE90),
(ColorName: 'lightgrey'; ColorValue: $FFD3D3D3),
(ColorName: 'lightpink'; ColorValue: $FFFFB6C1),
(ColorName: 'lightsalmon'; ColorValue: $FFFFA07A),
(ColorName: 'lightseagreen'; ColorValue: $FF20B2AA),
(ColorName: 'lightskyblue'; ColorValue: $FF87CEFA),
(ColorName: 'lightslategray'; ColorValue: $FF778899),
(ColorName: 'lightslategrey'; ColorValue: $FF778899),
(ColorName: 'lightsteelblue'; ColorValue: $FFB0C4DE),
(ColorName: 'lightyellow'; ColorValue: $FFFFFFE0),
(ColorName: 'lime'; ColorValue: $FF00FF00),
(ColorName: 'limegreen'; ColorValue: $FF32CD32),
(ColorName: 'linen'; ColorValue: $FFFAF0E6),
(ColorName: 'magenta'; ColorValue: $FFFF00FF),
(ColorName: 'maroon'; ColorValue: $FF800000),
(ColorName: 'mediumaquamarine'; ColorValue: $FF66CDAA),
(ColorName: 'mediumblue'; ColorValue: $FF0000CD),
(ColorName: 'mediumorchid'; ColorValue: $FFBA55D3),
(ColorName: 'mediumpurple'; ColorValue: $FF9370DB),
(ColorName: 'mediumseagreen'; ColorValue: $FF3CB371),
(ColorName: 'mediumslateblue'; ColorValue: $FF7B68EE),
(ColorName: 'mediumspringgreen'; ColorValue: $FF00FA9A),
(ColorName: 'mediumturquoise'; ColorValue: $FF48D1CC),
(ColorName: 'mediumvioletred'; ColorValue: $FFC71585),
(ColorName: 'midnightblue'; ColorValue: $FF191970),
(ColorName: 'mintcream'; ColorValue: $FFF5FFFA),
(ColorName: 'mistyrose'; ColorValue: $FFFFE4E1),
(ColorName: 'moccasin'; ColorValue: $FFFFE4B5),
(ColorName: 'navajowhite'; ColorValue: $FFFFDEAD),
(ColorName: 'navy'; ColorValue: $FF000080),
(ColorName: 'none'; ColorValue: $0),
(ColorName: 'oldlace'; ColorValue: $FFFDF5E6),
(ColorName: 'olive'; ColorValue: $FF808000),
(ColorName: 'olivedrab'; ColorValue: $FF6B8E23),
(ColorName: 'orange'; ColorValue: $FFFFA500),
(ColorName: 'orangered'; ColorValue: $FFFF4500),
(ColorName: 'orchid'; ColorValue: $FFDA70D6),
(ColorName: 'palegoldenrod'; ColorValue: $FFEEE8AA),
(ColorName: 'palegreen'; ColorValue: $FF98FB98),
(ColorName: 'paleturquoise'; ColorValue: $FFAFEEEE),
(ColorName: 'palevioletred'; ColorValue: $FFDB7093),
(ColorName: 'papayawhip'; ColorValue: $FFFFEFD5),
(ColorName: 'peachpuff'; ColorValue: $FFFFDAB9),
(ColorName: 'peru'; ColorValue: $FFCD853F),
(ColorName: 'pink'; ColorValue: $FFFFC0CB),
(ColorName: 'plum'; ColorValue: $FFDDA0DD),
(ColorName: 'powderblue'; ColorValue: $FFB0E0E6),
(ColorName: 'purple'; ColorValue: $FF800080),
(ColorName: 'red'; ColorValue: $FFFF0000),
(ColorName: 'rosybrown'; ColorValue: $FFBC8F8F),
(ColorName: 'royalblue'; ColorValue: $FF4169E1),
(ColorName: 'saddlebrown'; ColorValue: $FF8B4513),
(ColorName: 'salmon'; ColorValue: $FFFA8072),
(ColorName: 'sandybrown'; ColorValue: $FFF4A460),
(ColorName: 'seagreen'; ColorValue: $FF2E8B57),
(ColorName: 'seashell'; ColorValue: $FFFFF5EE),
(ColorName: 'sienna'; ColorValue: $FFA0522D),
(ColorName: 'silver'; ColorValue: $FFC0C0C0),
(ColorName: 'skyblue'; ColorValue: $FF87CEEB),
(ColorName: 'slateblue'; ColorValue: $FF6A5ACD),
(ColorName: 'slategray'; ColorValue: $FF708090),
(ColorName: 'slategrey'; ColorValue: $FF708090),
(ColorName: 'springgreen'; ColorValue: $FF00FF7F),
(ColorName: 'steelblue'; ColorValue: $FF4682B4),
(ColorName: 'tan'; ColorValue: $FFD2B48C),
(ColorName: 'teal'; ColorValue: $FF008080),
(ColorName: 'thistle'; ColorValue: $FFD8BFD8),
(ColorName: 'tomato'; ColorValue: $FFFF6347),
(ColorName: 'turquoise'; ColorValue: $FF40E0D0),
(ColorName: 'violet'; ColorValue: $FFEE82EE),
(ColorName: 'wheat'; ColorValue: $FFF5DEB3),
(ColorName: 'white'; ColorValue: $FFFFFFFF),
(ColorName: 'whitesmoke'; ColorValue: $FFF5F5F5),
(ColorName: 'yellow'; ColorValue: $FFFFFF00),
(ColorName: 'yellowgreen'; ColorValue: $FF9ACD32));

View file

@ -1,202 +0,0 @@
const
h_038_aacute = $C40CD1AC; // &aacute
h_038_Aacute_ = $849FF409; // &Aacute
h_038_acirc = $840D1F02; // &acirc
h_038_Acirc_ = $7F451D3E; // &Acirc
h_038_acute = $2680A5D5; // &acute
h_038_aelig = $3D929B9C; // &aelig
h_038_AElig_ = $61DC6137; // &AElig
h_038_agrave = $CA183FB7; // &agrave
h_038_Agrave_ = $F4CF5768; // &Agrave
h_038_alefsym = $6808FBEB; // &alefsym
h_038_alpha = $EC092241; // &alpha
h_038_Alpha_ = $66CC6726; // &Alpha
h_038_amp = $037B88FA; // &amp
h_038_and = $62F7C96D; // &and
h_038_ang = $938EAA9A; // &ang
h_038_apos = $22CA8797; // &apos
h_038_aring = $21C30C85; // &aring
h_038_Aring_ = $E12CC5CC; // &Aring
h_038_ast = $57D2388E; // &ast
h_038_asymp = $98C2269E; // &asymp
h_038_atilde = $C6B2E000; // &atilde
h_038_Atilde_ = $01CDB917; // &Atilde
h_038_auml = $614FA447; // &auml
h_038_Auml_ = $9677EFF3; // &Auml
h_038_bigcup = $B6CD4440; // &bigcup
h_038_bigvee = $03DC1C48; // &bigvee
h_038_bigwedge = $A7E74E34; // &bigwedge
h_038_brvbar = $D0BFD065; // &brvbar
h_038_bull = $C248AC08; // &bull
h_038_cap = $CC74A0B4; // &cap
h_038_ccedil = $A3A63E8D; // &ccedil
h_038_Ccedil_ = $DDCB49C7; // &Ccedil
h_038_cedil = $573159F9; // &cedil
h_038_cent = $E9BF1FFA; // &cent
h_038_Cent_ = $577BC371; // &Cent
h_038_centerdot = $2DFD2629; // &centerdot
h_038_clubs = $6BB65CA1; // &clubs
h_038_cong = $F0C66C02; // &cong
h_038_Cong_ = $AE6DC6E9; // &Cong
h_038_copy = $010005D9; // &copy
h_038_Copy_ = $EF3C2855; // &Copy
h_038_cup = $002CC197; // &cup
h_038_curren = $0DF89EA4; // &curren
h_038_Curren_ = $DE0CAB36; // &Curren
h_038_dagger = $7656FFBF; // &dagger
h_038_Dagger_ = $D0B7CF56; // &Dagger
h_038_darr = $96C9CD3E; // &darr
h_038_Darr_ = $6F934755; // &Darr
h_038_deg = $3DF5EABA; // &deg
h_038_diams = $A9A6FD96; // &diams
h_038_divide = $CAF03BB9; // &divide
h_038_dollar = $D9E72A5D; // &dollar
h_038_dotsquare = $C3397AE0; // &dotsquare
h_038_eacute = $B054C095; // &eacute
h_038_Eacute_ = $FA18A8B9; // &Eacute
h_038_ecirc = $F6524191; // &ecirc
h_038_Ecirc_ = $5C7D8715; // &Ecirc
h_038_egrave = $34A4D3BE; // &egrave
h_038_Egrave_ = $0C9283D5; // &Egrave
h_038_empty = $FBD5F648; // &empty
h_038_emsp = $E2F82BAC; // &emsp
h_038_ensp = $5AE82EFD; // &ensp
h_038_equiv = $FBDA3E8C; // &equiv
h_038_eth = $61C393B2; // &eth
h_038_ETH_ = $371CECCD; // &ETH
h_038_euml = $831CC155; // &euml
h_038_Euml_ = $B12AEDB4; // &Euml
h_038_euro = $8E9DCA23; // &euro
h_038_exist = $60EF4BBD; // &exist
h_038_fnof = $27A6853B; // &fnof
h_038_forall = $00CFD7CA; // &forall
h_038_frac12 = $AFAB928E; // &frac12
h_038_frac14 = $D13ED5B4; // &frac14
h_038_frac34 = $26F38364; // &frac34
h_038_ge = $3FE463F0; // &ge
h_038_gt = $0FD403D4; // &gt
h_038_harr = $228B0A67; // &harr
h_038_hArr_ = $C3485709; // &hArr
h_038_hearts = $C2D7805D; // &hearts
h_038_hellip = $3B6A2517; // &hellip
h_038_iacute = $B2178DF7; // &iacute
h_038_Iacute_ = $33FE3E74; // &Iacute
h_038_icirc = $F728EACE; // &icirc
h_038_Icirc_ = $68FEF48B; // &Icirc
h_038_iexcl = $8C9BEDEB; // &iexcl
h_038_igrave = $BE24CE59; // &igrave
h_038_Igrave_ = $865EE18F; // &Igrave
h_038_image = $A3B28075; // &image
h_038_infin = $2A0C2732; // &infin
h_038_int = $0CE86696; // &int
h_038_iquest = $FF64EBE5; // &iquest
h_038_isin = $35015C96; // &isin
h_038_iuml = $B0B2544F; // &iuml
h_038_Iuml_ = $3311D951; // &Iuml
h_038_lang = $9C5C37A0; // &lang
h_038_laquo = $C884260F; // &laquo
h_038_larr = $0F0233CE; // &larr
h_038_lceil = $0E7A49B4; // &lceil
h_038_ldquo = $471C971F; // &ldquo
h_038_le = $451E7194; // &le
h_038_lfloor = $77C9F190; // &lfloor
h_038_lowast = $A79F8857; // &lowast
h_038_loz = $65CA22E4; // &loz
h_038_lsquo = $F1ECC4BC; // &lsquo
h_038_lt = $2F63C61B; // &lt
h_038_macr = $321199A1; // &macr
h_038_mdash = $A7E292F7; // &mdash
h_038_micro = $361E671A; // &micro
h_038_middot = $451E45D5; // &middot
h_038_minus = $AA0B27F0; // &minus
h_038_nbsp = $B80B19D4; // &nbsp
h_038_ndash = $1BE48A01; // &ndash
h_038_ne = $8ABC7A9F; // &ne
h_038_ni = $3462CDED; // &ni
h_038_not = $6571D361; // &not
h_038_notin = $C267D23D; // &notin
h_038_nsub = $3173CA9F; // &nsub
h_038_nsube = $1AD041BF; // &nsube
h_038_nsup = $71994AED; // &nsup
h_038_nsupe = $0BF489BB; // &nsupe
h_038_ntilde = $8EFF31C4; // &ntilde
h_038_Ntilde_ = $70995F88; // &Ntilde
h_038_oacute = $7C30558E; // &oacute
h_038_Oacute_ = $EC941630; // &Oacute
h_038_ocirc = $F453A7D7; // &ocirc
h_038_Ocirc_ = $1B62B2F0; // &Ocirc
h_038_ograve = $7412F9CF; // &ograve
h_038_Ograve_ = $CC3707A0; // &Ograve
h_038_oplus = $83A0D7E5; // &oplus
h_038_or = $0B850432; // &or
h_038_ordf = $634ADF56; // &ordf
h_038_ordm = $2326DF17; // &ordm
h_038_oslash = $F5890720; // &oslash
h_038_oSlash_ = $D81B4F6F; // &oSlash
h_038_otilde = $A8F53BA4; // &otilde
h_038_Otilde_ = $1222634D; // &Otilde
h_038_otimes = $60D268D0; // &otimes
h_038_ouml = $E1690926; // &ouml
h_038_Ouml_ = $10A4C723; // &Ouml
h_038_para = $908DCE0A; // &para
h_038_part = $9EF86AD3; // &part
h_038_percnt = $32B29175; // &percnt
h_038_permil = $8BDC8C51; // &permil
h_038_perp = $91CB5D3A; // &perp
h_038_phi = $B6BD54CC; // &phi
h_038_pi = $1C659BC3; // &pi
h_038_plus = $F31E4F4F; // &plus
h_038_plusmn = $DED28303; // &plusmn
h_038_pound = $FA3E1E4A; // &pound
h_038_prime = $C00FD683; // &prime
h_038_Prime_ = $343E35F0; // &Prime
h_038_prop = $FBA00FBD; // &prop
h_038_quot = $3EF3A069; // &quot
h_038_radic = $E3557A8E; // &radic
h_038_rang = $E665B199; // &rang
h_038_raquo = $CB0641C1; // &raquo
h_038_rarr = $4EB6874D; // &rarr
h_038_Rarr_ = $E8708758; // &Rarr
h_038_rceil = $71227E13; // &rceil
h_038_rdquo = $0E641212; // &rdquo
h_038_real = $CBC6DF72; // &real
h_038_reg = $9A362741; // &reg
h_038_rfloor = $BF3EE28E; // &rfloor
h_038_rsquo = $3B95A919; // &rsquo
h_038_sdot = $B6410D51; // &sdot
h_038_sect = $DBCD5E27; // &sect
h_038_shy = $C5EDE58D; // &shy
h_038_sigma = $7E384D95; // &sigma
h_038_sim = $37602F84; // &sim
h_038_spades = $9B527690; // &spades
h_038_sub = $945E4A23; // &sub
h_038_sube = $EFD32218; // &sube
h_038_sum = $F4A00AC9; // &sum
h_038_sup = $23086799; // &sup
h_038_sup1 = $FDB1BC70; // &sup1
h_038_sup2 = $EBC8189D; // &sup2
h_038_sup3 = $D2D3E6BD; // &sup3
h_038_supe = $379D3036; // &supe
h_038_szlig = $F47D8D0F; // &szlig
h_038_there4 = $F447995B; // &there4
h_038_thinsp = $E9E04445; // &thinsp
h_038_thorn = $56DCFD2E; // &thorn
h_038_THORN_ = $182FE89F; // &THORN
h_038_times = $432DB063; // &times
h_038_trade = $F7216429; // &trade
h_038_uacute = $05E35265; // &uacute
h_038_Uacute_ = $35F6CEC7; // &Uacute
h_038_uarr = $D0A59EAE; // &uarr
h_038_Uarr_ = $05F25B6E; // &Uarr
h_038_ucirc = $C896F030; // &ucirc
h_038_Ucirc_ = $2DC48084; // &Ucirc
h_038_ugrave = $6383FA6E; // &ugrave
h_038_Ugrave_ = $4A2102A0; // &Ugrave
h_038_uml = $98C50DEB; // &uml
h_038_uuml = $5E1AD134; // &uuml
h_038_Uuml_ = $6DFDCE3C; // &Uuml
h_038_yacute = $45BAD69D; // &yacute
h_038_Yacute_ = $9AF55263; // &Yacute
h_038_yen = $087FF08F; // &yen
h_038_yuml = $152D09A6; // &yuml
h_038_Yuml_ = $DD9EA01E; // &Yuml

View file

@ -1,111 +0,0 @@
//hash identifiers with appended underscores refer to
//case sensitive string values (ie they contain capitals)
h_038_aacute : val := 225;
h_038_aacute_ : val := 193;
h_038_acirc : val := 226;
h_038_acirc_ : val := 194;
h_038_acute : val := 180;
h_038_aelig : val := 230;
h_038_aelig_ : val := 198;
h_038_agrave : val := 224;
h_038_agrave_ : val := 192;
h_038_alefsym : val := $2135;
h_038_alpha : val := $3B1;
h_038_Alpha_ : val := $391;
h_038_amp : val := $26;
h_038_apos : val := $27;
h_038_aring_ : val := 197;
h_038_aring : val := 229;
h_038_ast : val := $2A;
h_038_atilde_ : val := 195;
h_038_atilde : val := 227;
h_038_auml_ : val := 196;
h_038_auml : val := 228;
h_038_bull : val := $2022;
h_038_cap : val := $2229;
h_038_clubs : val := $2663;
h_038_cup : val := $222A;
h_038_brvbar : val := 166;
h_038_ccedil : val := 231;
h_038_cedil : val := 184;
h_038_cent : val := 162;
h_038_copy : val := 169;
h_038_curren : val := 164;
h_038_deg : val := 176;
h_038_diams : val := $2666;
h_038_divide : val := $F7;
h_038_eacute_ : val := 201;
h_038_eacute : val := 233;
h_038_ecirc_ : val := 202;
h_038_ecirc : val := 234;
h_038_egrave : val := 232;
h_038_egrave_ : val := 200;
h_038_eth : val := 240;
h_038_euml_ : val := 203;
h_038_euml : val := 235;
h_038_euro : val := 128;
h_038_frac12 : val := 189;
h_038_frac14 : val := 188;
h_038_frac34 : val := 190;
h_038_ge : val := $2265;
h_038_gt : val := $3E;
h_038_hearts : val := $2665;
h_038_iacute_ : val := 205;
h_038_iacute : val := 237;
h_038_icirc_ : val := 206;
h_038_icirc : val := 238;
h_038_iexcl : val := 161;
h_038_igrave_ : val := 204;
h_038_igrave : val := 236;
h_038_int : val := $222B;
h_038_iquest : val := 191;
h_038_iuml_ : val := 207;
h_038_iuml : val := 239;
h_038_laquo : val := 171;
h_038_le : val := $2264;
h_038_lt : val := $3C;
h_038_macr : val := 175;
h_038_micro : val := 181;
h_038_middot : val := 183;
h_038_nbsp : val := 32;
h_038_not : val := 172;
h_038_ntilde : val := 241;
h_038_oacute_ : val := 211;
h_038_oacute : val := 243;
h_038_ocirc_ : val := 212;
h_038_ocirc : val := 244;
h_038_ograve_ : val := 210;
h_038_ograve : val := 242;
h_038_ordf : val := 170;
h_038_ordm : val := 186;
h_038_oslash : val := 248;
h_038_otilde_ : val := 213;
h_038_otilde : val := 245;
h_038_ouml_ : val := 214;
h_038_ouml : val := 246;
h_038_para : val := 182;
h_038_plusmn : val := 177;
h_038_pound : val := 163;
h_038_quot : val := $22;
h_038_raquo : val := 187;
h_038_reg : val := 174;
h_038_sect : val := 167;
h_038_shy : val := 173;
h_038_spades : val := $2660;
h_038_sup1 : val := 185;
h_038_sup2 : val := 178;
h_038_sup3 : val := 179;
h_038_szlig : val := 223;
h_038_thorn : val := 254;
h_038_times : val := 215;
h_038_uacute_ : val := 218;
h_038_uacute : val := 250;
h_038_ucirc : val := 251;
h_038_ucirc_ : val := 219;
h_038_ugrave_ : val := 217;
h_038_ugrave : val := 249;
h_038_uml : val := 168;
h_038_uuml_ : val := 220;
h_038_uuml : val := 252;
h_038_yacute : val := 253;
h_038_yen : val := 165;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,121 +0,0 @@
// While "storage" is still technically experimental,
// it does allow file system storage of layered objects etc
// Comment out the following preprocessor define if you do wish to
// use storage (eg to compile the experimental 'CtrlDemo' in Examples).
{$DEFINE NO_STORAGE}
// default rotation direction is clockwise with positive angles
{.$DEFINE CLOCKWISE_ROTATION_WITH_NEGATIVE_ANGLES}
// Image downsampling occurs when images are reduced in size, and the default downsampling
// function is 'BoxDownSampling'. When downsampling, this function generally produces much
// clearer images than general purpose resamplers (which are much better at upsampling,
// and doing other affine transformations). However, if for some reason you do wish to use
// a general purpose resampler while downsampling, then comment out (ie disable) this define.
{$DEFINE USE_DOWNSAMPLER_AUTOMATICALLY}
// The SimplifyPath and SimplifyPaths functions have changed. Specifically the last
// parameter has changed from IsOpenPath to IsClosedPath, though the default has also
// changed from false to true which should minimise any inconvenience. This change was
// made to remove an inconsistency with other functions that all contain an IsClosedPath
// parameter. However, if this change is going to create havoc for some reason, then
// the following (somewhat temporary) define can be enabled.
{.$DEFINE USE_OLD_SIMPLIFYPATHS}
//USING_VCL_LCL - using either Delphi Visual Component Library or Lazarus Component Library
//is required if using the TImage32Panel component
//and adds a few extra library features (eg copying to and from TBitmap objects)
{$IF DEFINED(FPC)}
{$MACRO ON}
{$DEFINE USING_LCL}
{.$DEFINE USING_VCL_LCL}
{$DEFINE COMPILERVERSION:= 17}
{$ELSEIF declared(FireMonkeyVersion) OR DEFINED(FRAMEWORK_FMX)}
{$DEFINE USING_FMX}
{$ELSE}
{$DEFINE USING_VCL}
{$DEFINE USING_VCL_LCL}
{$IFEND}
{$IFDEF FPC}
{$MODE DELPHI}
{$DEFINE ABSTRACT_CLASSES}
{$DEFINE RECORD_METHODS}
{$DEFINE PBYTE}
{$DEFINE NEWPOSFUNC}
{$DEFINE SUPPORTS_POINTERMATH}
{$DEFINE CLASS_STATIC}
{.$DEFINE UITYPES}
{$DEFINE NESTED_TYPES}
{$IFNDEF DEBUG}
{$DEFINE INLINE}
{$DEFINE INLINE_COMPATIBLE}
{$ENDIF}
{$DEFINE DELPHI_PNG}
{$IFDEF WINDOWS}
{$DEFINE MSWINDOWS}
{$ENDIF}
{$ELSE}
{$IF COMPILERVERSION < 15}
Your version of Delphi is not supported (Image32 requires Delphi version 7 or above)
{$IFEND}
{$IF COMPILERVERSION < 23}
{$DEFINE CPUX86} // CPUX86 was added in Delphi XE2 (added Win64 compiler)
{$IFEND}
{$IF COMPILERVERSION >= 17} //Delphi 2005
{$IFNDEF DEBUG}
{$DEFINE INLINE} //added inlining
{$ENDIF}
{$DEFINE NESTED_TYPES} //added nested types & nested constants
{$IF COMPILERVERSION >= 18} //Delphi 2006
{$DEFINE ABSTRACT_CLASSES} //added abstract classes
{$DEFINE REPORTMEMORYLEAKS} //added ReportMemoryLeaksOnShutdown
{$WARN SYMBOL_PLATFORM OFF}
{$DEFINE SETSIZE} //added TBitmap.SetSize
{$IF COMPILERVERSION >= 18.5} //Delphi 2007
{$DEFINE RECORD_METHODS} //added records with methods
{$DEFINE DELPHI_PNG} //added PNG support
{$DEFINE DELPHI_GIF} //added GIF support
{$DEFINE MAINFORMONTASKBAR} //added TApplication.MainFormOnTaskbar
{$if CompilerVersion >= 20} //Delphi 2009
{$DEFINE PBYTE} //added PByte
{$DEFINE CHARINSET} //added CharInSet function
{$DEFINE EXIT_PARAM} //added Exit(value)
{$DEFINE ALPHAFORMAT} //added TBitmap.AlphaFormat property
{$DEFINE SUPPORTS_POINTERMATH} //added {$POINTERMATH ON/OFF}
{$DEFINE CLASS_STATIC} //added class static methods
{$IF COMPILERVERSION >= 21} //Delphi 2010
{$IFNDEF DEBUG}
{$DEFINE INLINE_COMPATIBLE} //avoid compiler bug with INLINE in Delphi 2005-2009 ("incompatible type")
{$ENDIF}
{$DEFINE GESTURES} //added screen gesture support
{$IF COMPILERVERSION >= 23} //DelphiXE2
{$DEFINE USES_NAMESPACES}
{$DEFINE FORMATSETTINGS}
{$DEFINE TROUNDINGMODE}
{$DEFINE UITYPES} //added UITypes unit
{$DEFINE XPLAT_GENERICS} //cross-platform generics support
{$DEFINE STYLESERVICES} //added StyleServices unit
{$IF COMPILERVERSION >= 24} //DelphiXE3
{$LEGACYIFEND ON}
{$DEFINE NEWPOSFUNC}
{$DEFINE ZEROBASEDSTR}
{$IF COMPILERVERSION >= 25} //DelphiXE4
{$LEGACYIFEND ON} //avoids compiler warning
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$ENDIF}
{$IFOPT Q+}
{$DEFINE OVERFLOWCHECKS_ENABLED}
{$ENDIF}
{$IFOPT R+}
{$DEFINE RANGECHECKS_ENABLED}
{$ENDIF}

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Control like TButton which does not steal focus on click
Copyright (C) 2021-2026 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2021 Alexander Koblov (alexx2000@mail.ru)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -27,7 +27,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, Themes, Types, ImgList, LMessages;
Buttons, Themes;
type
@ -37,20 +37,11 @@ type
private
FState: TButtonState;
FShowCaption: Boolean;
FMouseInControl: Boolean;
FButtonGlyph: TButtonGlyph;
FImageChangeLink: TChangeLink;
private
function GetGlyph: TBitmap;
function GetImageWidth: Integer;
function IsGlyphStored: Boolean;
procedure SetGlyph(AValue: TBitmap);
function GetImageIndex: TImageIndex;
function GetImages: TCustomImageList;
procedure SetImageWidth(AValue: Integer);
procedure SetShowCaption(AValue: Boolean);
procedure SetImageIndex(AValue: TImageIndex);
procedure SetImages(AValue: TCustomImageList);
function GetDrawDetails: TThemedElementDetails;
protected
procedure Paint; override;
@ -63,21 +54,14 @@ type
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
protected
function GetGlyphSize: TSize;
procedure GlyphChanged(Sender: TObject);
procedure ImageListChange(Sender: TObject);
class function GetControlClassDefaultSize: TSize; override;
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED;
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer; WithThemeSpace: Boolean); override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
published
property Action;
property Images: TCustomImageList read GetImages write SetImages;
property ImageIndex: TImageIndex read GetImageIndex write SetImageIndex default -1;
property ImageWidth: Integer read GetImageWidth write SetImageWidth default 0;
property Glyph: TBitmap read GetGlyph write SetGlyph stored IsGlyphStored;
property ShowCaption: Boolean read FShowCaption write SetShowCaption default True;
end;
@ -87,16 +71,13 @@ procedure Register;
implementation
uses
LCLType, LCLProc, LCLIntf, ActnList, GraphType;
LCLType, LCLProc, LCLIntf, ActnList;
procedure Register;
begin
RegisterComponents('KASComponents',[TKASButton]);
end;
const
UpState: array[Boolean] of TButtonState = (bsUp, bsHot);
{ TKASButton }
procedure TKASButton.DoEnter;
@ -143,21 +124,6 @@ begin
Result:= FButtonGlyph.Glyph;
end;
function TKASButton.GetImageIndex: TImageIndex;
begin
Result:= FButtonGlyph.ExternalImageIndex;
end;
function TKASButton.GetImages: TCustomImageList;
begin
Result:= FButtonGlyph.ExternalImages;
end;
function TKASButton.GetImageWidth: Integer;
begin
Result:= FButtonGlyph.ExternalImageWidth;
end;
function TKASButton.IsGlyphStored: Boolean;
var
Act: TCustomAction;
@ -181,41 +147,11 @@ begin
AdjustSize;
end;
procedure TKASButton.SetImageIndex(AValue: TImageIndex);
begin
FButtonGlyph.ExternalImageIndex:= AValue;
end;
procedure TKASButton.SetImages(AValue: TCustomImageList);
begin
if FButtonGlyph.ExternalImages <> nil then
begin
FButtonGlyph.ExternalImages.UnRegisterChanges(FImageChangeLink);
FButtonGlyph.ExternalImages.RemoveFreeNotification(Self);
end;
FButtonGlyph.ExternalImages := AValue;
if FButtonGlyph.ExternalImages <> nil then
begin
FButtonGlyph.ExternalImages.FreeNotification(Self);
FButtonGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
end;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TKASButton.SetImageWidth(AValue: Integer);
begin
FButtonGlyph.ExternalImageWidth:= AValue;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TKASButton.Paint;
var
APoint: TPoint;
SysFont: TFont;
PaintRect: TRect;
AGlyphSize: TSize;
TextFlags: Integer;
Details: TThemedElementDetails;
begin
@ -244,22 +180,17 @@ begin
DrawText(Canvas.Handle, PChar(Caption), Length(Caption), PaintRect, TextFlags);
end;
end
else begin
AGlyphSize:= GetGlyphSize;
if (AGlyphSize.CX > 0) and (AGlyphSize.CY > 0) then
begin
APoint.X:= (PaintRect.Width - AGlyphSize.CX) div 2;
APoint.Y:= (PaintRect.Height - AGlyphSize.CY) div 2;
FButtonGlyph.Draw(Canvas, PaintRect, APoint, FState, True, 0, Font.PixelsPerInch, GetCanvasScaleFactor);
end;
else if not FButtonGlyph.Glyph.Empty then
begin
APoint.X:= (PaintRect.Width - FButtonGlyph.Width) div 2;
APoint.Y:= (PaintRect.Height - FButtonGlyph.Height) div 2;
FButtonGlyph.Draw(Canvas, PaintRect, APoint, FState, True, 0);
end;
end;
procedure TKASButton.MouseEnter;
begin
inherited MouseEnter;
FMouseInControl:= True;
FState:= bsHot;
Invalidate;
end;
@ -267,7 +198,6 @@ end;
procedure TKASButton.MouseLeave;
begin
inherited MouseLeave;
FMouseInControl:= False;
FState:= bsUp;
Invalidate;
end;
@ -309,43 +239,12 @@ begin
Invalidate;
end;
function TKASButton.GetGlyphSize: TSize;
var
AIndex: Integer;
AEffect: TGraphicsDrawEffect;
AImageRes: TScaledImageListResolution;
begin
if (FButtonGlyph.Glyph.Empty) and ((Images = nil) or (ImageIndex = -1)) then
begin
Result.CX:= 0;
Result.CY:= 0;
Exit;
end;
FButtonGlyph.GetImageIndexAndEffect(Low(TButtonState), Font.PixelsPerInch,
GetCanvasScaleFactor, AImageRes, AIndex, AEffect);
Result.CX:= AImageRes.Width;
Result.CY:= AImageRes.Height;
end;
procedure TKASButton.GlyphChanged(Sender: TObject);
begin
InvalidatePreferredSize;
AdjustSize;
end;
procedure TKASButton.ImageListChange(Sender: TObject);
begin
if Sender = Images then Invalidate;
end;
class function TKASButton.GetControlClassDefaultSize: TSize;
begin
Result.CX := 23;
Result.CY := 22;
end;
procedure TKASButton.ActionChange(Sender: TObject; CheckDefaults: Boolean);
begin
inherited ActionChange(Sender, CheckDefaults);
@ -361,36 +260,23 @@ begin
end;
end;
procedure TKASButton.CMEnabledChanged(var Message: TLMessage);
begin
if Enabled then
FState:= UpState[FMouseInControl]
else begin
FState:= bsDisabled;
end;
inherited CMEnabledChanged(Message);
end;
procedure TKASButton.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer; WithThemeSpace: Boolean);
var
PaintRect: TRect;
ClientRect: TRect;
AGlyphSize: TSize;
Details: TThemedElementDetails;
begin
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
AGlyphSize:= GetGlyphSize;
if (AGlyphSize.CX > 0) and (AGlyphSize.CY > 0) then
if (not FButtonGlyph.Glyph.Empty) then
begin
Details:= GetDrawDetails;
PaintRect:= TRect.Create(0, 0, 32, 32);
ClientRect:= ThemeServices.ContentRect(Canvas.Handle, Details, PaintRect);
PreferredWidth:= Abs(PaintRect.Width - ClientRect.Width) + AGlyphSize.CX;
PreferredHeight:= Abs(PaintRect.Height - ClientRect.Height) + AGlyphSize.CY;
PreferredWidth:= Abs(PaintRect.Width - ClientRect.Width) + FButtonGlyph.Width;
PreferredHeight:= Abs(PaintRect.Height - ClientRect.Height) + FButtonGlyph.Height;
end;
end;
@ -403,9 +289,6 @@ begin
FButtonGlyph.OnChange := GlyphChanged;
FButtonGlyph.IsDesigning := csDesigning in ComponentState;
FImageChangeLink := TChangeLink.Create;
FImageChangeLink.OnChange := ImageListChange;
FShowCaption:= True;
TabStop:= True;
end;
@ -413,7 +296,6 @@ end;
destructor TKASButton.Destroy;
begin
FreeAndNil(FButtonGlyph);
FreeAndNil(FImageChangeLink);
inherited Destroy;
end;

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Custom edit control with the look and feel like TLabel
Copyright (C) 2017-2024 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2017-2018 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -26,7 +26,7 @@ unit KASCDEdit;
interface
uses
Classes, SysUtils, LazVersion, LResources, Controls, Graphics, Dialogs, Types,
Classes, SysUtils, LResources, Controls, Graphics, Dialogs, Types,
Menus, CustomDrawnControls, CustomDrawnDrawers, CustomDrawn_Common;
type
@ -58,9 +58,6 @@ type
procedure SelectAll;
procedure CopyToClipboard;
published
property Color default clDefault;
property Cursor default crIBeam;
property ReadOnly default True;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
@ -107,7 +104,12 @@ end;
procedure TKASCDDrawer.DrawEditBackground(ADest: TCanvas; ADestPos: TPoint;
ASize: TSize; AState: TCDControlState; AStateEx: TCDEditStateEx);
begin
// None
// The background
ADest.Pen.Style := psSolid;
ADest.Pen.Color := AStateEx.RGBColor;
ADest.Brush.Style := bsSolid;
ADest.Brush.Color := AStateEx.RGBColor;
ADest.Rectangle(0, 0, ASize.cx, ASize.cy);
end;
procedure TKASCDDrawer.DrawEdit(ADest: TCanvas; ASize: TSize;
@ -120,8 +122,10 @@ var
lTextLeftSpacing, lTextTopSpacing, lTextBottomSpacing: Integer;
lTextColor: TColor;
i, lVisibleLinesCount: Integer;
AClipRect: TRect;
begin
// Background
DrawEditBackground(ADest, Point(0, 0), ASize, AState, AStateEx);
// General text configurations which apply to all lines
// Configure the text color
if csfEnabled in AState then
@ -164,10 +168,10 @@ begin
// The text
ADest.Pen.Style := psClear;
ADest.Brush.Style := bsClear;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lControlTextLen);
// ToDo: Implement multi-line selection
if (AStateEx.SelLength = 0) or (AStateEx.SelStart.Y <> AStateEx.VisibleTextStart.Y+i) then
begin
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lControlTextLen);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
end
// Text and Selection
@ -182,18 +186,22 @@ begin
lSelLength := AStateEx.SelLength;
if lSelLength < 0 then lSelLength := lSelLength * -1;
// Draw a normal text
// Text right of the selection
ADest.Font.Color := lTextColor;
ADest.Brush.Color := AStateEx.RGBColor;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lControlTextLen);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
// Draw a selected text
// The selection text
ADest.Brush.Color := clHighlight;
ADest.Font.Color := clHighlightText;
// Calculate a clip rect
AClipRect := ADest.ClipRect;
AClipRect.Left := ADest.TextWidth(UTF8Copy(lVisibleText, 1, lSelLeftPos));
AClipRect.Right := ADest.TextWidth(UTF8Copy(lVisibleText, 1, lSelLeftPos + lSelLength));
IntersectClipRect(ADest.Handle, AClipRect.Left, AClipRect.Top, AClipRect.Right, AClipRect.Bottom);
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lSelLeftPos + lSelLength);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
// Text left of the selection
ADest.Font.Color := lTextColor;
ADest.Brush.Color := AStateEx.RGBColor;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lSelLeftPos-AStateEx.VisibleTextStart.X + 1);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
end;
end;
@ -374,10 +382,6 @@ begin
end;
end;
end;
if ReadOnly and (Key in [VK_BACK, VK_DELETE]) then
begin
Key:= 0;
end;
inherited KeyDown(Key, Shift);
end;
@ -385,11 +389,10 @@ constructor TKASCDEdit.Create(AOwner: TComponent);
begin
CreatePopupMenu;
inherited Create(AOwner);
Color:= clForm;
ReadOnly:= True;
Cursor:= crIBeam;
Color:= clDefault;
DrawStyle:= dsExtra1;
ControlStyle:= ControlStyle + [csParentBackground] - [csOpaque];
end;
procedure TKASCDEdit.MouseMove(Shift: TShiftState; X, Y: integer);
@ -412,12 +415,6 @@ begin
begin
inherited MouseDown(Button, Shift, X, Y);
{$IF Laz_FullVersion >= 4990000}
// see also LCL 4b41b7a:
// customdrawn: remove redundant SetFocus from TCDControl.MouseDown
SetFocus();
{$ENDIF}
FDragDropStarted := True;
// Caret positioning

View file

@ -28,11 +28,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
ColorBox, Buttons, LMessages, Types, KASButton;
const
DEF_COLOR_STYLE = [cbStandardColors, cbExtendedColors,
cbSystemColors, cbPrettyNames];
LCLVersion;
type
@ -50,64 +46,14 @@ type
TComboBoxAutoWidth = class(TComboBox)
protected
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer;
WithThemeSpace: Boolean); override;
procedure CalculatePreferredSize(
var PreferredWidth, PreferredHeight: Integer;
WithThemeSpace: Boolean); override;
procedure CalculateSize(MaxWidth: Integer; var PreferredWidth: Integer; PreferredHeight: Integer);
{$if lcl_fullversion >= 1070000}
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override;
end;
{ TKASColorBox }
TKASColorBox = class(TColorBox)
protected
procedure SetCustomColor(AColor: TColor);
function PickCustomColor: Boolean; override;
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer;
WithThemeSpace: Boolean); override;
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override;
public
constructor Create(AOwner: TComponent); override;
published
property DefaultColorColor default clNone;
property Style default DEF_COLOR_STYLE;
end;
{ TKASColorBoxButton }
TKASColorBoxButton = class(TCustomControl)
private
function GetSelected: TColor;
function GetStyle: TColorBoxStyle;
function GetOnChange: TNotifyEvent;
function GetColorDialog: TColorDialog;
procedure SetSelected(AValue: TColor);
procedure SetStyle(AValue: TColorBoxStyle);
procedure SetOnChange(AValue: TNotifyEvent);
procedure SetColorDialog(AValue: TColorDialog);
protected
FButton: TKASButton;
FColorBox: TKASColorBox;
procedure DoAutoSize; override;
procedure EnabledChanged; override;
procedure ButtonClick(Sender: TObject);
class function GetControlClassDefaultSize: TSize; override;
procedure CMParentColorChanged(var Message: TLMessage); message CM_PARENTCOLORCHANGED;
public
constructor Create(AOwner: TComponent); override;
procedure SetFocus; override;
function Focused: Boolean; override;
property Selected: TColor read GetSelected write SetSelected default clBlack;
published
property Align;
property Anchors;
property TabOrder;
property Constraints;
property BorderSpacing;
property AutoSize default True;
property OnChange: TNotifyEvent read GetOnChange write SetOnChange;
property ColorDialog: TColorDialog read GetColorDialog write SetColorDialog;
property Style: TColorBoxStyle read GetStyle write SetStyle default DEF_COLOR_STYLE;
{$endif}
end;
procedure Register;
@ -119,94 +65,7 @@ uses
procedure Register;
begin
RegisterComponents('KASComponents',[TComboBoxWithDelItems, TComboBoxAutoWidth,
TKASColorBox, TKASColorBoxButton]);
end;
procedure CalculateSize(ComboBox: TCustomComboBox;
var PreferredWidth: Integer; PreferredHeight: Integer);
var
DC: HDC;
R: TRect;
I, M: Integer;
Flags: Cardinal;
OldFont: HGDIOBJ;
MaxWidth: Integer;
LabelText: String;
Idx: Integer = -1;
begin
with ComboBox do
begin
MaxWidth:= Constraints.MinMaxWidth(10000);
if Items.Count = 0 then
LabelText:= Text
else begin
M := Canvas.TextWidth(Text);
for I := 0 to Items.Count - 1 do
begin
Flags := Canvas.TextWidth(Items[I]);
if Flags > M then
begin
M := Flags;
Idx := I;
end;
end;
if Idx < 0 then
LabelText := Text
else begin
LabelText := Items[Idx];
end;
end;
if LabelText = '' then begin
PreferredWidth := 1;
Exit;
end;
DC := GetDC(Parent.Handle);
try
LabelText:= LabelText + 'W';
R := Rect(0, 0, MaxWidth, 10000);
OldFont := SelectObject(DC, HGDIOBJ(Font.Reference.Handle));
Flags := DT_CALCRECT or DT_EXPANDTABS;
DrawText(DC, PChar(LabelText), Length(LabelText), R, Flags);
SelectObject(DC, OldFont);
PreferredWidth := (R.Right - R.Left) + PreferredHeight;
finally
ReleaseDC(Parent.Handle, DC);
end;
end;
end;
function CalculateHeight(ComboBox: TCustomComboBox): Integer;
var
DC: HDC;
R: TRect;
Flags: Cardinal;
OldFont: HGDIOBJ;
LabelText: String;
MaxHeight: Integer;
begin
with ComboBox do
begin
MaxHeight:= Constraints.MinMaxHeight(10000);
DC := GetDC(Parent.Handle);
try
LabelText:= Items.Text;
R := Rect(0, 0, 10000, MaxHeight);
OldFont := SelectObject(DC, HGDIOBJ(Font.Reference.Handle));
Flags := DT_CALCRECT or DT_EXPANDTABS or DT_SINGLELINE;
DrawText(DC, PChar(LabelText), Length(LabelText), R, Flags);
SelectObject(DC, OldFont);
Result := (R.Bottom - R.Top);
finally
ReleaseDC(Parent.Handle, DC);
end;
end;
RegisterComponents('KASComponents',[TComboBoxWithDelItems, TComboBoxAutoWidth]);
end;
{ TComboBoxWithDelItems }
@ -232,235 +91,77 @@ end;
procedure TComboBoxAutoWidth.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer; WithThemeSpace: Boolean);
var
AWidth: Integer;
begin
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
if csDesigning in ComponentState then Exit;
if (Parent = nil) or (not Parent.HandleAllocated) then Exit;
CalculateSize(Self, PreferredWidth, PreferredHeight);
AWidth := Constraints.MinMaxWidth(10000);
CalculateSize(AWidth, PreferredWidth, PreferredHeight);
end;
procedure TComboBoxAutoWidth.CalculateSize(MaxWidth: Integer;
var PreferredWidth: Integer; PreferredHeight: Integer);
var
DC: HDC;
R: TRect;
I, M: Integer;
Flags: Cardinal;
OldFont: HGDIOBJ;
LabelText: String;
Idx: Integer = -1;
begin
if Items.Count = 0 then
LabelText:= Text
else begin
M := Canvas.TextWidth(Text);
for I := 0 to Items.Count - 1 do
begin
Flags := Canvas.TextWidth(Items[I]);
if Flags > M then
begin
M := Flags;
Idx := I;
end;
end;
if Idx < 0 then
LabelText := Text
else begin
LabelText := Items[Idx];
end;
end;
if LabelText = '' then begin
PreferredWidth := 1;
Exit;
end;
DC := GetDC(Parent.Handle);
try
LabelText:= LabelText + 'W';
R := Rect(0, 0, MaxWidth, 10000);
OldFont := SelectObject(DC, HGDIOBJ(Font.Reference.Handle));
Flags := DT_CALCRECT or DT_EXPANDTABS;
DrawText(DC, PChar(LabelText), Length(LabelText), R, Flags);
SelectObject(DC, OldFont);
PreferredWidth := (R.Right - R.Left) + PreferredHeight;
finally
ReleaseDC(Parent.Handle, DC);
end;
end;
{$if lcl_fullversion >= 1070000}
procedure TComboBoxAutoWidth.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double);
begin
// Don't auto adjust horizontal layout
inherited DoAutoAdjustLayout(AMode, 1.0, AYProportion);
end;
{ TKASColorBox }
procedure TKASColorBox.SetCustomColor(AColor: TColor);
var
Index: Integer;
begin
for Index:= Ord(cbCustomColor in Style) to Items.Count - 1 do
begin
if Colors[Index] = AColor then
begin
Selected:= AColor;
Exit;
end;
end;
if cbCustomColor in Style then
begin
Items.Objects[0]:= TObject(PtrInt(AColor));
end;
Items.AddObject('$' + HexStr(AColor, 8), TObject(PtrInt(AColor)));
Selected:= AColor;
end;
function TKASColorBox.PickCustomColor: Boolean;
begin
Result:= inherited PickCustomColor;
SetCustomColor(Colors[0]);
end;
procedure TKASColorBox.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer; WithThemeSpace: Boolean);
begin
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
if csDesigning in ComponentState then Exit;
if (Parent = nil) or (not Parent.HandleAllocated) then Exit;
if (csSubComponent in ComponentStyle) then
begin
ItemHeight:= CalculateHeight(Self);
if (Parent.Anchors * [akLeft, akRight] = [akLeft, akRight]) then
Exit;
end;
CalculateSize(Self, PreferredWidth, PreferredHeight);
PreferredWidth+= ColorRectWidth + ColorRectOffset;
end;
procedure TKASColorBox.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double);
begin
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
begin
if ColorRectWidthStored then
ColorRectWidth:= Round(ColorRectWidth * AXProportion);
end;
// Don't auto adjust horizontal layout
inherited DoAutoAdjustLayout(AMode, 1.0, AYProportion);
end;
constructor TKASColorBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Style:= DEF_COLOR_STYLE;
DefaultColorColor:= clNone;
end;
{ TKASColorBoxButton }
function TKASColorBoxButton.GetSelected: TColor;
begin
Result:= FColorBox.Selected;
end;
function TKASColorBoxButton.GetStyle: TColorBoxStyle;
begin
Result:= FColorBox.Style;
end;
function TKASColorBoxButton.GetOnChange: TNotifyEvent;
begin
Result:= FColorBox.OnChange;
end;
function TKASColorBoxButton.GetColorDialog: TColorDialog;
begin
Result:= FColorBox.ColorDialog;
end;
procedure TKASColorBoxButton.SetSelected(AValue: TColor);
begin
FColorBox.SetCustomColor(AValue);
end;
procedure TKASColorBoxButton.SetStyle(AValue: TColorBoxStyle);
begin
FColorBox.Style:= AValue;
end;
procedure TKASColorBoxButton.SetOnChange(AValue: TNotifyEvent);
begin
FColorBox.OnChange:= AValue;
end;
procedure TKASColorBoxButton.SetColorDialog(AValue: TColorDialog);
begin
FColorBox.ColorDialog:= AValue;
end;
procedure TKASColorBoxButton.DoAutoSize;
begin
inherited DoAutoSize;
FButton.Constraints.MinWidth:= FButton.Height;
end;
procedure TKASColorBoxButton.EnabledChanged;
begin
if Enabled then
FColorBox.Font.Color:= clDefault
else begin
FColorBox.Font.Color:= clGrayText;
end;
inherited EnabledChanged;
end;
procedure TKASColorBoxButton.ButtonClick(Sender: TObject);
Var
FreeDialog: Boolean;
begin
if csDesigning in ComponentState then Exit;
with FColorBox do
begin
FreeDialog:= (ColorDialog = nil);
if FreeDialog then
begin
ColorDialog:= TColorDialog.Create(GetTopParent);
end;
try
with ColorDialog do
begin
Color:= FColorBox.Selected;
if Execute Then
begin
FColorBox.SetCustomColor(Color);
Invalidate;
end;
end;
finally
if FreeDialog Then
begin
ColorDialog.Free;
ColorDialog:= nil;
end;
end;
end;
end;
class function TKASColorBoxButton.GetControlClassDefaultSize: TSize;
begin
Result:= TKASColorBox.GetControlClassDefaultSize;
Result.cx += Result.cy;
end;
procedure TKASColorBoxButton.CMParentColorChanged(var Message: TLMessage);
begin
if inherited ParentColor then
begin
inherited SetColor(Parent.Color);
inherited ParentColor:= True;
end;
end;
constructor TKASColorBoxButton.Create(AOwner: TComponent);
begin
FButton:= TKASButton.Create(Self);
FColorBox:= TKASColorBox.Create(Self);
inherited Create(AOwner);
ControlStyle:= ControlStyle + [csNoFocus];
BorderStyle:= bsNone;
TabStop:= True;
inherited TabStop:= False;
with FColorBox do
begin
SetSubComponent(True);
Align:= alClient;
ParentColor:= False;
ParentFont:= True;
Parent:= Self;
end;
with FButton do
begin
Align:= alRight;
Caption:= '..';
BorderSpacing.Left:= 2;
OnClick:= @ButtonClick;
Parent:= Self;
end;
AutoSize:= True;
Color:= clWindow;
inherited ParentColor:= True;
end;
procedure TKASColorBoxButton.SetFocus;
begin
FColorBox.SetFocus;
end;
function TKASColorBoxButton.Focused: Boolean;
begin
Result:= FColorBox.Focused;
end;
{$endif}
end.

View file

@ -1,312 +0,0 @@
unit KASComCtrls;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, ComCtrls, Graphics, Dialogs;
type
{ TToolButtonClr }
TToolButtonClr = class(TToolButton)
private
FButtonColor: TColor;
FColorDialog: TColorDialog;
procedure SetButtonColor(AValue: TColor);
protected
procedure Paint; override;
procedure ShowColorDialog;
public
constructor Create(TheOwner: TComponent); override;
procedure Click; override;
property ButtonColor: TColor read FButtonColor write SetButtonColor;
end;
{ TToolBarAdv }
TToolBarAdv = class(TToolBar)
private
FToolBarFlags: TToolBarFlags;
protected
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer;
{%H-}WithThemeSpace: Boolean); override;
procedure AlignControls({%H-}AControl: TControl;
var RemainingClientRect: TRect); override;
function WrapButtons(UseSize: Integer; out NewWidth,
NewHeight: Integer; Simulate: Boolean): Boolean;
end;
procedure Register;
implementation
uses
Math;
{ TToolButtonClr }
procedure TToolButtonClr.SetButtonColor(AValue: TColor);
begin
if FButtonColor <> AValue then
begin
FButtonColor:= AValue;
Invalidate;
end;
end;
procedure TToolButtonClr.Paint;
var
ARect, IconRect: TRect;
begin
inherited Paint;
if (FToolBar <> nil) and (ClientWidth > 0) and (ClientHeight > 0) then
begin
ARect:= ClientRect;
IconRect.Left:= (ARect.Width - FToolBar.ImagesWidth) div 2;
IconRect.Top:= (ARect.Height - FToolBar.ImagesWidth) div 2;
IconRect.Right:= IconRect.Left + FToolBar.ImagesWidth;
IconRect.Bottom:= IconRect.Top + FToolBar.ImagesWidth;
if Enabled then
begin
Canvas.Brush.Style:= bsSolid;
Canvas.Brush.Color:= FButtonColor
end
else begin
Canvas.Brush.Color:= clGrayText;
Canvas.Brush.Style:= bsDiagCross;
end;
Canvas.Pen.Color:= clBtnText;
Canvas.Rectangle(IconRect);
end;
end;
procedure TToolButtonClr.ShowColorDialog;
begin
if not Enabled then Exit;
if (FColorDialog = nil) then
begin
FColorDialog := TColorDialog.Create(Self);
end;
FColorDialog.Color := ButtonColor;
if FColorDialog.Execute then
begin
ButtonColor := FColorDialog.Color;
end;
end;
constructor TToolButtonClr.Create(TheOwner: TComponent);
begin
FButtonColor:= clRed;
inherited Create(TheOwner);
end;
procedure TToolButtonClr.Click;
begin
inherited Click;
ShowColorDialog;
end;
{ TToolBarAdv }
procedure TToolBarAdv.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer; WithThemeSpace: Boolean);
begin
if IsVertical then
WrapButtons(Height, PreferredWidth, PreferredHeight, True)
else
WrapButtons(Width, PreferredWidth, PreferredHeight, True);
end;
procedure TToolBarAdv.AlignControls(AControl: TControl;
var RemainingClientRect: TRect);
var
NewWidth, NewHeight: integer;
begin
if tbfPlacingControls in FToolBarFlags then exit;
Include(FToolBarFlags, tbfPlacingControls);
DisableAlign;
try
AdjustClientRect(RemainingClientRect);
if IsVertical then
WrapButtons(Height, NewWidth, NewHeight, False)
else
WrapButtons(Width, NewWidth, NewHeight, False);
finally
Exclude(FToolBarFlags, tbfPlacingControls);
EnableAlign;
end;
end;
function TToolBarAdv.WrapButtons(UseSize: Integer; out NewWidth,
NewHeight: Integer; Simulate: Boolean): Boolean;
var
ARect: TRect;
X, Y: Integer;
Vertical: Boolean;
LeftToRight: Boolean;
CurControl: TControl;
StartX, StartY: Integer;
FRowWidth, FRowHeight: Integer;
procedure CalculatePosition;
var
NewBounds: TRect;
StartedAtRowStart: Boolean;
begin
if IsVertical then
begin
NewBounds := Bounds(X, Y, FRowWidth, CurControl.Height);
repeat
if (not Wrapable) or
(NewBounds.Top = StartY) or
(NewBounds.Bottom <= ARect.Bottom) then
begin
// control fits into the column
X := NewBounds.Left;
Y := NewBounds.Top;
Break;
end;
// try next column
NewBounds.Top := StartY;
NewBounds.Bottom := NewBounds.Top + CurControl.Height;
Inc(NewBounds.Left, FRowWidth);
Inc(NewBounds.Right, FRowWidth);
until False;
end
else begin
StartedAtRowStart := (X = StartX);
if LeftToRight then
NewBounds := Bounds(X, Y, CurControl.Width, FRowHeight)
else begin
NewBounds := Bounds(X - CurControl.Width, Y, CurControl.Width, FRowHeight);
end;
repeat
if (not Wrapable) or
(StartedAtRowStart) or
(LeftToRight and ((NewBounds.Left = StartX) or (NewBounds.Right <= ARect.Right))) or
((not LeftToRight) and ((NewBounds.Right = StartX) or (NewBounds.Left >= ARect.Left))) then
begin
// control fits into the row
X := NewBounds.Left;
Y := NewBounds.Top;
Break;
end;
StartedAtRowStart := True;
// try next row
if LeftToRight then
begin
NewBounds.Left := StartX;
NewBounds.Right := NewBounds.Left + CurControl.Width;
end else begin
NewBounds.Right := StartX;
NewBounds.Left := NewBounds.Right - CurControl.Width;
end;
Inc(NewBounds.Top, FRowHeight);
Inc(NewBounds.Bottom, FRowHeight);
until False;
end;
end;
var
I: Integer;
W, H: Integer;
CurClientRect: TRect;
AdjustClientFrame: TRect;
begin
NewWidth := 0;
NewHeight := 0;
Result := True;
Vertical := IsVertical;
FRowWidth:= ButtonWidth;
FRowHeight:= ButtonHeight;
if Vertical then
begin
LeftToRight := True;
end
else begin
LeftToRight := not UseRightToLeftAlignment;
end;
DisableAlign;
BeginUpdate;
try
CurClientRect := ClientRect;
if Vertical then
Inc(CurClientRect.Bottom, UseSize - Height)
else begin
Inc(CurClientRect.Right, UseSize - Width);
end;
ARect := CurClientRect;
AdjustClientRect(ARect);
AdjustClientFrame.Left := ARect.Left - CurClientRect.Left;
AdjustClientFrame.Top := ARect.Top - CurClientRect.Top;
AdjustClientFrame.Right := CurClientRect.Right - ARect.Right;
AdjustClientFrame.Bottom := CurClientRect.Bottom - ARect.Bottom;
//DebugLn(['TToolBar.WrapButtons ',DbgSName(Self),' ARect=',dbgs(ARect)]);
// important: top, left button must start in the AdjustClientRect top, left
// otherwise Toolbar.AutoSize=true will create an endless loop
if Vertical or LeftToRight then
StartX := ARect.Left
else begin
StartX := ARect.Right;
end;
StartY := ARect.Top;
X := StartX;
Y := StartY;
for I := 0 to ButtonList.Count - 1 do
begin
CurControl := TControl(ButtonList[I]);
if not CurControl.IsControlVisible then
Continue;
CalculatePosition;
W := CurControl.Width;
H := CurControl.Height;
if (not Simulate) and ((CurControl.Left <> X) or (CurControl.Top <> Y)) then
begin
CurControl.SetBounds(X, Y, W, H); // Note: do not use SetBoundsKeepBase
end;
// adjust NewWidth, NewHeight
if LeftToRight then
NewWidth := Max(NewWidth, X + W + AdjustClientFrame.Right)
else begin
NewWidth := Max(NewWidth, ARect.Right - X + ARect.Left + AdjustClientFrame.Right);
end;
NewHeight := Max(NewHeight, Y + H + AdjustClientFrame.Bottom);
// step to next position
if IsVertical then
Inc(Y, H)
else if LeftToRight then
Inc(X, W);
end;
finally
EndUpdate;
EnableAlign;
end;
end;
procedure Register;
begin
RegisterComponents('KASComponents', [TToolBarAdv]);
RegisterNoIcon([TToolButtonClr]);
end;
end.

View file

@ -26,8 +26,8 @@
"/>
<License Value="GNU GPL 2
"/>
<Version Major="1" Minor="10"/>
<Files Count="12">
<Version Major="1" Minor="9" Release="3"/>
<Files Count="10">
<Item1>
<Filename Value="kastoolbar.pas"/>
<HasRegisterProc Value="True"/>
@ -77,16 +77,6 @@
<HasRegisterProc Value="True"/>
<UnitName Value="KASButtonPanel"/>
</Item10>
<Item11>
<Filename Value="kascomctrls.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="KASComCtrls"/>
</Item11>
<Item12>
<Filename Value="kascontrols.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="kascontrols"/>
</Item12>
</Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3">

View file

@ -10,7 +10,7 @@ interface
uses
KASToolBar, KASProgressBar, KASPathEdit, KASToolItems, KASComboBox,
KASCDEdit, KASStatusBar, KASToolPanel, KASButton, KASButtonPanel,
KASComCtrls, KASControls, LazarusPackageIntf;
LazarusPackageIntf;
implementation
@ -25,8 +25,6 @@ begin
RegisterUnit('KASToolPanel', @KASToolPanel.Register);
RegisterUnit('KASButton', @KASButton.Register);
RegisterUnit('KASButtonPanel', @KASButtonPanel.Register);
RegisterUnit('KASComCtrls', @KASComCtrls.Register);
RegisterUnit('KASControls', @KASControls.Register);
end;
initialization

View file

@ -1,89 +0,0 @@
unit KASControls;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, StdCtrls, ExtCtrls;
type
{ TKASPanel }
TKASPanel = class(TPanel)
private
FOnAutoSize: TNotifyEvent;
protected
procedure DoAutoSize; override;
published
property OnAutoSize: TNotifyEvent read FOnAutoSize write FOnAutoSize;
end;
{ TKASGroupBox }
TKASGroupBox = class(TGroupBox)
private
FOnAutoSize: TNotifyEvent;
protected
procedure DoAutoSize; override;
published
property OnAutoSize: TNotifyEvent read FOnAutoSize write FOnAutoSize;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('KASComponents', [TKASPanel, TKASGroupBox]);
end;
procedure LabelsAutoSize(Self: TWinControl);
var
Index: Integer;
AControl: TControl;
begin
with Self do
begin
DisableAutoSizing;
for Index:= 0 to ControlCount - 1 do
begin
AControl:= Controls[Index];
if (not (AControl is TLabel)) and Assigned(AControl.AnchorSide[akTop].Control) then
begin
if AControl.AnchorSide[akTop].Control is TLabel then
AControl.AnchorSide[akTop].Control.Constraints.MinHeight:= AControl.Height;
end;
end;
EnableAutoSizing;
end;
end;
{ TKASPanel }
procedure TKASPanel.DoAutoSize;
begin
inherited DoAutoSize;
if not (csDesigning in ComponentState) then
begin
LabelsAutoSize(Self);
if Assigned(FOnAutoSize) then FOnAutoSize(Self);
end;
end;
{ TKASGroupBox }
procedure TKASGroupBox.DoAutoSize;
begin
inherited DoAutoSize;
if not (csDesigning in ComponentState) then
begin
LabelsAutoSize(Self);
if Assigned(FOnAutoSize) then FOnAutoSize(Self);
end;
end;
end.

View file

@ -22,86 +22,47 @@
unit KASPathEdit;
{$mode delphi}
{$interfaces corba}
{$IF DEFINED(LCLCOCOA)}
{$modeswitch objectivec1}
{$ENDIF}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
ShellCtrls, LCLType, LCLVersion
{$IF DEFINED(LCLCOCOA)}
, CocoaAll, CocoaWindows
{$ENDIF}
;
ShellCtrls, LCLType, LCLVersion;
type
{ TKASPathEditGetFilesFunc }
TKASPathEditGetFilesFunc = Procedure (
const path: String;
const types: TObjectTypes;
const sort: TFileSortType;
files: TStringList );
{ IKASPathEditMate }
IKASPathEditMate = interface
function getFilesAtPath(
const path: String;
const types: TObjectTypes;
const sort: TFileSortType ): TStringList;
end;
{ TKASPathEdit }
TKASPathEdit = class(TEdit)
private
FMate: IKASPathEditMate;
FKeyDown: Word;
FBasePath: String;
FListBox: TListBox;
FPanel: THintWindow;
FAutoComplete: Boolean;
FGetFilesFunc: TKASPathEditGetFilesFunc;
FStringList: TStringList;
FObjectTypes: TObjectTypes;
FFileSortType: TFileSortType;
private
procedure setTextAndSelect( newText:String );
procedure handleSpecialKeys( var Key: Word );
procedure handleUpKey;
procedure handleDownKey;
procedure AutoComplete(const Path: String);
procedure SetObjectTypes(const AValue: TObjectTypes);
procedure FormChangeBoundsEvent(Sender: TObject);
procedure ListBoxClick(Sender: TObject);
procedure ListBoxMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
private
function isShowingListBox(): Boolean; inline;
procedure ShowListBox;
procedure HideListBox;
protected
{$IF DEFINED(LCLWIN32)}
procedure CreateWnd; override;
{$ENDIF}
{$IF DEFINED(LCLCOCOA)}
procedure TextChanged; override;
{$ENDIF}
procedure DoExit; override;
procedure VisibleChanged; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyUpAfterInterface(var Key: Word; Shift: TShiftState); override;
public
onKeyESCAPE: TNotifyEvent;
onKeyRETURN: TNotifyEvent;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property GetFilesFunc: TKASPathEditGetFilesFunc read FGetFilesFunc write FGetFilesFunc;
property Mate: IKASPathEditMate read FMate write FMate;
published
property ObjectTypes: TObjectTypes read FObjectTypes write SetObjectTypes;
property FileSortType: TFileSortType read FFileSortType write FFileSortType;
@ -151,15 +112,81 @@ begin
RegisterComponents('KASComponents', [TKASPathEdit]);
end;
{ TKASPathEdit }
function TKASPathEdit.isShowingListBox(): Boolean;
function FilesSortAlphabet(List: TStringList; Index1, Index2: Integer): Integer;
begin
Result:= FPanel<>nil;
Result:= CompareFilenames(List[Index1], List[Index2]);
end;
function FilesSortFoldersFirst(List: TStringList; Index1, Index2: Integer): Integer;
var
Attr1, Attr2: IntPtr;
begin
Attr1:= IntPtr(List.Objects[Index1]);
Attr2:= IntPtr(List.Objects[Index2]);
if (Attr1 and faDirectory <> 0) and (Attr2 and faDirectory <> 0) then
Result:= CompareFilenames(List[Index1], List[Index2])
else begin
if (Attr1 and faDirectory <> 0) then
Result:= -1
else begin
Result:= 1;
end;
end;
end;
procedure GetFilesInDir(const ABaseDir: String; AMask: String; AObjectTypes: TObjectTypes;
AResult: TStringList; AFileSortType: TFileSortType);
var
ExcludeAttr: Integer;
SearchRec: TSearchRec;
{$IF DEFINED(MSWINDOWS)}
ErrMode : LongWord;
{$ENDIF}
begin
{$IF DEFINED(MSWINDOWS)}
ErrMode:= SetErrorMode(SEM_FAILCRITICALERRORS or SEM_NOALIGNMENTFAULTEXCEPT or SEM_NOGPFAULTERRORBOX or SEM_NOOPENFILEERRORBOX);
try
{$ENDIF}
if FindFirst(ABaseDir + AMask, faAnyFile, SearchRec) = 0 then
begin
ExcludeAttr:= 0;
if not (otHidden in AObjectTypes) then
ExcludeAttr:= ExcludeAttr or faHidden;
if not (otFolders in AObjectTypes) then
ExcludeAttr:= ExcludeAttr or faDirectory;
repeat
if (SearchRec.Attr and ExcludeAttr <> 0) then
Continue;
if (SearchRec.Name = '.') or (SearchRec.Name = '..')then
Continue;
if (SearchRec.Attr and faDirectory = 0) and not (otNonFolders in AObjectTypes) then
Continue;
AResult.AddObject(SearchRec.Name, TObject(IntPtr(SearchRec.Attr)));
until FindNext(SearchRec) <> 0;
if AResult.Count > 0 then
begin
case AFileSortType of
fstAlphabet: AResult.CustomSort(@FilesSortAlphabet);
fstFoldersFirst: AResult.CustomSort(@FilesSortFoldersFirst);
end;
end;
end;
SysUtils.FindClose(SearchRec);
{$IF DEFINED(MSWINDOWS)}
finally
SetErrorMode(ErrMode);
end;
{$ENDIF}
end;
{ TKASPathEdit }
procedure TKASPathEdit.AutoComplete(const Path: String);
{$IF LCL_FULLVERSION < 4990000}
{$IF LCL_FULLVERSION >= 2020000}
const
AFlags: array[Boolean] of TMaskOptions = (
[moDisableSets], [moDisableSets, moCaseSensitive]
@ -177,49 +204,44 @@ begin
BasePath:= ExtractFilePath(Path);
if CompareFilenames(FBasePath, BasePath) <> 0 then
begin
FreeAndNil(FStringList);
FStringList.Clear;
FBasePath:= BasePath;
if Assigned(FMate) then
FStringList:= FMate.getFilesAtPath(BasePath, FObjectTypes, FFileSortType);
GetFilesInDir(BasePath, AllFilesMask, FObjectTypes, FStringList, FFileSortType);
end;
if (FStringList=nil) or (FStringList.Count<=0) then
Exit;
FListBox.Items.BeginUpdate;
try
// Check mask and make absolute file name
AMask:= TMask.Create(ExtractFileName(Path) + '*',
{$IF LCL_FULLVERSION < 4990000}
AFlags[FileNameCaseSensitive]
{$ELSE}
FileNameCaseSensitive
{$ENDIF}
);
for I:= 0 to FStringList.Count - 1 do
begin
if AMask.Matches(FStringList[I]) then
FListBox.Items.Add(BasePath + FStringList[I]);
end;
AMask.Free;
finally
FListBox.Items.EndUpdate;
end;
if FListBox.Items.Count = 0 then HideListBox;
if FListBox.Items.Count > 0 then
if (FStringList.Count > 0) then
begin
ShowListBox;
// Calculate ListBox height
with FListBox.ItemRect(0) do
I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
with FListBox do
begin
{$IF NOT DEFINED(LCLCOCOA)}
if Items.Count = 1 then
FPanel.ClientHeight:= Self.Height
else
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
FListBox.Items.BeginUpdate;
try
// Check mask and make absolute file name
AMask:= TMask.Create(ExtractFileName(Path) + '*',
{$IF LCL_FULLVERSION >= 2020000}
AFlags[FileNameCaseSensitive]
{$ELSE}
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1) + trunc(i/2);
FileNameCaseSensitive
{$ENDIF}
);
for I:= 0 to FStringList.Count - 1 do
begin
if AMask.Matches(FStringList[I]) then
FListBox.Items.Add(BasePath + FStringList[I]);
end;
AMask.Free;
finally
FListBox.Items.EndUpdate;
end;
if FListBox.Items.Count > 0 then
begin
ShowListBox;
// Calculate ListBox height
with FListBox.ItemRect(0) do
I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
with FListBox do
begin
if Items.Count = 1 then
FPanel.ClientHeight:= Self.Height
else
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
end;
end;
end;
end;
@ -245,7 +267,8 @@ procedure TKASPathEdit.ListBoxClick(Sender: TObject);
begin
if FListBox.ItemIndex >= 0 then
begin
setTextAndSelect( FListBox.Items[FListBox.ItemIndex] );
Text:= FListBox.Items[FListBox.ItemIndex];
SelStart:= UTF8Length(Text);
HideListBox;
SetFocus;
end;
@ -256,24 +279,11 @@ begin
FListBox.ItemIndex:= FListBox.ItemAtPos(Classes.Point(X, Y), True);
end;
{$IF DEFINED(LCLCOCOA)}
procedure cocoaNeedMouseEvent( hintWindow: THintWindow );
var
cnt: TCocoaWindowContent;
begin
cnt:= TCocoaWindowContent( hintWindow.Handle );
cnt.window.setIgnoresMouseEvents( false );
end;
{$ENDIF}
procedure TKASPathEdit.ShowListBox;
begin
if not isShowingListBox() then
if (FPanel = nil) then
begin
FPanel:= THintWindow.Create(Self);
{$IF DEFINED(LCLCOCOA)}
cocoaNeedMouseEvent(FPanel);
{$ENDIF}
FPanel.Color:= clDefault;
FListBox.Parent:= FPanel;
@ -293,7 +303,7 @@ end;
procedure TKASPathEdit.HideListBox;
begin
if isShowingListBox() then
if (FPanel <> nil) then
begin
FPanel.Visible:= False;
FListBox.Parent:= nil;
@ -313,32 +323,6 @@ end;
{$ENDIF}
{$IF DEFINED(LCLCOCOA)}
procedure TKASPathEdit.TextChanged;
begin
Inherited;
if not Modified then
Exit;
if FAutoComplete then
AutoComplete(Text);
end;
{$ENDIF}
procedure TKASPathEdit.setTextAndSelect( newText:String );
var
start: Integer;
begin
if Pos(Text,newText) > 0 then
start:= UTF8Length(Text)
else
start:= UTF8Length(ExtractFilePath(Text));
Text:= newText;
SelStart:= start;
SelLength:= UTF8Length(Text)-SelStart;
end;
procedure TKASPathEdit.DoExit;
begin
HideListBox;
@ -351,56 +335,6 @@ begin
inherited VisibleChanged;
end;
procedure TKASPathEdit.handleSpecialKeys( var Key: Word );
begin
if isShowingListBox() then begin
HideListBox;
Key:= 0;
end else begin
if Key=VK_ESCAPE then begin
if Assigned(onKeyESCAPE) then begin
onKeyESCAPE( self );
Key:= 0;
end;
end else begin
if Assigned(onKeyRETURN) then begin
onKeyRETURN( self );
Key:= 0;
end;
end;
end;
end;
procedure TKASPathEdit.handleUpKey;
begin
if FListBox.ItemIndex = -1 then
FListBox.ItemIndex:= FListBox.Items.Count - 1
else if FListBox.ItemIndex - 1 < 0 then
FListBox.ItemIndex:= - 1
else
FListBox.ItemIndex:= FListBox.ItemIndex - 1;
if FListBox.ItemIndex >= 0 then
setTextAndSelect( FListBox.Items[FListBox.ItemIndex] )
else
setTextAndSelect( ExtractFilePath(Text) );
end;
procedure TKASPathEdit.handleDownKey;
begin
if FListBox.ItemIndex + 1 >= FListBox.Items.Count then
FListBox.ItemIndex:= -1
else if FListBox.ItemIndex = -1 then
FListBox.ItemIndex:= IfThen(FListBox.Items.Count > 0, 0, -1)
else
FListBox.ItemIndex:= FListBox.ItemIndex + 1;
if FListBox.ItemIndex >= 0 then
setTextAndSelect( FListBox.Items[FListBox.ItemIndex] )
else
setTextAndSelect( ExtractFilePath(Text) );
end;
procedure TKASPathEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin
FKeyDown:= Key;
@ -408,21 +342,44 @@ begin
VK_ESCAPE,
VK_RETURN,
VK_SELECT:
handleSpecialKeys( Key );
begin
HideListBox;
end;
VK_UP:
if isShowingListBox() then
if Assigned(FPanel) then
begin
Key:= 0;
handleUpKey();
if FListBox.ItemIndex = -1 then
FListBox.ItemIndex:= FListBox.Items.Count - 1
else if FListBox.ItemIndex - 1 < 0 then
FListBox.ItemIndex:= - 1
else
FListBox.ItemIndex:= FListBox.ItemIndex - 1;
if FListBox.ItemIndex >= 0 then
Text:= FListBox.Items[FListBox.ItemIndex]
else
Text:= ExtractFilePath(Text);
SelStart:= UTF8Length(Text);
end;
VK_DOWN:
if isShowingListBox() then
if Assigned(FPanel) then
begin
Key:= 0;
handleDownKey();
if FListBox.ItemIndex + 1 >= FListBox.Items.Count then
FListBox.ItemIndex:= -1
else if FListBox.ItemIndex = -1 then
FListBox.ItemIndex:= IfThen(FListBox.Items.Count > 0, 0, -1)
else
FListBox.ItemIndex:= FListBox.ItemIndex + 1;
if FListBox.ItemIndex >= 0 then
Text:= FListBox.Items[FListBox.ItemIndex]
else
Text:= ExtractFilePath(Text);
SelStart:= UTF8Length(Text);
end;
end;
inherited KeyDown(Key, Shift);
{$IFDEF LCLGTK2}
// Workaround for GTK2 - up and down arrows moving through controls.
@ -432,7 +389,6 @@ end;
procedure TKASPathEdit.KeyUpAfterInterface(var Key: Word; Shift: TShiftState);
begin
{$IF not DEFINED(LCLCOCOA)}
if (FKeyDown = Key) and FAutoComplete and not (Key in [VK_ESCAPE, VK_RETURN, VK_SELECT, VK_UP, VK_DOWN]) then
begin
if Modified then
@ -441,7 +397,6 @@ begin
AutoComplete(Text);
end;
end;
{$ENDIF}
inherited KeyUpAfterInterface(Key, Shift);
{$IF DEFINED(LCLWIN32)}
// Windows auto-completer eats the TAB so LCL doesn't get it and doesn't move to next control.
@ -454,6 +409,8 @@ constructor TKASPathEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FStringList:= TStringList.Create;
FListBox:= TListBox.Create(Self);
FListBox.TabStop:= False;
FListBox.Align:= alClient;

View file

@ -43,9 +43,6 @@ uses
{$IFDEF LCLQT5}
, qt5, qtwidgets
{$ENDIF}
{$IFDEF LCLQT6}
, qt6, qtwidgets
{$ENDIF}
;
type
@ -160,7 +157,7 @@ procedure TKASProgressBar.SetProgress(CurrentValue: Int64; MaxValue: Int64;
var
wText: String;
{$ENDIF}
{$IF DEFINED(LCLQT) OR DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
{$IF DEFINED(LCLQT) OR DEFINED(LCLQT5)}
var
wText: WideString;
{$ENDIF}
@ -202,7 +199,7 @@ begin
// Have to reset 'show_text' every time because LCLGTK2 will set it according to BarShowText.
gtk_progress_set_show_text(PGtkProgress(Self.Handle), True);
{$ENDIF}
{$IF DEFINED(LCLQT) OR DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
{$IF DEFINED(LCLQT) OR DEFINED(LCLQT5)}
{
%p - is replaced by the percentage completed.
%v - is replaced by the current value.

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Toolbar panel class
Copyright (C) 2006-2023 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2006-2019 Alexander Koblov (alexx2000@mail.ru)
contributors:
2012 Przemyslaw Nagay (cobines@gmail.com)
@ -33,7 +33,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, ComCtrls,
Graphics, Dialogs, ExtCtrls, Buttons, FileUtil, Menus,
DCXmlConfig, KASToolItems, LCLVersion, LMessages;
DCXmlConfig, KASToolItems, LCLVersion;
type
TOnToolButtonClick = procedure (Sender: TObject) of object;
@ -58,23 +58,19 @@ type
FOverlay: TBitmap;
FToolItem: TKASToolItem;
function GetToolBar: TKASToolBar;
function GetGlyphBitmap: TBitmap;
procedure SetGlyphBitmap(bitmap: TBitmap);
protected
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean); override;
function DrawGlyph(ACanvas: TCanvas; const AClient: TRect; const AOffset: TPoint;
AState: TButtonState; ATransparent: Boolean; BiDiFlags: Longint): TRect; override;
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
procedure CMHintShow(var Message: TLMessage); message CM_HINTSHOW;
public
constructor Create(AOwner: TComponent; Item: TKASToolItem); reintroduce; virtual;
constructor Create(AOwner: TComponent; Item: TKASToolItem); reintroduce;
destructor Destroy; override;
procedure Click; override;
public
property ToolBar: TKASToolBar read GetToolBar;
property ToolItem: TKASToolItem read FToolItem;
property Glyph: TBitmap read GetGlyphBitmap write SetGlyphBitmap;
end;
{ TKASToolDivider }
@ -84,17 +80,6 @@ type
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean); override;
procedure Paint; override;
public
constructor Create(AOwner: TComponent; Item: TKASToolItem); override;
end;
{ TKASToolLabel }
TKASToolLabel = class(TKASToolButton)
protected
procedure Paint; override;
public
constructor Create(AOwner: TComponent; Item: TKASToolItem); override;
end;
{ TKASToolBar }
@ -179,9 +164,7 @@ type
procedure RemoveButton(Button: TKASToolButton);
procedure RemoveToolItemExecutor(ExecuteFunction: TOnToolItemExecute);
procedure UncheckAllButtons;
function GlyphBitmapSize: Integer;
procedure UpdateIcon(ToolButton: TKASToolButton);
procedure UpdateIconWithBitmap(ToolButton: TKASToolButton; bitmap: TBitmap);
procedure UseItems(AItems: TKASToolBarItems);
procedure LoadConfiguration(Config: TXmlConfig; RootNode: TXmlNode;
@ -220,7 +203,7 @@ procedure Register;
implementation
uses
Themes, Types, Math, ActnList, LCLType, LCLIntf, DCOSUtils;
Themes, Types, Math, ActnList, DCOSUtils;
type
PToolItemExecutor = ^TToolItemExecutor;
@ -234,29 +217,6 @@ begin
RegisterComponents('KASComponents',[TKASToolBar]);
end;
function findScaleFactorByFirstForm: Double;
begin
Result:= 1;
if Screen.FormCount > 0 then
Result:= Screen.Forms[0].GetCanvasScaleFactor();
end;
function findScaleFactorByControl( control: TControl ): Double;
var
topParent: TControl;
begin
if Assigned(control) then begin
topParent:= control.GetTopParent;
if Assigned(topParent) then
control:= topParent;
if (control is TWinControl) and TWinControl(control).HandleAllocated then begin
Result:= control.GetCanvasScaleFactor;
Exit;
end;
end;
Result:= findScaleFactorByFirstForm();
end;
{ TKASToolBar }
procedure TKASToolBar.InsertButton(InsertAt: Integer; ToolButton: TKASToolButton);
@ -326,19 +286,14 @@ var
procedure CalculatePosition;
var
NewBounds: TRect;
ALineBreak: Boolean;
begin
ALineBreak:= (CurControl is TKASToolDivider) and (not FShowDividerAsButton) and
(TKASToolDivider(CurControl).FToolItem is TKASSeparatorItem) and
(TKASSeparatorItem(TKASToolDivider(CurControl).FToolItem).Style = kssLineBreak);
if IsVertical then
begin
NewBounds := Bounds(x, y, FRowWidth, CurControl.Height);
repeat
if (not Wrapable) or
(NewBounds.Top = StartY) or
((NewBounds.Bottom <= ARect.Bottom) and not ALineBreak) then
(NewBounds.Bottom <= ARect.Bottom) or
(NewBounds.Top = StartY) then
begin
// control fits into the column
x := NewBounds.Left;
@ -357,8 +312,8 @@ var
NewBounds := Bounds(x, y, CurControl.Width, FRowHeight);
repeat
if (not Wrapable) or
(NewBounds.Left = StartX) or
((NewBounds.Right <= ARect.Right) and not ALineBreak) then
(NewBounds.Right <= ARect.Right) or
(NewBounds.Left = StartX) then
begin
// control fits into the row
x := NewBounds.Left;
@ -591,18 +546,10 @@ begin
if FGlyphSize = AValue then Exit;
FGlyphSize:= AValue;
self.Images.Clear;
self.images.Width:= GlyphBitmapSize;
self.images.Height:= GlyphBitmapSize;
self.ImagesWidth:= FGlyphSize;
Self.Images.Scaled := (findScaleFactorByControl(Self) > 1.0);
BeginUpdate;
try
for I := 0 to ButtonList.Count - 1 do begin
TKASToolButton(ButtonList[i]).ImageIndex:= -1;
for I := 0 to ButtonList.Count - 1 do
UpdateIcon(TKASToolButton(ButtonList[i]));
end;
finally
EndUpdate;
end;
@ -781,8 +728,7 @@ begin
ToolButton.FOverlay := FOnLoadButtonOverlay(ToolButton.ToolItem, FGlyphSize div 2, clBtnFace);
end;
if Assigned(Bitmap) then
self.UpdateIconWithBitmap(ToolButton, Bitmap);
ToolButton.Glyph.Assign(Bitmap);
finally
Bitmap.Free;
end;
@ -791,18 +737,6 @@ begin
end;
end;
procedure TKASToolBar.UpdateIconWithBitmap(ToolButton: TKASToolButton;
bitmap: TBitmap);
begin
if ToolButton.ImageIndex < 0 then begin
ToolButton.Images:= self.Images;
ToolButton.ImageIndex:= self.Images.Add( bitmap, nil );
ToolButton.ImageWidth:= self.ImagesWidth;
end else begin
self.Images.Replace( ToolButton.ImageIndex, bitmap, nil );
end;
end;
procedure TKASToolBar.UseItems(AItems: TKASToolBarItems);
var
i: Integer;
@ -893,8 +827,7 @@ end;
constructor TKASToolBar.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
self.images:= TImageList.Create(self);
self.GlyphSize:= 16; // by default
FGlyphSize:= 16; // by default
FUpdateCount:= 0;
FButtonWidth := 23;
FButtonHeight := 22;
@ -915,10 +848,6 @@ begin
begin
Result := TKASToolDivider.Create(Self, Item);
end
else if Item is TKASLabelItem then
begin
Result := TKASToolLabel.Create(Self, Item);
end
else
begin
Result := TKASToolButton.Create(Self, Item);
@ -1096,18 +1025,12 @@ begin
Buttons[I].Down:= False;
end;
function TKASToolBar.GlyphBitmapSize: Integer;
begin
Result:= Round(FGlyphSize * findScaleFactorByControl(self));
end;
{ TKASToolButton }
procedure TKASToolButton.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean);
var
TextSize: TSize;
iconWidth: Integer;
begin
if (Parent = nil) then
inherited
@ -1125,10 +1048,7 @@ begin
begin
// Size to extent of the icon + caption.
TextSize := Canvas.TextExtent(Caption);
iconWidth := self.ImageWidth;
if iconWidth = 0 then
iconWidth := Glyph.Width;
PreferredWidth := Max(TextSize.cx + iconWidth + 16, PreferredWidth);
PreferredWidth := Max(TextSize.cx + Glyph.Width + 16, PreferredWidth);
PreferredHeight := Max(TextSize.cy + 4, PreferredHeight);
end;
end;
@ -1169,17 +1089,6 @@ begin
end;
end;
procedure TKASToolButton.CMHintShow(var Message: TLMessage);
begin
if (ActionLink <> nil) and FToolItem.ActionHint then
begin
inherited CMHintShow(Message);
end
else begin
DoOnShowHint(TCMHintShow(Message).HintInfo);
end;
end;
constructor TKASToolButton.Create(AOwner: TComponent; Item: TKASToolItem);
begin
inherited Create(AOwner);
@ -1202,44 +1111,22 @@ begin
Result := Parent as TKASToolBar;
end;
function TKASToolButton.GetGlyphBitmap: TBitmap;
begin
Result:= Inherited Glyph;
end;
procedure TKASToolButton.SetGlyphBitmap(bitmap: TBitmap);
begin
self.ToolBar.UpdateIconWithBitmap(self, bitmap);
end;
{ TKASToolDivider }
procedure TKASToolDivider.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean);
var
ASize: Integer;
begin
if Assigned(Parent) and (Parent is TKASToolBar) and
(not TKASSeparatorItem(FToolItem).Style) and
(not TKASToolBar(Parent).FShowDividerAsButton) then
begin
if (TKASSeparatorItem(FToolItem).Style = kssSeparator) then
ASize:= 5
else if (TKASSeparatorItem(FToolItem).Style = kssLineBreak) then
ASize:= 0
else begin
ASize:= -1;
end;
if ASize < 0 then
if ToolBar.IsVertical then
begin
inherited;
end
else if ToolBar.IsVertical then
begin
PreferredHeight := ASize;
PreferredHeight := 5;
PreferredWidth := ToolBar.FRowWidth;
end
else begin
PreferredWidth := ASize;
PreferredWidth := 5;
PreferredHeight := ToolBar.FRowHeight;
end;
end
@ -1255,7 +1142,7 @@ begin
if Assigned(Parent) and (Parent is TKASToolBar) and
not TKASToolBar(Parent).FShowDividerAsButton then
begin
if TKASSeparatorItem(FToolItem).Style > kssSeparator then Exit;
if TKASSeparatorItem(FToolItem).Style then Exit;
DividerRect:= ClientRect;
@ -1298,46 +1185,5 @@ begin
inherited Paint;
end;
constructor TKASToolDivider.Create(AOwner: TComponent; Item: TKASToolItem);
begin
inherited Create(AOwner, Item);
ControlStyle:= ControlStyle + [csAutoSize0x0];
end;
{ TKASToolLabel }
procedure TKASToolLabel.Paint;
const
cAlignment: array[TAlignment] of Longint = (DT_LEFT, DT_RIGHT, DT_CENTER);
var
R: TRect;
Flags: Longint;
LabelText: String;
begin
R:= ClientRect;
Canvas.Font:= Font;
LabelText:= Caption;
InflateRect(R, -8, 0);
Canvas.Brush.Color:= Color;
Canvas.Brush.Style:= bsClear;
Flags:= DT_EXPANDTABS or DT_VCENTER;
Flags:= Flags or DT_SINGLELINE or DT_NOPREFIX;
if UseRightToLeftReading then
begin
Flags:= Flags or DT_RTLREADING;
end;
Flags:= Flags or cAlignment[BidiFlipAlignment(Self.Alignment, UseRightToLeftAlignment)];
DrawText(Canvas.Handle, PAnsiChar(LabelText), Length(LabelText), R, Flags or DT_NOCLIP);
end;
constructor TKASToolLabel.Create(AOwner: TComponent; Item: TKASToolItem);
begin
inherited Create(AOwner, Item);
AutoSize:= True;
end;
end.

View file

@ -35,8 +35,6 @@ type
TOnLoadToolItem = procedure (Item: TKASToolItem) of object;
TKASSeparatorStyle = (kssSeparator, kssDivider, kssLineBreak);
{$interfaces corba}
IToolOwner = interface
['{A7908D38-1E13-4E8D-8FA7-8830A2FF9290}']
@ -64,7 +62,6 @@ type
FAction: TBasicAction;
property ToolOwner: IToolOwner read FToolOwner;
public
function ActionHint: Boolean; virtual;
procedure Assign(OtherItem: TKASToolItem); virtual;
function CheckExecute(ToolItemID: String): Boolean; virtual;
function Clone: TKASToolItem; virtual; abstract;
@ -84,7 +81,7 @@ type
TKASSeparatorItem = class(TKASToolItem)
public
Style: TKASSeparatorStyle;
Style: Boolean;
procedure Assign(OtherItem: TKASToolItem); override;
function Clone: TKASToolItem; override;
function ConfigNodeName: String; override;
@ -97,8 +94,6 @@ type
{ TKASNormalItem }
TKASNormalItem = class(TKASToolItem)
private
FShortcutsHint: Boolean;
strict private
FID: String; // Unique identificator of the button
function GetID: String;
@ -110,7 +105,6 @@ type
Icon: String;
Text: String;
Hint: String;
function ActionHint: Boolean; override;
procedure Assign(OtherItem: TKASToolItem); override;
function CheckExecute(ToolItemID: String): Boolean; override;
function Clone: TKASToolItem; override;
@ -142,10 +136,6 @@ type
property SubItems: TKASToolBarItems read FItems;
end;
{ TKASLabelItem }
TKASLabelItem = class(TKASNormalItem);
{ TKASToolBarItems }
TKASToolBarItems = class
@ -193,11 +183,6 @@ uses
{ TKASToolItem }
function TKASToolItem.ActionHint: Boolean;
begin
Result := True;
end;
procedure TKASToolItem.Assign(OtherItem: TKASToolItem);
begin
FUserData := OtherItem.FUserData;
@ -419,20 +404,13 @@ begin
end;
procedure TKASSeparatorItem.Load(Config: TXmlConfig; Node: TXmlNode; Loader: TKASToolBarLoader);
var
OldStyle: Boolean;
AStyle: array[Boolean] of TKASSeparatorStyle = (kssSeparator, kssDivider);
begin
if Config.TryGetValue(Node, 'Style', OldStyle) then
Style := AStyle[OldStyle]
else begin
Style := TKASSeparatorStyle(Config.GetValue(Node, 'Style', Integer(kssSeparator)));
end;
Style := Config.GetValue(Node, 'Style', False);
end;
procedure TKASSeparatorItem.SaveContents(Config: TXmlConfig; Node: TXmlNode);
begin
Config.AddValue(Node, 'Style', Integer(Style));
Config.AddValue(Node, 'Style', Style);
end;
{ TKASNormalItem }
@ -503,10 +481,8 @@ function TKASNormalItem.GetShortcutsHint: String;
begin
if Assigned(FToolOwner) then
Result := FToolOwner.GetToolItemShortcutsHint(Self)
else begin
else
Result := '';
end;
FShortcutsHint := (Length(Result) > 0);
end;
procedure TKASNormalItem.Load(Config: TXmlConfig; Node: TXmlNode; Loader: TKASToolBarLoader);
@ -549,11 +525,6 @@ begin
Config.AddValueDef(Node, 'Text', Text, '');
end;
function TKASNormalItem.ActionHint: Boolean;
begin
Result := not FShortcutsHint;
end;
{ TKASToolBarItems }
constructor TKASToolBarItems.Create;

View file

@ -8,22 +8,15 @@ uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Toolwin;
type
{ TKASToolPanel }
TKASToolPanel = class(TToolWindow)
public
constructor Create(TheOwner: TComponent); override;
published
property Align default alNone;
property Anchors;
property AutoSize;
property BorderSpacing;
property ChildSizing;
property EdgeBorders default [ebTop];
property EdgeInner;
property EdgeOuter;
property OnResize;
property TabOrder;
property Visible;
end;
@ -37,12 +30,4 @@ begin
RegisterComponents('KASComponents',[TKASToolPanel]);
end;
{ TKASToolPanel }
constructor TKASToolPanel.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
EdgeBorders:= [ebTop];
end;
end.

View file

@ -1,19 +1,18 @@
@echo off
rem Compiling components
rem Do not execute this script directly.
rem This script is called from ..\build.bat.
pushd components
lazbuild chsdet\chsdet.lpk %DC_ARCH%
lazbuild multithreadprocs\multithreadprocslaz.lpk %DC_ARCH%
lazbuild kascrypt\kascrypt.lpk %DC_ARCH%
lazbuild doublecmd\doublecmd_common.lpk %DC_ARCH%
lazbuild Image32\Image32.lpk %DC_ARCH%
lazbuild KASToolBar\kascomp.lpk %DC_ARCH%
lazbuild viewer\viewerpackage.lpk %DC_ARCH%
lazbuild gifview\gifview.lpk %DC_ARCH%
lazbuild synunihighlighter\synuni.lpk %DC_ARCH%
lazbuild virtualterminal\virtualterminal.lpk %DC_ARCH%
popd
@echo off
rem Compiling components
rem Do not execute this script directly.
rem This script is called from ..\build.bat.
pushd components
lazbuild chsdet\chsdet.lpk %DC_ARCH%
lazbuild CmdLine\cmdbox.lpk %DC_ARCH%
lazbuild multithreadprocs\multithreadprocslaz.lpk %DC_ARCH%
lazbuild dcpcrypt\dcpcrypt.lpk %DC_ARCH%
lazbuild doublecmd\doublecmd_common.lpk %DC_ARCH%
lazbuild KASToolBar\kascomp.lpk %DC_ARCH%
lazbuild viewer\viewerpackage.lpk %DC_ARCH%
lazbuild gifanim\pkg_gifanim.lpk %DC_ARCH%
lazbuild synunihighlighter\synuni.lpk %DC_ARCH%
popd

View file

@ -25,15 +25,14 @@ fi
basedir=$(pwd)
cd components
$lazbuild chsdet/chsdet.lpk $DC_ARCH
$lazbuild CmdLine/cmdbox.lpk $DC_ARCH
$lazbuild multithreadprocs/multithreadprocslaz.lpk $DC_ARCH
$lazbuild kascrypt/kascrypt.lpk $DC_ARCH
$lazbuild dcpcrypt/dcpcrypt.lpk $DC_ARCH
$lazbuild doublecmd/doublecmd_common.lpk $DC_ARCH
$lazbuild Image32/Image32.lpk $DC_ARCH
$lazbuild KASToolBar/kascomp.lpk $DC_ARCH
$lazbuild viewer/viewerpackage.lpk $DC_ARCH
$lazbuild gifview/gifview.lpk $DC_ARCH
$lazbuild gifanim/pkg_gifanim.lpk $DC_ARCH
$lazbuild synunihighlighter/synuni.lpk $DC_ARCH
$lazbuild virtualterminal/virtualterminal.lpk $DC_ARCH
cd $basedir
# Remove temporary file

View file

@ -0,0 +1,32 @@
Change in v2.0.4.1 by Graeme Geldenhuys (2010)
* Version number bumped to v2.0.4.1
* More fixes for 64-bit support
* Removed a lot of compiler warnings - tested with FPC 2.4.1
Change in v2.0.4 by Graeme Geldenhuys (2009)
* Version number bumped to v2.0.4
* Split the Lazarus package into two separate packages
- one is runtime only package and GUI toolkit independent.
- one is Lazarus design-time only package which installs
components in component palette.
* Updated code to be compilable with FPC 2.4.0-rc1
* Updated code to be compilable with 64-bit FPC 2.4.0-rc1.
- Tested under 32-bit & 64-bit Linux on x86 systems.
Changes since DCPCrypt v2 Beta 3:
* Ported DCPCrypt to Lazarus by Barko in 2006
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

View file

@ -0,0 +1,440 @@
LazarusResources.Add('TDCP_3DES','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#255#238#238#255#254#239#255#255#255#254#204#206#254#204#204#239#236#206#255
+#255#255#254#206#236#238#206#238#254#206#236#239#255#255#254#206#236#238#206
+#255#255#238#236#239#255#255#254#206#236#238#204#239#255#236#206#255#255#255
+#254#206#236#238#206#255#254#206#238#255#255#255#254#206#236#238#206#238#254
+#206#236#239#255#255#254#204#206#254#204#204#239#236#206#255#255#255#255#238
+#239#255#238#238#255#254#239#255#255#255#255#255#255#255#254#239#255#255#255
+#255#255#255#255#255#255#255#236#206#255#255#255#255#255#255#255#255#255#254
+#206#236#239#255#255#255#255#255#255#255#255#255#238#236#239#255#255#255#255
+#255#255#255#255#255#236#206#255#255#255#255#255#255#255#255#255#255#238#236
+#239#255#255#255#255#255#255#255#255#254#206#236#239#255#255#255#255#255#255
+#255#255#255#236#206#255#255#255#255#255#255#255#255#255#255#254#239#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_BLOWFISH','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#254#255#255#254
+#238#255#238#239#255#239#254#255#236#239#255#236#204#238#204#206#254#206#236
+#239#236#239#255#254#206#255#238#236#238#206#236#239#236#238#255#254#206#255
+#254#236#238#206#236#239#236#204#239#254#206#255#236#206#254#204#204#239#236
+#238#255#254#206#254#206#239#254#206#236#239#236#238#239#254#206#254#206#238
+#254#206#236#239#236#204#206#236#204#239#236#204#238#206#236#239#254#238#239
+#254#238#255#254#238#255#239#254#255#254#238#255#254#238#239#254#239#255#254
+#254#255#236#204#239#236#204#206#236#206#255#236#236#239#236#238#206#236#238
+#238#206#236#238#206#206#206#236#238#206#236#239#254#206#236#238#206#206#206
+#236#204#239#236#239#254#206#236#238#206#206#206#236#238#206#236#239#254#206
+#236#238#206#238#206#236#238#206#236#239#254#206#236#238#206#254#206#236#204
+#239#236#239#255#236#206#254#206#254#206#254#238#255#254#255#255#254#239#255
+#239#255#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_CAST128','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#254#238#239#255#238#255#255#255#255#254#204#206#236#204#206#254#204#239#255
+#255#255#255#236#239#236#238#239#236#238#206#255#255#255#255#236#239#254#206
+#255#236#238#206#255#255#255#255#236#239#255#236#239#254#204#239#255#255#255
+#255#236#239#254#254#206#236#238#206#255#255#255#254#204#239#236#238#206#236
+#238#206#255#255#255#255#236#239#254#204#239#254#204#239#255#255#255#255#254
+#255#255#238#255#255#238#255#255#255#255#238#239#254#255#239#254#238#255#255
+#239#255#254#204#206#236#238#206#236#204#239#254#206#255#236#238#239#236#238
+#206#254#238#206#254#206#255#236#239#255#236#238#206#255#238#206#254#206#255
+#236#239#255#236#204#206#254#204#239#254#206#255#236#239#255#236#238#206#236
+#238#255#254#206#255#236#238#239#236#238#206#236#238#239#254#206#255#254#204
+#206#254#204#239#254#204#206#236#204#239#255#238#239#255#238#255#255#238#239
+#254#238#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_CAST256','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#238
+#255#238#239#255#254#239#255#255#255#254#204#204#238#204#206#255#236#206#255
+#255#255#255#236#238#255#238#236#238#206#236#239#255#255#255#255#206#255#238
+#236#238#206#236#239#255#255#255#255#236#238#204#206#254#204#206#255#255#255
+#255#239#236#238#206#239#254#206#238#255#255#255#254#206#236#238#206#238#254
+#206#236#239#255#255#255#236#206#254#204#204#255#236#206#255#255#255#255#254
+#239#255#238#238#255#254#239#255#255#255#238#239#254#255#239#254#238#255#255
+#239#255#254#204#206#236#238#206#236#204#239#254#206#255#236#238#239#236#238
+#206#254#238#206#254#206#255#236#239#255#236#238#206#255#238#206#254#206#255
+#236#239#255#236#204#206#254#204#239#254#206#255#236#239#255#236#238#206#236
+#238#255#254#206#255#236#238#239#236#238#206#236#238#239#254#206#255#254#204
+#206#254#204#239#254#204#206#236#204#239#255#238#239#255#238#255#255#238#239
+#254#238#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_DES','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#238#239#255#238#238#255#254#239#255#255#255#254#204#206#254#204#204#239
+#236#206#255#255#255#254#206#236#238#206#238#254#206#236#239#255#255#254#206
+#236#238#206#255#255#238#236#239#255#255#254#206#236#238#204#239#255#236#206
+#255#255#255#254#206#236#238#206#255#254#206#238#255#255#255#254#206#236#238
+#206#238#254#206#236#239#255#255#254#204#206#254#204#204#239#236#206#255#255
+#255#255#238#239#255#238#238#255#254#239#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_GOST','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#254#239#255#254#239#255#238#239#255#254#255#255#236#206#255#236#206#254#204
+#206#255#236#239#254#206#236#238#206#236#239#238#236#239#236#239#254#206#204
+#238#206#236#239#254#236#239#236#239#254#206#238#254#206#236#239#236#206#255
+#236#239#254#206#254#254#206#236#238#206#239#255#236#239#254#206#236#238#206
+#236#238#206#238#255#236#239#255#236#206#255#236#206#255#236#204#238#204#206
+#255#254#239#255#254#239#255#254#238#255#238#239#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_ICE2','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#254#238#239#255#255#255#255#255#255#255#255#255#236#204#206#255#255#255#255
+#255#255#255#255#255#236#238#239#255#255#255#255#255#255#255#255#255#254#206
+#255#255#255#255#255#255#255#255#255#255#255#236#239#255#255#255#255#255#255
+#255#255#255#254#254#206#255#255#255#255#255#255#255#255#255#236#238#206#255
+#255#255#255#255#255#255#255#255#254#204#239#255#255#255#255#255#255#255#255
+#255#255#238#255#255#255#255#255#255#255#255#238#239#255#238#239#254#238#239
+#255#255#255#254#204#206#254#204#206#236#204#206#255#255#255#255#236#239#236
+#238#239#236#238#239#255#255#255#255#236#239#236#239#255#236#238#255#255#255
+#255#255#236#239#236#239#255#236#204#239#255#255#255#255#236#239#236#239#255
+#236#238#255#255#255#255#255#236#239#236#238#239#236#238#239#255#255#255#254
+#204#206#254#204#206#236#204#206#255#255#255#255#238#239#255#238#239#254#238
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_ICE','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#238#239#255#238#239#254#238#239#255#255#255#254#204#206#254#204#206#236
+#204#206#255#255#255#255#236#239#236#238#239#236#238#239#255#255#255#255#236
+#239#236#239#255#236#238#255#255#255#255#255#236#239#236#239#255#236#204#239
+#255#255#255#255#236#239#236#239#255#236#238#255#255#255#255#255#236#239#236
+#238#239#236#238#239#255#255#255#254#204#206#254#204#206#236#204#206#255#255
+#255#255#238#239#255#238#239#254#238#239#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_IDEA','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#238#239#254#238#255#254#238#239#254#255#239#254#204#206#236#204#239#236#204
+#206#236#238#206#255#236#239#236#238#206#236#238#239#236#238#206#255#236#239
+#236#238#206#236#238#255#236#238#206#255#236#239#236#238#206#236#204#239#236
+#204#206#255#236#239#236#238#206#236#238#255#236#238#206#255#236#239#236#238
+#206#236#238#239#236#238#206#254#204#206#236#204#239#236#204#206#254#204#239
+#255#238#239#254#238#255#254#238#239#255#238#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_MARS','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#239#255#239#239#254#254#255#239#238#239#255#254#206#254#206#206#236#236#238
+#206#204#206#255#254#206#238#206#206#236#236#238#206#238#236#239#254#206#206
+#206#206#236#236#238#206#254#236#239#254#206#206#206#204#204#236#204#239#236
+#206#255#254#204#236#206#206#236#236#238#206#206#239#255#254#204#236#206#206
+#236#236#238#206#206#238#255#254#206#254#206#236#206#236#204#239#236#204#239
+#255#239#255#239#254#239#254#238#255#254#238#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_MISTY1','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#238#239#255#255#255#255#255#255#255#255#255#254#204#206#255#255#255#255
+#255#255#255#255#255#255#236#239#255#255#255#255#255#255#255#255#255#255#236
+#239#255#255#255#255#255#255#255#255#255#255#236#239#255#255#255#255#255#255
+#255#255#255#255#236#239#255#255#255#255#255#255#255#255#255#254#204#239#255
+#255#255#255#255#255#255#255#255#255#236#239#255#255#255#255#255#255#255#255
+#255#255#254#255#255#255#255#255#255#254#255#254#254#238#254#238#255#254#255
+#238#255#236#239#236#236#204#236#204#239#236#238#204#239#236#238#236#238#206
+#254#238#206#236#239#238#206#236#236#236#238#206#255#238#206#236#239#254#206
+#236#236#236#238#206#254#204#239#236#239#236#206#236#206#204#238#206#236#238
+#255#236#238#206#206#236#206#204#238#206#236#238#239#236#238#206#206#236#239
+#236#236#204#238#204#206#204#206#206#206#254#255#254#254#238#255#238#239#238
+#239#239#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RC2','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#239#254#255#254#238#255#238#238#255#255#255#254#206#236#239#236#204#238
+#204#204#239#255#255#254#206#236#238#206#238#254#206#238#255#255#255#254#206
+#236#238#206#255#255#236#239#255#255#255#254#204#206#254#206#255#255#254#206
+#255#255#255#254#206#236#238#206#255#255#239#236#239#255#255#254#206#236#238
+#206#238#254#206#236#239#255#255#254#204#206#255#236#204#239#236#206#255#255
+#255#255#238#239#255#254#238#255#254#239#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RC4','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#239#254#255#254#238#255#255#239#255#255#255#254#206#236#239#236#204#239
+#254#206#255#255#255#254#206#236#238#206#238#255#238#206#255#255#255#254#206
+#236#238#206#255#254#204#204#239#255#255#254#204#206#254#206#255#254#206#206
+#255#255#255#254#206#236#238#206#255#254#206#239#255#255#255#254#206#236#238
+#206#238#254#206#255#255#255#255#254#204#206#255#236#204#238#206#255#255#255
+#255#255#238#239#255#254#238#255#239#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RC5','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#239#254#255#254#238#255#238#239#255#255#255#254#206#236#239#236#204#238
+#204#206#255#255#255#254#206#236#238#206#238#255#238#236#239#255#255#254#206
+#236#238#206#255#255#238#236#239#255#255#254#204#206#254#206#255#254#204#206
+#255#255#255#254#206#236#238#206#255#254#206#239#255#255#255#254#206#236#238
+#206#238#254#206#238#255#255#255#254#204#206#255#236#204#238#204#204#239#255
+#255#255#238#239#255#254#238#255#238#238#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RC6','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#239#254#255#254#238#255#254#239#255#255#255#254#206#236#239#236#204#239
+#236#206#255#255#255#254#206#236#238#206#238#254#206#236#239#255#255#254#206
+#236#238#206#255#254#206#236#239#255#255#254#204#206#254#206#255#254#204#206
+#255#255#255#254#206#236#238#206#255#254#206#238#255#255#255#254#206#236#238
+#206#238#254#206#236#239#255#255#254#204#206#255#236#204#239#236#206#255#255
+#255#255#238#239#255#254#238#255#254#239#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RIJNDAEL','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#254#238#255#254
+#255#239#254#238#239#238#238#255#236#204#239#236#238#206#236#204#206#204#204
+#239#236#238#206#236#238#206#236#238#238#206#238#255#236#238#206#236#238#206
+#236#238#254#206#255#255#236#238#206#236#204#206#236#204#238#206#255#255#236
+#238#206#236#238#206#236#238#254#206#255#255#236#238#206#236#238#206#236#238
+#238#206#255#255#236#204#239#254#204#239#236#204#206#206#255#255#254#238#255
+#255#238#255#254#238#239#239#255#255#254#255#239#254#238#255#254#255#255#239
+#254#255#236#238#206#236#204#239#236#239#254#206#236#239#236#238#206#254#206
+#254#206#206#254#206#236#239#236#238#206#254#206#254#206#206#254#206#204#239
+#236#204#239#254#206#255#238#206#254#206#204#239#236#238#206#254#206#255#254
+#206#254#204#236#239#236#238#206#254#206#255#238#206#254#204#236#239#236#204
+#239#236#204#238#204#204#238#206#236#239#254#238#255#254#238#255#238#238#255
+#239#254#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_SERPENT','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#239#255#254
+#238#239#239#254#255#254#255#255#254#206#255#236#204#206#206#236#239#236#239
+#255#254#206#255#236#238#238#206#204#239#236#239#255#254#206#239#236#238#254
+#206#204#239#236#239#255#254#204#206#236#204#238#204#204#239#236#239#255#254
+#206#236#236#238#254#204#236#239#236#239#255#254#206#236#236#238#238#204#236
+#238#236#238#255#254#204#206#236#204#206#206#236#236#204#204#239#255#238#239
+#254#238#239#239#254#254#238#238#255#255#255#238#239#255#238#238#255#239#254
+#255#255#255#254#204#206#254#204#204#238#206#236#239#255#255#255#238#236#238
+#206#238#254#206#236#239#255#255#255#254#236#238#206#239#254#206#236#239#255
+#255#255#236#206#254#204#206#254#204#206#255#255#255#254#206#239#254#206#239
+#254#206#236#239#255#255#254#206#238#254#206#238#254#206#236#239#255#255#255
+#236#204#238#204#204#238#204#206#255#255#255#255#254#238#255#238#238#255#254
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_TEA','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#254#255#255#238#238#255#239#254#255#255#255#255#236#239#254#204#204#238
+#206#236#239#255#255#255#236#239#254#206#238#254#206#236#239#255#255#255#236
+#239#254#206#255#254#206#236#239#255#255#255#236#239#254#204#239#254#204#204
+#239#255#255#255#236#239#254#206#255#254#206#236#239#255#255#254#236#238#254
+#206#238#254#206#236#239#255#255#236#204#204#238#204#204#239#236#206#255#255
+#255#254#238#238#255#238#238#255#254#239#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_THINICE','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#255#238#239#254#238#239#255#255#255#254#204#206#254#204#206#236#204#206#255
+#255#255#255#236#239#236#238#239#236#238#239#255#255#255#255#236#239#236#239
+#255#236#238#255#255#255#255#255#236#239#236#239#255#236#204#239#255#255#255
+#255#236#239#236#239#255#236#238#255#255#255#255#255#236#239#236#238#239#236
+#238#239#255#255#255#254#204#206#254#204#206#236#204#206#255#255#255#255#238
+#239#255#238#239#254#238#239#255#255#255#254#255#254#255#239#254#238#255#239
+#254#255#255#236#239#236#238#206#236#204#238#206#236#239#255#236#239#236#238
+#206#254#206#254#206#236#239#255#236#239#236#238#206#254#206#254#206#204#239
+#255#236#239#236#204#206#254#206#254#206#204#239#255#236#239#236#238#206#254
+#206#254#204#236#239#255#236#239#236#238#206#254#206#254#204#236#239#254#204
+#206#236#238#206#236#204#238#206#236#239#255#238#239#254#255#239#254#238#255
+#239#254#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_TWOFISH','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#254#255#255#254
+#238#255#238#239#255#239#254#255#236#239#255#236#204#238#204#206#254#206#236
+#239#236#239#255#254#206#255#238#236#238#206#236#239#236#238#255#254#206#255
+#254#236#238#206#236#239#236#204#239#254#206#255#236#206#254#204#204#239#236
+#238#255#254#206#254#206#239#254#206#236#239#236#238#239#254#206#254#206#238
+#254#206#236#239#236#204#206#236#204#239#236#204#238#206#236#239#254#238#239
+#254#238#255#254#238#255#239#254#255#255#255#254#255#255#254#254#255#255#238
+#255#255#255#255#236#239#255#236#236#239#254#204#239#255#255#255#236#239#254
+#206#206#206#236#238#206#255#255#255#236#239#254#206#206#206#236#238#206#255
+#255#255#236#239#254#206#206#206#236#238#206#255#255#255#236#239#254#206#238
+#206#236#238#206#255#255#254#236#238#254#206#254#206#236#238#206#255#255#236
+#204#204#238#206#254#206#254#204#239#255#255#254#238#238#255#239#255#239#255
+#238#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);

View file

@ -0,0 +1,220 @@
LazarusResources.Add('TDCP_HAVAL','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#254#254#254#254#255#239#254#254#254#238#255#255#236#236#236#236#238#206#236
+#236#236#204#239#255#236#236#236#236#236#236#236#236#236#238#255#255#236#236
+#236#236#236#236#236#236#236#239#255#255#236#204#236#204#236#236#236#204#236
+#239#255#255#236#236#236#236#236#236#236#236#236#239#255#255#236#236#236#236
+#236#236#236#236#236#239#255#255#236#236#238#206#236#236#238#206#236#239#255
+#255#254#254#255#239#254#254#255#239#254#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_MD4','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#254#255#254#255#238#239#255#255#239#255#255#255#236#239#236#238#204#206#255
+#254#206#255#255#255#236#239#236#238#206#236#239#238#206#255#255#255#236#238
+#236#238#206#236#238#204#204#239#255#255#236#236#236#238#206#236#238#206#206
+#255#255#255#236#236#236#238#206#236#238#206#239#255#255#255#236#206#204#238
+#206#236#238#206#255#255#255#255#236#239#236#238#204#206#254#206#255#255#255
+#255#254#255#254#255#238#239#255#239#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_MD5','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#254#255#254#255#238#239#255#238#239#255#255#255#236#239#236#238#204#206#254
+#204#206#255#255#255#236#239#236#238#206#236#239#238#236#239#255#255#236#238
+#236#238#206#236#239#254#236#239#255#255#236#236#236#238#206#236#239#236#204
+#239#255#255#236#236#236#238#206#236#238#206#238#255#255#255#236#206#204#238
+#206#236#238#206#238#255#255#255#236#239#236#238#204#206#254#204#204#239#255
+#255#254#255#254#255#238#239#255#238#238#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RIPEMD128','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#254#238#239#255#238#255#255#255#255#254#204#206#236#204#206#254#204#239#255
+#255#255#255#236#239#254#206#239#236#238#206#255#255#255#255#236#239#255#236
+#239#236#238#206#255#255#255#255#236#239#254#254#206#254#204#239#255#255#255
+#255#236#239#236#238#206#236#238#206#255#255#255#254#204#239#236#238#206#236
+#238#206#255#255#255#255#236#239#254#204#239#254#204#239#255#255#255#255#254
+#255#255#238#255#255#238#255#255#255#255#254#255#239#254#255#254#255#238#239
+#255#255#255#236#238#206#236#239#236#238#204#206#255#255#255#236#238#206#236
+#239#236#238#206#236#239#255#255#236#238#206#236#238#236#238#206#236#239#255
+#255#236#204#239#236#236#236#238#206#236#239#255#255#236#238#206#236#236#236
+#238#206#236#239#255#255#236#238#206#236#206#204#238#206#236#239#255#255#236
+#204#239#236#239#236#238#204#206#255#255#255#254#238#255#254#255#254#255#238
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_RIPEMD160','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#255#238#255#255#238#255#255#255#255#254#204#206#254#204#239#254#204#239#255
+#255#255#255#236#239#236#238#206#236#238#206#255#255#255#255#236#239#236#238
+#206#236#238#206#255#255#255#255#236#239#236#204#239#236#238#206#255#255#255
+#255#236#239#236#238#239#236#238#206#255#255#255#254#204#239#236#238#206#236
+#238#206#255#255#255#255#236#239#254#204#239#254#204#239#255#255#255#255#254
+#255#255#238#255#255#238#255#255#255#255#254#255#239#254#255#254#255#238#239
+#255#255#255#236#238#206#236#239#236#238#204#206#255#255#255#236#238#206#236
+#239#236#238#206#236#239#255#255#236#238#206#236#238#236#238#206#236#239#255
+#255#236#204#239#236#236#236#238#206#236#239#255#255#236#238#206#236#236#236
+#238#206#236#239#255#255#236#238#206#236#206#204#238#206#236#239#255#255#236
+#204#239#236#239#236#238#204#206#255#255#255#254#238#255#254#255#254#255#238
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_SHA1','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#254
+#238#255#254#255#239#254#255#239#254#238#255#236#204#239#236#238#206#236#238
+#206#236#204#239#254#238#206#236#238#206#236#238#206#254#206#255#255#238#206
+#236#238#206#236#238#206#254#206#255#254#204#239#236#204#206#236#204#206#254
+#206#255#236#238#255#236#238#206#236#238#206#254#206#255#236#238#239#236#238
+#206#236#238#206#236#206#255#254#204#206#236#238#206#254#204#239#254#206#255
+#255#238#239#254#255#239#255#238#255#255#239#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_SHA256','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#238
+#255#238#239#255#254#239#255#255#255#254#204#204#238#204#206#255#236#206#255
+#255#255#255#236#238#255#238#236#238#206#236#239#255#255#255#254#206#255#254
+#236#238#206#236#239#255#255#255#239#236#239#236#206#254#204#206#255#255#255
+#254#206#236#238#206#239#254#206#239#255#255#255#254#206#236#238#206#238#254
+#206#238#255#255#255#255#236#206#254#204#204#239#236#204#239#255#255#255#254
+#239#255#238#238#255#254#238#255#255#255#255#238#239#255#239#254#255#239#254
+#255#255#255#254#204#206#254#206#236#238#206#236#239#255#255#255#238#236#238
+#206#236#238#206#236#239#255#255#255#254#236#238#206#236#238#206#236#239#255
+#255#255#236#206#254#204#204#238#204#204#239#255#255#254#206#239#254#206#236
+#238#206#236#239#255#255#254#206#238#254#206#236#238#206#236#239#255#255#255
+#236#204#238#206#236#239#236#206#255#255#255#255#254#238#255#239#254#255#254
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_SHA384','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#255#254#239#255#255#239#255#255#255#254#204#206#255#236#206#255#238#206#255
+#255#255#255#238#236#238#206#236#238#204#204#239#255#255#255#254#236#238#206
+#236#238#206#206#255#255#255#255#236#206#255#236#206#254#206#206#255#255#255
+#255#254#236#238#206#236#238#206#239#255#255#255#255#238#236#238#206#236#239
+#236#239#255#255#255#254#204#206#255#236#206#255#236#239#255#255#255#255#238
+#239#255#254#239#255#254#255#255#255#255#255#238#239#255#239#254#255#239#254
+#255#255#255#254#204#206#254#206#236#238#206#236#239#255#255#255#238#236#238
+#206#236#238#206#236#239#255#255#255#254#236#238#206#236#238#206#236#239#255
+#255#255#236#206#254#204#204#238#204#204#239#255#255#254#206#239#254#206#236
+#238#206#236#239#255#255#254#206#238#254#206#236#238#206#236#239#255#255#255
+#236#204#238#206#236#239#236#206#255#255#255#255#254#238#255#239#254#255#254
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_SHA512','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#238#239
+#255#254#238#255#238#238#255#255#255#254#204#206#255#236#204#238#204#204#239
+#255#255#255#238#236#239#254#206#255#236#238#255#255#255#255#254#236#239#254
+#206#255#254#206#255#255#255#255#236#206#255#254#206#255#239#236#239#255#255
+#254#206#239#255#254#206#254#206#236#239#255#255#254#206#238#255#236#206#254
+#206#236#239#255#255#254#204#204#239#254#206#255#236#206#255#255#255#255#238
+#238#255#255#239#255#254#239#255#255#255#255#238#239#255#239#254#255#239#254
+#255#255#255#254#204#206#254#206#236#238#206#236#239#255#255#255#238#236#238
+#206#236#238#206#236#239#255#255#255#254#236#238#206#236#238#206#236#239#255
+#255#255#236#206#254#204#204#238#204#204#239#255#255#254#206#239#254#206#236
+#238#206#236#239#255#255#254#206#238#254#206#236#238#206#236#239#255#255#255
+#236#204#238#206#236#239#236#206#255#255#255#255#254#238#255#239#254#255#254
+#239#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);
LazarusResources.Add('TDCP_TIGER','BMP',[
'BM'#150#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '
+#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#254#255#238#239#238#239#238#239#238#239#255#255#236#238#204#206#204#206#204
+#206#206#206#255#255#236#239#236#238#206#206#206#238#206#206#255#255#236#239
+#236#238#206#206#206#238#206#206#255#255#236#239#236#238#204#238#204#206#204
+#239#255#255#236#239#236#238#206#238#206#238#206#206#255#255#236#239#236#238
+#206#206#206#238#206#206#255#254#204#206#204#206#204#206#204#206#204#239#255
+#255#238#239#238#239#238#239#238#239#238#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255
]);

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more