mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 10:02:10 +08:00
Delphi 2010 has PNG + alpha channel support in TImageList, so we don't need PNGcomponents any longer.
This commit is contained in:
@ -1,37 +0,0 @@
|
||||
PngComponents 1.0 RC3:
|
||||
- Editor: Fixed "invalid header" exception when adding a PNG to the list.
|
||||
- Editor: Everything should now look good on "large fonts" setting.
|
||||
- PngBitBtn: Positioning and drawing of the glyph was sometimes a bit odd.
|
||||
- PngBitBtn: Removed the need to draw an empty TBitmap glyph, prior to drawing the PNG glyph.
|
||||
- PngSpeedButton: The image is now shifted down-right by 1 pixel, when the button is down but not pressed, to match the behavior of a normal SpeedButton.
|
||||
- PngImageList: Fixed range check errors in PngToIcon32.
|
||||
- PngImageList: Fixed possible AccessViolation in PngToIcon32.
|
||||
- PngImageList: Fixed AccessViolation in AddImages.
|
||||
- PngImageList: Fixed memory leak in CopyPngs.
|
||||
- PngImageList: Added BeginUpdate and EndUpdate methods, to temporarily prevent the internal imagelist from being updated.
|
||||
- PngImageList: The patched methods are more efficient, because they now manipulate the internal imagelist directly, rather than relying on CopyPngs.
|
||||
- PngImageList: Added calls to Change in the patched methods.
|
||||
|
||||
PngComponents 1.0 RC2:
|
||||
- Editor: Fixed endless loop when repetitively removing the last image in a list of at least 3 (thanks to Aleksander Oven).
|
||||
- Editor: Fixed possible out-of-bounds error when moving an image down using the Down button (thanks to Spiril).
|
||||
- Editor: Now using Graphics.GetColorValues to retrieve available color identifiers (thanks to LJ and Ryan Mills).
|
||||
- Editor: Rewritten ParseBackgroundColor and SelectBackgroundColor to use IdentToColor, StringToColor and ColorToIdent from Gaphics unit (thanks to LJ and Ryan Mills).
|
||||
- Editor: It is now possible to set the background color to more than 1 selected image.
|
||||
- Editor: Minor GUI fixes
|
||||
- PngBitBtn: When Margin <> -1 and the button is focused, the image must be shifted 1 pixel, to match the behavior of a normal BitBtn.
|
||||
- PngBitBtn: Fixed EPngHeaderNotPresent when assigning a nil to the PngImage property.
|
||||
- PngBitBtn: PngImage property now behaves correctly when assigning an action. Note that the image will not be stored in the DFM if it came from a TActionList.ImageList (thanks to robvdl)
|
||||
- PngSpeedButton: The same fixes that apply to PngBitBtn, applied to PngSpeedButton.
|
||||
- PngImageList: Adding a default action to an imagelist no longer results in out of bounds errors (thanks to robvdl).
|
||||
- PngImageList: 14 methods that couldn't be overridden are now patched (thanks to Vladimir Bochkarev). However, adding a default action to an imagelist still doesn't call the "new" Add method, but supposedly the legacy ImageList_Add() function, which cannot be patched.
|
||||
- PngImageList: Fixed memory leak in CopyPngs (thanks to M. Youssfi).
|
||||
- Common: Added Amount parameter to MakeImageBlended and MakeImageGrayscale.
|
||||
- Common: Added function ConvertToPNG, which converts a TGraphic to a PNG object, if not already.
|
||||
- Common: Added functions CreatePNG and CreatePNGMasked, which create a new PNG object based on a bitmap and a (color or bitmap) mask.
|
||||
- Common: Added function CopyImageFromImageList, which effectively copies an image from a normal imagelist or a PngImageList into a PNG.
|
||||
- Common: Added function SlicePNG for future use. This slices a large PNG object into smaller, equally-sized ones.
|
||||
- Common: Added zlib version 1.2.2 to the PNG package (thanks to Vladimir Bochkarev).
|
||||
|
||||
PngComponents 1.0 RC1:
|
||||
- Initial public release
|
@ -1,73 +0,0 @@
|
||||
END-USER LICENSE AGREEMENT
|
||||
|
||||
All files included in this archive are Copyright (C) 2002-2005
|
||||
Martijn Saly.
|
||||
Use and/or distribution of them requires acceptance of the following License
|
||||
Agreement.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- "Author" herein refers to Martijn Saly (the creator of this package and
|
||||
containing files and software).
|
||||
- "Software" herein refers to all files bearing this notice, as well as any
|
||||
other files and source code included with this package (typically extracted
|
||||
from a .zip or .cab archive), and all content in them, regardless of whether
|
||||
any modifications have been made.
|
||||
- "Compile" herein refers to the automatic process of translating the Software's
|
||||
source code into executable machine code by a compiler such as the one
|
||||
included with Borland's Delphi or C++Builder.
|
||||
|
||||
Except where otherwise noted, all of the documentation and Software included in
|
||||
the this package is copyrighted by Martijn Saly (the Author).
|
||||
|
||||
Copyright (C) 2002-2005 Martijn Saly. All rights reserved.
|
||||
|
||||
|
||||
Use and distribution of the software is permitted provided that all of the
|
||||
following terms are accepted. Terms 5 through 8 apply only to distributions
|
||||
which include source code that one can Compile.
|
||||
|
||||
1) The Software is provided "as-is," without any express or implied warranty. In
|
||||
no event shall the Author be held liable for any damages arising from the use
|
||||
or Compile of the Software.
|
||||
|
||||
2) All redistributions of the Software's files must be in their original,
|
||||
unmodified form. Distributions of modified versions of the files is not
|
||||
permitted without express written permission of the Author.
|
||||
|
||||
3) All redistributions of the Software's files must retain all copyright notices
|
||||
and web site addresses that are currently in place, and must include this
|
||||
list of conditions in its original, unmodified form.
|
||||
|
||||
4) None of the Software's files may be redistributed for profit or as part of
|
||||
another software package without express written permission of the Author.
|
||||
|
||||
5) If applicable, you are permitted to Compile the Software, in orginal or
|
||||
modified form, into any kind of application, including commercial or
|
||||
shareware applications, or any application you are profiting from.
|
||||
|
||||
6) If applicable, redistribution of any of the Software's files in object form
|
||||
(including but not limited to .DCU and .OBJ formats) is strictly prohibited
|
||||
without express written permission of the Author.
|
||||
|
||||
7) If applicable, distribution of the Software in compiled package format
|
||||
(the BPL file) is permitted, as long as the Software is distributed as part
|
||||
of an application.
|
||||
|
||||
8) If applicable, distribution of the Software in compiled package format
|
||||
(the BPL file) is prohibed if the distribution does not specifically belong
|
||||
to an application, written by the same author as the application was written
|
||||
by.
|
||||
|
||||
9) Full backward compatibility in future versions of the Software is not
|
||||
guaranteed. In no event shall the Author be held liable for any inconvenience
|
||||
or damages arising from lack of backward compatibility.
|
||||
|
||||
If you do not agree to all of the above terms, you are not permitted to use or
|
||||
Compile the Software in any way, and all copies of it must be deleted from your
|
||||
system(s).
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Martijn Saly
|
||||
martijn@thany.org
|
@ -1,105 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml10.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>PngComponents</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
|
||||
<style type="text/css">
|
||||
body,table {background-color: white; font: 9pt Verdana,Arial,sans-serif; line-height: 13pt; color: rgb(64,64,64); text-align: justify}
|
||||
body {margin: 0; padding: 6pt 10%}
|
||||
h1,h2 {font-family: Trebuchet MS,Verdana,Arial,sans-serif; letter-spacing: 1pt}
|
||||
h1 {font-size: 14pt; text-align: center}
|
||||
h2 {font-size: 12pt}
|
||||
h2:before {content: "<22>"}
|
||||
h2:after {content: "<22>"}
|
||||
a {color: rgb(24,128,24)}
|
||||
a:hover {background-color: rgb(224,255,236)}
|
||||
a:hover > img {background-color: white}
|
||||
hr {height: 1px; background-color: rgb(96,96,96); color: rgb(96,96,96); border: none; width: 98%}
|
||||
.valid, .smalltitle, .subtitle {font-size: smaller}
|
||||
.subtitle {line-height: 125%; margin-top: 2pt}
|
||||
.smalltitle {text-align: center; margin-top: -1em}
|
||||
.examples {text-align: center}
|
||||
.examples div {margin-left: auto; margin-right: auto; border: solid 1px rgb(96,96,96); text-align: center; padding: 2pt 2pt 0 2pt; display: table}
|
||||
.examples div div {border-width: 0; padding: 0; display: block}
|
||||
strong {font-weight: bold}
|
||||
strong.warning {color: red}
|
||||
abbr {text-decoration: underline; cursor: help}
|
||||
@media print {
|
||||
h1 {margin-bottom: 2em}
|
||||
.valid {display: none}
|
||||
a {text-decoration: none; color: inherit}
|
||||
a[href]:after {content: ' [' attr(href) ']'; font-style: italic}
|
||||
a[rel="email"]:after {content: ' [' attr(title) ']'; font-style: italic}
|
||||
abbr {text-decoration: none}
|
||||
abbr span[title]:after {content: ' [' attr(title) ']'; font-style: italic}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>PngComponents</h1>
|
||||
<p class="smalltitle">This version: 1.0 RC2</p>
|
||||
|
||||
<h2>What is PngComponents?</h2>
|
||||
<p>PngComponents is a set of components that allows you to include in your application real PNG files. PNG files on their own do not generate an enourmous advantage, but their support for an alpha-channel does indeed have quite a charm to it. The PngComponents library supports alpha-channels to their full extend, using a modified version of the excellent <a href="http://pngdelphi.sourceforge.net" title="Visit the homepage for the pngdelphi delphi at SourceForge" target="_blank">pngdelphi</a> library.</p>
|
||||
<div class="examples">
|
||||
<div>
|
||||
<img src="../example images/Computer_32.png" alt="Windows XP computer icon"/>
|
||||
<img src="../example images/RemoteComputer_32.png" alt="Windows XP remote computer icon"/>
|
||||
<img src="../example images/FolderClosed_32.png" alt="Windows XP closed folder icon"/>
|
||||
<img src="../example images/FolderOpen_32.png" alt="Windows XP open folder icon"/>
|
||||
<br/>
|
||||
<div class="subtitle">Examples of PNG images with alpha-channels.<br/>Note that these don't work correctly in Internet Explorer (all versions up to 6).</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>PngComponents' main and most important component is the PngImageList. This is a descendant of the normal TImageList, with in addition full support for PNGs with an alpha-channel. This will enable you to keep using most components that take advantage of imagelists, while actually feeding them icons with alphablending capabilities. Two other very nice components are the PngSpeedButton and the PngBitBtn. These two buttons do not have a Glyph anymore, but in stead, they accept a PNG file to be assigned directly to the button, without the need for an imagelist (just like the normal SpeedButton and BitBtn). And since the PNG glyphs are drawn in realtime, there's no more hassling with WM_DISPLAYCHANGE when the user changes the clBtnFace color in his display settings...</p>
|
||||
<p>Two other components included in the library are the PngImageCollection, which is simply a collection of PNG images. Nothing more, nothing less. The last one is the PngCheckListBox. This one accepts PNG glyphs for the check states. Beside that, it's a completely normal CheckListBox.</p>
|
||||
<p>I've also added a "fix" for Alex Desinov's awesome addon for Jordan Russell's <a href="http://www.jrsoftware.org" title="Visit Jordan Russell's homepage, featuring Toolbar2000, among others" target="_blank">Toolbar2000</a>, called <a href="http://www.g32.org" title="Visit Alex Desinov's homepage, featuring the Toolbar2000 addon, TBX, among others" target="_blank">TBX</a>. This fix is a replacement for the OfficeXP theme. Just replace TBXOfficeXPTheme in your uses clause with PngTBXOfficeXPTheme and that's it! Beautiful alphablended icons become possible in the OfficeXP theme as well.</p>
|
||||
|
||||
<h2>Why should I use PngComponents?</h2>
|
||||
<p>The PngComponents library offers a major leap forward in creating nice GUI's in designtime. Not only does it speed up the implementation of alphablended icons in your application, it eases the way you can use them throughout your software. No longer do you need to put them in a resource file manually and then manually drawing them on a temporary bitmap and assigning that to somewhere. Adding beautiful alphablended icons to your interface is but a few clicks away.</p>
|
||||
|
||||
<h1>Usage</h1>
|
||||
|
||||
<h2>Common</h2>
|
||||
<p>The PngBitBtn and PngSpeedButton both have two extra properties, PngImage and PngOptions. PngImage substitutes the Glyph property with a PNG image, so only PNG files can be loaded into it. PngOptions determines what a disabled glyph looks like. You can choose from a combination of having it blended and having it grayscaled.</p>
|
||||
<p>The PngImageList and PngImageCollection share the same editor. This editor can be used to load PNG files into the respective component. When editing a PngImageList, the editor will only allow PNG files that have the correct dimensions. When editing a PngImageCollection, any PNG can be added. Note that in either case, it doesn't matter if you mix color depths or other properties.</p>
|
||||
<p><em>Note:</em> the beta versions of PngComponents required that you use a PngImageCollection and assign it to the PngImageList.PngImages property. That is no longer the case, i.o.w. the components have been separated completely.</p>
|
||||
|
||||
<h2>The editor</h2>
|
||||
<p>As said before, the PngImageList and PngImageCollection share an editor that allows to modify the contents of the respective component:</p>
|
||||
<ul>
|
||||
<li>The <strong>Add</strong> button will ask for a PNG image. After that, you may set its name and background color. Note that you can select multiple files and add them all at once.</li>
|
||||
<li>The <strong>Delete</strong> button deletes the currently selected image(s), after having asked for confirmation.</li>
|
||||
<li>The <strong>Replace</strong> button only works when a single image is selected. It will ask for a PNG file and will replace the actual image.</li>
|
||||
<li>The <strong>Clear</strong> button empties the list, after having asked for confirmation.</li>
|
||||
<li>The <strong>Up</strong> button moves the currently selected images one position up, if possible.</li>
|
||||
<li>The <strong>Down</strong> button moves the currently selected images one position down, if possible.</li>
|
||||
<li>You can also <strong>drag</strong> images in the listbox. They'll be moved as you drag them, in realtime.</li>
|
||||
<li>Remember that you can select <strong>multiple</strong> images, for your convenience.</li>
|
||||
</ul>
|
||||
<p>The editor will show up when you doubleclick the PngImageList or PngImageCollection component. You may also select <em>Edit images...</em> from its context menu, or doubleclick the PngImageList.PngImages or PngImageCollection.Items property.</p>
|
||||
|
||||
<h2>The ImageList</h2>
|
||||
<p>The ImageList has some features and issues you should probably know about:</p>
|
||||
<ul>
|
||||
<li>The images you add to the list are internally pumped into the "real" imagelist, so that native "API" windows controls, like listviews and treeviews, can take advantage of it. Even though PngImageList tries to make the best out of it, Windows 2000 and earlier simply do not support an alpha channel in an icon and may therefor display it incorrectly. This also applies on Windows XP and later, if you forget to add a manifest to your application. Note that themes support is not required for this to work, just a manifest is enough (themes may even be unavailable).</li>
|
||||
<li>The editor will not crop or resize images that do not conform the dimensions of the imagelist. Unfortunately, this is extremely hard when working with PNG images, due to limitations in the pngdelphi library.</li>
|
||||
<li>Components that do not natively support the PngImageList will not draw disabled images correctly. Those components usually have their own algorithm to generate disabled images, which will not work with the modern-style flashy colorful alpha-blended PNG images. You may want to include another imagelist with the same images, but with the <em>EnabledImages</em> property set to False.</li>
|
||||
</ul>
|
||||
|
||||
<h2>The OfficeXP fix</h2>
|
||||
<p>A small introduction: Jordan Russell's <a href="http://www.jrsoftware.org" title="Visit Jordan Russell's homepage, featuring Toolbar2000, among others" target="_blank">Toolbar2000</a> is a set of components for creating Office 2000-style toolbars and such. Alex Desinov's <a href="http://www.g32.org" title="Visit Alex Desinov's homepage, featuring the Toolbar2000 addon, TBX, among others" target="_blank">TBX</a> is an add-on package that adds even more functionality as well as theming. This allows for themes like "OfficeXP", "Office2003" and more.</p>
|
||||
<p>The OfficeXP theme comes standard with TBX and it's the one getting in major trouble when using in combination with PngComponents. The alpha-blended area's look ugly, images may show dark borders, and other kinds of artefacts may show up.</p>
|
||||
<p>The fix I've included is as simple as it is effective; it's a unit called PngTBXOfficeXPTheme. If you replace TBXOfficeXPTheme in your uses clauses with PngTBXOfficeXPTheme, you should be all set! You will not have the fancy looks in designtime, but in runtime your application will look better than ever.</p>
|
||||
<p><strong class="warning">Warning!</strong> If you still need TBXOfficeXPTheme included in your uses clause, then make sure PngTBXOfficeXPTheme gets initialized <strong>after</strong> TBXOfficeXPTheme, or it will not work as expected.</p>
|
||||
|
||||
<h1>Miscellaneous</h1>
|
||||
<h2>Feedback</h2>
|
||||
<p>I love to get feedback! You can either go to the <abbr><span title="Server: news.jrsoftware.org - Group: jrsoftware.toolbar2000.thirdparty - no username or password is required">newsgroup</span></abbr> or <a href="mailto:martijn@thany.org?subject=PngComponents" rel="email" title="martijn@thany.org">send me an e-mail</a> if you have a specific question.</p>
|
||||
<h2>Legal</h2>
|
||||
<p>See the License.txt file included in the archive. If the file is not there, the ZIP file is not a genuine PngComponents download!</p>
|
||||
|
||||
<hr/>
|
||||
<table class="valid" cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td style="width: 100%">This page is best viewed with <a href="http://www.opera.com/" target="_blank">Opera</a> or <a href="http://www.mozilla.org/products/firefox/" target="_blank">Firefox</a>. This page is also optmized for <a href="javascript:window.print();">printing</a>.</td><td><a href="http://jigsaw.w3.org/css-validator" title="Valid CSS 2.0!" target="_blank"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS 2.0!" height="31" width="88"/></a> <a href="http://validator.w3.org/" title="Valid XHTML 1.0 Transitional!" target="_blank"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional!" height="31" width="88"/></a></td></tr></table>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
@ -1,37 +0,0 @@
|
||||
package PNG;
|
||||
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO ON}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$OVERFLOWCHECKS ON}
|
||||
{$RANGECHECKS ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS ON}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'PNG image runtime/designtime'}
|
||||
{$LIBSUFFIX '110'}
|
||||
{$IMPLICITBUILD OFF}
|
||||
|
||||
requires
|
||||
vcl,
|
||||
rtl;
|
||||
|
||||
contains
|
||||
pngimage in '..\..\source\pngimage.pas',
|
||||
pnglang in '..\..\source\pnglang.pas',
|
||||
pngzlib in '..\..\source\pngzlib.pas';
|
||||
|
||||
end.
|
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{3adf4b67-001b-48bd-8974-5d17cf2057f3}</ProjectGuid>
|
||||
<MainSource>PNG.dpk</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PNG110.bpl</DCC_DependencyCheckOutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DcuOutput>..\..\build</DCC_DcuOutput>
|
||||
<DCC_ObjOutput>..\..\build</DCC_ObjOutput>
|
||||
<DCC_HppOutput>..\..\build</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\build</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\build</DCC_DcpOutput>
|
||||
<DCC_UnitSearchPath>..\..\build</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\..\build</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\..\build</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\..\build</DCC_IncludePath>
|
||||
<DCC_TypedAtParameter>True</DCC_TypedAtParameter>
|
||||
<DCC_IntegerOverflowCheck>True</DCC_IntegerOverflowCheck>
|
||||
<DCC_RangeChecking>True</DCC_RangeChecking>
|
||||
<DCC_GenerateStackFrames>True</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="PackageDescription">PNG image runtime/designtime</Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options><Package_Options Name="LibSuffix">110</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1031</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">PNG.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="PNG.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\source\pngimage.pas" />
|
||||
<DCCReference Include="..\..\source\pnglang.pas" />
|
||||
<DCCReference Include="..\..\source\pngzlib.pas" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,43 +0,0 @@
|
||||
package PngComponents;
|
||||
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO ON}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$OVERFLOWCHECKS ON}
|
||||
{$RANGECHECKS ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS ON}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Png components'}
|
||||
{$LIBSUFFIX '110'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
vclactnband,
|
||||
vcl,
|
||||
rtl,
|
||||
PNG;
|
||||
|
||||
contains
|
||||
PngSpeedButton in '..\..\source\PngSpeedButton.pas',
|
||||
PngFunctions in '..\..\source\PngFunctions.pas',
|
||||
PngImageList in '..\..\source\PngImageList.pas',
|
||||
PngBitBtn in '..\..\source\PngBitBtn.pas',
|
||||
PngButtonFunctions in '..\..\source\PngButtonFunctions.pas',
|
||||
PngCheckListBox in '..\..\source\PngCheckListBox.pas';
|
||||
|
||||
end.
|
@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{c1b67ac4-6c06-4206-850d-5f5efcc7880b}</ProjectGuid>
|
||||
<MainSource>PngComponents.dpk</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PngComponents110.bpl</DCC_DependencyCheckOutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_UnitSearchPath>..\..\..\source;..\..\build</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\..\..\..\source;..\..\build</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\..\..\..\source;..\..\build</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\..\..\..\source;..\..\build</DCC_IncludePath>
|
||||
<DCC_DcuOutput>..\..\build</DCC_DcuOutput>
|
||||
<DCC_ObjOutput>..\..\build</DCC_ObjOutput>
|
||||
<DCC_HppOutput>..\..\build</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\build</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\build</DCC_DcpOutput>
|
||||
<DCC_TypedAtParameter>True</DCC_TypedAtParameter>
|
||||
<DCC_IntegerOverflowCheck>True</DCC_IntegerOverflowCheck>
|
||||
<DCC_RangeChecking>True</DCC_RangeChecking>
|
||||
<DCC_GenerateStackFrames>True</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="PackageDescription">Png components</Package_Options><Package_Options Name="ImplicitBuild">True</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">True</Package_Options><Package_Options Name="LibSuffix">110</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1031</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">PngComponents.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="PngComponents.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\source\PngBitBtn.pas" />
|
||||
<DCCReference Include="..\..\source\PngButtonFunctions.pas" />
|
||||
<DCCReference Include="..\..\source\PngCheckListBox.pas" />
|
||||
<DCCReference Include="..\..\source\PngFunctions.pas" />
|
||||
<DCCReference Include="..\..\source\PngImageList.pas" />
|
||||
<DCCReference Include="..\..\source\PngSpeedButton.pas" />
|
||||
<DCCReference Include="PNG.dcp" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
<DCCReference Include="vclactnband.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,49 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{02633fc8-2f46-4d55-a3cf-c9c04bee06a7}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="PNG">
|
||||
<MSBuild Projects="PNG.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PNG:Clean">
|
||||
<MSBuild Projects="PNG.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PNG:Make">
|
||||
<MSBuild Projects="PNG.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PngComponents" DependsOnTargets="PNG">
|
||||
<MSBuild Projects="PngComponents.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PngComponents:Clean" DependsOnTargets="PNG:Clean">
|
||||
<MSBuild Projects="PngComponents.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PngComponents:Make" DependsOnTargets="PNG:Make">
|
||||
<MSBuild Projects="PngComponents.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD" DependsOnTargets="PNG;PngComponents">
|
||||
<MSBuild Projects="PngComponentsD.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD:Clean" DependsOnTargets="PNG:Clean;PngComponents:Clean">
|
||||
<MSBuild Projects="PngComponentsD.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD:Make" DependsOnTargets="PNG:Make;PngComponents:Make">
|
||||
<MSBuild Projects="PngComponentsD.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="PNG;PngComponents;PngComponentsD" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="PNG:Clean;PngComponents:Clean;PngComponentsD:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="PNG:Make;PngComponents:Make;PngComponentsD:Make" />
|
||||
</Target>
|
||||
</Project>
|
@ -1,47 +0,0 @@
|
||||
package PngComponentsD;
|
||||
|
||||
{$R '..\..\source\PngComponents.dcr'}
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO ON}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$OVERFLOWCHECKS ON}
|
||||
{$RANGECHECKS ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS ON}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Png components designtime'}
|
||||
{$LIBSUFFIX '110'}
|
||||
{$DESIGNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
designide;
|
||||
|
||||
contains
|
||||
PngSpeedButton in '..\..\source\PngSpeedButton.pas',
|
||||
PngCheckListBox in '..\..\source\PngCheckListBox.pas',
|
||||
PngButtonFunctions in '..\..\source\PngButtonFunctions.pas',
|
||||
PngBitBtn in '..\..\source\PngBitBtn.pas',
|
||||
pngzlib in '..\..\source\pngzlib.pas',
|
||||
pnglang in '..\..\source\pnglang.pas',
|
||||
PngFunctions in '..\..\source\PngFunctions.pas',
|
||||
PngImageList in '..\..\source\PngImageList.pas',
|
||||
pngimage in '..\..\source\pngimage.pas',
|
||||
PngComponentsRegister in '..\..\source\PngComponentsRegister.pas',
|
||||
PngComponentEditors in '..\..\source\PngComponentEditors.pas',
|
||||
PngImageListEditor in '..\..\source\PngImageListEditor.pas' {PngImageListEditorDlg};
|
||||
|
||||
end.
|
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{86eae7f6-8975-4793-8cd9-a56637d060d5}</ProjectGuid>
|
||||
<MainSource>PngComponentsD.dpk</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PngComponentsD110.bpl</DCC_DependencyCheckOutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_UnitSearchPath>..\..\..\..\source;..\..\build</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\..\..\..\source;..\..\build</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\..\..\..\source;..\..\build</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\..\..\..\source;..\..\build</DCC_IncludePath>
|
||||
<DCC_DcuOutput>..\..\build</DCC_DcuOutput>
|
||||
<DCC_ObjOutput>..\..\build</DCC_ObjOutput>
|
||||
<DCC_HppOutput>..\..\build</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\build</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\build</DCC_DcpOutput>
|
||||
<DCC_TypedAtParameter>True</DCC_TypedAtParameter>
|
||||
<DCC_IntegerOverflowCheck>True</DCC_IntegerOverflowCheck>
|
||||
<DCC_RangeChecking>True</DCC_RangeChecking>
|
||||
<DCC_GenerateStackFrames>True</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="PackageDescription">Png components designtime</Package_Options><Package_Options Name="ImplicitBuild">True</Package_Options><Package_Options Name="DesigntimeOnly">True</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options><Package_Options Name="LibSuffix">110</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1031</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">PngComponentsD.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="PngComponentsD.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\source\PngBitBtn.pas" />
|
||||
<DCCReference Include="..\..\source\PngButtonFunctions.pas" />
|
||||
<DCCReference Include="..\..\source\PngCheckListBox.pas" />
|
||||
<DCCReference Include="..\..\source\PngComponentEditors.pas" />
|
||||
<DCCReference Include="..\..\source\PngComponents.dcr" />
|
||||
<DCCReference Include="..\..\source\PngComponents.dcr" />
|
||||
<DCCReference Include="..\..\source\PngComponentsRegister.pas" />
|
||||
<DCCReference Include="..\..\source\PngFunctions.pas" />
|
||||
<DCCReference Include="..\..\source\pngimage.pas" />
|
||||
<DCCReference Include="..\..\source\PngImageList.pas" />
|
||||
<DCCReference Include="..\..\source\PngImageListEditor.pas">
|
||||
<Form>PngImageListEditorDlg</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="designide.dcp" />
|
||||
<DCCReference Include="..\..\source\pnglang.pas" />
|
||||
<DCCReference Include="..\..\source\PngSpeedButton.pas" />
|
||||
<DCCReference Include="..\..\source\pngzlib.pas" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,42 +0,0 @@
|
||||
package PngComponents;
|
||||
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS OFF}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO OFF}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Png Components'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
vclactnband,
|
||||
vcl,
|
||||
rtl,
|
||||
vclimg;
|
||||
|
||||
contains
|
||||
PngSpeedButton in '..\..\source\PngSpeedButton.pas',
|
||||
PngFunctions in '..\..\source\PngFunctions.pas',
|
||||
PngImageList in '..\..\source\PngImageList.pas',
|
||||
PngBitBtn in '..\..\source\PngBitBtn.pas',
|
||||
PngButtonFunctions in '..\..\source\PngButtonFunctions.pas',
|
||||
PngCheckListBox in '..\..\source\PngCheckListBox.pas';
|
||||
|
||||
end.
|
@ -1,133 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{c1b67ac4-6c06-4206-850d-5f5efcc7880b}</ProjectGuid>
|
||||
<MainSource>PngComponents.dpk</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PngComponents.bpl</DCC_DependencyCheckOutputName>
|
||||
<ProjectVersion>12.0</ProjectVersion>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_DependencyCheckOutputName>C:\Dokumente und Einstellungen\All Users\Dokumente\RAD Studio\7.0\Bpl\PngComponents.bpl</DCC_DependencyCheckOutputName>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<RuntimeOnlyPackage>true</RuntimeOnlyPackage>
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Description>Png Components</DCC_Description>
|
||||
<GenPackage>true</GenPackage>
|
||||
<GenDll>true</GenDll>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DesignOnlyPackage>false</DesignOnlyPackage>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_UnitSearchPath>..\..\..\..\source;..\..\build;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PngComponents.bpl</DCC_DependencyCheckOutputName>
|
||||
<Version>7.0</Version>
|
||||
<DCC_UnitSearchPath>..\..\..\..\source;..\..\build;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\..\..\..\source;..\..\build;$(DCC_ResourcePath)</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\..\..\..\source;..\..\build;$(DCC_ObjPath)</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\..\..\..\source;..\..\build;$(DCC_IncludePath)</DCC_IncludePath>
|
||||
<DCC_DcuOutput>..\..\build</DCC_DcuOutput>
|
||||
<DCC_ObjOutput>..\..\build</DCC_ObjOutput>
|
||||
<DCC_HppOutput>..\..\build</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\build</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\build</DCC_DcpOutput>
|
||||
<DCC_TypedAtParameter>True</DCC_TypedAtParameter>
|
||||
<DCC_IntegerOverflowCheck>True</DCC_IntegerOverflowCheck>
|
||||
<DCC_RangeChecking>True</DCC_RangeChecking>
|
||||
<DCC_GenerateStackFrames>True</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1031</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">PngComponents.dpk</Source>
|
||||
</Source>
|
||||
</Delphi.Personality>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="PngComponents.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="vclactnband.dcp"/>
|
||||
<DCCReference Include="vcl.dcp"/>
|
||||
<DCCReference Include="rtl.dcp"/>
|
||||
<DCCReference Include="vclimg.dcp"/>
|
||||
<DCCReference Include="..\..\source\PngSpeedButton.pas"/>
|
||||
<DCCReference Include="..\..\source\PngFunctions.pas"/>
|
||||
<DCCReference Include="..\..\source\PngImageList.pas"/>
|
||||
<DCCReference Include="..\..\source\PngBitBtn.pas"/>
|
||||
<DCCReference Include="..\..\source\PngButtonFunctions.pas"/>
|
||||
<DCCReference Include="..\..\source\PngCheckListBox.pas"/>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
</Project>
|
@ -1,49 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{02633fc8-2f46-4d55-a3cf-c9c04bee06a7}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="PNG">
|
||||
<MSBuild Projects="PNG.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PNG:Clean">
|
||||
<MSBuild Projects="PNG.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PNG:Make">
|
||||
<MSBuild Projects="PNG.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PngComponents" DependsOnTargets="PNG">
|
||||
<MSBuild Projects="PngComponents.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PngComponents:Clean" DependsOnTargets="PNG:Clean">
|
||||
<MSBuild Projects="PngComponents.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PngComponents:Make" DependsOnTargets="PNG:Make">
|
||||
<MSBuild Projects="PngComponents.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD" DependsOnTargets="PNG;PngComponents">
|
||||
<MSBuild Projects="PngComponentsD.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD:Clean" DependsOnTargets="PNG:Clean;PngComponents:Clean">
|
||||
<MSBuild Projects="PngComponentsD.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD:Make" DependsOnTargets="PNG:Make;PngComponents:Make">
|
||||
<MSBuild Projects="PngComponentsD.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="PNG;PngComponents;PngComponentsD" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="PNG:Clean;PngComponents:Clean;PngComponentsD:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="PNG:Make;PngComponents:Make;PngComponentsD:Make" />
|
||||
</Target>
|
||||
</Project>
|
@ -1,38 +0,0 @@
|
||||
package PngComponentsD;
|
||||
|
||||
{$R '..\..\source\PngComponents.dcr'}
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS OFF}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO OFF}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Png components designtime'}
|
||||
{$DESIGNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
designide,
|
||||
PngComponents;
|
||||
|
||||
contains
|
||||
PngComponentsRegister in '..\..\source\PngComponentsRegister.pas',
|
||||
PngComponentEditors in '..\..\source\PngComponentEditors.pas',
|
||||
PngImageListEditor in '..\..\source\PngImageListEditor.pas' {PngImageListEditorDlg};
|
||||
|
||||
end.
|
@ -1,130 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{86eae7f6-8975-4793-8cd9-a56637d060d5}</ProjectGuid>
|
||||
<MainSource>PngComponentsD.dpk</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PngComponentsD.bpl</DCC_DependencyCheckOutputName>
|
||||
<ProjectVersion>12.0</ProjectVersion>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_DependencyCheckOutputName>C:\Dokumente und Einstellungen\All Users\Dokumente\RAD Studio\7.0\Bpl\PngComponentsD.bpl</DCC_DependencyCheckOutputName>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Description>Png components designtime</DCC_Description>
|
||||
<DesignOnlyPackage>true</DesignOnlyPackage>
|
||||
<GenPackage>true</GenPackage>
|
||||
<GenDll>true</GenDll>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_UnitSearchPath>..\..\..\..\source;..\..\build;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_DependencyCheckOutputName>..\..\build\PngComponentsD.bpl</DCC_DependencyCheckOutputName>
|
||||
<Version>7.0</Version>
|
||||
<DCC_UnitSearchPath>..\..\..\..\source;..\..\build;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\..\..\..\source;..\..\build;$(DCC_ResourcePath)</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\..\..\..\source;..\..\build;$(DCC_ObjPath)</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\..\..\..\source;..\..\build;$(DCC_IncludePath)</DCC_IncludePath>
|
||||
<DCC_DcuOutput>..\..\build</DCC_DcuOutput>
|
||||
<DCC_ObjOutput>..\..\build</DCC_ObjOutput>
|
||||
<DCC_HppOutput>..\..\build</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\build</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\build</DCC_DcpOutput>
|
||||
<DCC_TypedAtParameter>True</DCC_TypedAtParameter>
|
||||
<DCC_IntegerOverflowCheck>True</DCC_IntegerOverflowCheck>
|
||||
<DCC_RangeChecking>True</DCC_RangeChecking>
|
||||
<DCC_GenerateStackFrames>True</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1031</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">PngComponentsD.dpk</Source>
|
||||
</Source>
|
||||
</Delphi.Personality>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="PngComponentsD.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\source\PngComponents.dcr"/>
|
||||
<DCCReference Include="designide.dcp"/>
|
||||
<DCCReference Include="PngComponents.dcp"/>
|
||||
<DCCReference Include="..\..\source\PngComponentsRegister.pas"/>
|
||||
<DCCReference Include="..\..\source\PngComponentEditors.pas"/>
|
||||
<DCCReference Include="..\..\source\PngImageListEditor.pas">
|
||||
<Form>PngImageListEditorDlg</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
</Project>
|
@ -1,242 +0,0 @@
|
||||
unit PngBitBtn;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, Classes, Graphics, Controls, Buttons, pngimage, PngFunctions;
|
||||
|
||||
type
|
||||
TPngBitBtn = class(TBitBtn)
|
||||
private
|
||||
FPngImage: TPngImage;
|
||||
FPngOptions: TPngOptions;
|
||||
FCanvas: TCanvas;
|
||||
FLastKind: TBitBtnKind;
|
||||
FImageFromAction: Boolean;
|
||||
FMouseInControl: Boolean;
|
||||
IsFocused: Boolean;
|
||||
function PngImageStored: Boolean;
|
||||
procedure SetPngImage(const Value: TPngImage);
|
||||
procedure SetPngOptions(const Value: TPngOptions);
|
||||
procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
|
||||
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
|
||||
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
|
||||
protected
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
|
||||
procedure SetButtonStyle(ADefault: Boolean); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property PngImage: TPngImage read FPngImage write SetPngImage stored PngImageStored;
|
||||
property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
|
||||
property Glyph stored False;
|
||||
property NumGlyphs stored False;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ActnList, Themes, PngButtonFunctions;
|
||||
|
||||
{ TPngBitBtn }
|
||||
|
||||
constructor TPngBitBtn.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FPngImage := TPngImage.Create;
|
||||
FPngOptions := [pngBlendOnDisabled];
|
||||
FCanvas := TCanvas.Create;
|
||||
FLastKind := bkCustom;
|
||||
FImageFromAction := False;
|
||||
end;
|
||||
|
||||
destructor TPngBitBtn.Destroy;
|
||||
begin
|
||||
FPngImage.Free;
|
||||
FCanvas.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.ActionChange(Sender: TObject; CheckDefaults: Boolean);
|
||||
begin
|
||||
inherited ActionChange(Sender, CheckDefaults);
|
||||
if Sender is TCustomAction then begin
|
||||
with TCustomAction(Sender) do begin
|
||||
//Copy image from action's imagelist
|
||||
if (PngImage.Empty or FImageFromAction) and (ActionList <> nil) and
|
||||
(ActionList.Images <> nil) and (ImageIndex >= 0) and (ImageIndex <
|
||||
ActionList.Images.Count) then begin
|
||||
CopyImageFromImageList(FPngImage, ActionList.Images, ImageIndex);
|
||||
FImageFromAction := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.SetButtonStyle(ADefault: Boolean);
|
||||
begin
|
||||
inherited SetButtonStyle(ADefault);
|
||||
if ADefault <> IsFocused then begin
|
||||
IsFocused := ADefault;
|
||||
Refresh;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPngBitBtn.PngImageStored: Boolean;
|
||||
begin
|
||||
Result := not FImageFromAction;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.SetPngImage(const Value: TPngImage);
|
||||
begin
|
||||
//This is all neccesary, because you can't assign a nil to a TPngImage
|
||||
if Value = nil then begin
|
||||
FPngImage.Free;
|
||||
FPngImage := TPngImage.Create;
|
||||
end
|
||||
else begin
|
||||
FPngImage.Assign(Value);
|
||||
end;
|
||||
|
||||
//To work around the gamma-problem
|
||||
with FPngImage do
|
||||
if not Empty and (Header.ColorType in [COLOR_RGB, COLOR_RGBALPHA, COLOR_PALETTE]) then
|
||||
Chunks.RemoveChunk(Chunks.ItemFromClass(TChunkgAMA));
|
||||
|
||||
FImageFromAction := False;
|
||||
Repaint;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.SetPngOptions(const Value: TPngOptions);
|
||||
begin
|
||||
if FPngOptions <> Value then begin
|
||||
FPngOptions := Value;
|
||||
Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.CNDrawItem(var Message: TWMDrawItem);
|
||||
var
|
||||
R, PaintRect: TRect;
|
||||
GlyphPos, TextPos: TPoint;
|
||||
IsDown, IsDefault: Boolean;
|
||||
Flags: Cardinal;
|
||||
Button: TThemedButton;
|
||||
Details: TThemedElementDetails;
|
||||
begin
|
||||
R := ClientRect;
|
||||
FCanvas.Handle := Message.DrawItemStruct^.hDC;
|
||||
FCanvas.Font := Self.Font;
|
||||
IsDown := Message.DrawItemStruct^.itemState and ODS_SELECTED <> 0;
|
||||
IsDefault := Message.DrawItemStruct^.itemState and ODS_FOCUS <> 0;
|
||||
|
||||
//Draw the border
|
||||
if ThemeServices.ThemesEnabled then begin
|
||||
//Themed border
|
||||
if not Enabled then
|
||||
Button := tbPushButtonDisabled
|
||||
else if IsDown then
|
||||
Button := tbPushButtonPressed
|
||||
else if FMouseInControl then
|
||||
Button := tbPushButtonHot
|
||||
else if IsFocused or IsDefault then
|
||||
Button := tbPushButtonDefaulted
|
||||
else
|
||||
Button := tbPushButtonNormal;
|
||||
|
||||
//Paint the background, border, and finally get the inner rect
|
||||
Details := ThemeServices.GetElementDetails(Button);
|
||||
ThemeServices.DrawParentBackground(Handle, Message.DrawItemStruct.hDC, @Details, True);
|
||||
ThemeServices.DrawElement(Message.DrawItemStruct.hDC, Details, Message.DrawItemStruct.rcItem);
|
||||
R := ThemeServices.ContentRect(FCanvas.Handle, Details, Message.DrawItemStruct.rcItem);
|
||||
end
|
||||
else begin
|
||||
//Draw the outer border, when focused
|
||||
if IsFocused or IsDefault then begin
|
||||
FCanvas.Pen.Color := clWindowFrame;
|
||||
FCanvas.Pen.Width := 1;
|
||||
FCanvas.Brush.Style := bsClear;
|
||||
FCanvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
|
||||
InflateRect(R, -1, -1);
|
||||
end;
|
||||
//Draw the inner border
|
||||
if IsDown then begin
|
||||
FCanvas.Pen.Color := clBtnShadow;
|
||||
FCanvas.Pen.Width := 1;
|
||||
FCanvas.Brush.Color := clBtnFace;
|
||||
FCanvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
|
||||
InflateRect(R, -1, -1);
|
||||
end
|
||||
else begin
|
||||
Flags := DFCS_BUTTONPUSH or DFCS_ADJUSTRECT;
|
||||
if Message.DrawItemStruct.itemState and ODS_DISABLED <> 0 then
|
||||
Flags := Flags or DFCS_INACTIVE;
|
||||
DrawFrameControl(Message.DrawItemStruct.hDC, R, DFC_BUTTON, Flags);
|
||||
end;
|
||||
//Adjust the rect when focused and/or down
|
||||
if IsFocused then begin
|
||||
R := ClientRect;
|
||||
InflateRect(R, -1, -1);
|
||||
end;
|
||||
if IsDown then
|
||||
OffsetRect(R, 1, 1);
|
||||
end;
|
||||
|
||||
//Calculate the position of the PNG glyph
|
||||
CalcButtonLayout(FCanvas, FPngImage, ClientRect, IsDown, False, Caption,
|
||||
Layout, Margin, Spacing, GlyphPos, TextPos, DrawTextBiDiModeFlags(0));
|
||||
|
||||
//Draw the image
|
||||
if (FPngImage <> nil) and (Kind = bkCustom) and not FPngImage.Empty then begin
|
||||
PaintRect := Bounds(GlyphPos.X, GlyphPos.Y, FPngImage.Width, FPngImage.Height);
|
||||
if Enabled then
|
||||
DrawPNG(FPngImage, FCanvas, PaintRect, [])
|
||||
else
|
||||
DrawPNG(FPngImage, FCanvas, PaintRect, FPngOptions);
|
||||
end;
|
||||
|
||||
//Draw the text
|
||||
if Length(Caption) > 0 then begin
|
||||
PaintRect := Rect(TextPos.X, TextPos.Y, Width, Height);
|
||||
FCanvas.Brush.Style := bsClear;
|
||||
DrawText(FCanvas.Handle, PChar(Caption), -1, PaintRect,
|
||||
DrawTextBiDiModeFlags(0) or DT_TOP or DT_LEFT or DT_SINGLELINE);
|
||||
end;
|
||||
|
||||
//Draw the focus rectangle
|
||||
if IsFocused and IsDefault then begin
|
||||
if not ThemeServices.ThemesEnabled then begin
|
||||
R := ClientRect;
|
||||
InflateRect(R, -3, -3);
|
||||
end;
|
||||
FCanvas.Pen.Color := clWindowFrame;
|
||||
FCanvas.Brush.Color := clBtnFace;
|
||||
DrawFocusRect(FCanvas.Handle, R);
|
||||
end;
|
||||
|
||||
FLastKind := Kind;
|
||||
FCanvas.Handle := 0;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.CMMouseEnter(var Message: TMessage);
|
||||
begin
|
||||
inherited;
|
||||
if ThemeServices.ThemesEnabled and not FMouseInControl and not (csDesigning in ComponentState) then begin
|
||||
FMouseInControl := True;
|
||||
Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPngBitBtn.CMMouseLeave(var Message: TMessage);
|
||||
begin
|
||||
inherited;
|
||||
if ThemeServices.ThemesEnabled and FMouseInControl then begin
|
||||
FMouseInControl := False;
|
||||
Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
@ -1,122 +0,0 @@
|
||||
unit PngButtonFunctions;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Buttons, Graphics, pngimage;
|
||||
|
||||
{$IF RTLVersion < 20.0 }
|
||||
type
|
||||
TPngImage = TPNGObject;
|
||||
{$IFEND}
|
||||
|
||||
procedure CalcButtonLayout(Canvas: TCanvas; PngImage: TPngImage; const Client:
|
||||
TRect; Pressed, Down: Boolean; const Caption: string; Layout: TButtonLayout;
|
||||
Margin, Spacing: Integer; var GlyphPos, TextPos: TPoint; BiDiFlags: LongInt);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Classes;
|
||||
|
||||
procedure CalcButtonLayout(Canvas: TCanvas; PngImage: TPngImage; const Client:
|
||||
TRect; Pressed, Down: Boolean; const Caption: string; Layout: TButtonLayout;
|
||||
Margin, Spacing: Integer; var GlyphPos, TextPos: TPoint; BiDiFlags: LongInt);
|
||||
var
|
||||
ClientSize, GlyphSize, TextSize, TotalSize: TPoint;
|
||||
TextBounds: TRect;
|
||||
begin
|
||||
if (BiDiFlags and DT_RIGHT) = DT_RIGHT then begin
|
||||
if Layout = blGlyphLeft then
|
||||
Layout := blGlyphRight
|
||||
else if Layout = blGlyphRight then
|
||||
Layout := blGlyphLeft;
|
||||
end;
|
||||
|
||||
//Calculate the item sizes
|
||||
ClientSize := Point(Client.Right - Client.Left, Client.Bottom - Client.Top);
|
||||
|
||||
if PngImage <> nil then
|
||||
GlyphSize := Point(PngImage.Width, PngImage.Height)
|
||||
else
|
||||
GlyphSize := Point(0, 0);
|
||||
|
||||
if Length(Caption) > 0 then begin
|
||||
TextBounds := Rect(0, 0, Client.Right - Client.Left, 0);
|
||||
DrawText(Canvas.Handle, PChar(Caption), Length(Caption), TextBounds,
|
||||
DT_CALCRECT or BiDiFlags);
|
||||
TextSize := Point(TextBounds.Right - TextBounds.Left, TextBounds.Bottom -
|
||||
TextBounds.Top);
|
||||
end
|
||||
else begin
|
||||
TextBounds := Rect(0, 0, 0, 0);
|
||||
TextSize := Point(0, 0);
|
||||
end;
|
||||
|
||||
//If the layout has the glyph on the right or the left, then both the
|
||||
//text and the glyph are centered vertically. If the glyph is on the top
|
||||
//or the bottom, then both the text and the glyph are centered horizontally.
|
||||
if Layout in [blGlyphLeft, blGlyphRight] then
|
||||
GlyphPos.Y := (ClientSize.Y - GlyphSize.Y + 1) div 2
|
||||
else
|
||||
GlyphPos.X := (ClientSize.X - GlyphSize.X + 1) div 2;
|
||||
|
||||
//If there is no text or no bitmap, then Spacing is irrelevant
|
||||
if (TextSize.X = 0) or (GlyphSize.X = 0) then
|
||||
Spacing := 0;
|
||||
|
||||
//Adjust Margin and Spacing
|
||||
if Margin = -1 then begin
|
||||
if Spacing = -1 then begin
|
||||
TotalSize := Point(GlyphSize.X + TextSize.X, GlyphSize.Y + TextSize.Y);
|
||||
if Layout in [blGlyphLeft, blGlyphRight] then
|
||||
Margin := (ClientSize.X - TotalSize.X) div 3
|
||||
else
|
||||
Margin := (ClientSize.Y - TotalSize.Y) div 3;
|
||||
end
|
||||
else begin
|
||||
TotalSize := Point(GlyphSize.X + Spacing + TextSize.X, GlyphSize.Y +
|
||||
Spacing + TextSize.Y);
|
||||
if Layout in [blGlyphLeft, blGlyphRight] then
|
||||
Margin := (ClientSize.X - TotalSize.X) div 2
|
||||
else
|
||||
Margin := (ClientSize.Y - TotalSize.Y) div 2;
|
||||
end
|
||||
end
|
||||
else if Spacing = -1 then begin
|
||||
TotalSize := Point(ClientSize.X - (Margin + GlyphSize.X), ClientSize.Y -
|
||||
(Margin + GlyphSize.Y));
|
||||
end;
|
||||
|
||||
case Layout of
|
||||
blGlyphLeft: GlyphPos.X := Margin;
|
||||
blGlyphRight: GlyphPos.X := ClientSize.X - Margin - GlyphSize.X;
|
||||
blGlyphTop: GlyphPos.Y := Margin;
|
||||
blGlyphBottom: GlyphPos.Y := ClientSize.Y - Margin - GlyphSize.Y;
|
||||
end;
|
||||
|
||||
if Layout in [blGlyphLeft, blGlyphRight] then
|
||||
TextPos.Y := (ClientSize.Y - TextSize.Y) div 2
|
||||
else
|
||||
TextPos.X := (ClientSize.X - TextSize.X) div 2;
|
||||
case Layout of
|
||||
blGlyphLeft: TextPos.X := GlyphPos.X + GlyphSize.X + Spacing;
|
||||
blGlyphRight: TextPos.X := GlyphPos.X - Spacing - TextSize.X;
|
||||
blGlyphTop: TextPos.Y := GlyphPos.Y + GlyphSize.Y + Spacing;
|
||||
blGlyphBottom: TextPos.Y := GlyphPos.Y - Spacing - TextSize.Y;
|
||||
end;
|
||||
|
||||
//Fixup the result variables
|
||||
with GlyphPos do begin
|
||||
Inc(X, Client.Left + Integer(Pressed or Down));
|
||||
Inc(Y, Client.Top + Integer(Pressed or Down));
|
||||
end;
|
||||
with TextPos do begin
|
||||
Inc(X, Client.Left + Integer(Pressed or Down));
|
||||
Inc(Y, Client.Top + Integer(Pressed or Down));
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
@ -1,208 +0,0 @@
|
||||
unit PngCheckListBox;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Classes, CheckLst, pngimage, PngFunctions;
|
||||
|
||||
type
|
||||
TPngCheckListBox = class(TCheckListBox)
|
||||
private
|
||||
FPngUnchecked: TPngImage;
|
||||
FPngChecked: TPngImage;
|
||||
FPngOptions: TPngOptions;
|
||||
FPngGrayed: TPngImage;
|
||||
procedure SetPngChecked(const Value: TPngImage);
|
||||
procedure SetPngUnchecked(const Value: TPngImage);
|
||||
procedure SetPngOptions(const Value: TPngOptions);
|
||||
procedure SetPngGrayed(const Value: TPngImage);
|
||||
protected
|
||||
procedure DrawItem(Index: Integer; ARect: TRect; State: TOwnerDrawState); override;
|
||||
function GetCheckWidth: Integer; reintroduce;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property PngChecked: TPngImage read FPngChecked write SetPngChecked;
|
||||
property PngUnchecked: TPngImage read FPngUnchecked write SetPngUnchecked;
|
||||
property PngGrayed: TPngImage read FPngGrayed write SetPngGrayed;
|
||||
property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Graphics, StdCtrls, Math;
|
||||
|
||||
{ TPngCheckListBox }
|
||||
|
||||
constructor TPngCheckListBox.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FPngChecked := TPngImage.Create;
|
||||
FPngUnchecked := TPngImage.Create;
|
||||
FPngGrayed := TPngImage.Create;
|
||||
end;
|
||||
|
||||
destructor TPngCheckListBox.Destroy;
|
||||
begin
|
||||
FPngChecked.Free;
|
||||
FPngUnchecked.Free;
|
||||
FPngGrayed.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TPngCheckListBox.DrawItem(Index: Integer; ARect: TRect; State:
|
||||
TOwnerDrawState);
|
||||
|
||||
procedure DrawCheck(R: TRect; AState: TCheckBoxState; AEnabled: Boolean);
|
||||
var
|
||||
Png: TPngImage;
|
||||
OldColor: TColor;
|
||||
begin
|
||||
//Draws the check image, if it's a PNG, otherwise the inherited would have
|
||||
//been called
|
||||
OldColor := Canvas.Brush.Color;
|
||||
Canvas.Brush.Color := Color;
|
||||
Canvas.FillRect(R);
|
||||
Canvas.Brush.Color := OldColor;
|
||||
case AState of
|
||||
cbUnchecked: Png := FPngUnchecked;
|
||||
cbChecked: Png := FPngChecked;
|
||||
else
|
||||
Png := FPngGrayed;
|
||||
end;
|
||||
DrawPNG(Png, Canvas, Rect(R.Left, R.Top, R.Left + Png.Width, R.Top +
|
||||
Png.Height), FPngOptions);
|
||||
end;
|
||||
|
||||
procedure DrawText;
|
||||
var
|
||||
Flags: Integer;
|
||||
Data: string;
|
||||
begin
|
||||
//Draws the text for an item
|
||||
if Assigned(OnDrawItem) then
|
||||
OnDrawItem(Self, Index, ARect, State)
|
||||
else begin
|
||||
Canvas.FillRect(ARect);
|
||||
if Index < Items.Count then begin
|
||||
Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or
|
||||
DT_NOPREFIX);
|
||||
if not UseRightToLeftAlignment then
|
||||
Inc(ARect.Left, 2)
|
||||
else
|
||||
Dec(ARect.Right, 2);
|
||||
Data := '';
|
||||
if (Style in [lbVirtual, lbVirtualOwnerDraw]) then
|
||||
Data := DoGetData(Index)
|
||||
else
|
||||
Data := Items[Index];
|
||||
Windows.DrawText(Canvas.Handle, PChar(Data), Length(Data), ARect, Flags);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
R: TRect;
|
||||
SaveEvent: TDrawItemEvent;
|
||||
ACheckWidth: Integer;
|
||||
Enable: Boolean;
|
||||
begin
|
||||
if FPngChecked.Empty and FPngUnchecked.Empty and FPngGrayed.Empty then
|
||||
inherited DrawItem(Index, ARect, State)
|
||||
else begin
|
||||
ACheckWidth := GetCheckWidth;
|
||||
if Index < Items.Count then begin
|
||||
R := ARect;
|
||||
Enable := Self.Enabled and ItemEnabled[Index];
|
||||
if not Header[Index] then begin
|
||||
if not UseRightToLeftAlignment then begin
|
||||
R.Right := ARect.Left;
|
||||
R.Left := R.Right - ACheckWidth;
|
||||
end
|
||||
else begin
|
||||
R.Left := ARect.Right;
|
||||
R.Right := R.Left + ACheckWidth;
|
||||
end;
|
||||
DrawCheck(R, Self.State[Index], Enable);
|
||||
end
|
||||
else begin
|
||||
Canvas.Font.Color := HeaderColor;
|
||||
Canvas.Brush.Color := HeaderBackgroundColor;
|
||||
end;
|
||||
if not Enable then
|
||||
Canvas.Font.Color := clGrayText;
|
||||
end;
|
||||
|
||||
if (Style = lbStandard) and Assigned(OnDrawItem) then begin
|
||||
//Force lbStandard list to ignore OnDrawItem event.
|
||||
SaveEvent := OnDrawItem;
|
||||
OnDrawItem := nil;
|
||||
try
|
||||
DrawText;
|
||||
finally
|
||||
OnDrawItem := SaveEvent;
|
||||
end;
|
||||
end
|
||||
else
|
||||
DrawText;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPngCheckListBox.GetCheckWidth: Integer;
|
||||
begin
|
||||
//CheckWidth is equal to the widest PNG
|
||||
if not (FPngChecked.Empty and FPngUnchecked.Empty and FPngGrayed.Empty) then
|
||||
Result := Max(FPngChecked.Width, Max(FPngUnchecked.Width, FPngGrayed.Width))
|
||||
else
|
||||
Result := inherited GetCheckWidth;
|
||||
end;
|
||||
|
||||
procedure TPngCheckListBox.SetPngChecked(const Value: TPngImage);
|
||||
begin
|
||||
//This is all neccesary, because you can't assign a nil to a TPngImage
|
||||
if Value = nil then begin
|
||||
FPngChecked.Free;
|
||||
FPngChecked := TPngImage.Create;
|
||||
end
|
||||
else
|
||||
FPngChecked.Assign(Value);
|
||||
Repaint;
|
||||
end;
|
||||
|
||||
procedure TPngCheckListBox.SetPngUnchecked(const Value: TPngImage);
|
||||
begin
|
||||
//This is all neccesary, because you can't assign a nil to a TPngImage
|
||||
if Value = nil then begin
|
||||
FPngUnchecked.Free;
|
||||
FPngUnchecked := TPngImage.Create;
|
||||
end
|
||||
else
|
||||
FPngUnchecked.Assign(Value);
|
||||
Repaint;
|
||||
end;
|
||||
|
||||
procedure TPngCheckListBox.SetPngGrayed(const Value: TPngImage);
|
||||
begin
|
||||
//This is all neccesary, because you can't assign a nil to a TPngImage
|
||||
if Value = nil then begin
|
||||
FPngGrayed.Free;
|
||||
FPngGrayed := TPngImage.Create;
|
||||
end
|
||||
else
|
||||
FPngGrayed.Assign(Value);
|
||||
Repaint;
|
||||
end;
|
||||
|
||||
procedure TPngCheckListBox.SetPngOptions(const Value: TPngOptions);
|
||||
begin
|
||||
if FPngOptions <> Value then begin
|
||||
FPngOptions := Value;
|
||||
Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
@ -1,225 +0,0 @@
|
||||
unit PngComponentEditors;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, SysUtils, Forms, Classes, Controls, PngImageList, TypInfo,
|
||||
DesignIntf, DesignEditors, ColnEdit;
|
||||
|
||||
type
|
||||
TPngImageListEditor = class(TComponentEditor)
|
||||
public
|
||||
procedure Edit; override;
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
end;
|
||||
|
||||
TPngImageCollectionEditor = class(TComponentEditor)
|
||||
public
|
||||
procedure Edit; override;
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
end;
|
||||
|
||||
TPngButtonEditor = class(TComponentEditor)
|
||||
public
|
||||
procedure Edit; override;
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
end;
|
||||
|
||||
TPngImageListImagesEditor = class(TStringProperty)
|
||||
public
|
||||
procedure Edit; override;
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
function GetValue: string; override;
|
||||
end;
|
||||
|
||||
TPngImageCollectionItemsEditor = class(TPngImageListImagesEditor)
|
||||
public
|
||||
procedure Edit; override;
|
||||
end;
|
||||
|
||||
TEditProperty = class
|
||||
private
|
||||
FPropery: string;
|
||||
procedure EnumProperty(const Prop: IProperty);
|
||||
public
|
||||
constructor Create(Component: TComponent; const Prop: string; Designer: IDesigner);
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
PngImageListEditor;
|
||||
|
||||
resourcestring
|
||||
SEditImage = '&Edit image...';
|
||||
SRecreateImages = '&Recreate images...';
|
||||
SEditImages = '&Edit images...';
|
||||
SEditing = 'Editing %s.%s';
|
||||
SPNGObjectsHaveBeenCopied = 'The PNG objects have been copied to the internal imagelist.';
|
||||
|
||||
//This type is neccesary to be able to call CopyPngs without having to make it
|
||||
//public in the TPngImageList class.
|
||||
type
|
||||
TPngImageListAccess = class(TPngImageList);
|
||||
|
||||
procedure EditProperty(Component: TComponent; const Prop: string; Designer: IDesigner);
|
||||
begin
|
||||
TEditProperty.Create(Component, Prop, Designer).Free;
|
||||
end;
|
||||
|
||||
{ TPngImageListEditor }
|
||||
|
||||
procedure TPngImageListEditor.Edit;
|
||||
var
|
||||
Component: TPngImageList;
|
||||
begin
|
||||
Component := GetComponent as TPngImageList;
|
||||
EditProperty(Component, 'PngImages', Designer); // do not localize
|
||||
end;
|
||||
|
||||
procedure TPngImageListEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
case Index of
|
||||
0: Edit;
|
||||
1: begin
|
||||
TPngImageListAccess(GetComponent).CopyPngs;
|
||||
MessageBox(0, PChar(SPNGObjectsHaveBeenCopied),
|
||||
PChar(string(GetComponent.ClassName)), MB_ICONINFORMATION or MB_OK);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPngImageListEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
case Index of
|
||||
0: Result := SEditImages;
|
||||
1: Result := SRecreateImages;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPngImageListEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := 2;
|
||||
end;
|
||||
|
||||
{ TPngImageCollectionEditor }
|
||||
|
||||
procedure TPngImageCollectionEditor.Edit;
|
||||
var
|
||||
Component: TPngImageCollection;
|
||||
begin
|
||||
Component := GetComponent as TPngImageCollection;
|
||||
EditProperty(Component, 'Items', Designer); // do not localize
|
||||
end;
|
||||
|
||||
procedure TPngImageCollectionEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
|
||||
function TPngImageCollectionEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
Result := SEditImages;
|
||||
end;
|
||||
|
||||
function TPngImageCollectionEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
procedure TPngButtonEditor.Edit;
|
||||
begin
|
||||
EditProperty(GetComponent, 'OnClick', Designer); // do not localize
|
||||
end;
|
||||
|
||||
{ TPngButtonEditor }
|
||||
|
||||
procedure TPngButtonEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
EditProperty(GetComponent, 'PngImage', Designer); // do not localize
|
||||
end;
|
||||
|
||||
function TPngButtonEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
Result := SEditImage;
|
||||
end;
|
||||
|
||||
function TPngButtonEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
{ TEditProperty }
|
||||
|
||||
constructor TEditProperty.Create(Component: TComponent; const Prop: string; Designer: IDesigner);
|
||||
var
|
||||
Components: IDesignerSelections;
|
||||
begin
|
||||
inherited Create;
|
||||
FPropery := Prop;
|
||||
Components := TDesignerSelections.Create;
|
||||
Components.Add(Component);
|
||||
GetComponentProperties(Components, tkAny, Designer, EnumProperty);
|
||||
end;
|
||||
|
||||
procedure TEditProperty.EnumProperty(const Prop: IProperty);
|
||||
begin
|
||||
if Prop.GetName = FPropery then
|
||||
Prop.Edit;
|
||||
end;
|
||||
|
||||
{ TPngImageListImagesEditor }
|
||||
|
||||
procedure TPngImageListImagesEditor.Edit;
|
||||
var
|
||||
ImageList: TPngImageList;
|
||||
dlg: TPngImageListEditorDlg;
|
||||
begin
|
||||
dlg := TPngImageListEditorDlg.Create(nil);
|
||||
ImageList := GetComponent(0) as TPngImageList;
|
||||
dlg.Caption := Format(SEditing, [ImageList.Name, GetName]);
|
||||
dlg.Images.Items.Assign(ImageList.PngImages);
|
||||
dlg.ImageWidth := ImageList.Width;
|
||||
dlg.ImageHeight := ImageList.Height;
|
||||
if dlg.ShowModal = mrOK then begin
|
||||
ImageList.PngImages.Assign(dlg.Images.Items);
|
||||
Designer.Modified;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPngImageListImagesEditor.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result := inherited GetAttributes + [paDialog, paReadOnly];
|
||||
end;
|
||||
|
||||
function TPngImageListImagesEditor.GetValue: string;
|
||||
begin
|
||||
Result := '(PNG images)'; // do not localize
|
||||
end;
|
||||
|
||||
{ TPngImageCollectionItemsEditor }
|
||||
|
||||
procedure TPngImageCollectionItemsEditor.Edit;
|
||||
var
|
||||
Collection: TPngImageCollection;
|
||||
dlg: TPngImageListEditorDlg;
|
||||
begin
|
||||
Collection := GetComponent(0) as TPngImageCollection;
|
||||
dlg := TPngImageListEditorDlg.Create(nil);
|
||||
dlg.Caption := Format(SEditing, [Collection.Name, GetName]);
|
||||
dlg.Images.Items.Assign(Collection.Items);
|
||||
if dlg.ShowModal = mrOK then begin
|
||||
Collection.Items.Assign(dlg.Images.Items);
|
||||
Designer.Modified;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
Binary file not shown.
@ -1,43 +0,0 @@
|
||||
unit PngComponentsRegister;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, DesignIntf, TypInfo,
|
||||
PngSpeedButton, PngBitBtn, PngImageList, PngCheckListBox, PngComponentEditors;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
SPageName = 'Png';
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
//Register all components
|
||||
RegisterComponents(SPageName, [TPngSpeedButton, TPngBitBtn, TPngImageList,
|
||||
TPngImageCollection, TPngCheckListBox]);
|
||||
|
||||
//Register component editors
|
||||
RegisterComponentEditor(TPngImageList, TPngImageListEditor);
|
||||
RegisterComponentEditor(TPngImageCollection, TPngImageCollectionEditor);
|
||||
RegisterComponentEditor(TPngBitBtn, TPngButtonEditor);
|
||||
RegisterComponentEditor(TPngSpeedButton, TPngButtonEditor);
|
||||
|
||||
//Register property editors
|
||||
RegisterPropertyEditor(TypeInfo(TPngImageCollectionItems), TPngImageList,
|
||||
'PngImages', TPngImageListImagesEditor); // do not localize
|
||||
RegisterPropertyEditor(TypeInfo(TPngImageCollectionItems), TPngImageCollection,
|
||||
'Items', TPngImageCollectionItemsEditor); // do not localize
|
||||
|
||||
//Hide properties that should be omitted
|
||||
UnlistPublishedProperty(TPngSpeedButton, 'NumGlyphs'); // do not localize
|
||||
UnlistPublishedProperty(TPngSpeedButton, 'Glyph'); // do not localize
|
||||
UnlistPublishedProperty(TPngBitBtn, 'NumGlyphs'); // do not localize
|
||||
UnlistPublishedProperty(TPngBitBtn, 'Glyph'); // do not localize
|
||||
end;
|
||||
|
||||
end.
|
@ -1,555 +0,0 @@
|
||||
unit PngFunctions;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Graphics, ImgList, Contnrs, pngimage;
|
||||
|
||||
{$IF RTLVersion < 20.0 }
|
||||
{$IF RTLVersion < 15.0 }
|
||||
PngComponents are only compatible with Delphi 7 and higher!
|
||||
{$IFEND}
|
||||
type
|
||||
TPngImage = TPNGObject;
|
||||
{$IFEND}
|
||||
|
||||
type
|
||||
TPngOption = (pngBlendOnDisabled, pngGrayscaleOnDisabled);
|
||||
TPngOptions = set of TPngOption;
|
||||
TRGBLine = array[Word] of TRGBTriple;
|
||||
PRGBLine = ^TRGBLine;
|
||||
TRGBALine = array[Word] of TRGBQuad;
|
||||
PRGBALine = ^TRGBALine;
|
||||
|
||||
procedure MakeImageBlended(Image: TPngImage; Amount: Byte = 127);
|
||||
procedure MakeImageGrayscale(Image: TPngImage; Amount: Byte = 255);
|
||||
procedure DrawPNG(Png: TPngImage; Canvas: TCanvas; const ARect: TRect; const Options: TPngOptions);
|
||||
procedure ConvertToPNG(Source: TGraphic; out Dest: TPngImage);
|
||||
procedure CreatePNG(Color, Mask: TBitmap; out Dest: TPngImage; InverseMask: Boolean = False);
|
||||
procedure CreatePNGMasked(Bitmap: TBitmap; Mask: TColor; out Dest: TPngImage);
|
||||
procedure CopyImageFromImageList(Dest: TPngImage; ImageList: TCustomImageList; Index: Integer);
|
||||
procedure SlicePNG(JoinedPNG: TPngImage; Columns, Rows: Integer; out SlicedPNGs: TObjectList);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, PngImageList;
|
||||
|
||||
function ColorToTriple(Color: TColor): TRGBTriple;
|
||||
var
|
||||
ColorRGB: Longint;
|
||||
begin
|
||||
ColorRGB := ColorToRGB(Color);
|
||||
Result.rgbtBlue := ColorRGB shr 16 and $FF;
|
||||
Result.rgbtGreen := ColorRGB shr 8 and $FF;
|
||||
Result.rgbtRed := ColorRGB and $FF;
|
||||
end;
|
||||
|
||||
procedure MakeImageBlended(Image: TPngImage; Amount: Byte = 127);
|
||||
|
||||
procedure ForceAlphachannel(BitTransparency: Boolean; TransparentColor: TColor);
|
||||
var
|
||||
Assigner: TBitmap;
|
||||
Temp: TPngImage;
|
||||
X, Y: Integer;
|
||||
Line: pngimage.PByteArray;
|
||||
Current: TColor;
|
||||
begin
|
||||
//Not all formats of PNG support an alpha-channel (paletted images for example),
|
||||
//so with this function, I simply recreate the PNG as being 32-bits, effectivly
|
||||
//forcing an alpha-channel on it.
|
||||
Temp := TPngImage.Create;
|
||||
try
|
||||
Assigner := TBitmap.Create;
|
||||
try
|
||||
Assigner.Width := Image.Width;
|
||||
Assigner.Height := Image.Height;
|
||||
Temp.Assign(Assigner);
|
||||
finally
|
||||
Assigner.Free;
|
||||
end;
|
||||
Temp.CreateAlpha;
|
||||
for Y := 0 to Image.Height - 1 do begin
|
||||
Line := Temp.AlphaScanline[Y];
|
||||
for X := 0 to Image.Width - 1 do begin
|
||||
Current := Image.Pixels[X, Y];
|
||||
Temp.Pixels[X, Y] := Current;
|
||||
if BitTransparency and (Current = TransparentColor) then
|
||||
Line[X] := 0
|
||||
else
|
||||
Line[X] := Amount;
|
||||
end;
|
||||
end;
|
||||
Image.Assign(Temp);
|
||||
finally
|
||||
Temp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
X, Y: Integer;
|
||||
Line: pngimage.PByteArray;
|
||||
Forced: Boolean;
|
||||
TransparentColor: TColor;
|
||||
BitTransparency: Boolean;
|
||||
begin
|
||||
//If the PNG doesn't have an alpha channel, then add one
|
||||
BitTransparency := Image.TransparencyMode = ptmBit;
|
||||
TransparentColor := Image.TransparentColor;
|
||||
Forced := False;
|
||||
if not (Image.Header.ColorType in [COLOR_RGBALPHA, COLOR_GRAYSCALEALPHA]) then begin
|
||||
Forced := Image.Header.ColorType in [COLOR_GRAYSCALE, COLOR_PALETTE];
|
||||
if Forced then
|
||||
ForceAlphachannel(BitTransparency, TransparentColor)
|
||||
else
|
||||
Image.CreateAlpha;
|
||||
end;
|
||||
|
||||
//Divide the alpha values by 2
|
||||
if not Forced and (Image.Header.ColorType in [COLOR_RGBALPHA, COLOR_GRAYSCALEALPHA]) then begin
|
||||
for Y := 0 to Image.Height - 1 do begin
|
||||
Line := Image.AlphaScanline[Y];
|
||||
for X := 0 to Image.Width - 1 do begin
|
||||
if BitTransparency and (Image.Pixels[X, Y] = TransparentColor) then
|
||||
Line[X] := 0
|
||||
else
|
||||
Line[X] := Round(Line[X] / 256 * (Amount + 1));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure MakeImageGrayscale(Image: TPngImage; Amount: Byte = 255);
|
||||
|
||||
procedure GrayscaleRGB(var R, G, B: Byte);
|
||||
var
|
||||
X: Byte;
|
||||
begin
|
||||
X := Round(R * 0.30 + G * 0.59 + B * 0.11);
|
||||
R := Round(R / 256 * (256 - Amount - 1)) + Round(X / 256 * (Amount + 1));
|
||||
G := Round(G / 256 * (256 - Amount - 1)) + Round(X / 256 * (Amount + 1));
|
||||
B := Round(B / 256 * (256 - Amount - 1)) + Round(X / 256 * (Amount + 1));
|
||||
end;
|
||||
|
||||
var
|
||||
X, Y, PalCount: Integer;
|
||||
Line: PRGBLine;
|
||||
PaletteHandle: HPalette;
|
||||
Palette: array[Byte] of TPaletteEntry;
|
||||
begin
|
||||
//Don't do anything if the image is already a grayscaled one
|
||||
if not (Image.Header.ColorType in [COLOR_GRAYSCALE, COLOR_GRAYSCALEALPHA]) then begin
|
||||
if Image.Header.ColorType = COLOR_PALETTE then begin
|
||||
//Grayscale every palette entry
|
||||
PaletteHandle := Image.Palette;
|
||||
PalCount := GetPaletteEntries(PaletteHandle, 0, 256, Palette);
|
||||
for X := 0 to PalCount - 1 do
|
||||
GrayscaleRGB(Palette[X].peRed, Palette[X].peGreen, Palette[X].peBlue);
|
||||
SetPaletteEntries(PaletteHandle, 0, PalCount, Palette);
|
||||
Image.Palette := PaletteHandle;
|
||||
end
|
||||
else begin
|
||||
//Grayscale every pixel
|
||||
for Y := 0 to Image.Height - 1 do begin
|
||||
Line := Image.Scanline[Y];
|
||||
for X := 0 to Image.Width - 1 do
|
||||
GrayscaleRGB(Line[X].rgbtRed, Line[X].rgbtGreen, Line[X].rgbtBlue);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure DrawPNG(Png: TPngImage; Canvas: TCanvas; const ARect: TRect; const Options: TPngOptions);
|
||||
var
|
||||
PngCopy: TPngImage;
|
||||
begin
|
||||
if Options <> [] then begin
|
||||
PngCopy := TPngImage.Create;
|
||||
try
|
||||
PngCopy.Assign(Png);
|
||||
if pngBlendOnDisabled in Options then
|
||||
MakeImageBlended(PngCopy);
|
||||
if pngGrayscaleOnDisabled in Options then
|
||||
MakeImageGrayscale(PngCopy);
|
||||
PngCopy.Draw(Canvas, ARect);
|
||||
finally
|
||||
PngCopy.Free;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
Png.Draw(Canvas, ARect);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ConvertToPNG(Source: TGraphic; out Dest: TPngImage);
|
||||
var
|
||||
MaskLines: array of pngimage.PByteArray;
|
||||
|
||||
function CompareColors(const Color1: TRGBTriple; const Color2: TColor): Boolean;
|
||||
begin
|
||||
Result := (Color1.rgbtBlue = Color2 shr 16 and $FF) and
|
||||
(Color1.rgbtGreen = Color2 shr 8 and $FF) and
|
||||
(Color1.rgbtRed = Color2 and $FF);
|
||||
end;
|
||||
|
||||
function ColorToTriple(const Color: TColor): TRGBTriple;
|
||||
begin
|
||||
Result.rgbtBlue := Color shr 16 and $FF;
|
||||
Result.rgbtGreen := Color shr 8 and $FF;
|
||||
Result.rgbtRed := Color and $FF;
|
||||
end;
|
||||
|
||||
procedure GetAlphaMask(SourceColor: TBitmap);
|
||||
type
|
||||
TBitmapInfo = packed record
|
||||
bmiHeader: TBitmapV4Header;
|
||||
//Otherwise I may not get per-pixel alpha values.
|
||||
bmiColors: array[0..0] of TRGBQuad;
|
||||
end;
|
||||
var
|
||||
Bits: PRGBALine;
|
||||
BitmapInfo: TBitmapInfo;
|
||||
I, X, Y: Integer;
|
||||
HasAlpha: Boolean;
|
||||
BitsSize: Integer;
|
||||
begin
|
||||
BitsSize := 4 * SourceColor.Width * SourceColor.Height;
|
||||
Bits := AllocMem(BitsSize);
|
||||
try
|
||||
ZeroMemory(Bits, BitsSize);
|
||||
ZeroMemory(@BitmapInfo, SizeOf(BitmapInfo));
|
||||
BitmapInfo.bmiHeader.bV4Size := SizeOf(BitmapInfo.bmiHeader);
|
||||
BitmapInfo.bmiHeader.bV4Width := SourceColor.Width;
|
||||
BitmapInfo.bmiHeader.bV4Height := -SourceColor.Height;
|
||||
//Otherwise the image is upside down.
|
||||
BitmapInfo.bmiHeader.bV4Planes := 1;
|
||||
BitmapInfo.bmiHeader.bV4BitCount := 32;
|
||||
BitmapInfo.bmiHeader.bV4V4Compression := BI_BITFIELDS;
|
||||
BitmapInfo.bmiHeader.bV4SizeImage := BitsSize;
|
||||
|
||||
if GetDIBits(SourceColor.Canvas.Handle, SourceColor.Handle, 0,
|
||||
SourceColor.Height, Bits, Windows.PBitmapInfo(@BitmapInfo)^,
|
||||
DIB_RGB_COLORS) > 0 then begin
|
||||
//Because Win32 API is a piece of crap when it comes to icons, I have to check
|
||||
//whether an has an alpha-channel the hard way.
|
||||
HasAlpha := False;
|
||||
for I := 0 to (SourceColor.Height * SourceColor.Width) - 1 do begin
|
||||
if Bits[I].rgbReserved <> 0 then begin
|
||||
HasAlpha := True;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if HasAlpha then begin
|
||||
//OK, so not all alpha-values are 0, which indicates the existence of an
|
||||
//alpha-channel.
|
||||
I := 0;
|
||||
for Y := 0 to SourceColor.Height - 1 do
|
||||
for X := 0 to SourceColor.Width - 1 do begin
|
||||
MaskLines[Y][X] := Bits[I].rgbReserved;
|
||||
Inc(I);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
FreeMem(Bits, BitsSize);
|
||||
end;
|
||||
end;
|
||||
|
||||
function WinXPOrHigher: Boolean;
|
||||
var
|
||||
Info: TOSVersionInfo;
|
||||
begin
|
||||
Info.dwOSVersionInfoSize := SizeOf(Info);
|
||||
GetVersionEx(Info);
|
||||
Result := (Info.dwPlatformId = VER_PLATFORM_WIN32_NT) and
|
||||
((Info.dwMajorVersion > 5) or
|
||||
((Info.dwMajorVersion = 5) and (Info.dwMinorVersion >= 1)));
|
||||
end;
|
||||
|
||||
var
|
||||
Temp, SourceColor, SourceMask: TBitmap;
|
||||
X, Y: Integer;
|
||||
Line: PRGBLine;
|
||||
MaskLine, AlphaLine: pngimage.PByteArray;
|
||||
TransparentColor, CurrentColor: TColor;
|
||||
IconInfo: TIconInfo;
|
||||
AlphaNeeded: Boolean;
|
||||
begin
|
||||
//A PNG does not have to be converted
|
||||
if Source is TPngImage then begin
|
||||
Dest := TPngImage.Create;
|
||||
Dest.Assign(Source);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
AlphaNeeded := False;
|
||||
Temp := TBitmap.Create;
|
||||
SetLength(MaskLines, Source.Height);
|
||||
for Y := 0 to Source.Height - 1 do begin
|
||||
MaskLines[Y] := AllocMem(Source.Width);
|
||||
FillMemory(MaskLines[Y], Source.Width, 255);
|
||||
end;
|
||||
try
|
||||
//Initialize intermediate color bitmap
|
||||
Temp.Width := Source.Width;
|
||||
Temp.Height := Source.Height;
|
||||
Temp.PixelFormat := pf24bit;
|
||||
|
||||
//Now figure out the transparency
|
||||
if Source is TBitmap then begin
|
||||
if Source.Transparent then begin
|
||||
//TBitmap is just about comparing the drawn colors against the TransparentColor
|
||||
if TBitmap(Source).TransparentMode = tmFixed then
|
||||
TransparentColor := TBitmap(Source).TransparentColor
|
||||
else
|
||||
TransparentColor := TBitmap(Source).Canvas.Pixels[0, Source.Height - 1];
|
||||
|
||||
for Y := 0 to Temp.Height - 1 do begin
|
||||
Line := Temp.ScanLine[Y];
|
||||
MaskLine := MaskLines[Y];
|
||||
for X := 0 to Temp.Width - 1 do begin
|
||||
CurrentColor := GetPixel(TBitmap(Source).Canvas.Handle, X, Y);
|
||||
if CurrentColor = TransparentColor then begin
|
||||
MaskLine^[X] := 0;
|
||||
AlphaNeeded := True;
|
||||
end;
|
||||
Line[X] := ColorToTriple(CurrentColor);
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
Temp.Canvas.Draw(0, 0, Source);
|
||||
end;
|
||||
end
|
||||
else if Source is TIcon then begin
|
||||
//TIcon is more complicated, because there are bitmasked (classic) icons and
|
||||
//alphablended (modern) icons. Not to forget about the "inverse" color.
|
||||
GetIconInfo(TIcon(Source).Handle, IconInfo);
|
||||
SourceColor := TBitmap.Create;
|
||||
SourceMask := TBitmap.Create;
|
||||
try
|
||||
SourceColor.Handle := IconInfo.hbmColor;
|
||||
SourceMask.Handle := IconInfo.hbmMask;
|
||||
Temp.Canvas.Draw(0, 0, SourceColor);
|
||||
for Y := 0 to Temp.Height - 1 do begin
|
||||
MaskLine := MaskLines[Y];
|
||||
for X := 0 to Temp.Width - 1 do begin
|
||||
if GetPixel(SourceMask.Canvas.Handle, X, Y) <> 0 then begin
|
||||
MaskLine^[X] := 0;
|
||||
AlphaNeeded := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if (GetDeviceCaps(SourceColor.Canvas.Handle, BITSPIXEL) = 32) and WinXPOrHigher then begin
|
||||
//This doesn't neccesarily mean we actually have 32bpp in the icon, because the
|
||||
//bpp of an icon is always the same as the display settings, regardless of the
|
||||
//actual color depth of the icon :(
|
||||
AlphaNeeded := True;
|
||||
GetAlphaMask(SourceColor);
|
||||
end;
|
||||
//This still doesn't work for alphablended icons...
|
||||
finally
|
||||
SourceColor.Free;
|
||||
SourceMask.Free
|
||||
end;
|
||||
end;
|
||||
|
||||
//And finally, create the destination PNG image
|
||||
Dest := TPngImage.Create;
|
||||
Dest.Assign(Temp);
|
||||
if AlphaNeeded then begin
|
||||
Dest.CreateAlpha;
|
||||
for Y := 0 to Dest.Height - 1 do begin
|
||||
AlphaLine := Dest.AlphaScanline[Y];
|
||||
CopyMemory(AlphaLine, MaskLines[Y], Temp.Width);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
for Y := 0 to Source.Height - 1 do
|
||||
FreeMem(MaskLines[Y], Source.Width);
|
||||
Temp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CreatePNG(Color, Mask: TBitmap; out Dest: TPngImage; InverseMask: Boolean = False);
|
||||
var
|
||||
Temp: TBitmap;
|
||||
Line: pngimage.PByteArray;
|
||||
X, Y: Integer;
|
||||
begin
|
||||
//Create a PNG from two separate color and mask bitmaps. InverseMask should be
|
||||
//True if white means transparent, and black means opaque.
|
||||
Dest := TPngImage.Create;
|
||||
if not (Color.PixelFormat in [pf24bit, pf32bit]) then begin
|
||||
Temp := TBitmap.Create;
|
||||
try
|
||||
Temp.Assign(Color);
|
||||
Temp.PixelFormat := pf24bit;
|
||||
Dest.Assign(Temp);
|
||||
finally
|
||||
Temp.Free;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
Dest.Assign(Color);
|
||||
end;
|
||||
|
||||
//Copy the alpha channel.
|
||||
Dest.CreateAlpha;
|
||||
for Y := 0 to Dest.Height - 1 do begin
|
||||
Line := Dest.AlphaScanline[Y];
|
||||
for X := 0 to Dest.Width - 1 do begin
|
||||
if InverseMask then
|
||||
Line[X] := 255 - (GetPixel(Mask.Canvas.Handle, X, Y) and $FF)
|
||||
else
|
||||
Line[X] := GetPixel(Mask.Canvas.Handle, X, Y) and $FF;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CreatePNGMasked(Bitmap: TBitmap; Mask: TColor; out Dest: TPngImage);
|
||||
var
|
||||
Temp: TBitmap;
|
||||
Line: pngimage.PByteArray;
|
||||
X, Y: Integer;
|
||||
begin
|
||||
//Create a PNG from two separate color and mask bitmaps. InverseMask should be
|
||||
//True if white means transparent, and black means opaque.
|
||||
Dest := TPngImage.Create;
|
||||
if not (Bitmap.PixelFormat in [pf24bit, pf32bit]) then begin
|
||||
Temp := TBitmap.Create;
|
||||
try
|
||||
Temp.Assign(Bitmap);
|
||||
Temp.PixelFormat := pf24bit;
|
||||
Dest.Assign(Temp);
|
||||
finally
|
||||
Temp.Free;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
Dest.Assign(Bitmap);
|
||||
end;
|
||||
|
||||
//Copy the alpha channel.
|
||||
Dest.CreateAlpha;
|
||||
for Y := 0 to Dest.Height - 1 do begin
|
||||
Line := Dest.AlphaScanline[Y];
|
||||
for X := 0 to Dest.Width - 1 do
|
||||
Line[X] := Integer(TColor(GetPixel(Bitmap.Canvas.Handle, X, Y)) <> Mask) * $FF;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CopyImageFromImageList(Dest: TPngImage; ImageList: TCustomImageList; Index: Integer);
|
||||
var
|
||||
Icon: TIcon;
|
||||
IconInfo: TIconInfo;
|
||||
ColorBitmap, MaskBitmap: TBitmap;
|
||||
X, Y: Integer;
|
||||
AlphaLine: pngimage.PByteArray;
|
||||
Png: TPngImageCollectionItem;
|
||||
begin
|
||||
if ImageList is TPngImageList then begin
|
||||
//This is easy, just copy the PNG object from the imagelist to the PNG object
|
||||
//from the button
|
||||
Png := TPNGImageList(ImageList).PngImages[Index];
|
||||
if Png <> nil then
|
||||
Dest.Assign(Png.PngImage);
|
||||
end
|
||||
else begin
|
||||
Icon := TIcon.Create;
|
||||
ColorBitmap := TBitmap.Create;
|
||||
MaskBitmap := TBitmap.Create;
|
||||
try
|
||||
//Try to copy an icon to a PNG object, including transparency
|
||||
ImageList.GetIcon(Index, Icon);
|
||||
if GetIconInfo(Icon.Handle, IconInfo) then begin
|
||||
//First, pump the colors into the PNG object
|
||||
ColorBitmap.Handle := IconInfo.hbmColor;
|
||||
ColorBitmap.PixelFormat := pf24bit;
|
||||
Dest.Assign(ColorBitmap);
|
||||
|
||||
//Finally, copy the transparency
|
||||
Dest.CreateAlpha;
|
||||
MaskBitmap.Handle := IconInfo.hbmMask;
|
||||
for Y := 0 to Dest.Height - 1 do begin
|
||||
AlphaLine := Dest.AlphaScanline[Y];
|
||||
for X := 0 to Dest.Width - 1 do
|
||||
AlphaLine^[X] := Integer(GetPixel(MaskBitmap.Canvas.Handle, X, Y) = COLORREF(clBlack)) * $FF;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
MaskBitmap.Free;
|
||||
ColorBitmap.Free;
|
||||
Icon.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SlicePNG(JoinedPNG: TPngImage; Columns, Rows: Integer; out SlicedPNGs: TObjectList);
|
||||
var
|
||||
X, Y, ImageX, ImageY, OffsetX, OffsetY: Integer;
|
||||
Width, Height: Integer;
|
||||
Bitmap: TBitmap;
|
||||
BitmapLine: PRGBLine;
|
||||
AlphaLineA, AlphaLineB: pngimage.PByteArray;
|
||||
PNG: TPngImage;
|
||||
begin
|
||||
//This function slices a large PNG file (e.g. an image with all images for a
|
||||
//toolbar) into smaller, equally-sized pictures.
|
||||
SlicedPNGs := TObjectList.Create(False);
|
||||
Width := JoinedPNG.Width div Columns;
|
||||
Height := JoinedPNG.Height div Rows;
|
||||
|
||||
//Loop through the columns and rows to create each individual image
|
||||
for ImageY := 0 to Rows - 1 do begin
|
||||
for ImageX := 0 to Columns - 1 do begin
|
||||
OffsetX := ImageX * Width;
|
||||
OffsetY := ImageY * Height;
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.PixelFormat := pf24bit;
|
||||
|
||||
//Copy the color information into a temporary bitmap. We can't use TPngImage.Draw
|
||||
//here, because that would combine the color and alpha values.
|
||||
for Y := 0 to Bitmap.Height - 1 do begin
|
||||
BitmapLine := Bitmap.Scanline[Y];
|
||||
for X := 0 to Bitmap.Width - 1 do
|
||||
BitmapLine[X] := ColorToTriple(JoinedPNG.Pixels[X + OffsetX, Y + OffsetY]);
|
||||
end;
|
||||
|
||||
PNG := TPngImage.Create;
|
||||
PNG.Assign(Bitmap);
|
||||
|
||||
if JoinedPNG.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA] then begin
|
||||
//Copy the alpha channel
|
||||
PNG.CreateAlpha;
|
||||
for Y := 0 to PNG.Height - 1 do begin
|
||||
AlphaLineA := JoinedPNG.AlphaScanline[Y + OffsetY];
|
||||
AlphaLineB := JoinedPNG.AlphaScanline[Y];
|
||||
for X := 0 to PNG.Width - 1 do
|
||||
AlphaLineB[X] := AlphaLineA[X + OffsetX];
|
||||
end;
|
||||
end;
|
||||
|
||||
SlicedPNGs.Add(PNG);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IF RTLVersion >= 20.0 }
|
||||
type
|
||||
TPNGObject = class(TPngImage);
|
||||
initialization
|
||||
TPicture.RegisterFileFormat('', '', TPNGObject);
|
||||
finalization
|
||||
TPicture.UnregisterGraphicClass(TPNGObject);
|
||||
{$IFEND}
|
||||
end.
|
File diff suppressed because it is too large
Load Diff
@ -1,574 +0,0 @@
|
||||
object PngImageListEditorDlg: TPngImageListEditorDlg
|
||||
Left = 202
|
||||
Top = 128
|
||||
BorderIcons = [biSystemMenu]
|
||||
Caption = 'Editing PngImageList'
|
||||
ClientHeight = 288
|
||||
ClientWidth = 461
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnResize = FormResize
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object pnlMain: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 461
|
||||
Height = 249
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
461
|
||||
249)
|
||||
object gbxProperties: TGroupBox
|
||||
Left = 8
|
||||
Top = 4
|
||||
Width = 177
|
||||
Height = 128
|
||||
Anchors = [akLeft, akTop, akBottom]
|
||||
Caption = 'Image properties'
|
||||
TabOrder = 0
|
||||
object lblName: TLabel
|
||||
Left = 10
|
||||
Top = 20
|
||||
Width = 31
|
||||
Height = 13
|
||||
Caption = '&Name:'
|
||||
FocusControl = edtName
|
||||
end
|
||||
object lblBackgroundColor: TLabel
|
||||
Left = 10
|
||||
Top = 64
|
||||
Width = 86
|
||||
Height = 13
|
||||
Caption = '&Background color:'
|
||||
FocusControl = cmbBackgroundColor
|
||||
end
|
||||
object edtName: TEdit
|
||||
Left = 8
|
||||
Top = 35
|
||||
Width = 161
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
OnChange = edtNameChange
|
||||
end
|
||||
object cmbBackgroundColor: TComboBox
|
||||
Left = 29
|
||||
Top = 79
|
||||
Width = 140
|
||||
Height = 21
|
||||
ItemHeight = 0
|
||||
TabOrder = 2
|
||||
OnChange = cmbBackgroundColorChange
|
||||
OnDblClick = cmbBackgroundColorDblClick
|
||||
OnExit = cmbBackgroundColorExit
|
||||
end
|
||||
object pnlBackgroundColor: TPanel
|
||||
Left = 8
|
||||
Top = 79
|
||||
Width = 20
|
||||
Height = 21
|
||||
BevelOuter = bvNone
|
||||
BorderStyle = bsSingle
|
||||
TabOrder = 1
|
||||
OnClick = cmbBackgroundColorDblClick
|
||||
end
|
||||
end
|
||||
object lbxImages: TListBox
|
||||
Left = 276
|
||||
Top = 8
|
||||
Width = 177
|
||||
Height = 209
|
||||
Style = lbOwnerDrawVariable
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
DragCursor = crDefault
|
||||
DragMode = dmAutomatic
|
||||
ItemHeight = 16
|
||||
MultiSelect = True
|
||||
TabOrder = 3
|
||||
OnClick = lbxImagesClick
|
||||
OnDblClick = lbxImagesDblClick
|
||||
OnDragOver = lbxImagesDragOver
|
||||
OnDrawItem = lbxImagesDrawItem
|
||||
OnEnter = lbxImagesEnter
|
||||
OnExit = lbxImagesExit
|
||||
OnKeyDown = lbxImagesKeyDown
|
||||
OnMeasureItem = lbxImagesMeasureItem
|
||||
OnMouseUp = lbxImagesMouseUp
|
||||
OnStartDrag = lbxImagesStartDrag
|
||||
end
|
||||
object cmbPreviewBackground: TComboBox
|
||||
Left = 276
|
||||
Top = 220
|
||||
Width = 177
|
||||
Height = 21
|
||||
Style = csOwnerDrawFixed
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
ItemHeight = 15
|
||||
TabOrder = 4
|
||||
OnChange = cmbPreviewBackgroundChange
|
||||
OnDrawItem = cmbPreviewBackgroundDrawItem
|
||||
Items.Strings = (
|
||||
'Default background'
|
||||
'Checkerboard background'
|
||||
'Diamonds background'
|
||||
'Slashed background'
|
||||
'Backslashed background')
|
||||
end
|
||||
object gbxImageInfo: TGroupBox
|
||||
Left = 8
|
||||
Top = 136
|
||||
Width = 177
|
||||
Height = 105
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Image information'
|
||||
TabOrder = 1
|
||||
object lblDimensions: TLabel
|
||||
Left = 8
|
||||
Top = 20
|
||||
Width = 70
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
AutoSize = False
|
||||
Caption = 'Dimensions:'
|
||||
end
|
||||
object lblColorDepth: TLabel
|
||||
Left = 8
|
||||
Top = 36
|
||||
Width = 70
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
AutoSize = False
|
||||
Caption = 'Color depth:'
|
||||
end
|
||||
object lblTransparency: TLabel
|
||||
Left = 8
|
||||
Top = 52
|
||||
Width = 70
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
AutoSize = False
|
||||
Caption = 'Transparency:'
|
||||
end
|
||||
object lblCompression: TLabel
|
||||
Left = 8
|
||||
Top = 68
|
||||
Width = 70
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
AutoSize = False
|
||||
Caption = 'Compression:'
|
||||
end
|
||||
object lblFiltering: TLabel
|
||||
Left = 8
|
||||
Top = 84
|
||||
Width = 70
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
AutoSize = False
|
||||
Caption = 'Filtering:'
|
||||
end
|
||||
object lblDimensionsValue: TLabel
|
||||
Left = 82
|
||||
Top = 20
|
||||
Width = 87
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
ShowAccelChar = False
|
||||
end
|
||||
object lblColorDepthValue: TLabel
|
||||
Left = 82
|
||||
Top = 36
|
||||
Width = 87
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
ShowAccelChar = False
|
||||
end
|
||||
object lblTransparencyValue: TLabel
|
||||
Left = 82
|
||||
Top = 52
|
||||
Width = 87
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
ShowAccelChar = False
|
||||
end
|
||||
object lblCompressionValue: TLabel
|
||||
Left = 82
|
||||
Top = 68
|
||||
Width = 87
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
ShowAccelChar = False
|
||||
end
|
||||
object lblFilteringValue: TLabel
|
||||
Left = 82
|
||||
Top = 84
|
||||
Width = 87
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
ShowAccelChar = False
|
||||
end
|
||||
end
|
||||
object pnlActionButtons: TPanel
|
||||
Left = 193
|
||||
Top = 35
|
||||
Width = 75
|
||||
Height = 178
|
||||
Anchors = [akLeft]
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 2
|
||||
object btnAdd: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Add'
|
||||
TabOrder = 0
|
||||
OnClick = btnAddClick
|
||||
Layout = blGlyphRight
|
||||
Margin = 6
|
||||
Spacing = 3
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000002804944415478DA8D925D48145114C7FF33AEBB7725BF52
|
||||
23B31E8D908C08EB210885A8C0879630B132320A3114C2972232049F22E893BE
|
||||
E82125A32CF13362C3079505832CB34811524837025B4557F7EBEEECDC3BB7AB
|
||||
A3D52846070E773867FEBF39FF734711426021B2CFF454C6547BADA638D29599
|
||||
A92FB648A88E33FE8A85A382852958240A1692A77CD6231A04BFBEA85396015B
|
||||
4E7BC239FB7625541424A2FECD24FA5EBF178E90FFAAE046CD7F01369579A8EB
|
||||
643E797800189E05EADC4174B5F4439D186B8CE3BC5AA79AFFDF8013DD34FFD8
|
||||
7E72710F1033005D01DA87389E37F421F8F1934765AC5C4E31B62660637117CD
|
||||
2B3944CA738108930D0970DA81FE1F024F1B07E0EBEA1DB569E152A6F1015DDA
|
||||
5905D8E072D36D2585E4683610D56136653A1DC04408686B1BC14453874F9DF3
|
||||
5719DC6835F80D2B20A3B0936E2E7691822C6981C3128E7820205FEBE9F662BC
|
||||
FE8586E9C90B42DCBE6B01A41D6CA5C9454564472AC00C53C88539459C0AD864
|
||||
EA36E0C3A00F53B71E4445A8CE6901AC2F7849D523252493008659324FC504E9
|
||||
6C6114C03FEEC3FC3D0908AE00A4EC7D4623AE5222F558D263A1A51B660AB950
|
||||
7CFD06743469989D9216EE582D24ED7E428387CB088C65F552CAD115B90331F8
|
||||
197037FB40035580BD55889BD62526ED7C4C95E36709D89FE529EAA211447A7A
|
||||
A1F7BA47C163A540FC8039DD0A404AEE239A71AE8208DDF4ADCAAF72CA30DDD2
|
||||
8EE0BBB71E592C973986DFF656005273EED3ED97AB088BCA8D4BBF81F19FF036
|
||||
77627E64A85156AA25D2FFF7D5AE02ACCBBA16CE3B7F2A216D6B26BC9E610C37
|
||||
3447B5C08CFC5BEC57CCCBB4C62A80CD79A9D2999C589B909E9A3EE7FD3E140B
|
||||
856BA45F37D68865C02F696882F0CDD367480000000049454E44AE426082}
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
object btnDelete: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Delete'
|
||||
TabOrder = 1
|
||||
OnClick = btnDeleteClick
|
||||
Layout = blGlyphRight
|
||||
Margin = 6
|
||||
Spacing = 3
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C0000026B4944415478DA8D935948545118C7FF779B7BE7CEA233
|
||||
A913068D46E38339916225B43866B48C94630E961562D1438821E44B3D0D483E
|
||||
842F06D9824259894942168542055AD04B0D0519D1F2580E895B33317366BBB7
|
||||
338E4533B9F487EF5CEE39DFF73BDFF91F0EA3AA2A1262D85608B2085EA75D08
|
||||
09BCAC05A793184EE00EC664BD0759391BC578784AA346DA3EDFA8BC325FB712
|
||||
003CDB1ED69BCEEF38B08539B93F17D7470378FFDC1BFCDAEBD02D0F904593C2
|
||||
729D6ABEAD618FBB0C9E2A03369881A627C0D0AD51E2BBEDD02E0D90259BC2F3
|
||||
DD86D292F2A38DDBE1B27310689AC0021DAF80B1FEA7C4D7BF7B3180044EE44A
|
||||
E3A2AECFB2B7A2E058C3666C5DC32018051269320FF4BC03BC0323E4FBE0BE54
|
||||
004B012CC7D42A99E62E6BBDCB525D5308AB1E08856931929204E0FE17E0D3C0
|
||||
6332F9B02AAD03A6E50CB2733BF21A0F8B3B2BF360A473E11852A4E1801713C0
|
||||
B77B43646AD89506D07B42592D4D5271B1057C04882D6CCBFC19929F37D34064
|
||||
6890CC3E73A7010C9E5046739394B3DE827868219B2EC569286AF2D74FC173B4
|
||||
2BD3F05D32337664912398733AF843F5225BB88EF64FEBE3C94E54E5AF735023
|
||||
331EDD21732F8FA703CED231520BADB10BCE3A0B4A3601D47D28A93E80FA6078
|
||||
7093F8BD8D8B01128A9682D3F40915CE02795745E27EFEE940E9EF2181B7A796
|
||||
0224A4DA68741BCAB69567BB6BC0697928D1A4270CBDCAC9ABD7C88FF1D3CB01
|
||||
12524CD481CE8C427B83B5AE1AC6FCD58851137909186FBF4C663F34AF044072
|
||||
4B442E88C655AD4527EA24ABA308D31F7D787DA937F873E29CEE3F00BF15756A
|
||||
F4BAF64CEB5A7B7072662AE40FB4C5C8C5F9E7FC0BBF2FFCE106AF47A6000000
|
||||
0049454E44AE426082}
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
object btnReplace: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 58
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Replace'
|
||||
TabOrder = 2
|
||||
OnClick = btnReplaceClick
|
||||
Layout = blGlyphRight
|
||||
Margin = 6
|
||||
Spacing = 3
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000003464944415478DA5D525B4C5457145DE70EC3D0995B2582
|
||||
8A112316FBD12698C6F8200A3206A90A43438C3AB5C6D6261325FAD3F4A3F607
|
||||
DBFEF92121468D1AA2898FD8001518CC84A94AC6AA959AB64322FED854014306
|
||||
9D1106B833F7FD70DF3B62D49DEC7372CED96BEDB5F73EAC7CFFC05185E5B768
|
||||
8A9A2E10670EE8B2D6AB4B0AC8161A8CEBD05CDE6A6B3A3DEC1233BB74597DA2
|
||||
8B0A0C4986264AB074136C6968305BD3B0D6CB341591CEC1143FF33CA82946CC
|
||||
54D490AF6255FB3707D7221A7E8CA15FA3718FAE345282C43B04A5CDFF668E7D
|
||||
BFDAB7BD0CD877258B3B5DB713FC6CD22F8B6ADDA70D9B4E477FF9040F93C0FE
|
||||
9FE378168EC65C9619342425F5866049E8817028B48E0F7E0C8C668196EE690C
|
||||
77FF1ECF9F4A8EAFDCEEFFA2F5BB0A147B80072F8023C7E34847FA7B3851DCAB
|
||||
C98AE410947C3B28ECF9BA92DFB20CD04C2029036DE1098C748451B6B9123F1D
|
||||
FE0C8487270F187C0E9C68BB874C24729EA96AB3695A3A5BB4EFAEB06D4F15BF
|
||||
613120E980DB0508B45FBE3E0AFEC302046B4BE0B2008BBC8048FE22259DADFD
|
||||
9007A2672C703FB0E2AFFE10D6EDD8C4571402AA418194CDCD0122030C3A7B69
|
||||
37E992D973A1C5E306224F4D0C9FEE02E27FB6B1A2604C280FF8F98FBCB912E6
|
||||
8C63B9DD06CF997DA5D3F93E3535F992649E3B9161453B6F09F3EA6AF945C44C
|
||||
3D7100D66B02DB5FF33825D80AC7668119C242A5E52C112C68BA2168D5757CBE
|
||||
95BB538C1C497E01B94DA0E752DBEA32F6FF7239BA806B9DC0D0FD565618880A
|
||||
D3EBB7F2D0904BCD7241ECFFFF607D40752D2975E2E76A60D448ABBF8F4672E3
|
||||
2475EB47B6A03E22E835F50E01B3C114608C8C41EBBA88BCAA5AB8366C84F3C6
|
||||
E5C0E2CD01A837C3E7A9C066721A63FD75615E4380B7543A521FE4F11798ECB8
|
||||
FAB7369118290C34ED9E5FB3D1A99F235553B7EE61B2B7A787BEE05E922939A2
|
||||
4A037D99E5C1461FA8F6EC441AA397AE26C4C4845F97D4CFCB76EF3855B2A5D2
|
||||
513616BE8DF1EEDF62243B48B0D49BC994545DCAAE39F8A557991131D4DE999A
|
||||
1D7B16E45C793179321D5AB1CDDFBEE670131EF7FD8347172EC74D038D943981
|
||||
B78CCD2F6F3DEAE67D2DA6A4A4332FA70E701CD7ABCE6661AADAC23C8FBBC357
|
||||
5C549D4D4D0EEBAABC8BC04FF09EBD02E1D692A4E09B28E50000000049454E44
|
||||
AE426082}
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
object btnClear: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 87
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Clear'
|
||||
TabOrder = 3
|
||||
OnClick = btnClearClick
|
||||
Layout = blGlyphRight
|
||||
Margin = 6
|
||||
Spacing = 3
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000003094944415478DA6D935B48145118C7FFB373E6BA9BDBBA
|
||||
ADB58BE1A5A8970CB4A28C8A966EA696DA45ED22452515296A12BD45E14B4545
|
||||
0F15223D1414B545216D8558A2A6899544D8432F964611994617775777DD9DE9
|
||||
9B59A5A80E733867BE6FFEBFF3FDBFE170400D38DE02A6CA608A0C5E95C06471
|
||||
96A6DA6E730E47068B8E76303D560270434C11C1CB426158B137088AE410F570
|
||||
1DF70F40163C1126F933B7ADCFCA299A8B2BF5CF11ECED2DE725F1B220F1DE80
|
||||
7D862FBF24DBA50912DAEFBF08FD05905C518EF7A514AEF35E39BE00F3938075
|
||||
C7DEE0CD83F643B2223E0AD893DA56147B3DD7765AF17000387AF665F0374016
|
||||
155D55AF3BF2728B4E1DC9C2E2E9C07018A83DFF1A7D0FDBEE45125DC9199B73
|
||||
B2EA364D45AA15F0F501971A9E05E2008E6310C57A6B7EEEDEEAC3CB914DE270
|
||||
94268013175EA1BFB51BE9A505A82970234906040BF0F80370E36AB701A8B601
|
||||
B1D3CAAA9C83C5B5B95842E23112739489D1F4B57C4660640C651B52318501E3
|
||||
3140A1B56B1068BAD169002ACF2173694D464531F2D22D088FD3B1BAF9C042D9
|
||||
106D781E50691DD7084C7191DE5F7F079EDF794200F79911ECAFB2254D63584A
|
||||
4D635C5C3C390C8831B43F8286857721E0ADBF750270A0CA0691C14EA5A524C4
|
||||
4FE02684FA84D898DC049011E00B55FAB3B9C5B470862CD46273B19126E3804D
|
||||
8A9F625A216884B691D1B85822B868C40CD09366B3892AB93B89ECB595DCFA8D
|
||||
D0A3F8EDC1807CFA086E2C047DF61C136EE68C5204606A7753FC375281C4D4EA
|
||||
C535057BD535AB4C886E348C3E8A763D45B4E33184ADBBC1A7A75080727A1CC0
|
||||
DA1F4C028C1153C0B1EBCEC2A2A2C4D5CBA0C5E27DF8D1DE896FFEC65BA2DB93
|
||||
E62CDDB1484E9E0E8DFC7322E5EEFBFF04982D73911D5FF2A62DDE948295D0A8
|
||||
8AC1962E0CF8EE56D03D69563DEEB6D45DDB3D56B783FE2DF0FEA63FF817C0AC
|
||||
C463E1E19FB7A72C6BEEC685E8B9D888FEA6D67239D171598BC5BC0969337D99
|
||||
FB4A5C925D454FFDCDD07F0026641613E5DB5697332338FCB5231A1E2FB1086C
|
||||
484CB05155D142DB34678385AE732410ACFB05147F0B83A25F23860000000049
|
||||
454E44AE426082}
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
object btnUp: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 124
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Up'
|
||||
TabOrder = 4
|
||||
OnClick = btnUpClick
|
||||
Layout = blGlyphRight
|
||||
Margin = 6
|
||||
Spacing = 3
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C0000021C4944415478DAA5933B68535118C7FFE7DE247D886821
|
||||
26197C504C8A5894D2461087BA38A874503B89521F9B858E0AA28BA08B1D1C14
|
||||
412D48EB031D62972E6D8DD84987802D8A1645712AA6A995368F7BCFDB737223
|
||||
B44171C8E17CE783EF5E7EE7FBFEF77F89D61A8D2CD23020753E0B68BBAB07A0
|
||||
ECA121851CF211B9A928835B2A5E9294DE16C50A44C983CDAC5481E6F2EF0025
|
||||
44BF1F6A79D27B38DD04A530FD7C863A3F0BA714E599FF038448AF8AD0C48143
|
||||
DDF13B27DB400870617411D9B1A97CB357EC931ECBF17F0374CAA37A626BF79E
|
||||
8ECB2712D81209E65C12C0B587DF309F99FC1C617E1FAFD02FAC585E03B04BA9
|
||||
362ED4787847EAE0E923ED486E02CA3C78B4C180BE9680FB0F7258CEBE9E218C
|
||||
1F371DFC5AD781E4629447B70DECEFDD85DD51029F013CD01361076869023E2D
|
||||
294C8E4CC37BFB664C7371467155034871BDD81ABB92E8DA8B8EA8032103396C
|
||||
4805840C4098CC4C616E41A0F0E8199C8FB337941BBE4A5267A78E5244322BED
|
||||
FB9AE3B156386B6CA1AB46017C334AA16C46A2A61036B5FC22F0F49EAF970BFD
|
||||
64E7B957EF56E29D5D7C730C9A0437592BB824080BA4352D1C52231B887AFF01
|
||||
FE8BC7B324399813A1CE1E574BABA301A00E60BB2075F63345C708FB7DF8AE24
|
||||
C981973F123DE9F8C698915DD9B7AB1BEB0C5E07704266A4F905CCDD1AC993ED
|
||||
C7C6075DD71DB697492ACDB765904C40D9E036F35AFCA905F3B0B2A7E86AE962
|
||||
E33F53A380DF494945E019F9A78D0000000049454E44AE426082}
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
object btnDown: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 153
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Down'
|
||||
TabOrder = 5
|
||||
OnClick = btnDownClick
|
||||
Layout = blGlyphRight
|
||||
Margin = 6
|
||||
Spacing = 3
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000002174944415478DAB5934F68134114C6BFCD6E936AFF482B
|
||||
521A3555AC52D4D21EF620586C4104FF1D2C257810ADA5148AC5A35E144F7A50
|
||||
111141105A44AD07853482C593158A2749A1912A88550F82D5DA966CB2D96E76
|
||||
6667C7994D0824F1161C18DEEEDB79BFF7E6FB5885738E6A965235A07D68E682
|
||||
E3A9B719E3014E5D7894C22322120A26222F4617CCFF4EFCC8D2A607C3B8A444
|
||||
86DFFD8EE85D2DBBDA1AE079E5F8B257259FD3346021F1137337279695D69184
|
||||
3B7A5E574FB50386535153B254592CF6C620F0F207702DFA8029E1E8EBF9B0DE
|
||||
DD1DED6B459D0A30AFB25042B500F0C70252A249631D30F5E2233E3D9C4C2A6D
|
||||
FD53C7B3448D6D3BDC5B7B68FF26410078D9D812FA6105F8BC0AE404A866750D
|
||||
C6DD7B39ACA70694ADC79E83DBCE75AB297C65FB913EEC6856C10A105EE8BE68
|
||||
00DF5205A2EB02938F80AFC91B40E8AA123E2A000E0535ADC774E7DE73F53D07
|
||||
119417155DA5C32601D67252004914C9780C48CC3E11730C4A7C1E202CA2996C
|
||||
13B349DCEE3CD0EB76E9E06EFEBCEF8C1C430887B733C09B57B3E2A91F08F833
|
||||
1501C4B4C032D66E97B269D673628FB6AF03ACE04A6003E0BC4F82C49F7E1182
|
||||
9C14D9C5A2462500D3064D9B3AD782D35BA2A75BEA3B223E21B3F01D4B13E3CB
|
||||
CC324571CD5C89431580EC3A889119A86DDEFCAC73EC6C480A317F67DCB1577E
|
||||
9D11F7885558FC2F80BF4DEB62A8B1E1163C8E5CDAB82C54BCFF7F7EA66A017F
|
||||
01C92B1C3633E7F2D20000000049454E44AE426082}
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
end
|
||||
end
|
||||
object pnlButtons: TPanel
|
||||
Left = 0
|
||||
Top = 249
|
||||
Width = 461
|
||||
Height = 37
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
461
|
||||
37)
|
||||
object pnlModalButtons: TPanel
|
||||
Left = 152
|
||||
Top = 4
|
||||
Width = 158
|
||||
Height = 25
|
||||
Anchors = [akBottom]
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
object btnOK: TPngBitBtn
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000001D44944415478DAC5934148146118869F7F669ADD550221
|
||||
5C5110090FDB25820E2B052D754848F010648487D214098930A443E521F02228
|
||||
E52D4AA873744828DA20483A48D6C15B5D4294D2924A6D0F5B63EB36BEF3AF44
|
||||
222D8287061E66BEE17B9F9DEF9B1D1386213B39CC8E05DCA49E353E9257F543
|
||||
FC146BC213BED8F5D7B5B751FB34FA31BA5C97FD8661A629709D55B26505D1D9
|
||||
A58E18E771E85115188F36E30C39AF5DDF6D2C7C2BB44934B145109D43F65049
|
||||
77554355673C164F2DCE2C4E4A72C654326FCC35D39FCC24477273B9F9E06D70
|
||||
5AEDAF242A050D35929CF4EABD3EF5A4BC658F85C9856CB150ECA6824FA6226A
|
||||
E925E337FBCF9D238E1FDC096699E394A2EF44070D7498C3A629914E60A60CF9
|
||||
A7F9871AA38738DF05254117493566B9CC41BE28768F198DB14486348754578B
|
||||
47E209A3FAD51BEC266747FB23E85451E43617B9404AD71F84236A4534CA036D
|
||||
E40DB7B4BCABDA435112360BDAA37D6AB327B8CB513D60B8D1B0221E8B69AE28
|
||||
38226C68ABA0D53EC13EF6F292731A277A5DCB625CDAF75C5270CC8612FF12B4
|
||||
584174E3859EE318BFECBC2B1AA55FCDF76D205E4E705CC56FFB4719E000837C
|
||||
E6ABC267F51A9F6D0A9615948EB41893AC4F4B9CB07762DB10FCF7AF711D7610
|
||||
84C5CCB842D50000000049454E44AE426082}
|
||||
end
|
||||
object btnCancel: TPngBitBtn
|
||||
Left = 83
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 25
|
||||
Cancel = True
|
||||
Caption = '&Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000002E24944415478DA6D93CB4F135114C6BF79B5451E022D42
|
||||
B0C5C82321206A58812B4AD8B8D2981077B22BB4087F4C1BCA232E64E38618FF
|
||||
00096C30411E0B44A031214140A10FFAA02D7DCCDCB99E3B8A4074929399CC9D
|
||||
EF37F77EDF39D2D1230012C00DDCA1EA3638964B65A05C02741D600C372EC380
|
||||
9773EC98266206AD49478F495C42BDEA541750533198DFCB064837FD3F0089FD
|
||||
352E255CCA9A4BD92C1FE640523A7C8066B5D6365FF7EAC590E66EC149F88D99
|
||||
DE4C4E3219537AF90A40B07197C7166CEFF7C8D9E30CBE7D4E2CE62E30221D76
|
||||
6240BB5FB5DCF03A00D9D104F3C7571CBF7D6F24B7321304991100128FB9DCF6
|
||||
506BBF5BD5B802964C636B258E54867BA5C387908A598CDDEA72061B5F3E5315
|
||||
471DD8E93E0EDE7DC45924EFD309E074DBE63AFA3D50B80C3D914164FDCC8825
|
||||
D8A4AC604600502A02C5738C5777DD0EDD7DEE9514AD0A2C7A80FD0F9BE0BA89
|
||||
D63E37344B9C16621E4D98130A1D51986F01CA04289169A53CFCD5ED95E196A7
|
||||
BDD0640758220A295F806CC012EF6D9C211637038A8269CB180BD0F33B3201B0
|
||||
EE45F86AEF55CCB60D744021217279B0740EBB6B0944636C94C4737F63118055
|
||||
273DF0ABA8C8309FCB639F6D7FD20245A7855C810017D8FD92C6CF241F953801
|
||||
E8B5F94723ADD6DF10FBC9B0701B1926CECCCE32405E87526428A78AD8FD5EC6
|
||||
4901018563FA1F80C8D9E9B185DAFA3C92884A4FA410D94852F798E86CD0A015
|
||||
4CE8E706B6D3E0511313B493A94B80441D36E674DB83E4B67AE9F6DEBA65984F
|
||||
F451A30373DD0E40CBD28FA8B9B6097B0A4CCAA018576A3040EDB9DCE5BD0799
|
||||
ABD0E356544634CE26C8B019EA799419C61A65847A18544DEC966A832A057805
|
||||
A0D96697E7DB7BEB872A1D32226B09331A3727AD9CE9120046454336DEC411A4
|
||||
D064DA08B680454A7F44FA546B45586FB761C1AE4A83C90C0F9078FAD2D84B00
|
||||
4D201887BF0E089370290F0CAB6298048051DE659DC699A15B96B17C7D7CAF03
|
||||
44D1A75E05D8A1168889F55F525F839E0094AAF50000000049454E44AE426082}
|
||||
end
|
||||
end
|
||||
object chkUseFilenames: TCheckBox
|
||||
Left = 341
|
||||
Top = 7
|
||||
Width = 112
|
||||
Height = 17
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Use Filenames'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object dlgOpenPicture: TOpenPictureDialog
|
||||
DefaultExt = 'png'
|
||||
Filter = 'Portable Network Graphics (*.png)|*.png'
|
||||
Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Title = 'Browse for a PNG file'
|
||||
Left = 40
|
||||
Top = 251
|
||||
end
|
||||
object dlgColor: TColorDialog
|
||||
Options = [cdAnyColor]
|
||||
Left = 72
|
||||
Top = 251
|
||||
end
|
||||
object Images: TPngImageCollection
|
||||
Items = <>
|
||||
Left = 8
|
||||
Top = 251
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
@ -1,149 +0,0 @@
|
||||
unit PngSpeedButton;
|
||||
|
||||
{$I compilers.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Classes, Buttons, pngimage, PngFunctions;
|
||||
|
||||
type
|
||||
TPngSpeedButton = class(TSpeedButton)
|
||||
private
|
||||
FPngImage: TPngImage;
|
||||
FPngOptions: TPngOptions;
|
||||
FImageFromAction: Boolean;
|
||||
function PngImageStored: Boolean;
|
||||
procedure SetPngImage(const Value: TPngImage);
|
||||
procedure SetPngOptions(const Value: TPngOptions);
|
||||
procedure CreatePngGlyph;
|
||||
protected
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
|
||||
procedure Paint; override;
|
||||
procedure Loaded; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property PngImage: TPngImage read FPngImage write SetPngImage stored PngImageStored;
|
||||
property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
|
||||
property Glyph stored False;
|
||||
property NumGlyphs stored False;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Graphics, ActnList, PngButtonFunctions;
|
||||
|
||||
{ TPngSpeedButton }
|
||||
|
||||
constructor TPngSpeedButton.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FPngImage := TPngImage.Create;
|
||||
FPngOptions := [pngBlendOnDisabled];
|
||||
FImageFromAction := False;
|
||||
end;
|
||||
|
||||
destructor TPngSpeedButton.Destroy;
|
||||
begin
|
||||
FPngImage.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TPngSpeedButton.ActionChange(Sender: TObject; CheckDefaults: Boolean);
|
||||
begin
|
||||
inherited ActionChange(Sender, CheckDefaults);
|
||||
if Sender is TCustomAction then
|
||||
with TCustomAction(Sender) do begin
|
||||
//Copy image from action's imagelist
|
||||
if (PngImage.Empty or FImageFromAction) and (ActionList <> nil) and
|
||||
(ActionList.Images <> nil) and (ImageIndex >= 0) and (ImageIndex <
|
||||
ActionList.Images.Count) then begin
|
||||
CopyImageFromImageList(FPngImage, ActionList.Images, ImageIndex);
|
||||
CreatePngGlyph;
|
||||
FImageFromAction := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPngSpeedButton.Paint;
|
||||
var
|
||||
PaintRect: TRect;
|
||||
GlyphPos, TextPos: TPoint;
|
||||
begin
|
||||
inherited Paint;
|
||||
|
||||
if FPngImage <> nil then begin
|
||||
//Calculate the position of the PNG glyph
|
||||
CalcButtonLayout(Canvas, FPngImage, ClientRect, FState = bsDown, Down,
|
||||
Caption, Layout, Margin, Spacing, GlyphPos, TextPos, DrawTextBiDiModeFlags(0));
|
||||
PaintRect := Bounds(GlyphPos.X, GlyphPos.Y, FPngImage.Width, FPngImage.Height);
|
||||
|
||||
if Enabled then
|
||||
DrawPNG(FPngImage, Canvas, PaintRect, [])
|
||||
else
|
||||
DrawPNG(FPngImage, Canvas, PaintRect, FPngOptions);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPngSpeedButton.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
CreatePngGlyph;
|
||||
end;
|
||||
|
||||
function TPngSpeedButton.PngImageStored: Boolean;
|
||||
begin
|
||||
Result := not FImageFromAction;
|
||||
end;
|
||||
|
||||
procedure TPngSpeedButton.SetPngImage(const Value: TPngImage);
|
||||
begin
|
||||
//This is all neccesary, because you can't assign a nil to a TPngImage
|
||||
if Value = nil then begin
|
||||
FPngImage.Free;
|
||||
FPngImage := TPngImage.Create;
|
||||
end
|
||||
else
|
||||
FPngImage.Assign(Value);
|
||||
|
||||
//To work around the gamma-problem
|
||||
with FPngImage do
|
||||
if Header.ColorType in [COLOR_RGB, COLOR_RGBALPHA, COLOR_PALETTE] then
|
||||
Chunks.RemoveChunk(Chunks.ItemFromClass(TChunkgAMA));
|
||||
|
||||
FImageFromAction := False;
|
||||
CreatePngGlyph;
|
||||
Repaint;
|
||||
end;
|
||||
|
||||
procedure TPngSpeedButton.SetPngOptions(const Value: TPngOptions);
|
||||
begin
|
||||
if FPngOptions <> Value then begin
|
||||
FPngOptions := Value;
|
||||
CreatePngGlyph;
|
||||
Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPngSpeedButton.CreatePngGlyph;
|
||||
var
|
||||
Bmp: TBitmap;
|
||||
begin
|
||||
//Create an empty glyph, just to align the text correctly
|
||||
Bmp := TBitmap.Create;
|
||||
try
|
||||
Bmp.Width := FPngImage.Width;
|
||||
Bmp.Height := FPngImage.Height;
|
||||
Bmp.Canvas.Brush.Color := clBtnFace;
|
||||
Bmp.Canvas.FillRect(Rect(0, 0, Bmp.Width, Bmp.Height));
|
||||
Glyph.Assign(Bmp);
|
||||
NumGlyphs := 1;
|
||||
finally
|
||||
Bmp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
@ -87,7 +87,7 @@ set params=%params% -aWinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BD
|
||||
set params=%params% -B
|
||||
set params=%params% -i"%base_dir%\source"
|
||||
set params=%params% -r"%base_dir%\components\synedit\resources;%base_dir%\components\virtualtreeview\Resources"
|
||||
set params=%params% -u"%compiler_dir%\lib;%compiler_dir%\lib\obj;%base_dir%\components\virtualtreeview\build;%base_dir%\components\synedit\build;%base_dir%\components\pngcomponents\build;%mad_dir%\madExcept\BDS7;%mad_dir%\madDisAsm\BDS7;%mad_dir%\madBasic\BDS7"
|
||||
set params=%params% -u"%compiler_dir%\lib;%compiler_dir%\lib\obj;%base_dir%\components\virtualtreeview\build;%base_dir%\components\synedit\build;%mad_dir%\madExcept\BDS7;%mad_dir%\madDisAsm\BDS7;%mad_dir%\madBasic\BDS7"
|
||||
set params=%params% -N0"..\..\build"
|
||||
set params=%params% -LE"..\..\build"
|
||||
set params=%params% -LN"..\..\build"
|
||||
@ -146,13 +146,6 @@ call :compile virtualtreeview VirtualTreesD
|
||||
if not %err% == 0 goto end
|
||||
|
||||
|
||||
rem Build PNGComponents
|
||||
call :compile pngcomponents PngComponents
|
||||
if not %err% == 0 goto end
|
||||
call :compile pngcomponents PngComponentsD
|
||||
if not %err% == 0 goto end
|
||||
|
||||
|
||||
rem Build main executable
|
||||
echo Compiling main project.
|
||||
cd /d "%base_dir%\packages\%package_dir%\"
|
||||
|
@ -89,11 +89,6 @@ call :install virtualtreeview VirtualTreesD
|
||||
if not %err% == 0 goto end
|
||||
|
||||
|
||||
rem Install PNGComponents
|
||||
call :install pngcomponents PngComponentsD
|
||||
if not %err% == 0 goto end
|
||||
|
||||
|
||||
echo.
|
||||
echo Finished.
|
||||
echo.
|
||||
|
@ -57,10 +57,10 @@
|
||||
<DCC_HppOutput>..\..\build</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\build</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\build</DCC_DcpOutput>
|
||||
<DCC_UnitSearchPath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;..\..\components\pngcomponents\build;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;..\..\components\pngcomponents\build;$(DCC_ResourcePath)</DCC_ResourcePath>
|
||||
<DCC_ObjPath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;..\..\components\pngcomponents\build;$(DCC_ObjPath)</DCC_ObjPath>
|
||||
<DCC_IncludePath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;..\..\components\pngcomponents\build;$(DCC_IncludePath)</DCC_IncludePath>
|
||||
<DCC_UnitSearchPath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;$(DCC_ResourcePath)</DCC_ResourcePath>
|
||||
<DCC_ObjPath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;$(DCC_ObjPath)</DCC_ObjPath>
|
||||
<DCC_IncludePath>$(BDS)\RaveReports\Lib;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\components\synedit\build;..\..\components\synedit\resources;..\..\components\virtualtreeview\build;..\..\components\virtualtreeview\resources;$(DCC_IncludePath)</DCC_IncludePath>
|
||||
<DCC_Define>DEBUG;madExcept;$(DCC_Define)</DCC_Define>
|
||||
<DCC_Description>HeidiSQL</DCC_Description>
|
||||
</PropertyGroup>
|
||||
|
@ -1,92 +1,86 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{9d2773a7-5199-4f9f-9b9a-ad4c0c48a953}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="SynEditR">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="SynEditR:Clean">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="SynEditR:Make">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="SynEditD">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="SynEditD:Clean">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="SynEditD:Make">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="VirtualTreesR">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="VirtualTreesR:Clean">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="VirtualTreesR:Make">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="VirtualTreesD">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="VirtualTreesD:Clean">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="VirtualTreesD:Make">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PNG">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PNG.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PNG:Clean">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PNG.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PNG:Make">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PNG.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PngComponents">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PngComponents.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PngComponents:Clean">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PngComponents.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PngComponents:Make">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PngComponents.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PngComponentsD.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD:Clean">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PngComponentsD.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PngComponentsD:Make">
|
||||
<MSBuild Projects="..\..\components\pngcomponents\packages\delphi2010\PngComponentsD.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="heidisql">
|
||||
<MSBuild Projects="heidisql.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="heidisql:Clean">
|
||||
<MSBuild Projects="heidisql.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="heidisql:Make">
|
||||
<MSBuild Projects="heidisql.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="SynEditR;SynEditD;VirtualTreesR;VirtualTreesD;PngComponents;PngComponentsD;heidisql" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="SynEditR:Clean;SynEditD:Clean;VirtualTreesR:Clean;VirtualTreesD:Clean;PngComponents:Clean;PngComponentsD:Clean;heidisql:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="SynEditR:Make;SynEditD:Make;VirtualTreesR:Make;VirtualTreesD:Make;PngComponents:Make;PngComponentsD:Make;heidisql:Make" />
|
||||
</Target>
|
||||
</Project>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{9d2773a7-5199-4f9f-9b9a-ad4c0c48a953}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Projects Include="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="heidisql.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<BorlandProject>
|
||||
<Default.Personality/>
|
||||
</BorlandProject>
|
||||
</BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="SynEditR">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEditR:Clean">
|
||||
<MSBuild Targets="Clean" Projects="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEditR:Make">
|
||||
<MSBuild Targets="Make" Projects="..\..\components\synedit\Packages\delphi2010\SynEditR.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEditD">
|
||||
<MSBuild Projects="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEditD:Clean">
|
||||
<MSBuild Targets="Clean" Projects="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEditD:Make">
|
||||
<MSBuild Targets="Make" Projects="..\..\components\synedit\Packages\delphi2010\SynEditD.dproj"/>
|
||||
</Target>
|
||||
<Target Name="VirtualTreesR">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj"/>
|
||||
</Target>
|
||||
<Target Name="VirtualTreesR:Clean">
|
||||
<MSBuild Targets="Clean" Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj"/>
|
||||
</Target>
|
||||
<Target Name="VirtualTreesR:Make">
|
||||
<MSBuild Targets="Make" Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesR.dproj"/>
|
||||
</Target>
|
||||
<Target Name="VirtualTreesD">
|
||||
<MSBuild Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj"/>
|
||||
</Target>
|
||||
<Target Name="VirtualTreesD:Clean">
|
||||
<MSBuild Targets="Clean" Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj"/>
|
||||
</Target>
|
||||
<Target Name="VirtualTreesD:Make">
|
||||
<MSBuild Targets="Make" Projects="..\..\components\virtualtreeview\packages\delphi2010\VirtualTreesD.dproj"/>
|
||||
</Target>
|
||||
<Target Name="heidisql">
|
||||
<MSBuild Projects="heidisql.dproj"/>
|
||||
</Target>
|
||||
<Target Name="heidisql:Clean">
|
||||
<MSBuild Targets="Clean" Projects="heidisql.dproj"/>
|
||||
</Target>
|
||||
<Target Name="heidisql:Make">
|
||||
<MSBuild Targets="Make" Projects="heidisql.dproj"/>
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="SynEditR;SynEditD;VirtualTreesR;VirtualTreesD;heidisql"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="SynEditR:Clean;SynEditD:Clean;VirtualTreesR:Clean;VirtualTreesD:Clean;heidisql:Clean"/>
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="SynEditR:Make;SynEditD:Make;VirtualTreesR:Make;VirtualTreesD:Make;heidisql:Make"/>
|
||||
</Target>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
|
||||
</Project>
|
||||
|
@ -57,7 +57,7 @@ object frmBinEditor: TfrmBinEditor
|
||||
Align = alNone
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'tlbStandard'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
|
@ -98,7 +98,7 @@ object connform: Tconnform
|
||||
Header.Font.Style = []
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs]
|
||||
HintMode = hmTooltip
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
IncrementalSearch = isAll
|
||||
PopupMenu = popupSessions
|
||||
TabOrder = 0
|
||||
@ -316,7 +316,7 @@ object connform: Tconnform
|
||||
end
|
||||
end
|
||||
object popupSessions: TPopupMenu
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
Left = 176
|
||||
Top = 240
|
||||
object Save1: TMenuItem
|
||||
|
@ -327,6 +327,7 @@ procedure Tconnform.ListSessionsGetImageIndex(Sender: TBaseVirtualTree;
|
||||
var Ghosted: Boolean; var ImageIndex: Integer);
|
||||
begin
|
||||
// A new session gets an additional plus symbol, editing gets a pencil
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
ImageIndex := 36;
|
||||
if Node = Sender.FocusedNode then begin
|
||||
if FSessionAdded then ImageIndex := 72
|
||||
|
@ -70,7 +70,7 @@ object loaddataform: Tloaddataform
|
||||
DesignSize = (
|
||||
403
|
||||
90)
|
||||
object btnOpenFile: TPngSpeedButton
|
||||
object btnOpenFile: TSpeedButton
|
||||
Left = 362
|
||||
Top = 24
|
||||
Width = 22
|
||||
@ -263,7 +263,7 @@ object loaddataform: Tloaddataform
|
||||
Height = 13
|
||||
Caption = 'Use Columns:'
|
||||
end
|
||||
object btnColUp: TPngSpeedButton
|
||||
object btnColUp: TSpeedButton
|
||||
Left = 150
|
||||
Top = 117
|
||||
Width = 25
|
||||
@ -272,7 +272,7 @@ object loaddataform: Tloaddataform
|
||||
Flat = True
|
||||
OnClick = btnColUpClick
|
||||
end
|
||||
object btnColDown: TPngSpeedButton
|
||||
object btnColDown: TSpeedButton
|
||||
Left = 150
|
||||
Top = 142
|
||||
Width = 25
|
||||
|
@ -9,7 +9,7 @@ unit loaddata;
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, ComCtrls, CheckLst, PngSpeedButton,
|
||||
Windows, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, ComCtrls, CheckLst,
|
||||
SynRegExpr, Buttons,
|
||||
mysql_connection;
|
||||
|
||||
@ -27,8 +27,8 @@ type
|
||||
comboTable: TComboBox;
|
||||
lblColumns: TLabel;
|
||||
chklistColumns: TCheckListBox;
|
||||
btnColUp: TPngSpeedButton;
|
||||
btnColDown: TPngSpeedButton;
|
||||
btnColUp: TSpeedButton;
|
||||
btnColDown: TSpeedButton;
|
||||
grpOptions: TGroupBox;
|
||||
chkLowPriority: TCheckBox;
|
||||
chkReplace: TCheckBox;
|
||||
@ -36,7 +36,7 @@ type
|
||||
lblDuplicates: TLabel;
|
||||
grpFilename: TGroupBox;
|
||||
editFilename: TEdit;
|
||||
btnOpenFile: TPngSpeedButton;
|
||||
btnOpenFile: TSpeedButton;
|
||||
grpFields: TGroupBox;
|
||||
lblFieldTerminater: TLabel;
|
||||
lblFieldEncloser: TLabel;
|
||||
@ -102,9 +102,9 @@ end;
|
||||
procedure Tloaddataform.FormCreate(Sender: TObject);
|
||||
begin
|
||||
// Assign images from main imagelist to speedbuttons
|
||||
btnOpenFile.PngImage := Mainform.PngImageListMain.PngImages[52].PngImage;
|
||||
btnColUp.PngImage := Mainform.PngImageListMain.PngImages[74].PngImage;
|
||||
btnColDown.PngImage := Mainform.PngImageListMain.PngImages[75].PngImage;
|
||||
Mainform.ImageListMain.GetBitmap(52, btnOpenFile.Glyph);
|
||||
Mainform.ImageListMain.GetBitmap(74, btnColUp.Glyph);
|
||||
Mainform.ImageListMain.GetBitmap(75, btnColDown.Glyph);
|
||||
InheritFont(Font);
|
||||
end;
|
||||
|
||||
|
8756
source/main.dfm
8756
source/main.dfm
File diff suppressed because it is too large
Load Diff
@ -12,10 +12,10 @@ interface
|
||||
uses
|
||||
Windows, SysUtils, Classes, Graphics, GraphUtil, Forms, Controls, Menus, StdCtrls, Dialogs, Buttons,
|
||||
Messages, ExtCtrls, ComCtrls, StdActns, ActnList, ImgList, ToolWin, Clipbrd, SynMemo,
|
||||
SynEdit, SynEditTypes, SynEditKeyCmds, VirtualTrees, DateUtils, PngImageList,
|
||||
SynEdit, SynEditTypes, SynEditKeyCmds, VirtualTrees, DateUtils,
|
||||
ShlObj, SynEditMiscClasses, SynEditSearch, SynEditRegexSearch, SynCompletionProposal, SynEditHighlighter,
|
||||
SynHighlighterSQL, Tabs, SynUnicode, SynRegExpr, WideStrUtils, ExtActns,
|
||||
CommCtrl, Contnrs, PngSpeedButton, Generics.Collections,
|
||||
CommCtrl, Contnrs, Generics.Collections,
|
||||
routine_editor, trigger_editor, options, EditVar, helpers, createdatabase, table_editor,
|
||||
TableTools, View, Usermanager, SelectDBObject, connections, sqlhelp, mysql_connection,
|
||||
mysql_api, insertfiles, searchreplace;
|
||||
@ -24,7 +24,7 @@ uses
|
||||
type
|
||||
TQueryTab = class(TObject)
|
||||
Number: Integer;
|
||||
CloseButton: TPngSpeedButton;
|
||||
CloseButton: TSpeedButton;
|
||||
pnlMemo: TPanel;
|
||||
pnlHelpers: TPanel;
|
||||
lboxHelpers: TListBox;
|
||||
@ -133,7 +133,7 @@ type
|
||||
Import1: TMenuItem;
|
||||
tlbSep6: TToolButton;
|
||||
menuUpdateCheck: TMenuItem;
|
||||
PngImageListMain: TPngImageList;
|
||||
ImageListMain: TImageList;
|
||||
actCreateView: TAction;
|
||||
ToolButton3: TToolButton;
|
||||
actDataFirst: TAction;
|
||||
@ -422,7 +422,7 @@ type
|
||||
Newquerytab1: TMenuItem;
|
||||
Closetab1: TMenuItem;
|
||||
pnlRight: TPanel;
|
||||
btnCloseFilterPanel: TPngSpeedButton;
|
||||
btnCloseFilterPanel: TSpeedButton;
|
||||
actFilterPanel: TAction;
|
||||
actFindInVT1: TMenuItem;
|
||||
TimerFilterVT: TTimer;
|
||||
@ -773,7 +773,7 @@ type
|
||||
virtualDesktopName: string;
|
||||
AllDatabases: TStringList;
|
||||
Databases: TStringList;
|
||||
btnAddTab: TPngSpeedButton;
|
||||
btnAddTab: TSpeedButton;
|
||||
QueryTabs: TObjectList<TQueryTab>;
|
||||
|
||||
// Cached forms
|
||||
@ -1388,9 +1388,9 @@ begin
|
||||
|
||||
DataGridResult := TGridResult.Create;
|
||||
|
||||
btnAddTab := TPngSpeedButton.Create(PageControlMain);
|
||||
btnAddTab := TSpeedButton.Create(PageControlMain);
|
||||
btnAddTab.Parent := PageControlMain;
|
||||
btnAddTab.PngImage := PngImageListMain.PngImages[actNewQueryTab.ImageIndex].PngImage;
|
||||
ImageListMain.GetBitmap(actNewQueryTab.ImageIndex, btnAddTab.Glyph);
|
||||
btnAddTab.Height := PageControlMain.TabRect(0).Bottom - PageControlMain.TabRect(0).Top - 2;
|
||||
btnAddTab.Width := btnAddTab.Height;
|
||||
btnAddTab.Flat := True;
|
||||
@ -1398,7 +1398,7 @@ begin
|
||||
btnAddTab.OnClick := actNewQueryTab.OnExecute;
|
||||
|
||||
// Filter panel
|
||||
btnCloseFilterPanel.PngImage := PngImageListMain.PngImages[134].PngImage;
|
||||
ImageListMain.GetBitmap(134, btnCloseFilterPanel.Glyph);
|
||||
if GetRegValue(REGNAME_FILTERACTIVE, DEFAULT_FILTERACTIVE) then
|
||||
actFilterPanelExecute(nil);
|
||||
lblFilterVTInfo.Caption := '';
|
||||
@ -5404,6 +5404,8 @@ begin
|
||||
// Display icon only for leftmost cell (0) or for tree nodes (-1)
|
||||
if Column > 0 then
|
||||
exit;
|
||||
// Prevent state images, overlaying the normal image
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
// Get pointer to node which gets displayed
|
||||
NodeData := Sender.GetNodeData(Node);
|
||||
ImageIndex := NodeData.ImageIndex;
|
||||
@ -6081,6 +6083,8 @@ var
|
||||
begin
|
||||
if Column > 0 then
|
||||
Exit;
|
||||
// Prevent state images, overlaying the normal image
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
case Sender.GetNodeLevel(Node) of
|
||||
0: ImageIndex := ICONINDEX_SERVER;
|
||||
1: if (Kind = ikSelected) or ((Sender.GetFirstSelected<>nil) and (Node=Sender.GetFirstSelected.Parent)) then
|
||||
@ -6797,7 +6801,7 @@ begin
|
||||
if Node.Index >= Cardinal(Length(DataGridResult.Rows)) then Exit;
|
||||
// Paint a red triangle at the top left corner of the cell
|
||||
if DataGridResult.Rows[Node.Index].Cells[Column].Modified then
|
||||
PngImageListMain.Draw(TargetCanvas, CellRect.Left, CellRect.Top, 111);
|
||||
ImageListMain.Draw(TargetCanvas, CellRect.Left, CellRect.Top, 111);
|
||||
end;
|
||||
|
||||
|
||||
@ -8431,12 +8435,12 @@ begin
|
||||
QueryTab.TabSheet.PageControl := PageControlMain;
|
||||
QueryTab.TabSheet.ImageIndex := tabQuery.ImageIndex;
|
||||
|
||||
QueryTab.CloseButton := TPngSpeedButton.Create(QueryTab.TabSheet);
|
||||
QueryTab.CloseButton := TSpeedButton.Create(QueryTab.TabSheet);
|
||||
QueryTab.CloseButton.Parent := PageControlMain;
|
||||
QueryTab.CloseButton.Width := 16;
|
||||
QueryTab.CloseButton.Height := 16;
|
||||
QueryTab.CloseButton.Flat := True;
|
||||
QueryTab.CloseButton.PngImage := PngImageListMain.PngImages[134].PngImage;
|
||||
ImageListMain.GetBitmap(134, QueryTab.CloseButton.Glyph);
|
||||
QueryTab.CloseButton.OnMouseDown := CloseButtonOnMouseDown;
|
||||
QueryTab.CloseButton.OnMouseUp := CloseButtonOnMouseUp;
|
||||
SetTabCaption(QueryTab.TabSheet.PageIndex, '');
|
||||
@ -8633,7 +8637,7 @@ begin
|
||||
// here, we must check if also the MouseDown event was fired on this particular button. See issue #1469.
|
||||
if (Sender <> FLastMouseDownCloseButton) then
|
||||
Exit;
|
||||
aPoint := PageControlMain.ScreenToClient((Sender as TPngSpeedButton).ClientToScreen(Point(X,Y)));
|
||||
aPoint := PageControlMain.ScreenToClient((Sender as TSpeedButton).ClientToScreen(Point(X,Y)));
|
||||
CloseQueryTab(GetMainTabAt(aPoint.X, aPoint.Y));
|
||||
end;
|
||||
|
||||
@ -8674,7 +8678,7 @@ procedure TMainForm.FixQueryTabCloseButtons;
|
||||
var
|
||||
i, PageIndex, VisiblePageIndex: Integer;
|
||||
Rect: TRect;
|
||||
btn: TPngSpeedButton;
|
||||
btn: TSpeedButton;
|
||||
begin
|
||||
// Fix positions of "Close" buttons on Query tabs
|
||||
// Avoid AV on Startup, when Mainform.OnResize is called once or twice implicitely.
|
||||
|
@ -895,7 +895,7 @@ object optionsform: Toptionsform
|
||||
Header.Font.Name = 'Tahoma'
|
||||
Header.Font.Style = []
|
||||
Header.MainColumn = -1
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 0
|
||||
OnFocusChanged = TreeShortcutItemsFocusChanged
|
||||
OnGetText = TreeShortcutItemsGetText
|
||||
|
@ -632,6 +632,7 @@ var
|
||||
Data: PShortcutItemData;
|
||||
begin
|
||||
// Fetch icon number of shortcut item
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
if Sender.GetNodeLevel(Node) = 1 then begin
|
||||
Data := Sender.GetNodeData(Node);
|
||||
if Assigned(Data.KeyStroke) then
|
||||
|
@ -142,7 +142,7 @@ object frmRoutineEditor: TfrmRoutineEditor
|
||||
Align = alNone
|
||||
ButtonWidth = 66
|
||||
Caption = 'tlbParameters'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 7
|
||||
@ -185,7 +185,7 @@ object frmRoutineEditor: TfrmRoutineEditor
|
||||
Header.MainColumn = 1
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoVisible]
|
||||
Header.ParentFont = True
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
NodeDataSize = 0
|
||||
TabOrder = 8
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
||||
|
@ -269,6 +269,7 @@ var
|
||||
Context: String;
|
||||
begin
|
||||
// Draw arrow icon to indicate in/out context
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
List := Sender as TVirtualStringTree;
|
||||
if Column <> 3 then
|
||||
ImageIndex := -1
|
||||
|
@ -76,7 +76,7 @@ object frmSelectDBObject: TfrmSelectDBObject
|
||||
Header.Font.Name = 'Tahoma'
|
||||
Header.Font.Style = []
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs]
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
Indent = 16
|
||||
Margin = 2
|
||||
TabOrder = 0
|
||||
|
@ -49,7 +49,7 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
Align = alBottom
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
ChangeDelay = 50
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
Indent = 19
|
||||
ReadOnly = True
|
||||
ShowLines = False
|
||||
@ -183,13 +183,16 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
Align = alTop
|
||||
Caption = 'Example:'
|
||||
end
|
||||
object btnSearchOnline: TPngSpeedButton
|
||||
object btnSearchOnline: TButton
|
||||
Left = 207
|
||||
Top = 128
|
||||
Width = 103
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Search online'
|
||||
ImageIndex = 69
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 2
|
||||
OnClick = ButtonOnlinehelpClick
|
||||
end
|
||||
object MemoExample: TSynMemo
|
||||
|
@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
Windows, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls,
|
||||
Buttons, PngSpeedButton, SynMemo, SynEditHighlighter, SynHighlighterURI,
|
||||
Buttons, SynMemo, SynEditHighlighter, SynHighlighterURI,
|
||||
SynURIOpener, SynEdit,
|
||||
mysql_connection;
|
||||
|
||||
@ -25,7 +25,7 @@ type
|
||||
lblExample: TLabel;
|
||||
MemoExample: TSynMemo;
|
||||
ButtonClose: TButton;
|
||||
btnSearchOnline: TPngSpeedButton;
|
||||
btnSearchOnline: TButton;
|
||||
URIOpenerDescription: TSynURIOpener;
|
||||
URIHighlighter: TSynURISyn;
|
||||
URIOpenerExample: TSynURIOpener;
|
||||
@ -71,8 +71,6 @@ uses helpers, main;
|
||||
}
|
||||
procedure TfrmSQLhelp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
// Assign images from main imagelist to speedbuttons
|
||||
btnSearchOnline.PngImage := Mainform.PngImageListMain.PngImages[69].PngImage;
|
||||
InheritFont(Font);
|
||||
end;
|
||||
|
||||
|
@ -64,7 +64,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Header.DefaultHeight = 17
|
||||
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoVisible]
|
||||
Header.ParentFont = True
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
IncrementalSearch = isAll
|
||||
PopupMenu = popupColumns
|
||||
TabOrder = 2
|
||||
@ -161,7 +161,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Margins.Bottom = 0
|
||||
ActivePage = tabBasic
|
||||
Align = alTop
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 0
|
||||
OnChange = PageControlMainChange
|
||||
object tabBasic: TTabSheet
|
||||
@ -384,7 +384,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Header.DefaultHeight = 17
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
|
||||
Header.ParentFont = True
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
PopupMenu = popupIndexes
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoTristateTracking]
|
||||
@ -431,7 +431,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
AutoSize = True
|
||||
ButtonWidth = 66
|
||||
Caption = 'tlbIndexes'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
@ -493,7 +493,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
AutoSize = True
|
||||
ButtonWidth = 66
|
||||
Caption = 'tlbForeignKeys'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
@ -547,7 +547,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Header.DefaultHeight = 17
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
|
||||
Header.ParentFont = True
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 0
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowTreeLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||
@ -694,7 +694,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Align = alClient
|
||||
ButtonWidth = 66
|
||||
Caption = 'Columns:'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
@ -733,7 +733,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
end
|
||||
end
|
||||
object popupIndexes: TPopupMenu
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
Left = 344
|
||||
Top = 360
|
||||
object menuAddIndex: TMenuItem
|
||||
@ -774,7 +774,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
end
|
||||
end
|
||||
object popupColumns: TPopupMenu
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
OnPopup = popupColumnsPopup
|
||||
Left = 312
|
||||
Top = 360
|
||||
@ -821,7 +821,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
end
|
||||
end
|
||||
object popupSQLmemo: TPopupMenu
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
OnPopup = popupSQLmemoPopup
|
||||
Left = 376
|
||||
Top = 360
|
||||
|
@ -1035,6 +1035,7 @@ var
|
||||
begin
|
||||
// Primary key icon
|
||||
if Column <> 0 then Exit;
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
Col := Sender.GetNodeData(Node);
|
||||
|
||||
for i:=0 to FKeys.Count-1 do begin
|
||||
@ -1431,8 +1432,8 @@ var
|
||||
begin
|
||||
// Icon image showing type of index
|
||||
VT := Sender as TVirtualStringTree;
|
||||
if Column <> 0 then
|
||||
Exit;
|
||||
if Column <> 0 then Exit;
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
case VT.GetNodeLevel(Node) of
|
||||
0: begin
|
||||
IndexType := VT.Text[Node, 1];
|
||||
@ -2077,6 +2078,7 @@ procedure TfrmTableEditor.listForeignKeysGetImageIndex(Sender: TBaseVirtualTree;
|
||||
var Ghosted: Boolean; var ImageIndex: Integer);
|
||||
begin
|
||||
// Return image index for node cell in foreign key list
|
||||
if not (Kind in [ikNormal, ikSelected]) then Exit;
|
||||
case Column of
|
||||
0: ImageIndex := 136;
|
||||
else ImageIndex := -1;
|
||||
|
@ -85,7 +85,7 @@ object frmTableTools: TfrmTableTools
|
||||
Header.Font.Name = 'Tahoma'
|
||||
Header.Font.Style = []
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs]
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
NodeDataSize = 0
|
||||
TabOrder = 0
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
||||
@ -126,7 +126,7 @@ object frmTableTools: TfrmTableTools
|
||||
Align = alClient
|
||||
Header.AutoSizeIndex = -1
|
||||
Header.DefaultHeight = 17
|
||||
Header.Images = MainForm.PngImageListMain
|
||||
Header.Images = MainForm.ImageListMain
|
||||
Header.MainColumn = -1
|
||||
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
|
||||
Header.ParentFont = True
|
||||
@ -150,7 +150,7 @@ object frmTableTools: TfrmTableTools
|
||||
Height = 145
|
||||
ActivePage = tabSQLexport
|
||||
Align = alTop
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 1
|
||||
OnChange = ValidateControls
|
||||
object tabMaintenance: TTabSheet
|
||||
@ -330,14 +330,16 @@ object frmTableTools: TfrmTableTools
|
||||
Height = 13
|
||||
Caption = 'Filename:'
|
||||
end
|
||||
object btnExportOutputTargetSelect: TPngSpeedButton
|
||||
object btnExportOutputTargetSelect: TButton
|
||||
Left = 346
|
||||
Top = 74
|
||||
Width = 23
|
||||
Height = 21
|
||||
Hint = 'Browse filesystem'
|
||||
Anchors = [akTop, akRight]
|
||||
Flat = True
|
||||
ImageIndex = 10
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 7
|
||||
OnClick = btnExportOutputTargetSelectClick
|
||||
end
|
||||
object chkExportDatabasesCreate: TCheckBox
|
||||
|
@ -10,7 +10,7 @@ interface
|
||||
|
||||
uses
|
||||
Windows, SysUtils, Classes, Controls, Forms, StdCtrls, ComCtrls, Buttons, Dialogs, StdActns,
|
||||
VirtualTrees, ExtCtrls, Contnrs, Graphics, PngSpeedButton, SynRegExpr,
|
||||
VirtualTrees, ExtCtrls, Contnrs, Graphics, SynRegExpr,
|
||||
mysql_connection, helpers;
|
||||
|
||||
type
|
||||
@ -57,7 +57,7 @@ type
|
||||
udSkipLargeTables: TUpDown;
|
||||
lblSkipLargeTablesMB: TLabel;
|
||||
lblSkipLargeTables: TLabel;
|
||||
btnExportOutputTargetSelect: TPngSpeedButton;
|
||||
btnExportOutputTargetSelect: TButton;
|
||||
tabBulkTableEdit: TTabSheet;
|
||||
chkBulkTableEditDatabase: TCheckBox;
|
||||
comboBulkTableEditDatabase: TComboBox;
|
||||
@ -731,18 +731,18 @@ begin
|
||||
comboExportOutputTarget.Items.Text := OutputFiles.Text;
|
||||
lblExportOutputTarget.Caption := 'Filename:';
|
||||
btnExportOutputTargetSelect.Enabled := True;
|
||||
btnExportOutputTargetSelect.PngImage := Mainform.PngImageListMain.PngImages[10].PngImage;
|
||||
btnExportOutputTargetSelect.ImageIndex := 10;
|
||||
end else if comboExportOutputType.Text = OUTPUT_DIR then begin
|
||||
comboExportOutputTarget.Style := csDropDown;
|
||||
comboExportOutputTarget.Items.Text := OutputDirs.Text;
|
||||
lblExportOutputTarget.Caption := 'Directory:';
|
||||
btnExportOutputTargetSelect.Enabled := True;
|
||||
btnExportOutputTargetSelect.PngImage := Mainform.PngImageListMain.PngImages[51].PngImage;
|
||||
btnExportOutputTargetSelect.ImageIndex := 51;
|
||||
end else if comboExportOutputType.Text = OUTPUT_DB then begin
|
||||
comboExportOutputTarget.Style := csDropDownList;
|
||||
lblExportOutputTarget.Caption := 'Database:';
|
||||
btnExportOutputTargetSelect.Enabled := False;
|
||||
btnExportOutputTargetSelect.PngImage := Mainform.PngImageListMain.PngImages[27].PngImage;
|
||||
btnExportOutputTargetSelect.ImageIndex := 27;
|
||||
// Add unchecked databases
|
||||
comboExportOutputTarget.Items.Clear;
|
||||
DBNode := TreeObjects.GetFirstChild(TreeObjects.GetFirst);
|
||||
@ -756,7 +756,7 @@ begin
|
||||
comboExportOutputTarget.Style := csDropDownList;
|
||||
lblExportOutputTarget.Caption := 'Database:';
|
||||
btnExportOutputTargetSelect.Enabled := False;
|
||||
btnExportOutputTargetSelect.PngImage := Mainform.PngImageListMain.PngImages[27].PngImage;
|
||||
btnExportOutputTargetSelect.ImageIndex := 27;
|
||||
SessionName := Copy(comboExportOutputType.Text, Length(OUTPUT_SERVER)+1, Length(comboExportOutputType.Text));
|
||||
FreeAndNil(FTargetConnection);
|
||||
FTargetConnection := TMySQLConnection.Create(Self);
|
||||
|
@ -57,7 +57,7 @@ object frmTextEditor: TfrmTextEditor
|
||||
Align = alNone
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'tlbStandard'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
@ -103,7 +103,7 @@ object frmTextEditor: TfrmTextEditor
|
||||
end
|
||||
end
|
||||
object popupLinebreaks: TPopupMenu
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
Left = 8
|
||||
Top = 16
|
||||
object menuWindowsLB: TMenuItem
|
||||
|
@ -146,7 +146,7 @@ object frmTriggerEditor: TfrmTriggerEditor
|
||||
item
|
||||
BiggestWord = 'CONSTRUCTOR'
|
||||
end>
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
OnExecute = SynCompletionProposalStatementExecute
|
||||
ShortCut = 16416
|
||||
Editor = SynMemoStatement
|
||||
|
@ -49,7 +49,7 @@ object UserManagerForm: TUserManagerForm
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 0
|
||||
OnChange = comboUsersChange
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 269
|
||||
@ -83,7 +83,7 @@ object UserManagerForm: TUserManagerForm
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 3
|
||||
OnChange = comboObjectsChange
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
end
|
||||
object boxPrivs: TCheckListBox
|
||||
Left = 8
|
||||
@ -469,7 +469,7 @@ object UserManagerForm: TUserManagerForm
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
Caption = 'tlbUsers'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
@ -509,7 +509,7 @@ object UserManagerForm: TUserManagerForm
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
Caption = 'tlbObjects'
|
||||
Images = MainForm.PngImageListMain
|
||||
Images = MainForm.ImageListMain
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
|
Reference in New Issue
Block a user