Added ide icons

Removed Register procedure from main unit

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum 2007-05-01 01:41:35 +00:00
parent e6c6bc8691
commit 636993e3ff
12 changed files with 282 additions and 31 deletions

View File

@ -3294,8 +3294,6 @@ type
bmConstantAlphaAndColor // blend the destination color with the given constant color und the constant alpha value
);
procedure Register;
// OLE Clipboard and drag'n drop helper
procedure EnumerateVTClipboardFormats(TreeClass: TVirtualTreeClass; const List: TStrings); overload;
procedure EnumerateVTClipboardFormats(TreeClass: TVirtualTreeClass; var Formats: TFormatEtcArray); overload;
@ -32209,11 +32207,6 @@ end;
//----------------------------------------------------------------------------------------------------------------------
procedure Register;
begin
RegisterComponents('VirtualTreeView', [TVirtualDrawTree,TVirtualStringTree]);
end;
initialization
{$I virtualtrees.lrs}
// Necessary for dynamic package loading.

View File

@ -0,0 +1,51 @@
LazarusResources.Add('tvirtualdrawtree','XPM',[
'/* XPM */'#13#10'static char * tvirtualdrawtree_xpm[] = {'#13#10'"24 24 9 1"'
+','#13#10'".'#9'c #000000",'#13#10'"+'#9'c None",'#13#10'"@'#9'c #808000",'
+#13#10'"#'#9'c #20A080",'#13#10'"$'#9'c #808080",'#13#10'"%'#9'c #C0A000",'
+#13#10'"&'#9'c #C0C0C0",'#13#10'"*'#9'c #FFFFFF",'#13#10'"++++++..++++++++++'
+'++++++",'#13#10'"+++++.&&.............+++",'#13#10'"++++.***&&&&&&&&&&$$@.+'
+'+",'#13#10'"++++.************@$$$.++",'#13#10'"+++.************@$$$$.++",'
+#13#10'"++++...@********.$$$$.++",'#13#10'"+++++++.........$$$$@+++",'#13#10
+'"+++++++.$$$$$$$$***$.+++",'#13#10'"+++++++.*******%***&.+++",'#13#10'"++++'
+'+++.*.****%%%**$.+++",'#13#10'"+++++++.*...*%%%%%*.++++",'#13#10'"+++++++.*'
+'.**%%%%%%%.++++",'#13#10'"++++++.**.***####**.++++",'#13#10'"+++++.$**.**##'
+'####*.++++",'#13#10'"+++++.&**..*######*.++++",'#13#10'"+++++.******######*'
+'.++++",'#13#10'"+++++.*******####**&.+++",'#13#10'"+...+.***.....******.+++'
+'",'#13#10'"+.&&@....&&&&&.****$.+++",'#13#10'"+.&&&&&&&&&&&&&.**&.++++",'#13
+#10'"++.$&&&&&&&&&&&.&&&.++++",'#13#10'"++.$$$$$$$$$$$$$.&.+++++",'#13#10'"+'
+'++...............++++++",'#13#10'"++++++++++++++++++++++++"};'#13#10
]);
LazarusResources.Add('tvirtualstringtree','XPM',[
'/* XPM */'#13#10'static char * tvirtualstringtree_xpm[] = {'#13#10'"24 24 9 '
+'1",'#13#10'".'#9'c #000000",'#13#10'"+'#9'c None",'#13#10'"@'#9'c #808000",'
+#13#10'"#'#9'c #20A080",'#13#10'"$'#9'c #808080",'#13#10'"%'#9'c #C0A000",'
+#13#10'"&'#9'c #C0C0C0",'#13#10'"*'#9'c #FFFFFF",'#13#10'"++++++..++++++++++'
+'++++++",'#13#10'"+++++.&&.............+++",'#13#10'"++++.***&&&&&&&&&&$$@.+'
+'+",'#13#10'"++++.************@$$$.++",'#13#10'"+++.************@$$$$.++",'
+#13#10'"++++...@********.$$$$.++",'#13#10'"+++++++.........$$$$@+++",'#13#10
+'"+++++++.$$$$$$$$***$.+++",'#13#10'"+++++++.***********&.+++",'#13#10'"++++'
+'+++.*.**......*$.+++",'#13#10'"+++++++.*....%%%%.*.++++",'#13#10'"+++++++.*'
+'.**......*.++++",'#13#10'"++++++.**.*********.++++",'#13#10'"+++++.$**.**..'
+'....*.++++",'#13#10'"+++++.&**....####.*.++++",'#13#10'"+++++.******......*'
+'.++++",'#13#10'"+++++.*************&.+++",'#13#10'"+...+.***.....******.+++'
+'",'#13#10'"+.&&@....&&&&&.****$.+++",'#13#10'"+.&&&&&&&&&&&&&.**&.++++",'#13
+#10'"++.$&&&&&&&&&&&.&&&.++++",'#13#10'"++.$$$$$$$$$$$$$.&.+++++",'#13#10'"+'
+'++...............++++++",'#13#10'"++++++++++++++++++++++++"};'#13#10
]);
LazarusResources.Add('tvtheaderpopupmenu','XPM',[
'/* XPM */'#13#10'static char * tvtheaderpopupmenu_xpm[] = {'#13#10'"24 24 8 '
+'1",'#13#10'".'#9'c #000000",'#13#10'"+'#9'c #000080",'#13#10'"@'#9'c None",'
+#13#10'"#'#9'c #808000",'#13#10'"$'#9'c #808080",'#13#10'"%'#9'c #C0C0C0",'
+#13#10'"&'#9'c #FFFFFF",'#13#10'"@@@@@@..@@@@@@@@@@@@@@@@",'#13#10'"@@@@@.%%'
+'.............@@@",'#13#10'"@@@@.&&&%%%%%%%%%%$$#.@@",'#13#10'"@@@@.&&&&&&&&'
+'&&&&#$$$.@@",'#13#10'"@@@.&&&&&&&&&&&&#$$$$.@@",'#13#10'"@@@@...#&&&&&&&&.$'
+'$$$.@@",'#13#10'"@@@@@@@.........$$$$#@@@",'#13#10'"@@@@@@@.$$$$$$$$&&&$.@@'
+'@",'#13#10'"@@@@@@@.$&&&&&&.&&&%.@@@",'#13#10'"@@@@@@@.$&+++&&.&&&$.@@@",'
+#13#10'"@@@@@@@.$&&&&&&.&&&.@@@@",'#13#10'"@@@@@@@.$&+++++.&&&.@@@@",'#13#10
+'"@@@@@@.&$+&&&+&+&&&.@@@@",'#13#10'"@@@@@.$&$&++++&&+&&.@@@@",'#13#10'"@@@@'
+'@.%&$&&&&+&&&+&.@@@@",'#13#10'"@@@@@.&&$....+&&&&+.@@@@",'#13#10'"@@@@@.&&&'
+'&&&&+&&&++++@@@",'#13#10'"@...@.&&&....+&&&&+&.@@@",'#13#10'"@.%%#....%%%%+'
+'&++&&+.@@@",'#13#10'"@.%%%%%%%%%%%++$+&&+@@@@",'#13#10'"@@.$%%%%%%%%%+%.%+&'
+'&+@@@",'#13#10'"@@.$$$$$$$$$$$$$.+&&+@@@",'#13#10'"@@@...............++@@@@'
+'",'#13#10'"@@@@@@@@@@@@@@@@@@@@@@@@"};'#13#10
]);

View File

@ -106,24 +106,29 @@ Port started in 26/01/07
* Added images demo
* Fixed header click when Header.States is empty
>> The remaining log can be obtained using the svn repository
#Major Tasks#
< > General Painting
<*> General Painting
[*] The NodeBitmap width/Height is not reseted when erasing the background > LCL bug
< > Define the UNICODE support schema. Probably change from widestring to ansistring and let LCL do the rest
[ ] Use GetTextExtentPoint instead of GetTextExtentPoint32 since the later is a wrapper to the former in LCL
[ ] For now all rendering will be done with DrawTextW wrapper > Windows.DrawTextW
[?] For now all rendering will be done with DrawTextW wrapper > Windows.DrawTextW
UPDATE: VirtualTrees.DrawTextW will be removed. Use DelphiCompat instead
<*> Find a way to mantain OLE drag and Drop in windows
[-] Also maintain OLE ClipBoard?? Necessary?? -> No will be removed
<-> Replace TWMTimer since is only called in win32. Or implement in GTK Intf?
[ ] Will be implemented under gtk
< > Implement Imagelist handling
[ ] See a properly way to setup the ImageLists (avoid current hack)
<-> Implement Imagelist handling
[-] See a properly way to setup the ImageLists (avoid current hack)
[ ] Create a mask using LclExt functions
< > GetCurrentObject used for blending does not exists in LCL. Add it?
[ ] Gtk.GetObject does not return dmBits (is always nil) -> Is not viable to implement
GetObject under Gtk. See another way to do alpha blend (Disable in GTK??)
< > Implement the header
[ ] Add to DelphiCompat
<-> Implement the header
[ ] BevelEdges is used to paint the Header. See if is worth implementing it
[ ] Process the header messages or do another way
[*] Process the header messages or do another way
[ ] See if DestroyWindowHandle is necessary in Destroy
< > Bidi Support
[ ]Properly Implement TBaseVirtualTree.UseRightToLeftAlignment
@ -140,9 +145,11 @@ Port started in 26/01/07
< > Replace WMSetFont since LM_SETFONT is not used in LCL
<*> Replace RaiseLastOSError. Is used in only one place -> Removed
< > IsWinNT is currently set to True. See if will support win98 and how do it
[ ] IsWinNT Will be removed. Win98 should use MS Unicode Layer
< > See what todo with GetTextAlign. Implement in LCL??
[ ] Implement in DelphiCompat
< > Thread support
[ ] Replace TVTCriticalSection by SyncObjs.TCriticalSection??
[ ] Replace TVTCriticalSection by SyncObjs.TCriticalSection?? > YES
[ ] See appropriate value for INFINITE constant in Linux/BSD etc
< > TWorkerThread.ChangeTreeStates uses SendMessage. See if it works both in win and linux
<-> In fpc TStgMedium records have PunkForRelease instead of unkForRelease, same for stm and stg
@ -150,8 +157,9 @@ Port started in 26/01/07
< > Add a way to replace TBitmap.Scanline and all advanced graphics routines
[ ] Use TLazIntfImage?
[ ] Properly implement CreatePatternBrush or find a way to paint the lines
< > Implement GetBkColor in LCL
< > Implement GetBkColor in LCL > DelphiCompat
< > Begin/EndUpdate uses WM_SETREDRAW message to avoid painting. See a crossplatform way of doing it
[ ] Add a function in LCLExt
<*> Translate MAKEROP4 from C to Pascal. Done copied from fpc
< > TCMMouseWheel type is not used in Lazarus. Remove
< > Revise CM* functions and messages
@ -165,16 +173,18 @@ Port started in 26/01/07
#Checks#
< > See if getting the length of PWideChar by typecasting to WideString is correct
< > See if the Hint is being show in the correct place
< > See the effect of using RecreateWnd (in TCustomVirtualTreeOptions.SetMiscOptions)
<-> See the effect of using RecreateWnd (in TCustomVirtualTreeOptions.SetMiscOptions)
[-] It seems to be working fine
<*> WM_NCPAINT: see the behavior under LCL
[*] Is not handled. TControl will never receive it
< > TVMGet* functions: probably it can be ignored, since is windows specific and not necessary at all
< > See if WM_COPY can be mapped to LM_COPYTOCLIP
< > See WM_ENABLE,WM_GETDLGCODE behavior under lcl/win32
< > See function of WM_GETOBJECT and if is necessary to add to LCL
< > See the difference between TWMPaint and TLMPaint
<*> See the difference between TWMPaint and TLMPaint
[*] TLMPaint GetUpdateRect returna an empty rect unlike TWMPaint.
< > TWMPrint and WM_PRINT. See if is necessary
< > In SetCursor uses TLMessage. Investigate
<*> In SetCursor uses TLMessage. Investigate > REMOVED
< > See if GetRGBColor is necessary. Probably not. If so remove color constants
< > Found no way to replace ValidateRect in Hint Window animation. See how to replace it
< > See if the typecasts to longword in TVirtualTreeColumn.LoadFromStream is correct
@ -187,11 +197,11 @@ Port started in 26/01/07
But GetUpdateRect will always return an empty Rect when called inside LM_PAINT because there's a
prior BeginPaint call
< > In TWMKillfocus the code to nullify the active control is probably not necessary
< > See if DeleteObject is necessary in AdjustCursorPanning
<*> See if DeleteObject is necessary in AdjustCursorPanning > Removed
< > See if WHEEL_ constants are valids under gtk
< > See if is necessary WM_SYSCOLORCHANGE
< > See if is necessary handle LM_SETCURSOR (not used in LCL)
< > See how replace CreateParams
<*> See if is necessary handle LM_SETCURSOR (not used in LCL). Removed
<?> See how replace CreateParams
< > See if Canvas Respect TextStyle properties and if is necessary to set the bk in PaintNormalText
< > IStream.SetSize expects ULARGE_INTEGER instead of LARGE_INTEGER
< > Remove TRect copy in FillRect

View File

@ -0,0 +1,9 @@
object Form1: TForm1
Left = 404
Height = 300
Top = 152
Width = 400
HorzScrollBar.Page = 399
VertScrollBar.Page = 299
Caption = 'Form1'
end

View File

@ -0,0 +1,36 @@
unit registervirtualtreeview;
{$Mode ObjFpc}
{$H+}
interface
uses
Classes, SysUtils, LResources, LazarusPackageIntf,
VirtualTrees, VTHeaderPopup;
procedure Register;
implementation
procedure RegisterUnitVirtualTrees;
begin
RegisterComponents('Virtual Treeview', [TVirtualDrawTree,TVirtualStringTree]);
end;
procedure RegisterUnitVTHeaderPopup;
begin
RegisterComponents('Virtual Treeview', [TVTHeaderPopupMenu]);
end;
procedure Register;
begin
RegisterUnit('VirtualTrees',@RegisterUnitVirtualTrees);
RegisterUnit('VTHeaderPopup',@RegisterUnitVTHeaderPopup);
end;
initialization
{$i ideicons.lrs}
end.

View File

@ -1 +1,3 @@
lazres ..\virtualtrees.lrs VT_HEADERSPLIT.cur VT_MOVEALL.cur VT_MOVEE.cur VT_MOVEEW.cur VT_MOVEN.cur VT_MOVENE.cur VT_MOVENS.cur VT_MOVENW.cur VT_MOVES.cur VT_MOVESE.cur VT_MOVESW.cur VT_MOVEW.cur VT_XPBUTTONPLUS.bmp VT_XPBUTTONMINUS.bmp VT_CHECK_LIGHT.bmp VT_CHECK_DARK.bmp VT_FLAT.bmp VT_TICK_DARK.bmp VT_TICK_LIGHT.bmp VT_UTILITIES.bmp VT_XP.bmp VT_MOVENS_BMP.bmp VT_MOVEEW_BMP.bmp VT_MOVEALL_BMP.bmp
lazres ..\virtualtrees.lrs VT_HEADERSPLIT.cur VT_MOVEALL.cur VT_MOVEE.cur VT_MOVEEW.cur VT_MOVEN.cur VT_MOVENE.cur VT_MOVENS.cur VT_MOVENW.cur VT_MOVES.cur VT_MOVESE.cur VT_MOVESW.cur VT_MOVEW.cur VT_XPBUTTONPLUS.bmp VT_XPBUTTONMINUS.bmp VT_CHECK_LIGHT.bmp VT_CHECK_DARK.bmp VT_FLAT.bmp VT_TICK_DARK.bmp VT_TICK_LIGHT.bmp VT_UTILITIES.bmp VT_XP.bmp VT_MOVENS_BMP.bmp VT_MOVEEW_BMP.bmp VT_MOVEALL_BMP.bmp
lazres ..\ideicons.lrs tvirtualdrawtree.xpm tvirtualstringtree.xpm tvtheaderpopupmenu.xpm

View File

@ -0,0 +1,35 @@
/* XPM */
static char * tvirtualdrawtree_xpm[] = {
"24 24 9 1",
". c #000000",
"+ c None",
"@ c #808000",
"# c #20A080",
"$ c #808080",
"% c #C0A000",
"& c #C0C0C0",
"* c #FFFFFF",
"++++++..++++++++++++++++",
"+++++.&&.............+++",
"++++.***&&&&&&&&&&$$@.++",
"++++.************@$$$.++",
"+++.************@$$$$.++",
"++++...@********.$$$$.++",
"+++++++.........$$$$@+++",
"+++++++.$$$$$$$$***$.+++",
"+++++++.*******%***&.+++",
"+++++++.*.****%%%**$.+++",
"+++++++.*...*%%%%%*.++++",
"+++++++.*.**%%%%%%%.++++",
"++++++.**.***####**.++++",
"+++++.$**.**######*.++++",
"+++++.&**..*######*.++++",
"+++++.******######*.++++",
"+++++.*******####**&.+++",
"+...+.***.....******.+++",
"+.&&@....&&&&&.****$.+++",
"+.&&&&&&&&&&&&&.**&.++++",
"++.$&&&&&&&&&&&.&&&.++++",
"++.$$$$$$$$$$$$$.&.+++++",
"+++...............++++++",
"++++++++++++++++++++++++"};

View File

@ -0,0 +1,35 @@
/* XPM */
static char * tvirtualexplorertree_xpm[] = {
"24 24 9 1",
". c #000000",
"+ c None",
"@ c #808000",
"# c #808080",
"$ c #C0C0C0",
"% c #E0E000",
"& c #E0E080",
"* c #FFFFFF",
"++++++..++++++++++++++++",
"+++++.$$.............+++",
"++++.***$$$$$$$$$$##@.++",
"++++.************@###.++",
"+++.************@####.++",
"++++...@********.####.++",
"+++++++.........####@+++",
"+++++++.########***#.+++",
"+++++++.***********$.+++",
"+++++++.**@@@@*****#.+++",
"+++++++.*@&&&&@****.++++",
"+++++++.*@&&&&%@@@*.++++",
"++++++.**@&&&%%%%@*.++++",
"+++++.#**@&%%%@%@@*.++++",
"+++++.$**@&%%@%@%@*.++++",
"+++++.***@@@@@@@@@*.++++",
"+++++.*************$.+++",
"+...+.***.....******.+++",
"+.$$@....$$$$$.****#.+++",
"+.$$$$$$$$$$$$$.**$.++++",
"++.#$$$$$$$$$$$.$$$.++++",
"++.#############.$.+++++",
"+++...............++++++",
"++++++++++++++++++++++++"};

View File

@ -0,0 +1,35 @@
/* XPM */
static char * tvirtualstringtree_xpm[] = {
"24 24 9 1",
". c #000000",
"+ c None",
"@ c #808000",
"# c #20A080",
"$ c #808080",
"% c #C0A000",
"& c #C0C0C0",
"* c #FFFFFF",
"++++++..++++++++++++++++",
"+++++.&&.............+++",
"++++.***&&&&&&&&&&$$@.++",
"++++.************@$$$.++",
"+++.************@$$$$.++",
"++++...@********.$$$$.++",
"+++++++.........$$$$@+++",
"+++++++.$$$$$$$$***$.+++",
"+++++++.***********&.+++",
"+++++++.*.**......*$.+++",
"+++++++.*....%%%%.*.++++",
"+++++++.*.**......*.++++",
"++++++.**.*********.++++",
"+++++.$**.**......*.++++",
"+++++.&**....####.*.++++",
"+++++.******......*.++++",
"+++++.*************&.+++",
"+...+.***.....******.+++",
"+.&&@....&&&&&.****$.+++",
"+.&&&&&&&&&&&&&.**&.++++",
"++.$&&&&&&&&&&&.&&&.++++",
"++.$$$$$$$$$$$$$.&.+++++",
"+++...............++++++",
"++++++++++++++++++++++++"};

View File

@ -0,0 +1,34 @@
/* XPM */
static char * tvtheaderpopupmenu_xpm[] = {
"24 24 8 1",
". c #000000",
"+ c #000080",
"@ c None",
"# c #808000",
"$ c #808080",
"% c #C0C0C0",
"& c #FFFFFF",
"@@@@@@..@@@@@@@@@@@@@@@@",
"@@@@@.%%.............@@@",
"@@@@.&&&%%%%%%%%%%$$#.@@",
"@@@@.&&&&&&&&&&&&#$$$.@@",
"@@@.&&&&&&&&&&&&#$$$$.@@",
"@@@@...#&&&&&&&&.$$$$.@@",
"@@@@@@@.........$$$$#@@@",
"@@@@@@@.$$$$$$$$&&&$.@@@",
"@@@@@@@.$&&&&&&.&&&%.@@@",
"@@@@@@@.$&+++&&.&&&$.@@@",
"@@@@@@@.$&&&&&&.&&&.@@@@",
"@@@@@@@.$&+++++.&&&.@@@@",
"@@@@@@.&$+&&&+&+&&&.@@@@",
"@@@@@.$&$&++++&&+&&.@@@@",
"@@@@@.%&$&&&&+&&&+&.@@@@",
"@@@@@.&&$....+&&&&+.@@@@",
"@@@@@.&&&&&&&+&&&++++@@@",
"@...@.&&&....+&&&&+&.@@@",
"@.%%#....%%%%+&++&&+.@@@",
"@.%%%%%%%%%%%++$+&&+@@@@",
"@@.$%%%%%%%%%+%.%+&&+@@@",
"@@.$$$$$$$$$$$$$.+&&+@@@",
"@@@...............++@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@"};

View File

@ -1,12 +1,14 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<PathDelim Value="\"/>
<Name Value="virtualtreeview_package"/>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="units/$(LCLWidgetType)/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
<OtherUnitFiles Value="units\$(LCLWidgetType)\"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
@ -15,38 +17,47 @@
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="3">
<Files Count="5">
<Item1>
<Filename Value="virtualtrees.lrs"/>
<Type Value="LRS"/>
</Item1>
<Item2>
<Filename Value="VirtualTrees.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="VirtualTrees"/>
</Item2>
<Item3>
<Filename Value="VTHeaderPopup.pas"/>
<UnitName Value="VTHeaderPopup"/>
</Item3>
<Item4>
<Filename Value="registervirtualtreeview.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="registervirtualtreeview"/>
</Item4>
<Item5>
<Filename Value="ideicons.lrs"/>
<Type Value="LRS"/>
</Item5>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="3">
<Item1>
<PackageName Value="lclextensions_package"/>
<PackageName Value="multiloglaz"/>
</Item1>
<Item2>
<PackageName Value="multiloglaz"/>
<PackageName Value="lclextensions_package"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)/"/>
<UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>

View File

@ -7,13 +7,13 @@ unit virtualtreeview_package;
interface
uses
VirtualTrees, VTHeaderPopup, LazarusPackageIntf;
VirtualTrees, VTHeaderPopup, registervirtualtreeview, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('VirtualTrees', @VirtualTrees.Register);
RegisterUnit('registervirtualtreeview', @registervirtualtreeview.Register);
end;
initialization