git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@71 8e941d3f-bd1b-0410-a28a-d453659cc2b4

This commit is contained in:
christian_u
2007-02-20 18:57:22 +00:00
parent 8c8c8fad8f
commit 5e87c24957
15 changed files with 30810 additions and 0 deletions

View File

@ -0,0 +1,319 @@
//----------------------------------------------------------------------------------------------------------------------
// Include file to determine which compiler is currently being used to build the project/component.
// This file uses ideas from Brad Stowers DFS.inc file (www.delphifreestuff.com).
//
// Portions created by Mike Lischke are Copyright
// (C) 1999-2003 Dipl. Ing. Mike Lischke. All Rights Reserved.
//----------------------------------------------------------------------------------------------------------------------
// The following symbols are defined:
//
// - COMPILER_1 : Kylix/Delphi/BCB 1.x is the compiler.
// - COMPILER_1_UP : Kylix/Delphi/BCB 1.x or higher is the compiler.
// - COMPILER_2 : Kylix/Delphi 2.x or BCB 1.x is the compiler.
// - COMPILER_2_UP : Kylix/Delphi 2.x or higher, or BCB 1.x or higher is the compiler.
// - COMPILER_3 : Kylix/Delphi/BCB 3.x is the compiler.
// - COMPILER_3_UP : Kylix/Delphi/BCB 3.x or higher is the compiler.
// - COMPILER_4 : Kylix/Delphi/BCB 4.x is the compiler.
// - COMPILER_4_UP : Kylix/Delphi/BCB 4.x or higher is the compiler.
// - COMPILER_5 : Kylix/Delphi/BCB 5.x is the compiler.
// - COMPILER_5_UP : Kylix/Delphi/BCB 5.x or higher is the compiler.
// - COMPILER_6 : Kylix/Delphi/BCB 6.x is the compiler.
// - COMPILER_6_UP : Kylix/Delphi/BCB 6.x or higher is the compiler.
// - COMPILER_7 : Kylix/Delphi/BCB 7.x is the compiler.
// - COMPILER_7_UP : Kylix/Delphi/BCB 7.x or higher is the compiler.
//
// Only defined if Windows is the target:
// - CPPB : Any version of BCB is being used.
// - CPPB_1 : BCB v1.x is being used.
// - CPPB_3 : BCB v3.x is being used.
// - CPPB_3_UP : BCB v3.x or higher is being used.
// - CPPB_4 : BCB v4.x is being used.
// - CPPB_4_UP : BCB v4.x or higher is being used.
// - CPPB_5 : BCB v5.x is being used.
// - CPPB_5_UP : BCB v5.x or higher is being used.
// - CPPB_6 : BCB v6.x is being used.
// - CPPB_6_UP : BCB v6.x or higher is being used.
//
// Only defined if Windows is the target:
// - DELPHI : Any version of Delphi is being used.
// - DELPHI_1 : Delphi v1.x is being used.
// - DELPHI_2 : Delphi v2.x is being used.
// - DELPHI_2_UP : Delphi v2.x or higher is being used.
// - DELPHI_3 : Delphi v3.x is being used.
// - DELPHI_3_UP : Delphi v3.x or higher is being used.
// - DELPHI_4 : Delphi v4.x is being used.
// - DELPHI_4_UP : Delphi v4.x or higher is being used.
// - DELPHI_5 : Delphi v5.x is being used.
// - DELPHI_5_UP : Delphi v5.x or higher is being used.
// - DELPHI_6 : Delphi v6.x is being used.
// - DELPHI_6_UP : Delphi v6.x or higher is being used.
// - DELPHI_7 : Delphi v7.x is being used.
// - DELPHI_7_UP : Delphi v7.x or higher is being used.
//
// Only defined if Linux is the target:
// - KYLIX : Any version of Kylix is being used.
// - KYLIX_1 : Kylix 1.x is being used.
// - KYLIX_1_UP : Kylix 1.x or higher is being used.
// - KYLIX_2 : Kylix 2.x is being used.
// - KYLIX_2_UP : Kylix 2.x or higher is being used.
// - KYLIX_3 : Kylix 3.x is being used.
// - KYLIX_3_UP : Kylix 3.x or higher is being used.
//
// Only defined if Linux is the target:
// - QT_CLX : Trolltech's QT library is being used.
//
// Only defined if Delphi.NET is the target:
// - DELPHI.NET : Any version of Delphi.NET is being used.
// - DELPHI.NET_1 : Delphi.NET version 1.x is being used.
// - DELPHI.NET_1_UP : Delphi.NET version 1.x is being used.
//----------------------------------------------------------------------------------------------------------------------
{$ifdef CLR} // The common language runtime symbol is only defined for the .NET platform.
{$define DELPHI.NET}
{$ifdef VER160}
{$define DELPHI.NET_1}
{$endif VER160}
// Compiler defines common to all .NET versions.
{$ifdef DELPHI.NET_1}
{$define DELHI.NET_1_UP}
{$endif DELPHI.NET_1}
{$else}
{$ifdef Win32}
{$ifdef VER150}
{$define COMPILER_7}
{$define DELPHI}
{$define DELPHI_7}
{$endif}
{$ifdef VER140}
{$define COMPILER_6}
{$ifdef BCB}
{$define CPPB}
{$define CPPB_6}
{$else}
{$define DELPHI}
{$define DELPHI_6}
{$endif}
{$endif}
{$ifdef VER130}
{$define COMPILER_5}
{$ifdef BCB}
{$define CPPB}
{$define CPPB_5}
{$else}
{$define DELPHI}
{$define DELPHI_5}
{$endif}
{$endif}
{$ifdef VER125}
{$define COMPILER_4}
{$define CPPB}
{$define CPPB_4}
{$endif}
{$ifdef VER120}
{$define COMPILER_4}
{$define DELPHI}
{$define DELPHI_4}
{$endif}
{$ifdef VER110}
{$define COMPILER_3}
{$define CPPB}
{$define CPPB_3}
{$endif}
{$ifdef VER100}
{$define COMPILER_3}
{$define DELPHI}
{$define DELPHI_3}
{$endif}
{$ifdef VER93}
{$define COMPILER_2} // C++ Builder v1 compiler is really v2
{$define CPPB}
{$define CPPB_1}
{$endif}
{$ifdef VER90}
{$define COMPILER_2}
{$define DELPHI}
{$define DELPHI_2}
{$endif}
{$ifdef VER80}
{$define COMPILER_1}
{$define DELPHI}
{$define DELPHI_1}
{$endif}
{$ifdef DELPHI_2}
{$define DELPHI_2_UP}
{$endif}
{$ifdef DELPHI_3}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$endif}
{$ifdef DELPHI_4}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$endif}
{$ifdef DELPHI_5}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$endif}
{$ifdef DELPHI_6}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$endif}
{$ifdef DELPHI_7}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$endif}
{$ifdef CPPB_3}
{$define CPPB_3_UP}
{$endif}
{$ifdef CPPB_4}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$endif}
{$ifdef CPPB_5}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$endif}
{$ifdef CPPB_6}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$endif}
{$ifdef CPPB_3_UP}
// C++ Builder requires this if you use Delphi components in run-time packages.
{$ObjExportAll On}
{$endif}
{$else (not Windows)}
// Linux is the target
{$define QT_CLX}
{$define KYLIX}
{$ifdef VER140}
{$define COMPILER_6}
{$ifdef conditionalexpressions}
{$if Declared(RTLVersion) and (RTLVersion = 14)}
{$define KYLIX_1}
{$ifend}
{$if Declared(RTLVersion) and (RTLVersion = 14.2)}
{$define KYLIX_2}
{$ifend}
{$if Declared(RTLVersion) and (RTLVersion = 14.5)}
{$define KYLIX_3}
{$ifend}
{$endif}
{$endif}
{$ifdef VER150}
{$define COMPILER_7}
{$define KYLIX_3}
{$endif}
{$ifdef VER140}
{$define COMPILER_6}
{$define KYLIX_2}
{$endif}
{$ifdef KYLIX_1}
{$define KYLIX_1_UP}
{$endif}
{$ifdef KYLIX_2}
{$define KYLIX_2_UP}
{$endif}
{$ifdef KYLIX_3}
{$define KYLIX_2_UP}
{$define KYLIX_3_UP}
{$endif}
{$endif Win32}
// Compiler defines common to Windows/Linux platforms.
{$ifdef COMPILER_1}
{$define COMPILER_1_UP}
{$endif}
{$ifdef COMPILER_2}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$endif}
{$ifdef COMPILER_3}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$endif}
{$ifdef COMPILER_4}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$define COMPILER_4_UP}
{$endif}
{$ifdef COMPILER_5}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$define COMPILER_4_UP}
{$define COMPILER_5_UP}
{$endif}
{$ifdef COMPILER_6}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$define COMPILER_4_UP}
{$define COMPILER_5_UP}
{$define COMPILER_6_UP}
{$endif}
{$ifdef COMPILER_7}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$define COMPILER_4_UP}
{$define COMPILER_5_UP}
{$define COMPILER_6_UP}
{$define COMPILER_7_UP}
{$endif}
{$endif CLR}
//----------------------------------------------------------------------------------------------------------------------

View File

@ -0,0 +1,85 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<PathDelim Value="\"/>
<Name Value="virtualtreeslcl"/>
<Author Value="Joerg Thaler,Christian Ulrich"/>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\"/>
<OtherUnitFiles Value="..\"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="Virtual Treeview
"/>
<License Value="The contents of this file are subject to the Mozilla Public License
Version 1.1 (the &quot;License&quot;); you may not use this file except in compliance
with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
Alternatively, you may redistribute this library, use and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.
You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/.
Software distributed under the License is distributed on an &quot;AS IS&quot; basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.
"/>
<Version Major="4" Release="17" Build="20"/>
<Files Count="6">
<Item1>
<Filename Value="..\VirtualTrees.lrs"/>
<Type Value="LRS"/>
</Item1>
<Item2>
<Filename Value="..\VirtualTrees.pas"/>
<UnitName Value="VirtualTrees"/>
</Item2>
<Item3>
<Filename Value="..\virtualdrawtree.pas"/>
<UnitName Value="VirtualDrawTree"/>
</Item3>
<Item4>
<Filename Value="..\virtualstringtree.pas"/>
<UnitName Value="VirtualStringTree"/>
</Item4>
<Item5>
<Filename Value="..\VTHeaderPopup.pas"/>
<UnitName Value="VTHeaderPopup"/>
</Item5>
<Item6>
<Filename Value="..\vtregister.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="VTRegister"/>
</Item6>
</Files>
<Type Value="DesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="LCL"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<CustomOptions Value="-Facthreads
"/>
<UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View File

@ -0,0 +1,22 @@
{ Diese Datei wurde automatisch von Lazarus erzeugt. Sie darf nicht bearbeitet werden!
Dieser Quelltext dient nur dem Übersetzen und Installieren des Packages.
}
unit virtualtreeslcl;
interface
uses
VirtualTrees, VirtualDrawTree, VirtualStringTree, VTHeaderPopup, VTRegister,
LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('VTRegister', @VTRegister.Register);
end;
initialization
RegisterPackage('virtualtreeslcl', @Register);
end.

View File

@ -0,0 +1,52 @@
VirtualTreeview for Lazarus
current package can be found at : http://sourceforge.net/project/showfiles.php?group_id=92177
Version 4.0.17
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
Alternatively, you may redistribute this library, use and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.
You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/.
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.
The original code is VirtualTrees.pas, released September 30, 2000.
The initial developer of the original code is digital publishing AG (Munich, Germany, www.digitalpublishing.de),
written by Dipl. Ing. Mike Lischke (public@lischke-online.de, www.lischke-online.de).
Portions created by digital publishing AG are Copyright
(C) 1999-2001 digital publishing AG. All Rights Reserved.
----------------------------------------------------------------------------------------------------------------------
October 2005
- SaveToFile/LoadFromFile and all arounf fixed for Lazarus
December 2003
- Bug fix: check for existing window handle before posting a message for the node editor.
- Change: published property OnAdvancedHeaderDraw in TVirtualDrawTree.
For full document history see help file.
Credits for their valuable assistance and code donations go to:
Freddy Ertl, Marian Aldenh�vel, Thomas Bogenrieder, Jim Kuenemann, Werner Lehmann, Jens Treichler,
Paul Gallagher (IBO tree), Ondrej Kelle, Ronaldo Melo Ferraz, Heri Bender, Roland Bed�rftig (BCB)
Anthony Mills, Alexander Egorushkin (BCB), Mathias Torell (BCB), Frank van den Bergh, Vadim Sedulin, Peter Evans,
Milan Vandrovec (BCB), Steve Moss (system check images), Joe White, David Clark (local node memory manager),
Anders Thomsen, Igor Afanasyev, Eugene Programmer
Beta testers:
Freddy Ertl, Hans-J�rgen Schnorrenberg, Werner Lehmann, Jim Kueneman, Vadim Sedulin, Moritz Franckenstein,
Wim van der Vegt, Franc v/d Westelaken
Indirect contribution (via publicly accessible work of those persons):
Alex Denissov, Hiroyuki Hori (MMXAsm expert)
Documentation:
Markus Spoettl and toolsfactory GbR (http://www.doc-o-matic.com/, sponsoring Virtual Treeview
with a free copy of the Doc-O-Matic help authoring system), Sven H. (Step by step tutorial)
CLX:
Dmitri Dmitrienko (initial developer)
LCL:
Joerg Thaler,Christian Ulrich

View File

@ -0,0 +1,284 @@
/* XPM */
static char *Pixmap[] = {
"24 24 256 3",
"000 c black",
"001 c #000080",
"002 c #808000",
"003 c #808080",
"004 c #D4D0C8",
"005 c gray100",
"006 c black",
"007 c black",
"008 c black",
"009 c black",
"010 c black",
"011 c black",
"012 c black",
"013 c black",
"014 c black",
"015 c black",
"016 c black",
"017 c black",
"018 c black",
"019 c black",
"020 c black",
"021 c black",
"022 c black",
"023 c black",
"024 c black",
"025 c black",
"026 c black",
"027 c black",
"028 c black",
"029 c black",
"030 c black",
"031 c black",
"032 c black",
"033 c black",
"034 c black",
"035 c black",
"036 c black",
"037 c black",
"038 c black",
"039 c black",
"040 c black",
"041 c black",
"042 c black",
"043 c black",
"044 c black",
"045 c black",
"046 c black",
"047 c black",
"048 c black",
"049 c black",
"050 c black",
"051 c black",
"052 c black",
"053 c black",
"054 c black",
"055 c black",
"056 c black",
"057 c black",
"058 c black",
"059 c black",
"060 c black",
"061 c black",
"062 c black",
"063 c black",
"064 c black",
"065 c black",
"066 c black",
"067 c black",
"068 c black",
"069 c black",
"070 c black",
"071 c black",
"072 c black",
"073 c black",
"074 c black",
"075 c black",
"076 c black",
"077 c black",
"078 c black",
"079 c black",
"080 c black",
"081 c black",
"082 c black",
"083 c black",
"084 c black",
"085 c black",
"086 c black",
"087 c black",
"088 c black",
"089 c black",
"090 c black",
"091 c black",
"092 c black",
"093 c black",
"094 c black",
"095 c black",
"096 c black",
"097 c black",
"098 c black",
"099 c black",
"100 c black",
"101 c black",
"102 c black",
"103 c black",
"104 c black",
"105 c black",
"106 c black",
"107 c black",
"108 c black",
"109 c black",
"110 c black",
"111 c black",
"112 c black",
"113 c black",
"114 c black",
"115 c black",
"116 c black",
"117 c black",
"118 c black",
"119 c black",
"120 c black",
"121 c black",
"122 c black",
"123 c black",
"124 c black",
"125 c black",
"126 c black",
"127 c black",
"128 c black",
"129 c black",
"130 c black",
"131 c black",
"132 c black",
"133 c black",
"134 c black",
"135 c black",
"136 c black",
"137 c black",
"138 c black",
"139 c black",
"140 c black",
"141 c black",
"142 c black",
"143 c black",
"144 c black",
"145 c black",
"146 c black",
"147 c black",
"148 c black",
"149 c black",
"150 c black",
"151 c black",
"152 c black",
"153 c black",
"154 c black",
"155 c black",
"156 c black",
"157 c black",
"158 c black",
"159 c black",
"160 c black",
"161 c black",
"162 c black",
"163 c black",
"164 c black",
"165 c black",
"166 c black",
"167 c black",
"168 c black",
"169 c black",
"170 c black",
"171 c black",
"172 c black",
"173 c black",
"174 c black",
"175 c black",
"176 c black",
"177 c black",
"178 c black",
"179 c black",
"180 c black",
"181 c black",
"182 c black",
"183 c black",
"184 c black",
"185 c black",
"186 c black",
"187 c black",
"188 c black",
"189 c black",
"190 c black",
"191 c black",
"192 c black",
"193 c black",
"194 c black",
"195 c black",
"196 c black",
"197 c black",
"198 c black",
"199 c black",
"200 c black",
"201 c black",
"202 c black",
"203 c black",
"204 c black",
"205 c black",
"206 c black",
"207 c black",
"208 c black",
"209 c black",
"210 c black",
"211 c black",
"212 c black",
"213 c black",
"214 c black",
"215 c black",
"216 c black",
"217 c black",
"218 c black",
"219 c black",
"220 c black",
"221 c black",
"222 c black",
"223 c black",
"224 c black",
"225 c black",
"226 c black",
"227 c black",
"228 c black",
"229 c black",
"230 c black",
"231 c black",
"232 c black",
"233 c black",
"234 c black",
"235 c black",
"236 c black",
"237 c black",
"238 c black",
"239 c black",
"240 c black",
"241 c black",
"242 c black",
"243 c black",
"244 c black",
"245 c black",
"246 c black",
"247 c black",
"248 c black",
"249 c black",
"250 c black",
"251 c black",
"252 c black",
"253 c black",
"254 c black",
"255 c black",
"004004004004004004004004004004004004004004004004004004004004004004004004",
"004004004004004004004000000004004004004004004004004004004004004004004004",
"004004004004004004000004004000000000000000000000000000000000000000004004",
"004004004004004000005005005004004004004004004004004004004003003002000004",
"004004004004004000005005005005005005005005005005005005002003003003000004",
"004004004004000005005005005005005005005005005005005002003003003003000004",
"004004004004004000000000002005005005005005005005005000003003003003000004",
"004004004004004004004004000000000000000000000000000003003003003002004004",
"004004004004004004004004000003003003003003003003003005005005003000004004",
"004004004004004004004004000003005005005005005005000005005005004000004004",
"004004004004004004004004000003005001001001005005000005005005003000004004",
"004004004004004004004004000003005005005005005005000005005005000004004004",
"004004004004004004004004000003005001001001001001000005005005000004004004",
"004004004004004004004000005003001005005005001005001005005005000004004004",
"004004004004004004000003005003005001001001001005005001005005000004004004",
"004004004004004004000004005003005005005005001005005005001005000004004004",
"004004004004004004000005005003000000000000001005005005005001000004004004",
"004004004004004004000005005005005005005005001005005005001001001001004004",
"004004000000000004000005005005000000000000001005005005005001005000004004",
"004004000004004002000000000000004004004004001005001001005005001000004004",
"004004000004004004004004004004004004004004001001003001005005001004004004",
"004004004000003004004004004004004004004004001004000004001005005001004004",
"004004004000003003003003003003003003003003003003003000001005005001004004",
"004004004004000000000000000000000000000000000000000000000001001004004004"
};

View File

@ -0,0 +1,284 @@
/* XPM */
static char *Pixmap[] = {
"24 24 256 3",
"000 c black",
"001 c #20A080",
"002 c #808000",
"003 c #C0A000",
"004 c #808080",
"005 c #D4D0C8",
"006 c gray100",
"007 c black",
"008 c black",
"009 c black",
"010 c black",
"011 c black",
"012 c black",
"013 c black",
"014 c black",
"015 c black",
"016 c black",
"017 c black",
"018 c black",
"019 c black",
"020 c black",
"021 c black",
"022 c black",
"023 c black",
"024 c black",
"025 c black",
"026 c black",
"027 c black",
"028 c black",
"029 c black",
"030 c black",
"031 c black",
"032 c black",
"033 c black",
"034 c black",
"035 c black",
"036 c black",
"037 c black",
"038 c black",
"039 c black",
"040 c black",
"041 c black",
"042 c black",
"043 c black",
"044 c black",
"045 c black",
"046 c black",
"047 c black",
"048 c black",
"049 c black",
"050 c black",
"051 c black",
"052 c black",
"053 c black",
"054 c black",
"055 c black",
"056 c black",
"057 c black",
"058 c black",
"059 c black",
"060 c black",
"061 c black",
"062 c black",
"063 c black",
"064 c black",
"065 c black",
"066 c black",
"067 c black",
"068 c black",
"069 c black",
"070 c black",
"071 c black",
"072 c black",
"073 c black",
"074 c black",
"075 c black",
"076 c black",
"077 c black",
"078 c black",
"079 c black",
"080 c black",
"081 c black",
"082 c black",
"083 c black",
"084 c black",
"085 c black",
"086 c black",
"087 c black",
"088 c black",
"089 c black",
"090 c black",
"091 c black",
"092 c black",
"093 c black",
"094 c black",
"095 c black",
"096 c black",
"097 c black",
"098 c black",
"099 c black",
"100 c black",
"101 c black",
"102 c black",
"103 c black",
"104 c black",
"105 c black",
"106 c black",
"107 c black",
"108 c black",
"109 c black",
"110 c black",
"111 c black",
"112 c black",
"113 c black",
"114 c black",
"115 c black",
"116 c black",
"117 c black",
"118 c black",
"119 c black",
"120 c black",
"121 c black",
"122 c black",
"123 c black",
"124 c black",
"125 c black",
"126 c black",
"127 c black",
"128 c black",
"129 c black",
"130 c black",
"131 c black",
"132 c black",
"133 c black",
"134 c black",
"135 c black",
"136 c black",
"137 c black",
"138 c black",
"139 c black",
"140 c black",
"141 c black",
"142 c black",
"143 c black",
"144 c black",
"145 c black",
"146 c black",
"147 c black",
"148 c black",
"149 c black",
"150 c black",
"151 c black",
"152 c black",
"153 c black",
"154 c black",
"155 c black",
"156 c black",
"157 c black",
"158 c black",
"159 c black",
"160 c black",
"161 c black",
"162 c black",
"163 c black",
"164 c black",
"165 c black",
"166 c black",
"167 c black",
"168 c black",
"169 c black",
"170 c black",
"171 c black",
"172 c black",
"173 c black",
"174 c black",
"175 c black",
"176 c black",
"177 c black",
"178 c black",
"179 c black",
"180 c black",
"181 c black",
"182 c black",
"183 c black",
"184 c black",
"185 c black",
"186 c black",
"187 c black",
"188 c black",
"189 c black",
"190 c black",
"191 c black",
"192 c black",
"193 c black",
"194 c black",
"195 c black",
"196 c black",
"197 c black",
"198 c black",
"199 c black",
"200 c black",
"201 c black",
"202 c black",
"203 c black",
"204 c black",
"205 c black",
"206 c black",
"207 c black",
"208 c black",
"209 c black",
"210 c black",
"211 c black",
"212 c black",
"213 c black",
"214 c black",
"215 c black",
"216 c black",
"217 c black",
"218 c black",
"219 c black",
"220 c black",
"221 c black",
"222 c black",
"223 c black",
"224 c black",
"225 c black",
"226 c black",
"227 c black",
"228 c black",
"229 c black",
"230 c black",
"231 c black",
"232 c black",
"233 c black",
"234 c black",
"235 c black",
"236 c black",
"237 c black",
"238 c black",
"239 c black",
"240 c black",
"241 c black",
"242 c black",
"243 c black",
"244 c black",
"245 c black",
"246 c black",
"247 c black",
"248 c black",
"249 c black",
"250 c black",
"251 c black",
"252 c black",
"253 c black",
"254 c black",
"255 c black",
"005005005005005005005005005005005005005005005005005005005005005005005005",
"005005005005005005005000000005005005005005005005005005005005005005005005",
"005005005005005005000005005000000000000000000000000000000000000000005005",
"005005005005005000006006006005005005005005005005005005005004004002000005",
"005005005005005000006006006006006006006006006006006006002004004004000005",
"005005005005000006006006006006006006006006006006006002004004004004000005",
"005005005005005000000000002006006006006006006006006000004004004004000005",
"005005005005005005005005000000000000000000000000000004004004004002005005",
"005005005005005005005005000004004004004004004004004006006006004000005005",
"005005005005005005005005000006006006006006006006003006006006005000005005",
"005005005005005005005005000006000006006006006003003003006006004000005005",
"005005005005005005005005000006000000000006003003003003003006000005005005",
"005005005005005005005005000006000006006003003003003003003003000005005005",
"005005005005005005005000006006000006006006001001001001006006000005005005",
"005005005005005005000004006006000006006001001001001001001006000005005005",
"005005005005005005000005006006000000006001001001001001001006000005005005",
"005005005005005005000006006006006006006001001001001001001006000005005005",
"005005005005005005000006006006006006006006001001001001006006005000005005",
"005005000000000005000006006006000000000000000006006006006006006000005005",
"005005000005005002000000000000005005005005005000006006006006004000005005",
"005005000005005005005005005005005005005005005005000006006005000005005005",
"005005005000004005005005005005005005005005005005000005005005000005005005",
"005005005000004004004004004004004004004004004004004000005000005005005005",
"005005005005000000000000000000000000000000000000000000000005005005005005"
};

View File

@ -0,0 +1,284 @@
/* XPM */
static char *Pixmap[] = {
"24 24 256 3",
"000 c black",
"001 c #20A080",
"002 c #808000",
"003 c #C0A000",
"004 c #808080",
"005 c #D4D0C8",
"006 c gray100",
"007 c black",
"008 c black",
"009 c black",
"010 c black",
"011 c black",
"012 c black",
"013 c black",
"014 c black",
"015 c black",
"016 c black",
"017 c black",
"018 c black",
"019 c black",
"020 c black",
"021 c black",
"022 c black",
"023 c black",
"024 c black",
"025 c black",
"026 c black",
"027 c black",
"028 c black",
"029 c black",
"030 c black",
"031 c black",
"032 c black",
"033 c black",
"034 c black",
"035 c black",
"036 c black",
"037 c black",
"038 c black",
"039 c black",
"040 c black",
"041 c black",
"042 c black",
"043 c black",
"044 c black",
"045 c black",
"046 c black",
"047 c black",
"048 c black",
"049 c black",
"050 c black",
"051 c black",
"052 c black",
"053 c black",
"054 c black",
"055 c black",
"056 c black",
"057 c black",
"058 c black",
"059 c black",
"060 c black",
"061 c black",
"062 c black",
"063 c black",
"064 c black",
"065 c black",
"066 c black",
"067 c black",
"068 c black",
"069 c black",
"070 c black",
"071 c black",
"072 c black",
"073 c black",
"074 c black",
"075 c black",
"076 c black",
"077 c black",
"078 c black",
"079 c black",
"080 c black",
"081 c black",
"082 c black",
"083 c black",
"084 c black",
"085 c black",
"086 c black",
"087 c black",
"088 c black",
"089 c black",
"090 c black",
"091 c black",
"092 c black",
"093 c black",
"094 c black",
"095 c black",
"096 c black",
"097 c black",
"098 c black",
"099 c black",
"100 c black",
"101 c black",
"102 c black",
"103 c black",
"104 c black",
"105 c black",
"106 c black",
"107 c black",
"108 c black",
"109 c black",
"110 c black",
"111 c black",
"112 c black",
"113 c black",
"114 c black",
"115 c black",
"116 c black",
"117 c black",
"118 c black",
"119 c black",
"120 c black",
"121 c black",
"122 c black",
"123 c black",
"124 c black",
"125 c black",
"126 c black",
"127 c black",
"128 c black",
"129 c black",
"130 c black",
"131 c black",
"132 c black",
"133 c black",
"134 c black",
"135 c black",
"136 c black",
"137 c black",
"138 c black",
"139 c black",
"140 c black",
"141 c black",
"142 c black",
"143 c black",
"144 c black",
"145 c black",
"146 c black",
"147 c black",
"148 c black",
"149 c black",
"150 c black",
"151 c black",
"152 c black",
"153 c black",
"154 c black",
"155 c black",
"156 c black",
"157 c black",
"158 c black",
"159 c black",
"160 c black",
"161 c black",
"162 c black",
"163 c black",
"164 c black",
"165 c black",
"166 c black",
"167 c black",
"168 c black",
"169 c black",
"170 c black",
"171 c black",
"172 c black",
"173 c black",
"174 c black",
"175 c black",
"176 c black",
"177 c black",
"178 c black",
"179 c black",
"180 c black",
"181 c black",
"182 c black",
"183 c black",
"184 c black",
"185 c black",
"186 c black",
"187 c black",
"188 c black",
"189 c black",
"190 c black",
"191 c black",
"192 c black",
"193 c black",
"194 c black",
"195 c black",
"196 c black",
"197 c black",
"198 c black",
"199 c black",
"200 c black",
"201 c black",
"202 c black",
"203 c black",
"204 c black",
"205 c black",
"206 c black",
"207 c black",
"208 c black",
"209 c black",
"210 c black",
"211 c black",
"212 c black",
"213 c black",
"214 c black",
"215 c black",
"216 c black",
"217 c black",
"218 c black",
"219 c black",
"220 c black",
"221 c black",
"222 c black",
"223 c black",
"224 c black",
"225 c black",
"226 c black",
"227 c black",
"228 c black",
"229 c black",
"230 c black",
"231 c black",
"232 c black",
"233 c black",
"234 c black",
"235 c black",
"236 c black",
"237 c black",
"238 c black",
"239 c black",
"240 c black",
"241 c black",
"242 c black",
"243 c black",
"244 c black",
"245 c black",
"246 c black",
"247 c black",
"248 c black",
"249 c black",
"250 c black",
"251 c black",
"252 c black",
"253 c black",
"254 c black",
"255 c black",
"005005005005005005005005005005005005005005005005005005005005005005005005",
"005005005005005005000000005005005005005005005005005005005005005005005005",
"005005005005005000005005000000000000000000000000000000000000000005005005",
"005005005005000006006006005005005005005005005005005005004004002000005005",
"005005005005000006006006006006006006006006006006006002004004004000005005",
"005005005000006006006006006006006006006006006006002004004004004000005005",
"005005005005000000000002006006006006006006006006000004004004004000005005",
"005005005005005005005000000000000000000000000000004004004004002005005005",
"005005005005005005005000004004004004004004004004006006006004000005005005",
"005005005005005005005000006006006006006006006006006006006005000005005005",
"005005005005005005005000006000006006000000000000000000006004000005005005",
"005005005005005005005000006000000000000003003003003000006000005005005005",
"005005005005005005005000006000006006000000000000000000006000005005005005",
"005005005005005005000006006000006006006006006006006006006000005005005005",
"005005005005005000004006006000006006000000000000000000006000005005005005",
"005005005005005000005006006000000000000001001001001000006000005005005005",
"005005005005005000006006006006006006000000000000000000006000005005005005",
"005005005005005000006006006006006006006006006006006006006005000005005005",
"005000000000005000006006006000000000000000006006006006006006000005005005",
"005000005005002000000000000005005005005005000006006006006004000005005005",
"005000005005005005005005005005005005005005005000006006005000005005005005",
"005005000004005005005005005005005005005005005000005005005000005005005005",
"005005000004004004004004004004004004004004004004000005000005005005005005",
"005005005000000000000000000000000000000000000000000000005005005005005005"
};

View File

@ -0,0 +1 @@
d:\src\lazarus\tools\lazres.exe ..\VirtualTrees.lrs TVirtualDrawTree.xpm TVirtualStringTree.xpm TVTHeaderPopupMenu.xpm

View File

@ -0,0 +1,315 @@
LazarusResources.Add('TVirtualDrawTree','XPM',[
'/* XPM */'#13#10'static char *Pixmap[] = {'#13#10'"24 24 256 3",'#13#10'"000'
+' c black",'#13#10'"001 c #20A080",'#13#10'"002 c #808000",'#13#10'"003 c #C'
+'0A000",'#13#10'"004 c #808080",'#13#10'"005 c #D4D0C8",'#13#10'"006 c gray1'
+'00",'#13#10'"007 c black",'#13#10'"008 c black",'#13#10'"009 c black",'#13
+#10'"010 c black",'#13#10'"011 c black",'#13#10'"012 c black",'#13#10'"013 c'
+' black",'#13#10'"014 c black",'#13#10'"015 c black",'#13#10'"016 c black",'
+#13#10'"017 c black",'#13#10'"018 c black",'#13#10'"019 c black",'#13#10'"02'
+'0 c black",'#13#10'"021 c black",'#13#10'"022 c black",'#13#10'"023 c black'
+'",'#13#10'"024 c black",'#13#10'"025 c black",'#13#10'"026 c black",'#13#10
+'"027 c black",'#13#10'"028 c black",'#13#10'"029 c black",'#13#10'"030 c bl'
+'ack",'#13#10'"031 c black",'#13#10'"032 c black",'#13#10'"033 c black",'#13
+#10'"034 c black",'#13#10'"035 c black",'#13#10'"036 c black",'#13#10'"037 c'
+' black",'#13#10'"038 c black",'#13#10'"039 c black",'#13#10'"040 c black",'
+#13#10'"041 c black",'#13#10'"042 c black",'#13#10'"043 c black",'#13#10'"04'
+'4 c black",'#13#10'"045 c black",'#13#10'"046 c black",'#13#10'"047 c black'
+'",'#13#10'"048 c black",'#13#10'"049 c black",'#13#10'"050 c black",'#13#10
+'"051 c black",'#13#10'"052 c black",'#13#10'"053 c black",'#13#10'"054 c bl'
+'ack",'#13#10'"055 c black",'#13#10'"056 c black",'#13#10'"057 c black",'#13
+#10'"058 c black",'#13#10'"059 c black",'#13#10'"060 c black",'#13#10'"061 c'
+' black",'#13#10'"062 c black",'#13#10'"063 c black",'#13#10'"064 c black",'
+#13#10'"065 c black",'#13#10'"066 c black",'#13#10'"067 c black",'#13#10'"06'
+'8 c black",'#13#10'"069 c black",'#13#10'"070 c black",'#13#10'"071 c black'
+'",'#13#10'"072 c black",'#13#10'"073 c black",'#13#10'"074 c black",'#13#10
+'"075 c black",'#13#10'"076 c black",'#13#10'"077 c black",'#13#10'"078 c bl'
+'ack",'#13#10'"079 c black",'#13#10'"080 c black",'#13#10'"081 c black",'#13
+#10'"082 c black",'#13#10'"083 c black",'#13#10'"084 c black",'#13#10'"085 c'
+' black",'#13#10'"086 c black",'#13#10'"087 c black",'#13#10'"088 c black",'
+#13#10'"089 c black",'#13#10'"090 c black",'#13#10'"091 c black",'#13#10'"09'
+'2 c black",'#13#10'"093 c black",'#13#10'"094 c black",'#13#10'"095 c black'
+'",'#13#10'"096 c black",'#13#10'"097 c black",'#13#10'"098 c black",'#13#10
+'"099 c black",'#13#10'"100 c black",'#13#10'"101 c black",'#13#10'"102 c bl'
+'ack",'#13#10'"103 c black",'#13#10'"104 c black",'#13#10'"105 c black",'#13
+#10'"106 c black",'#13#10'"107 c black",'#13#10'"108 c black",'#13#10'"109 c'
+' black",'#13#10'"110 c black",'#13#10'"111 c black",'#13#10'"112 c black",'
+#13#10'"113 c black",'#13#10'"114 c black",'#13#10'"115 c black",'#13#10'"11'
+'6 c black",'#13#10'"117 c black",'#13#10'"118 c black",'#13#10'"119 c black'
+'",'#13#10'"120 c black",'#13#10'"121 c black",'#13#10'"122 c black",'#13#10
+'"123 c black",'#13#10'"124 c black",'#13#10'"125 c black",'#13#10'"126 c bl'
+'ack",'#13#10'"127 c black",'#13#10'"128 c black",'#13#10'"129 c black",'#13
+#10'"130 c black",'#13#10'"131 c black",'#13#10'"132 c black",'#13#10'"133 c'
+' black",'#13#10'"134 c black",'#13#10'"135 c black",'#13#10'"136 c black",'
+#13#10'"137 c black",'#13#10'"138 c black",'#13#10'"139 c black",'#13#10'"14'
+'0 c black",'#13#10'"141 c black",'#13#10'"142 c black",'#13#10'"143 c black'
+'",'#13#10'"144 c black",'#13#10'"145 c black",'#13#10'"146 c black",'#13#10
+'"147 c black",'#13#10'"148 c black",'#13#10'"149 c black",'#13#10'"150 c bl'
+'ack",'#13#10'"151 c black",'#13#10'"152 c black",'#13#10'"153 c black",'#13
+#10'"154 c black",'#13#10'"155 c black",'#13#10'"156 c black",'#13#10'"157 c'
+' black",'#13#10'"158 c black",'#13#10'"159 c black",'#13#10'"160 c black",'
+#13#10'"161 c black",'#13#10'"162 c black",'#13#10'"163 c black",'#13#10'"16'
+'4 c black",'#13#10'"165 c black",'#13#10'"166 c black",'#13#10'"167 c black'
+'",'#13#10'"168 c black",'#13#10'"169 c black",'#13#10'"170 c black",'#13#10
+'"171 c black",'#13#10'"172 c black",'#13#10'"173 c black",'#13#10'"174 c bl'
+'ack",'#13#10'"175 c black",'#13#10'"176 c black",'#13#10'"177 c black",'#13
+#10'"178 c black",'#13#10'"179 c black",'#13#10'"180 c black",'#13#10'"181 c'
+' black",'#13#10'"182 c black",'#13#10'"183 c black",'#13#10'"184 c black",'
+#13#10'"185 c black",'#13#10'"186 c black",'#13#10'"187 c black",'#13#10'"18'
+'8 c black",'#13#10'"189 c black",'#13#10'"190 c black",'#13#10'"191 c black'
+'",'#13#10'"192 c black",'#13#10'"193 c black",'#13#10'"194 c black",'#13#10
+'"195 c black",'#13#10'"196 c black",'#13#10'"197 c black",'#13#10'"198 c bl'
+'ack",'#13#10'"199 c black",'#13#10'"200 c black",'#13#10'"201 c black",'#13
+#10'"202 c black",'#13#10'"203 c black",'#13#10'"204 c black",'#13#10'"205 c'
+' black",'#13#10'"206 c black",'#13#10'"207 c black",'#13#10'"208 c black",'
+#13#10'"209 c black",'#13#10'"210 c black",'#13#10'"211 c black",'#13#10'"21'
+'2 c black",'#13#10'"213 c black",'#13#10'"214 c black",'#13#10'"215 c black'
,'",'#13#10'"216 c black",'#13#10'"217 c black",'#13#10'"218 c black",'#13#10
+'"219 c black",'#13#10'"220 c black",'#13#10'"221 c black",'#13#10'"222 c bl'
+'ack",'#13#10'"223 c black",'#13#10'"224 c black",'#13#10'"225 c black",'#13
+#10'"226 c black",'#13#10'"227 c black",'#13#10'"228 c black",'#13#10'"229 c'
+' black",'#13#10'"230 c black",'#13#10'"231 c black",'#13#10'"232 c black",'
+#13#10'"233 c black",'#13#10'"234 c black",'#13#10'"235 c black",'#13#10'"23'
+'6 c black",'#13#10'"237 c black",'#13#10'"238 c black",'#13#10'"239 c black'
+'",'#13#10'"240 c black",'#13#10'"241 c black",'#13#10'"242 c black",'#13#10
+'"243 c black",'#13#10'"244 c black",'#13#10'"245 c black",'#13#10'"246 c bl'
+'ack",'#13#10'"247 c black",'#13#10'"248 c black",'#13#10'"249 c black",'#13
+#10'"250 c black",'#13#10'"251 c black",'#13#10'"252 c black",'#13#10'"253 c'
+' black",'#13#10'"254 c black",'#13#10'"255 c black",'#13#10'"00500500500500'
+'5005005005005005005005005005005005005005005005005005005005",'#13#10'"005005'
+'005005005005005000000005005005005005005005005005005005005005005005",'#13#10
+'"005005005005005005000005005000000000000000000000000000000000000000005005",'
+#13#10'"00500500500500500000600600600500500500500500500500500500500400400200'
+'0005",'#13#10'"005005005005005000006006006006006006006006006006006006002004'
+'004004000005",'#13#10'"0050050050050000060060060060060060060060060060060060'
+'02004004004004000005",'#13#10'"00500500500500500000000000200600600600600600'
+'6006006000004004004004000005",'#13#10'"005005005005005005005005000000000000'
+'000000000000000004004004004002005005",'#13#10'"0050050050050050050050050000'
+'04004004004004004004004006006006004000005005",'#13#10'"00500500500500500500'
+'5005000006006006006006006006003006006006005000005005",'#13#10'"005005005005'
+'005005005005000006000006006006006003003003006006004000005005",'#13#10'"0050'
+'05005005005005005005000006000000000006003003003003003006000005005005",'#13
+#10'"00500500500500500500500500000600000600600300300300300300300300000500500'
+'5",'#13#10'"005005005005005005005000006006000006006006001001001001006006000'
+'005005005",'#13#10'"0050050050050050050000040060060000060060010010010010010'
+'01006000005005005",'#13#10'"00500500500500500500000500600600000000600100100'
+'1001001001006000005005005",'#13#10'"005005005005005005000006006006006006006'
+'001001001001001001006000005005005",'#13#10'"0050050050050050050000060060060'
+'06006006006001001001001006006005000005005",'#13#10'"00500500000000000500000'
+'6006006000000000000000006006006006006006000005005",'#13#10'"005005000005005'
+'002000000000000005005005005005000006006006006004000005005",'#13#10'"0050050'
+'00005005005005005005005005005005005005005000006006005000005005005",'#13#10
+'"005005005000004005005005005005005005005005005005000005005005000005005005",'
+#13#10'"00500500500000400400400400400400400400400400400400400000500000500500'
+'5005",'#13#10'"005005005005000000000000000000000000000000000000000000000005'
+'005005005005"'#13#10'};'#13#10
]);
LazarusResources.Add('TVirtualStringTree','XPM',[
'/* XPM */'#13#10'static char *Pixmap[] = {'#13#10'"24 24 256 3",'#13#10'"000'
+' c black",'#13#10'"001 c #20A080",'#13#10'"002 c #808000",'#13#10'"003 c #C'
+'0A000",'#13#10'"004 c #808080",'#13#10'"005 c #D4D0C8",'#13#10'"006 c gray1'
+'00",'#13#10'"007 c black",'#13#10'"008 c black",'#13#10'"009 c black",'#13
+#10'"010 c black",'#13#10'"011 c black",'#13#10'"012 c black",'#13#10'"013 c'
+' black",'#13#10'"014 c black",'#13#10'"015 c black",'#13#10'"016 c black",'
+#13#10'"017 c black",'#13#10'"018 c black",'#13#10'"019 c black",'#13#10'"02'
+'0 c black",'#13#10'"021 c black",'#13#10'"022 c black",'#13#10'"023 c black'
+'",'#13#10'"024 c black",'#13#10'"025 c black",'#13#10'"026 c black",'#13#10
+'"027 c black",'#13#10'"028 c black",'#13#10'"029 c black",'#13#10'"030 c bl'
+'ack",'#13#10'"031 c black",'#13#10'"032 c black",'#13#10'"033 c black",'#13
+#10'"034 c black",'#13#10'"035 c black",'#13#10'"036 c black",'#13#10'"037 c'
+' black",'#13#10'"038 c black",'#13#10'"039 c black",'#13#10'"040 c black",'
+#13#10'"041 c black",'#13#10'"042 c black",'#13#10'"043 c black",'#13#10'"04'
+'4 c black",'#13#10'"045 c black",'#13#10'"046 c black",'#13#10'"047 c black'
+'",'#13#10'"048 c black",'#13#10'"049 c black",'#13#10'"050 c black",'#13#10
+'"051 c black",'#13#10'"052 c black",'#13#10'"053 c black",'#13#10'"054 c bl'
+'ack",'#13#10'"055 c black",'#13#10'"056 c black",'#13#10'"057 c black",'#13
+#10'"058 c black",'#13#10'"059 c black",'#13#10'"060 c black",'#13#10'"061 c'
+' black",'#13#10'"062 c black",'#13#10'"063 c black",'#13#10'"064 c black",'
+#13#10'"065 c black",'#13#10'"066 c black",'#13#10'"067 c black",'#13#10'"06'
+'8 c black",'#13#10'"069 c black",'#13#10'"070 c black",'#13#10'"071 c black'
+'",'#13#10'"072 c black",'#13#10'"073 c black",'#13#10'"074 c black",'#13#10
+'"075 c black",'#13#10'"076 c black",'#13#10'"077 c black",'#13#10'"078 c bl'
+'ack",'#13#10'"079 c black",'#13#10'"080 c black",'#13#10'"081 c black",'#13
+#10'"082 c black",'#13#10'"083 c black",'#13#10'"084 c black",'#13#10'"085 c'
+' black",'#13#10'"086 c black",'#13#10'"087 c black",'#13#10'"088 c black",'
+#13#10'"089 c black",'#13#10'"090 c black",'#13#10'"091 c black",'#13#10'"09'
+'2 c black",'#13#10'"093 c black",'#13#10'"094 c black",'#13#10'"095 c black'
+'",'#13#10'"096 c black",'#13#10'"097 c black",'#13#10'"098 c black",'#13#10
+'"099 c black",'#13#10'"100 c black",'#13#10'"101 c black",'#13#10'"102 c bl'
+'ack",'#13#10'"103 c black",'#13#10'"104 c black",'#13#10'"105 c black",'#13
+#10'"106 c black",'#13#10'"107 c black",'#13#10'"108 c black",'#13#10'"109 c'
+' black",'#13#10'"110 c black",'#13#10'"111 c black",'#13#10'"112 c black",'
+#13#10'"113 c black",'#13#10'"114 c black",'#13#10'"115 c black",'#13#10'"11'
+'6 c black",'#13#10'"117 c black",'#13#10'"118 c black",'#13#10'"119 c black'
+'",'#13#10'"120 c black",'#13#10'"121 c black",'#13#10'"122 c black",'#13#10
+'"123 c black",'#13#10'"124 c black",'#13#10'"125 c black",'#13#10'"126 c bl'
+'ack",'#13#10'"127 c black",'#13#10'"128 c black",'#13#10'"129 c black",'#13
+#10'"130 c black",'#13#10'"131 c black",'#13#10'"132 c black",'#13#10'"133 c'
+' black",'#13#10'"134 c black",'#13#10'"135 c black",'#13#10'"136 c black",'
+#13#10'"137 c black",'#13#10'"138 c black",'#13#10'"139 c black",'#13#10'"14'
+'0 c black",'#13#10'"141 c black",'#13#10'"142 c black",'#13#10'"143 c black'
+'",'#13#10'"144 c black",'#13#10'"145 c black",'#13#10'"146 c black",'#13#10
+'"147 c black",'#13#10'"148 c black",'#13#10'"149 c black",'#13#10'"150 c bl'
+'ack",'#13#10'"151 c black",'#13#10'"152 c black",'#13#10'"153 c black",'#13
+#10'"154 c black",'#13#10'"155 c black",'#13#10'"156 c black",'#13#10'"157 c'
+' black",'#13#10'"158 c black",'#13#10'"159 c black",'#13#10'"160 c black",'
+#13#10'"161 c black",'#13#10'"162 c black",'#13#10'"163 c black",'#13#10'"16'
+'4 c black",'#13#10'"165 c black",'#13#10'"166 c black",'#13#10'"167 c black'
+'",'#13#10'"168 c black",'#13#10'"169 c black",'#13#10'"170 c black",'#13#10
+'"171 c black",'#13#10'"172 c black",'#13#10'"173 c black",'#13#10'"174 c bl'
+'ack",'#13#10'"175 c black",'#13#10'"176 c black",'#13#10'"177 c black",'#13
+#10'"178 c black",'#13#10'"179 c black",'#13#10'"180 c black",'#13#10'"181 c'
+' black",'#13#10'"182 c black",'#13#10'"183 c black",'#13#10'"184 c black",'
+#13#10'"185 c black",'#13#10'"186 c black",'#13#10'"187 c black",'#13#10'"18'
+'8 c black",'#13#10'"189 c black",'#13#10'"190 c black",'#13#10'"191 c black'
+'",'#13#10'"192 c black",'#13#10'"193 c black",'#13#10'"194 c black",'#13#10
+'"195 c black",'#13#10'"196 c black",'#13#10'"197 c black",'#13#10'"198 c bl'
+'ack",'#13#10'"199 c black",'#13#10'"200 c black",'#13#10'"201 c black",'#13
+#10'"202 c black",'#13#10'"203 c black",'#13#10'"204 c black",'#13#10'"205 c'
+' black",'#13#10'"206 c black",'#13#10'"207 c black",'#13#10'"208 c black",'
+#13#10'"209 c black",'#13#10'"210 c black",'#13#10'"211 c black",'#13#10'"21'
+'2 c black",'#13#10'"213 c black",'#13#10'"214 c black",'#13#10'"215 c black'
,'",'#13#10'"216 c black",'#13#10'"217 c black",'#13#10'"218 c black",'#13#10
+'"219 c black",'#13#10'"220 c black",'#13#10'"221 c black",'#13#10'"222 c bl'
+'ack",'#13#10'"223 c black",'#13#10'"224 c black",'#13#10'"225 c black",'#13
+#10'"226 c black",'#13#10'"227 c black",'#13#10'"228 c black",'#13#10'"229 c'
+' black",'#13#10'"230 c black",'#13#10'"231 c black",'#13#10'"232 c black",'
+#13#10'"233 c black",'#13#10'"234 c black",'#13#10'"235 c black",'#13#10'"23'
+'6 c black",'#13#10'"237 c black",'#13#10'"238 c black",'#13#10'"239 c black'
+'",'#13#10'"240 c black",'#13#10'"241 c black",'#13#10'"242 c black",'#13#10
+'"243 c black",'#13#10'"244 c black",'#13#10'"245 c black",'#13#10'"246 c bl'
+'ack",'#13#10'"247 c black",'#13#10'"248 c black",'#13#10'"249 c black",'#13
+#10'"250 c black",'#13#10'"251 c black",'#13#10'"252 c black",'#13#10'"253 c'
+' black",'#13#10'"254 c black",'#13#10'"255 c black",'#13#10'"00500500500500'
+'5005005005005005005005005005005005005005005005005005005005",'#13#10'"005005'
+'005005005005000000005005005005005005005005005005005005005005005005",'#13#10
+'"005005005005005000005005000000000000000000000000000000000000000005005005",'
+#13#10'"00500500500500000600600600500500500500500500500500500500400400200000'
+'5005",'#13#10'"005005005005000006006006006006006006006006006006006002004004'
+'004000005005",'#13#10'"0050050050000060060060060060060060060060060060060020'
+'04004004004000005005",'#13#10'"00500500500500000000000200600600600600600600'
+'6006000004004004004000005005",'#13#10'"005005005005005005005000000000000000'
+'000000000000004004004004002005005005",'#13#10'"0050050050050050050050000040'
+'04004004004004004004006006006004000005005005",'#13#10'"00500500500500500500'
+'5000006006006006006006006006006006006005000005005005",'#13#10'"005005005005'
+'005005005000006000006006000000000000000000006004000005005005",'#13#10'"0050'
+'05005005005005005000006000000000000003003003003000006000005005005005",'#13
+#10'"00500500500500500500500000600000600600000000000000000000600000500500500'
+'5",'#13#10'"005005005005005005000006006000006006006006006006006006006000005'
+'005005005",'#13#10'"0050050050050050000040060060000060060000000000000000000'
+'06000005005005005",'#13#10'"00500500500500500000500600600000000000000100100'
+'1001000006000005005005005",'#13#10'"005005005005005000006006006006006006000'
+'000000000000000006000005005005005",'#13#10'"0050050050050050000060060060060'
+'06006006006006006006006006005000005005005",'#13#10'"00500000000000500000600'
+'6006000000000000000006006006006006006000005005005",'#13#10'"005000005005002'
+'000000000000005005005005005000006006006006004000005005005",'#13#10'"0050000'
+'05005005005005005005005005005005005005000006006005000005005005005",'#13#10
+'"005005000004005005005005005005005005005005005000005005005000005005005005",'
+#13#10'"00500500000400400400400400400400400400400400400400000500000500500500'
+'5005",'#13#10'"005005005000000000000000000000000000000000000000000000005005'
+'005005005005"'#13#10'};'#13#10
]);
LazarusResources.Add('TVTHeaderPopupMenu','XPM',[
'/* XPM */'#13#10'static char *Pixmap[] = {'#13#10'"24 24 256 3",'#13#10'"000'
+' c black",'#13#10'"001 c #000080",'#13#10'"002 c #808000",'#13#10'"003 c #8'
+'08080",'#13#10'"004 c #D4D0C8",'#13#10'"005 c gray100",'#13#10'"006 c black'
+'",'#13#10'"007 c black",'#13#10'"008 c black",'#13#10'"009 c black",'#13#10
+'"010 c black",'#13#10'"011 c black",'#13#10'"012 c black",'#13#10'"013 c bl'
+'ack",'#13#10'"014 c black",'#13#10'"015 c black",'#13#10'"016 c black",'#13
+#10'"017 c black",'#13#10'"018 c black",'#13#10'"019 c black",'#13#10'"020 c'
+' black",'#13#10'"021 c black",'#13#10'"022 c black",'#13#10'"023 c black",'
+#13#10'"024 c black",'#13#10'"025 c black",'#13#10'"026 c black",'#13#10'"02'
+'7 c black",'#13#10'"028 c black",'#13#10'"029 c black",'#13#10'"030 c black'
+'",'#13#10'"031 c black",'#13#10'"032 c black",'#13#10'"033 c black",'#13#10
+'"034 c black",'#13#10'"035 c black",'#13#10'"036 c black",'#13#10'"037 c bl'
+'ack",'#13#10'"038 c black",'#13#10'"039 c black",'#13#10'"040 c black",'#13
+#10'"041 c black",'#13#10'"042 c black",'#13#10'"043 c black",'#13#10'"044 c'
+' black",'#13#10'"045 c black",'#13#10'"046 c black",'#13#10'"047 c black",'
+#13#10'"048 c black",'#13#10'"049 c black",'#13#10'"050 c black",'#13#10'"05'
+'1 c black",'#13#10'"052 c black",'#13#10'"053 c black",'#13#10'"054 c black'
+'",'#13#10'"055 c black",'#13#10'"056 c black",'#13#10'"057 c black",'#13#10
+'"058 c black",'#13#10'"059 c black",'#13#10'"060 c black",'#13#10'"061 c bl'
+'ack",'#13#10'"062 c black",'#13#10'"063 c black",'#13#10'"064 c black",'#13
+#10'"065 c black",'#13#10'"066 c black",'#13#10'"067 c black",'#13#10'"068 c'
+' black",'#13#10'"069 c black",'#13#10'"070 c black",'#13#10'"071 c black",'
+#13#10'"072 c black",'#13#10'"073 c black",'#13#10'"074 c black",'#13#10'"07'
+'5 c black",'#13#10'"076 c black",'#13#10'"077 c black",'#13#10'"078 c black'
+'",'#13#10'"079 c black",'#13#10'"080 c black",'#13#10'"081 c black",'#13#10
+'"082 c black",'#13#10'"083 c black",'#13#10'"084 c black",'#13#10'"085 c bl'
+'ack",'#13#10'"086 c black",'#13#10'"087 c black",'#13#10'"088 c black",'#13
+#10'"089 c black",'#13#10'"090 c black",'#13#10'"091 c black",'#13#10'"092 c'
+' black",'#13#10'"093 c black",'#13#10'"094 c black",'#13#10'"095 c black",'
+#13#10'"096 c black",'#13#10'"097 c black",'#13#10'"098 c black",'#13#10'"09'
+'9 c black",'#13#10'"100 c black",'#13#10'"101 c black",'#13#10'"102 c black'
+'",'#13#10'"103 c black",'#13#10'"104 c black",'#13#10'"105 c black",'#13#10
+'"106 c black",'#13#10'"107 c black",'#13#10'"108 c black",'#13#10'"109 c bl'
+'ack",'#13#10'"110 c black",'#13#10'"111 c black",'#13#10'"112 c black",'#13
+#10'"113 c black",'#13#10'"114 c black",'#13#10'"115 c black",'#13#10'"116 c'
+' black",'#13#10'"117 c black",'#13#10'"118 c black",'#13#10'"119 c black",'
+#13#10'"120 c black",'#13#10'"121 c black",'#13#10'"122 c black",'#13#10'"12'
+'3 c black",'#13#10'"124 c black",'#13#10'"125 c black",'#13#10'"126 c black'
+'",'#13#10'"127 c black",'#13#10'"128 c black",'#13#10'"129 c black",'#13#10
+'"130 c black",'#13#10'"131 c black",'#13#10'"132 c black",'#13#10'"133 c bl'
+'ack",'#13#10'"134 c black",'#13#10'"135 c black",'#13#10'"136 c black",'#13
+#10'"137 c black",'#13#10'"138 c black",'#13#10'"139 c black",'#13#10'"140 c'
+' black",'#13#10'"141 c black",'#13#10'"142 c black",'#13#10'"143 c black",'
+#13#10'"144 c black",'#13#10'"145 c black",'#13#10'"146 c black",'#13#10'"14'
+'7 c black",'#13#10'"148 c black",'#13#10'"149 c black",'#13#10'"150 c black'
+'",'#13#10'"151 c black",'#13#10'"152 c black",'#13#10'"153 c black",'#13#10
+'"154 c black",'#13#10'"155 c black",'#13#10'"156 c black",'#13#10'"157 c bl'
+'ack",'#13#10'"158 c black",'#13#10'"159 c black",'#13#10'"160 c black",'#13
+#10'"161 c black",'#13#10'"162 c black",'#13#10'"163 c black",'#13#10'"164 c'
+' black",'#13#10'"165 c black",'#13#10'"166 c black",'#13#10'"167 c black",'
+#13#10'"168 c black",'#13#10'"169 c black",'#13#10'"170 c black",'#13#10'"17'
+'1 c black",'#13#10'"172 c black",'#13#10'"173 c black",'#13#10'"174 c black'
+'",'#13#10'"175 c black",'#13#10'"176 c black",'#13#10'"177 c black",'#13#10
+'"178 c black",'#13#10'"179 c black",'#13#10'"180 c black",'#13#10'"181 c bl'
+'ack",'#13#10'"182 c black",'#13#10'"183 c black",'#13#10'"184 c black",'#13
+#10'"185 c black",'#13#10'"186 c black",'#13#10'"187 c black",'#13#10'"188 c'
+' black",'#13#10'"189 c black",'#13#10'"190 c black",'#13#10'"191 c black",'
+#13#10'"192 c black",'#13#10'"193 c black",'#13#10'"194 c black",'#13#10'"19'
+'5 c black",'#13#10'"196 c black",'#13#10'"197 c black",'#13#10'"198 c black'
+'",'#13#10'"199 c black",'#13#10'"200 c black",'#13#10'"201 c black",'#13#10
+'"202 c black",'#13#10'"203 c black",'#13#10'"204 c black",'#13#10'"205 c bl'
+'ack",'#13#10'"206 c black",'#13#10'"207 c black",'#13#10'"208 c black",'#13
+#10'"209 c black",'#13#10'"210 c black",'#13#10'"211 c black",'#13#10'"212 c'
+' black",'#13#10'"213 c black",'#13#10'"214 c black",'#13#10'"215 c black",'
,#13#10'"216 c black",'#13#10'"217 c black",'#13#10'"218 c black",'#13#10'"21'
+'9 c black",'#13#10'"220 c black",'#13#10'"221 c black",'#13#10'"222 c black'
+'",'#13#10'"223 c black",'#13#10'"224 c black",'#13#10'"225 c black",'#13#10
+'"226 c black",'#13#10'"227 c black",'#13#10'"228 c black",'#13#10'"229 c bl'
+'ack",'#13#10'"230 c black",'#13#10'"231 c black",'#13#10'"232 c black",'#13
+#10'"233 c black",'#13#10'"234 c black",'#13#10'"235 c black",'#13#10'"236 c'
+' black",'#13#10'"237 c black",'#13#10'"238 c black",'#13#10'"239 c black",'
+#13#10'"240 c black",'#13#10'"241 c black",'#13#10'"242 c black",'#13#10'"24'
+'3 c black",'#13#10'"244 c black",'#13#10'"245 c black",'#13#10'"246 c black'
+'",'#13#10'"247 c black",'#13#10'"248 c black",'#13#10'"249 c black",'#13#10
+'"250 c black",'#13#10'"251 c black",'#13#10'"252 c black",'#13#10'"253 c bl'
+'ack",'#13#10'"254 c black",'#13#10'"255 c black",'#13#10'"00400400400400400'
+'4004004004004004004004004004004004004004004004004004004",'#13#10'"004004004'
+'004004004004000000004004004004004004004004004004004004004004004",'#13#10'"0'
+'04004004004004004000004004000000000000000000000000000000000000000004004",'
+#13#10'"00400400400400400000500500500400400400400400400400400400400300300200'
+'0004",'#13#10'"004004004004004000005005005005005005005005005005005005002003'
+'003003000004",'#13#10'"0040040040040000050050050050050050050050050050050050'
+'02003003003003000004",'#13#10'"00400400400400400000000000200500500500500500'
+'5005005000003003003003000004",'#13#10'"004004004004004004004004000000000000'
+'000000000000000003003003003002004004",'#13#10'"0040040040040040040040040000'
+'03003003003003003003003005005005003000004004",'#13#10'"00400400400400400400'
+'4004000003005005005005005005000005005005004000004004",'#13#10'"004004004004'
+'004004004004000003005001001001005005000005005005003000004004",'#13#10'"0040'
+'04004004004004004004000003005005005005005005000005005005000004004004",'#13
+#10'"00400400400400400400400400000300500100100100100100000500500500000400400'
+'4",'#13#10'"004004004004004004004000005003001005005005001005001005005005000'
+'004004004",'#13#10'"0040040040040040040000030050030050010010010010050050010'
+'05005000004004004",'#13#10'"00400400400400400400000400500300500500500500100'
+'5005005001005000004004004",'#13#10'"004004004004004004000005005003000000000'
+'000001005005005005001000004004004",'#13#10'"0040040040040040040000050050050'
+'05005005005001005005005001001001001004004",'#13#10'"00400400000000000400000'
+'5005005000000000000001005005005005001005000004004",'#13#10'"004004000004004'
+'002000000000000004004004004001005001001005005001000004004",'#13#10'"0040040'
+'00004004004004004004004004004004004001001003001005005001004004004",'#13#10
+'"004004004000003004004004004004004004004004001004000004001005005001004004",'
+#13#10'"00400400400000300300300300300300300300300300300300300000100500500100'
+'4004",'#13#10'"004004004004000000000000000000000000000000000000000000000001'
+'001004004004"'#13#10'};'#13#10
]);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,261 @@
unit VirtualDrawTree;
interface
uses
Classes,Sysutils,Graphics,VirtualTrees;
type
TVTDrawHintEvent = procedure(Sender: TBaseVirtualTree; HintCanvas: TCanvas; Node: PVirtualNode; R: TRect;
Column: TColumnIndex) of object;
TVTDrawNodeEvent = procedure(Sender: TBaseVirtualTree; const PaintInfo: TVTPaintInfo) of object;
TVTGetNodeWidthEvent = procedure(Sender: TBaseVirtualTree; HintCanvas: TCanvas; Node: PVirtualNode;
Column: TColumnIndex; var NodeWidth: Integer) of object;
TVTGetHintSizeEvent = procedure(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
var R: TRect) of object;
// Tree descendant to let an application draw its stuff itself.
TCustomVirtualDrawTree = class(TBaseVirtualTree)
private
FOnDrawNode: TVTDrawNodeEvent;
FOnGetNodeWidth: TVTGetNodeWidthEvent;
FOnGetHintSize: TVTGetHintSizeEvent;
FOnDrawHint: TVTDrawHintEvent;
protected
procedure DoDrawHint(xCanvas: TCanvas; Node: PVirtualNode; R: TRect; Column: TColumnIndex);
procedure DoGetHintSize(Node: PVirtualNode; Column: TColumnIndex; var R: TRect); virtual;
function DoGetNodeWidth(Node: PVirtualNode; Column: TColumnIndex; xCanvas: TCanvas = nil): Integer; override;
procedure DoPaintNode(var PaintInfo: TVTPaintInfo); override;
property OnDrawHint: TVTDrawHintEvent read FOnDrawHint write FOnDrawHint;
property OnDrawNode: TVTDrawNodeEvent read FOnDrawNode write FOnDrawNode;
property OnGetHintSize: TVTGetHintSizeEvent read FOnGetHintSize write FOnGetHintSize;
property OnGetNodeWidth: TVTGetNodeWidthEvent read FOnGetNodeWidth write FOnGetNodeWidth;
end;
TVirtualDrawTree = class(TCustomVirtualDrawTree)
protected
function GetOptionsClass: TTreeOptionsClass; override;
public
property Canvas;
published
property Action;
property Align;
property Alignment;
property Anchors;
property AnimationDuration;
property AutoExpandDelay;
property AutoScrollDelay;
property AutoScrollInterval;
property Background;
property BackgroundOffsetX;
property BackgroundOffsetY;
property BorderStyle;
property ButtonFillMode;
property ButtonStyle;
property BorderWidth;
property ChangeDelay;
property CheckImageKind;
property ClipboardFormats;
property Color;
property Colors;
property Constraints;
property Ctl3D;
property CustomCheckImages;
property DefaultNodeHeight;
property DefaultPasteMode;
property DragCursor;
property DrawSelectionMode;
property EditDelay;
property Enabled;
property Font;
property Header;
property HintAnimation;
property HintMode;
property HotCursor;
property Images;
property IncrementalSearch;
property IncrementalSearchDirection;
property IncrementalSearchStart;
property IncrementalSearchTimeout;
property Indent;
property LineMode;
property LineStyle;
property Margin;
property NodeAlignment;
property NodeDataSize;
{$ifdef COMPILER_7_UP}
property ParentBackground;
{$endif COMPILER_7_UP}
property ParentColor default False;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property RootNodeCount;
property ScrollBarOptions;
property SelectionBlendFactor;
property SelectionCurveRadius;
property ShowHint;
property StateImages;
property TabOrder;
property TabStop default True;
property TextMargin;
property TreeOptions;//: TVirtualTreeOptions read GetOptions write SetOptions;
property Visible;
property WantTabs;
property OnAdvancedHeaderDraw;
property OnAfterCellPaint;
property OnAfterItemErase;
property OnAfterItemPaint;
property OnAfterPaint;
property OnBeforeCellPaint;
property OnBeforeItemErase;
property OnBeforeItemPaint;
property OnBeforePaint;
property OnChange;
property OnChecked;
property OnChecking;
property OnClick;
property OnCollapsed;
property OnCollapsing;
property OnColumnClick;
property OnColumnDblClick;
property OnColumnResize;
property OnCompareNodes;
{$ifdef COMPILER_5_UP}
property OnContextPopup;
{$endif COMPILER_5_UP}
// property OnCreateDragManager;
property OnCreateEditor;
property OnDblClick;
// property OnDragAllowed;
property OnDragOver;
property OnDragDrop;
property OnDrawHint;
property OnDrawNode;
property OnEdited;
property OnEditing;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnExpanded;
property OnExpanding;
property OnFocusChanged;
property OnFocusChanging;
property OnFreeNode;
property OnGetCellIsEmpty;
property OnGetCursor;
property OnGetHeaderCursor;
property OnGetHelpContext;
property OnGetHintSize;
property OnGetImageIndex;
property OnGetLineStyle;
property OnGetNodeDataSize;
property OnGetNodeWidth;
property OnGetPopupMenu;
// property OnGetUserClipboardFormats;
property OnHeaderClick;
property OnHeaderDblClick;
property OnHeaderDraw;
property OnHeaderMouseDown;
property OnHeaderMouseMove;
property OnHeaderMouseUp;
property OnHotChange;
property OnIncrementalSearch;
property OnInitChildren;
property OnInitNode;
property OnKeyAction;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnLoadNode;
property OnMeasureItem;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnNodeCopied;
property OnNodeCopying;
property OnNodeMoved;
property OnNodeMoving;
property OnPaintBackground;
property OnResetNode;
property OnResize;
property OnSaveNode;
property OnScroll;
property OnStartDock;
property OnStateChange;
property OnStructureChange;
property OnUpdating;
end;
implementation
//----------------- TCustomVirtualDrawTree -----------------------------------------------------------------------------
procedure TCustomVirtualDrawTree.DoDrawHint(xCanvas: TCanvas; Node: PVirtualNode; R: TRect; Column: TColumnIndex);
begin
if Assigned(FOnDrawHint) then
FOnDrawHint(Self, xCanvas, Node, R, Column);
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TCustomVirtualDrawTree.DoGetHintSize(Node: PVirtualNode; Column: TColumnIndex; var R: TRect);
begin
if Assigned(FOnGetHintSize) then
FOnGetHintSize(Self, Node, Column, R);
end;
//----------------------------------------------------------------------------------------------------------------------
function TCustomVirtualDrawTree.DoGetNodeWidth(Node: PVirtualNode; Column: TColumnIndex; xCanvas: TCanvas = nil): Integer;
begin
Result := 2 * FTextMargin;
if xCanvas = nil then
xCanvas := Self.Canvas;
if Assigned(FOnGetNodeWidth) then
FOnGetNodeWidth(Self, xCanvas, Node, Column, Result);
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TCustomVirtualDrawTree.DoPaintNode(var PaintInfo: TVTPaintInfo);
begin
if Assigned(FOnDrawNode) then
FOnDrawNode(Self, PaintInfo);
end;
//----------------- TVirtualDrawTree -----------------------------------------------------------------------------------
{function TVirtualDrawTree.GetOptions: TVirtualTreeOptions;
begin
Result := Options as TVirtualTreeOptions;
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TVirtualDrawTree.SetOptions(const Value: TVirtualTreeOptions);
begin
FOptions.Assign(Value);
end;}
//----------------------------------------------------------------------------------------------------------------------
function TVirtualDrawTree.GetOptionsClass: TTreeOptionsClass;
begin
Result := TVirtualTreeOptions;
end;
//----------------------------------------------------------------------------------------------------------------------
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,252 @@
unit VTHeaderPopup;
//----------------------------------------------------------------------------------------------------------------------
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
//
// Alternatively, you may redistribute this library, use and/or modify it under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation;
// either version 2.1 of the License, or (at your option) any later version.
// You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/.
//
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
// License for the specific language governing rights and limitations
// under the License.
//
// The Original Code is VTHeaderPopup.pas.
//
// The Initial Developer of the Original Code is Ralf Junker <delphi@zeitungsjunge.de>. All Rights Reserved.
//
// September 2004:
// - Bug fix: TVTHeaderPopupMenu.OnMenuItemClick used the wrong Tag member for the event.
//
// Modified 12 Dec 2003 by Ralf Junker <delphi@zeitungsjunge.de>.
// - Added missing default storage specifier for Options property.
// - To avoid mixing up image lists of different trees sharing the same header
// popup, set the popup's image list to nil if hoShowImages is not in the
// tree's header options.
// - Added an additional check for the PopupComponent property before casting
// it hardly to a Virtual Treeview in OnMenuItemClick. See entry 31 Mar 2003.
//
// Modified 14 Sep 2003 by Mike Lischke <public@delphi-gems.com>.
// - Renamed event type name to be consistent with other event types (e.g. used in VT).
// - Added event for hiding/showing columns.
// - DoXXX method are now virtual.
// - Conditional code rearrangement to get back Ctrl+Shift+Up/Down navigation.
//
// Modified 31 Mar 2003 by Mike Lischke <public@soft-gems.net>.
// - Added a check for the PopupComponent property before casting it hardly to
// a Virtual Treeview. People might (accidentally) misuse the header popup.
//
// Modified 20 Oct 2002 by Borut Maricic <borut.maricic@pobox.com>.
// - Added the possibility to use Troy Wolbrink's Unicode aware popup menu.
// Define the compiler symbol TNT to enable it. You can get Troy's Unicode
// controls collection from http://home.ccci.org/wolbrink/tnt/delphi_unicode_controls.htm.
//
// Modified 24 Feb 2002 by Ralf Junker <delphi@zeitungsjunge.de>.
// - Fixed a bug where the OnAddHeaderPopupItem would interfere with
// poAllowHideAll options.
// - All column indexes now consistently use TColumnIndex (instead of Integer).
//
// Modified 23 Feb 2002 by Ralf Junker <delphi@zeitungsjunge.de>.
// - Added option to show menu items in the same order as the columns or in
// original order.
// - Added option to prevent the user to hide all columns.
//
// Modified 17 Feb 2002 by Jim Kueneman <jimdk@mindspring.com>.
// - Added the event to filter the items as they are added to the menu.
//----------------------------------------------------------------------------------------------------------------------
{$I Compilers.inc}
interface
uses
{$ifdef TNT}
TntMenus,
{$else}
Menus,
{$endif TNT}
VirtualTrees;
type
TVTHeaderPopupOption = (
poOriginalOrder, // Show menu items in original column order as they were added to the tree.
poAllowHideAll // Allows to hide all columns, including the last one.
);
TVTHeaderPopupOptions = set of TVTHeaderPopupOption;
TAddPopupItemType = (
apNormal,
apDisabled,
apHidden
);
TAddHeaderPopupItemEvent = procedure(const Sender: TBaseVirtualTree; const Column: TColumnIndex;
var Cmd: TAddPopupItemType) of object;
TColumnChangeEvent = procedure(const Sender: TBaseVirtualTree; const Column: TColumnIndex; Visible: Boolean) of object;
{$ifdef TNT}
TVTMenuItem = TTntMenuItem;
{$else}
TVTMenuItem = TMenuItem;
{$endif}
{$ifdef TNT}
TVTHeaderPopupMenu = class(TTntPopupMenu)
{$else}
TVTHeaderPopupMenu = class(TPopupMenu)
{$endif}
private
FOptions: TVTHeaderPopupOptions;
FOnAddHeaderPopupItem: TAddHeaderPopupItemEvent;
FOnColumnChange: TColumnChangeEvent;
protected
procedure DoAddHeaderPopupItem(const Column: TColumnIndex; out Cmd: TAddPopupItemType); virtual;
procedure DoColumnChange(Column: TColumnIndex; Visible: Boolean); virtual;
procedure OnMenuItemClick(Sender: TObject);
public
procedure Popup(x, y: Integer); //later: override;
published
property Options: TVTHeaderPopupOptions read FOptions write FOptions default [];
property OnAddHeaderPopupItem: TAddHeaderPopupItemEvent read FOnAddHeaderPopupItem write FOnAddHeaderPopupItem;
property OnColumnChange: TColumnChangeEvent read FOnColumnChange write FOnColumnChange;
end;
//----------------------------------------------------------------------------------------------------------------------
implementation
uses
{$ifdef TNT}
TnTClasses
{$else}
Classes
{$endif TNT};
type
TVirtualTreeCast = class(TBaseVirtualTree); // Necessary to make the header accessible.
//----------------- TVTHeaderPopupMenu ---------------------------------------------------------------------------------
procedure TVTHeaderPopupMenu.DoAddHeaderPopupItem(const Column: TColumnIndex; out Cmd: TAddPopupItemType);
begin
Cmd := apNormal;
if Assigned(FOnAddHeaderPopupItem) then
FOnAddHeaderPopupItem(TVirtualTreeCast(PopupComponent), Column, Cmd);
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TVTHeaderPopupMenu.DoColumnChange(Column: TColumnIndex; Visible: Boolean);
begin
if Assigned(FOnColumnChange) then
FOnColumnChange(TVirtualTreeCast(PopupComponent), Column, Visible);
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TVTHeaderPopupMenu.OnMenuItemClick(Sender: TObject);
begin
if Assigned(PopupComponent) and (PopupComponent is TBaseVirtualTree) then
with TVTMenuItem(Sender),
TVirtualTreeCast(PopupComponent).Header.Columns.Items[Tag] do
begin
if Checked then
Options := Options - [coVisible]
else
Options := Options + [coVisible];
DoColumnChange(TVTMenuItem(Sender).Tag, not Checked);
end;
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TVTHeaderPopupMenu.Popup(x, y: Integer);
var
I: Integer;
ColPos: TColumnPosition;
ColIdx: TColumnIndex;
NewMenuItem: TVTMenuItem;
Cmd: TAddPopupItemType;
VisibleCounter: Cardinal;
VisibleItem: TVTMenuItem;
begin
if Assigned(PopupComponent) and (PopupComponent is TBaseVirtualTree) then
begin
// Delete existing menu items.
I := Items.Count;
while I > 0 do
begin
Dec(I);
Items[I].Free;
end;
// Add column menu items.
with TVirtualTreeCast(PopupComponent).Header do
begin
if hoShowImages in Options then
Self.Images := Images
else
// Remove a possible reference to image list of another tree previously assigned.
Self.Images := nil;
VisibleItem := nil;
VisibleCounter := 0;
for ColPos := 0 to Columns.Count - 1 do
begin
if poOriginalOrder in FOptions then
ColIdx := ColPos
else
ColIdx := Columns.ColumnFromPosition(ColPos);
with Columns[ColIdx] do
begin
if coVisible in Options then
Inc(VisibleCounter);
DoAddHeaderPopupItem(ColIdx, Cmd);
if Cmd <> apHidden then
begin
NewMenuItem := TVTMenuItem.Create(Self);
NewMenuItem.Tag := ColIdx;
NewMenuItem.Caption := Text;
NewMenuItem.Hint := Hint;
NewMenuItem.ImageIndex := ImageIndex;
NewMenuItem.Checked := coVisible in Options;
NewMenuItem.OnClick := @OnMenuItemClick;
if Cmd = apDisabled then
NewMenuItem.Enabled := False
else
if coVisible in Options then
VisibleItem := NewMenuItem;
Items.Add(NewMenuItem);
end;
end;
end;
// Conditionally disable menu item of last enabled column.
if (VisibleCounter = 1) and (VisibleItem <> nil) and not (poAllowHideAll in FOptions) then
VisibleItem.Enabled := False;
end;
end;
inherited;
end;
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
end.

View File

@ -0,0 +1,22 @@
unit VTRegister;
{$mode objfpc}{$H+}
interface
uses
Classes,SysUtils,VirtualTrees,VirtualStringTree,VirtualDrawTree,VTHeaderPopup;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Virtual Controls', [TVirtualStringTree, TVirtualDrawTree]);
RegisterComponents('Virtual Controls', [TVTHeaderPopupMenu]);
end;
end.

View File

@ -0,0 +1,88 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<PathDelim Value="\"/>
<Name Value="virtualtreeslcl"/>
<Author Value="Christian Ulrich,Joerg Thaler"/>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\"/>
<OtherUnitFiles Value="..\"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<Verbosity>
<ShowNotes Value="False"/>
<ShowHints Value="False"/>
<ShowGenInfo Value="False"/>
</Verbosity>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="Virtual Treeview
"/>
<License Value="The contents of this file are subject to the Mozilla Public License
Version 1.1 (the &quot;License&quot;); you may not use this file except in compliance
with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
Alternatively, you may redistribute this library, use and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.
You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/.
Software distributed under the License is distributed on an &quot;AS IS&quot; basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.
"/>
<Version Major="4" Release="17" Build="23"/>
<Files Count="6">
<Item1>
<Filename Value="..\VirtualTrees.lrs"/>
<Type Value="LRS"/>
</Item1>
<Item2>
<Filename Value="..\VirtualTrees.pas"/>
<UnitName Value="VirtualTrees"/>
</Item2>
<Item3>
<Filename Value="..\virtualdrawtree.pas"/>
<UnitName Value="VirtualDrawTree"/>
</Item3>
<Item4>
<Filename Value="..\virtualstringtree.pas"/>
<UnitName Value="VirtualStringTree"/>
</Item4>
<Item5>
<Filename Value="..\VTHeaderPopup.pas"/>
<UnitName Value="VTHeaderPopup"/>
</Item5>
<Item6>
<Filename Value="..\vtregister.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="VTRegister"/>
</Item6>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="LCL"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>