From 54a8e6dadcd70d6f3aeec60f7faa804c730e6683 Mon Sep 17 00:00:00 2001 From: wp Date: Mon, 21 Jan 2019 14:57:14 +0000 Subject: [PATCH] VirtualTreeView: Rename package and files with prefix "laz.", register component names with prefix "Laz", to allow the user to install other versions of VTV. OnlinePackageManager: Adapt to the new virtualtreeview package. git-svn-id: trunk@60132 - --- .gitattributes | 281 ++- .../onlinepackagemanager.lpk | 2 +- .../opkman_categoriesfrm.pas | 8 +- .../opkman_createjsonforupdatesfrm.pas | 16 +- .../opkman_createrepositoryfrm.pas | 18 +- .../opkman_createrepositorypackagefrm.pas | 12 +- .../onlinepackagemanager/opkman_installer.pas | 2 +- .../opkman_intf_packagelistfrm.pas | 16 +- .../onlinepackagemanager/opkman_mainfrm.pas | 2 +- .../opkman_packagelistfrm.pas | 6 +- .../opkman_progressfrm.pas | 6 +- .../opkman_repositories.pas | 20 +- .../onlinepackagemanager/opkman_showhint.pas | 2 +- .../opkman_visualtree.pas | 20 +- components/virtualtreeview/Makefile | 178 +- components/virtualtreeview/Makefile.compiled | 2 +- components/virtualtreeview/Makefile.fpc | 12 +- ...aldrawtree.png => tlazvirtualdrawtree.png} | Bin ...ee_150.png => tlazvirtualdrawtree_150.png} | Bin ...ee_200.png => tlazvirtualdrawtree_200.png} | Bin ...ringtree.png => tlazvirtualstringtree.png} | Bin ..._150.png => tlazvirtualstringtree_150.png} | Bin ..._200.png => tlazvirtualstringtree_200.png} | Bin ...opupmenu.png => tlazvtheaderpopupmenu.png} | Bin ..._150.png => tlazvtheaderpopupmenu_150.png} | Bin ..._200.png => tlazvtheaderpopupmenu_200.png} | Bin .../components/tvirtualexplorertree.png | Bin 1068 -> 0 bytes .../components/tvirtualexplorertree_150.png | Bin 1719 -> 0 bytes .../components/tvirtualexplorertree_200.png | Bin 2200 -> 0 bytes .../virtualtreeview/images/ideicons_list.txt | 21 +- ...t_check_dark.png => laz_vt_check_dark.png} | Bin ...dark_150.png => laz_vt_check_dark_150.png} | Bin ...dark_200.png => laz_vt_check_dark_200.png} | Bin ...check_light.png => laz_vt_check_light.png} | Bin ...ght_150.png => laz_vt_check_light_150.png} | Bin ...ght_200.png => laz_vt_check_light_200.png} | Bin .../images/{vt_flat.png => laz_vt_flat.png} | Bin .../{vt_flat_150.png => laz_vt_flat_150.png} | Bin .../{vt_flat_200.png => laz_vt_flat_200.png} | Bin ...headersplit.cur => laz_vt_headersplit.cur} | Bin .../{vt_moveall.cur => laz_vt_moveall.cur} | Bin ...moveall_bmp.png => laz_vt_moveall_bmp.png} | Bin ...bmp_150.png => laz_vt_moveall_bmp_150.png} | Bin ...bmp_200.png => laz_vt_moveall_bmp_200.png} | Bin .../images/{vt_movee.cur => laz_vt_movee.cur} | Bin .../{vt_moveew.cur => laz_vt_moveew.cur} | Bin ...t_moveew_bmp.png => laz_vt_moveew_bmp.png} | Bin ..._bmp_150.png => laz_vt_moveew_bmp_150.png} | Bin ..._bmp_200.png => laz_vt_moveew_bmp_200.png} | Bin .../images/{vt_moven.cur => laz_vt_moven.cur} | Bin .../{vt_movene.cur => laz_vt_movene.cur} | Bin .../{vt_movens.cur => laz_vt_movens.cur} | Bin ...t_movens_bmp.png => laz_vt_movens_bmp.png} | Bin ..._bmp_150.png => laz_vt_movens_bmp_150.png} | Bin ..._bmp_200.png => laz_vt_movens_bmp_200.png} | Bin .../{vt_movenw.cur => laz_vt_movenw.cur} | Bin .../images/{vt_moves.cur => laz_vt_moves.cur} | Bin .../{vt_movese.cur => laz_vt_movese.cur} | Bin .../{vt_movesw.cur => laz_vt_movesw.cur} | Bin .../images/{vt_movew.cur => laz_vt_movew.cur} | Bin ...{vt_tick_dark.png => laz_vt_tick_dark.png} | Bin ..._dark_150.png => laz_vt_tick_dark_150.png} | Bin ..._dark_200.png => laz_vt_tick_dark_200.png} | Bin ...t_tick_light.png => laz_vt_tick_light.png} | Bin ...ight_150.png => laz_vt_tick_light_150.png} | Bin ...ight_200.png => laz_vt_tick_light_200.png} | Bin ...{vt_utilities.png => laz_vt_utilities.png} | Bin ...ities_150.png => laz_vt_utilities_150.png} | Bin ...ities_200.png => laz_vt_utilities_200.png} | Bin ...{vt_vertsplit.cur => laz_vt_vertsplit.cur} | Bin .../images/{vt_xp.png => laz_vt_xp.png} | Bin .../{vt_xp_150.png => laz_vt_xp_150.png} | Bin .../{vt_xp_200.png => laz_vt_xp_200.png} | Bin ...ttonminus.png => laz_vt_xpbuttonminus.png} | Bin ...s_150.png => laz_vt_xpbuttonminus_150.png} | Bin ...s_200.png => laz_vt_xpbuttonminus_200.png} | Bin ...buttonplus.png => laz_vt_xpbuttonplus.png} | Bin ...us_150.png => laz_vt_xpbuttonplus_150.png} | Bin ...us_200.png => laz_vt_xpbuttonplus_200.png} | Bin .../virtualtreeview/images/make_res.bat | 4 +- .../images/virtualtrees_list.txt | 98 +- .../include/intf/carbon/laz.olemethods.inc | 2 + .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 .../intf/carbon/laz.vtvdragmanager.inc | 2 + .../include/intf/carbon/olemethods.inc | 2 - .../include/intf/carbon/vtvdragmanager.inc | 2 - .../include/intf/cocoa/laz.olemethods.inc | 2 + .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 .../include/intf/cocoa/laz.vtvdragmanager.inc | 2 + .../include/intf/cocoa/olemethods.inc | 2 - .../include/intf/cocoa/vtvdragmanager.inc | 2 - .../include/intf/gtk/laz.olemethods.inc | 2 + .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 .../include/intf/gtk/laz.vtvdragmanager.inc | 2 + .../include/intf/gtk/olemethods.inc | 2 - .../include/intf/gtk/vtvdragmanager.inc | 2 - .../include/intf/gtk2/laz.olemethods.inc | 2 + .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 .../include/intf/gtk2/laz.vtvdragmanager.inc | 2 + .../include/intf/gtk2/olemethods.inc | 2 - .../include/intf/gtk2/vtvdragmanager.inc | 2 - ...agmanager.inc => laz.dummydragmanager.inc} | 0 ...olemethods.inc => laz.dummyolemethods.inc} | 0 .../include/intf/qt/laz.olemethods.inc | 2 + .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 .../include/intf/qt/laz.vtvdragmanager.inc | 2 + .../include/intf/qt/olemethods.inc | 2 - .../include/intf/qt/vtvdragmanager.inc | 2 - .../include/intf/qt5/laz.olemethods.inc | 2 + .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 .../include/intf/qt5/laz.vtvdragmanager.inc | 2 + .../include/intf/qt5/olemethods.inc | 2 - .../include/intf/qt5/vtvdragmanager.inc | 2 - .../{olemethods.inc => laz.olemethods.inc} | 0 .../{vtgraphicsi.inc => laz.vtgraphicsi.inc} | 0 ...dragmanager.inc => laz.vtvdragmanager.inc} | 0 ...tualTrees.fi.po => laz.virtualtrees.fi.po} | 32 +- ...tualTrees.fr.po => laz.virtualtrees.fr.po} | 32 +- ...tualTrees.hu.po => laz.virtualtrees.hu.po} | 16 +- ...tualTrees.lt.po => laz.virtualtrees.lt.po} | 0 .../{VirtualTrees.po => laz.virtualtrees.po} | 16 +- ...ees.pt_BR.po => laz.virtualtrees.pt_BR.po} | 32 +- ...tualTrees.ru.po => laz.virtualtrees.ru.po} | 32 +- ...tualTrees.uk.po => laz.virtualtrees.uk.po} | 32 +- ...ees.zh_CN.po => laz.virtualtrees.zh_CN.po} | 16 +- ...derPopup.fr.po => laz.vtheaderpopup.fr.po} | 4 +- ...derPopup.hu.po => laz.vtheaderpopup.hu.po} | 2 +- ...{VTHeaderPopup.po => laz.vtheaderpopup.po} | 2 +- ...up.pt_BR.po => laz.vtheaderpopup.pt_BR.po} | 2 +- ...derPopup.ru.po => laz.vtheaderpopup.ru.po} | 2 +- ...derPopup.uk.po => laz.vtheaderpopup.uk.po} | 2 +- ...up.zh_CN.po => laz.vtheaderpopup.zh_CN.po} | 2 +- .../{ideicons.res => laz.ideicons.res} | Bin 21612 -> 16428 bytes ...{lclconstants.inc => laz.lclconstants.inc} | 0 ...{lclfunctions.inc => laz.lclfunctions.inc} | 0 .../laz.registervirtualtreeview.pas | 38 + ...{VirtualTrees.pas => laz.virtualtrees.pas} | 62 +- ...{VirtualTrees.res => laz.virtualtrees.res} | Bin 87752 -> 88144 bytes ...ge.lpk => laz.virtualtreeview_package.lpk} | 38 +- .../laz.virtualtreeview_package.pas | 24 + ...essibility.pas => laz.vtaccessibility.pas} | 6 +- ...ory.pas => laz.vtaccessibilityfactory.pas} | 4 +- .../{VTConfig.inc => laz.vtconfig.inc} | 0 .../{VTGraphics.pas => laz.vtgraphics.pas} | 4 +- ...THeaderPopup.pas => laz.vtheaderpopup.pas} | 5 +- ...{VTIDEEditors.pas => laz.vtideeditors.pas} | 6 +- .../{vtlogger.pas => laz.vtlogger.pas} | 4 +- .../registervirtualtreeview.pas | 37 - .../units/carbon/fakeactivex.pas | 3 - .../units/carbon/laz.fakeactivex.pas | 3 + .../laz.fakemmsystem.pas} | 2 +- .../laz.virtualdragmanager.pas} | 4 +- .../laz.virtualpanningwindow.pas} | 4 +- .../units/cocoa/fakeactivex.pas | 3 - .../units/cocoa/laz.fakeactivex.pas | 3 + .../laz.fakemmsystem.pas} | 2 +- ...manager.pas => laz.virtualdragmanager.pas} | 4 +- .../laz.virtualpanningwindow.pas} | 4 +- .../virtualtreeview/units/gtk/fakeactivex.pas | 3 - .../units/gtk/laz.fakeactivex.pas | 3 + ...{fakemmsystem.pas => laz.fakemmsystem.pas} | 2 +- .../laz.virtualdragmanager.pas} | 4 +- .../laz.virtualpanningwindow.pas} | 4 +- .../units/gtk2/fakeactivex.pas | 3 - .../units/gtk2/laz.fakeactivex.pas | 3 + ...{fakemmsystem.pas => laz.fakemmsystem.pas} | 2 +- .../laz.virtualdragmanager.pas} | 4 +- .../laz.virtualpanningwindow.pas} | 4 +- ...{dummyactivex.inc => laz.dummyactivex.inc} | 0 .../virtualtreeview/units/qt/fakeactivex.pas | 3 - .../units/qt/laz.fakeactivex.pas | 3 + .../laz.fakemmsystem.pas} | 2 +- .../laz.virtualdragmanager.pas} | 4 +- .../units/qt/laz.virtualpanningwindow.pas | 58 + .../units/qt/virtualpanningwindow.pas | 58 - .../virtualtreeview/units/qt5/fakeactivex.pas | 3 - .../units/qt5/fakemmsystem.pas | 38 - .../units/qt5/laz.fakeactivex.pas | 3 + .../units/qt5/laz.fakemmsystem.pas | 38 + .../units/qt5/laz.virtualdragmanager.pas | 1629 +++++++++++++++++ .../units/qt5/laz.virtualpanningwindow.pas | 58 + .../units/qt5/virtualdragmanager.pas | 1629 ----------------- .../units/qt5/virtualpanningwindow.pas | 58 - ...manager.pas => laz.virtualdragmanager.pas} | 4 +- ...indow.pas => laz.virtualpanningwindow.pas} | 4 +- .../virtualtreeview_package.pas | 23 - 186 files changed, 2458 insertions(+), 2447 deletions(-) rename components/virtualtreeview/images/components/{tvirtualdrawtree.png => tlazvirtualdrawtree.png} (100%) rename components/virtualtreeview/images/components/{tvirtualdrawtree_150.png => tlazvirtualdrawtree_150.png} (100%) rename components/virtualtreeview/images/components/{tvirtualdrawtree_200.png => tlazvirtualdrawtree_200.png} (100%) rename components/virtualtreeview/images/components/{tvirtualstringtree.png => tlazvirtualstringtree.png} (100%) rename components/virtualtreeview/images/components/{tvirtualstringtree_150.png => tlazvirtualstringtree_150.png} (100%) rename components/virtualtreeview/images/components/{tvirtualstringtree_200.png => tlazvirtualstringtree_200.png} (100%) rename components/virtualtreeview/images/components/{tvtheaderpopupmenu.png => tlazvtheaderpopupmenu.png} (100%) rename components/virtualtreeview/images/components/{tvtheaderpopupmenu_150.png => tlazvtheaderpopupmenu_150.png} (100%) rename components/virtualtreeview/images/components/{tvtheaderpopupmenu_200.png => tlazvtheaderpopupmenu_200.png} (100%) delete mode 100644 components/virtualtreeview/images/components/tvirtualexplorertree.png delete mode 100644 components/virtualtreeview/images/components/tvirtualexplorertree_150.png delete mode 100644 components/virtualtreeview/images/components/tvirtualexplorertree_200.png rename components/virtualtreeview/images/{vt_check_dark.png => laz_vt_check_dark.png} (100%) rename components/virtualtreeview/images/{vt_check_dark_150.png => laz_vt_check_dark_150.png} (100%) rename components/virtualtreeview/images/{vt_check_dark_200.png => laz_vt_check_dark_200.png} (100%) rename components/virtualtreeview/images/{vt_check_light.png => laz_vt_check_light.png} (100%) rename components/virtualtreeview/images/{vt_check_light_150.png => laz_vt_check_light_150.png} (100%) rename components/virtualtreeview/images/{vt_check_light_200.png => laz_vt_check_light_200.png} (100%) rename components/virtualtreeview/images/{vt_flat.png => laz_vt_flat.png} (100%) rename components/virtualtreeview/images/{vt_flat_150.png => laz_vt_flat_150.png} (100%) rename components/virtualtreeview/images/{vt_flat_200.png => laz_vt_flat_200.png} (100%) rename components/virtualtreeview/images/{vt_headersplit.cur => laz_vt_headersplit.cur} (100%) rename components/virtualtreeview/images/{vt_moveall.cur => laz_vt_moveall.cur} (100%) rename components/virtualtreeview/images/{vt_moveall_bmp.png => laz_vt_moveall_bmp.png} (100%) rename components/virtualtreeview/images/{vt_moveall_bmp_150.png => laz_vt_moveall_bmp_150.png} (100%) rename components/virtualtreeview/images/{vt_moveall_bmp_200.png => laz_vt_moveall_bmp_200.png} (100%) rename components/virtualtreeview/images/{vt_movee.cur => laz_vt_movee.cur} (100%) rename components/virtualtreeview/images/{vt_moveew.cur => laz_vt_moveew.cur} (100%) rename components/virtualtreeview/images/{vt_moveew_bmp.png => laz_vt_moveew_bmp.png} (100%) rename components/virtualtreeview/images/{vt_moveew_bmp_150.png => laz_vt_moveew_bmp_150.png} (100%) rename components/virtualtreeview/images/{vt_moveew_bmp_200.png => laz_vt_moveew_bmp_200.png} (100%) rename components/virtualtreeview/images/{vt_moven.cur => laz_vt_moven.cur} (100%) rename components/virtualtreeview/images/{vt_movene.cur => laz_vt_movene.cur} (100%) rename components/virtualtreeview/images/{vt_movens.cur => laz_vt_movens.cur} (100%) rename components/virtualtreeview/images/{vt_movens_bmp.png => laz_vt_movens_bmp.png} (100%) rename components/virtualtreeview/images/{vt_movens_bmp_150.png => laz_vt_movens_bmp_150.png} (100%) rename components/virtualtreeview/images/{vt_movens_bmp_200.png => laz_vt_movens_bmp_200.png} (100%) rename components/virtualtreeview/images/{vt_movenw.cur => laz_vt_movenw.cur} (100%) rename components/virtualtreeview/images/{vt_moves.cur => laz_vt_moves.cur} (100%) rename components/virtualtreeview/images/{vt_movese.cur => laz_vt_movese.cur} (100%) rename components/virtualtreeview/images/{vt_movesw.cur => laz_vt_movesw.cur} (100%) rename components/virtualtreeview/images/{vt_movew.cur => laz_vt_movew.cur} (100%) rename components/virtualtreeview/images/{vt_tick_dark.png => laz_vt_tick_dark.png} (100%) rename components/virtualtreeview/images/{vt_tick_dark_150.png => laz_vt_tick_dark_150.png} (100%) rename components/virtualtreeview/images/{vt_tick_dark_200.png => laz_vt_tick_dark_200.png} (100%) rename components/virtualtreeview/images/{vt_tick_light.png => laz_vt_tick_light.png} (100%) rename components/virtualtreeview/images/{vt_tick_light_150.png => laz_vt_tick_light_150.png} (100%) rename components/virtualtreeview/images/{vt_tick_light_200.png => laz_vt_tick_light_200.png} (100%) rename components/virtualtreeview/images/{vt_utilities.png => laz_vt_utilities.png} (100%) rename components/virtualtreeview/images/{vt_utilities_150.png => laz_vt_utilities_150.png} (100%) rename components/virtualtreeview/images/{vt_utilities_200.png => laz_vt_utilities_200.png} (100%) rename components/virtualtreeview/images/{vt_vertsplit.cur => laz_vt_vertsplit.cur} (100%) rename components/virtualtreeview/images/{vt_xp.png => laz_vt_xp.png} (100%) rename components/virtualtreeview/images/{vt_xp_150.png => laz_vt_xp_150.png} (100%) rename components/virtualtreeview/images/{vt_xp_200.png => laz_vt_xp_200.png} (100%) rename components/virtualtreeview/images/{vt_xpbuttonminus.png => laz_vt_xpbuttonminus.png} (100%) rename components/virtualtreeview/images/{vt_xpbuttonminus_150.png => laz_vt_xpbuttonminus_150.png} (100%) rename components/virtualtreeview/images/{vt_xpbuttonminus_200.png => laz_vt_xpbuttonminus_200.png} (100%) rename components/virtualtreeview/images/{vt_xpbuttonplus.png => laz_vt_xpbuttonplus.png} (100%) rename components/virtualtreeview/images/{vt_xpbuttonplus_150.png => laz_vt_xpbuttonplus_150.png} (100%) rename components/virtualtreeview/images/{vt_xpbuttonplus_200.png => laz_vt_xpbuttonplus_200.png} (100%) create mode 100644 components/virtualtreeview/include/intf/carbon/laz.olemethods.inc rename components/virtualtreeview/include/intf/carbon/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/carbon/laz.vtvdragmanager.inc delete mode 100644 components/virtualtreeview/include/intf/carbon/olemethods.inc delete mode 100644 components/virtualtreeview/include/intf/carbon/vtvdragmanager.inc create mode 100644 components/virtualtreeview/include/intf/cocoa/laz.olemethods.inc rename components/virtualtreeview/include/intf/cocoa/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/cocoa/laz.vtvdragmanager.inc delete mode 100644 components/virtualtreeview/include/intf/cocoa/olemethods.inc delete mode 100644 components/virtualtreeview/include/intf/cocoa/vtvdragmanager.inc create mode 100644 components/virtualtreeview/include/intf/gtk/laz.olemethods.inc rename components/virtualtreeview/include/intf/gtk/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/gtk/laz.vtvdragmanager.inc delete mode 100644 components/virtualtreeview/include/intf/gtk/olemethods.inc delete mode 100644 components/virtualtreeview/include/intf/gtk/vtvdragmanager.inc create mode 100644 components/virtualtreeview/include/intf/gtk2/laz.olemethods.inc rename components/virtualtreeview/include/intf/gtk2/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/gtk2/laz.vtvdragmanager.inc delete mode 100644 components/virtualtreeview/include/intf/gtk2/olemethods.inc delete mode 100644 components/virtualtreeview/include/intf/gtk2/vtvdragmanager.inc rename components/virtualtreeview/include/intf/{dummydragmanager.inc => laz.dummydragmanager.inc} (100%) rename components/virtualtreeview/include/intf/{dummyolemethods.inc => laz.dummyolemethods.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/qt/laz.olemethods.inc rename components/virtualtreeview/include/intf/qt/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/qt/laz.vtvdragmanager.inc delete mode 100644 components/virtualtreeview/include/intf/qt/olemethods.inc delete mode 100644 components/virtualtreeview/include/intf/qt/vtvdragmanager.inc create mode 100644 components/virtualtreeview/include/intf/qt5/laz.olemethods.inc rename components/virtualtreeview/include/intf/qt5/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) create mode 100644 components/virtualtreeview/include/intf/qt5/laz.vtvdragmanager.inc delete mode 100644 components/virtualtreeview/include/intf/qt5/olemethods.inc delete mode 100644 components/virtualtreeview/include/intf/qt5/vtvdragmanager.inc rename components/virtualtreeview/include/intf/win32/{olemethods.inc => laz.olemethods.inc} (100%) rename components/virtualtreeview/include/intf/win32/{vtgraphicsi.inc => laz.vtgraphicsi.inc} (100%) rename components/virtualtreeview/include/intf/win32/{vtvdragmanager.inc => laz.vtvdragmanager.inc} (100%) rename components/virtualtreeview/languages/{VirtualTrees.fi.po => laz.virtualtrees.fi.po} (57%) rename components/virtualtreeview/languages/{VirtualTrees.fr.po => laz.virtualtrees.fr.po} (70%) rename components/virtualtreeview/languages/{VirtualTrees.hu.po => laz.virtualtrees.hu.po} (82%) rename components/virtualtreeview/languages/{VirtualTrees.lt.po => laz.virtualtrees.lt.po} (100%) rename components/virtualtreeview/languages/{VirtualTrees.po => laz.virtualtrees.po} (69%) rename components/virtualtreeview/languages/{VirtualTrees.pt_BR.po => laz.virtualtrees.pt_BR.po} (69%) rename components/virtualtreeview/languages/{VirtualTrees.ru.po => laz.virtualtrees.ru.po} (74%) rename components/virtualtreeview/languages/{VirtualTrees.uk.po => laz.virtualtrees.uk.po} (76%) rename components/virtualtreeview/languages/{VirtualTrees.zh_CN.po => laz.virtualtrees.zh_CN.po} (82%) rename components/virtualtreeview/languages/{VTHeaderPopup.fr.po => laz.vtheaderpopup.fr.po} (85%) rename components/virtualtreeview/languages/{VTHeaderPopup.hu.po => laz.vtheaderpopup.hu.po} (92%) rename components/virtualtreeview/languages/{VTHeaderPopup.po => laz.vtheaderpopup.po} (75%) rename components/virtualtreeview/languages/{VTHeaderPopup.pt_BR.po => laz.vtheaderpopup.pt_BR.po} (92%) rename components/virtualtreeview/languages/{VTHeaderPopup.ru.po => laz.vtheaderpopup.ru.po} (92%) rename components/virtualtreeview/languages/{VTHeaderPopup.uk.po => laz.vtheaderpopup.uk.po} (95%) rename components/virtualtreeview/languages/{VTHeaderPopup.zh_CN.po => laz.vtheaderpopup.zh_CN.po} (93%) rename components/virtualtreeview/{ideicons.res => laz.ideicons.res} (71%) rename components/virtualtreeview/{lclconstants.inc => laz.lclconstants.inc} (100%) rename components/virtualtreeview/{lclfunctions.inc => laz.lclfunctions.inc} (100%) create mode 100644 components/virtualtreeview/laz.registervirtualtreeview.pas rename components/virtualtreeview/{VirtualTrees.pas => laz.virtualtrees.pas} (99%) rename components/virtualtreeview/{VirtualTrees.res => laz.virtualtrees.res} (90%) rename components/virtualtreeview/{virtualtreeview_package.lpk => laz.virtualtreeview_package.lpk} (75%) create mode 100644 components/virtualtreeview/laz.virtualtreeview_package.pas rename components/virtualtreeview/{VTAccessibility.pas => laz.vtaccessibility.pas} (99%) rename components/virtualtreeview/{VTAccessibilityFactory.pas => laz.vtaccessibilityfactory.pas} (98%) rename components/virtualtreeview/{VTConfig.inc => laz.vtconfig.inc} (100%) rename components/virtualtreeview/{VTGraphics.pas => laz.vtgraphics.pas} (94%) rename components/virtualtreeview/{VTHeaderPopup.pas => laz.vtheaderpopup.pas} (98%) rename components/virtualtreeview/{VTIDEEditors.pas => laz.vtideeditors.pas} (89%) rename components/virtualtreeview/{vtlogger.pas => laz.vtlogger.pas} (97%) delete mode 100644 components/virtualtreeview/registervirtualtreeview.pas delete mode 100644 components/virtualtreeview/units/carbon/fakeactivex.pas create mode 100644 components/virtualtreeview/units/carbon/laz.fakeactivex.pas rename components/virtualtreeview/units/{cocoa/fakemmsystem.pas => carbon/laz.fakemmsystem.pas} (95%) rename components/virtualtreeview/units/{gtk2/virtualdragmanager.pas => carbon/laz.virtualdragmanager.pas} (99%) rename components/virtualtreeview/units/{gtk2/virtualpanningwindow.pas => carbon/laz.virtualpanningwindow.pas} (95%) delete mode 100644 components/virtualtreeview/units/cocoa/fakeactivex.pas create mode 100644 components/virtualtreeview/units/cocoa/laz.fakeactivex.pas rename components/virtualtreeview/units/{qt/fakemmsystem.pas => cocoa/laz.fakemmsystem.pas} (95%) rename components/virtualtreeview/units/cocoa/{virtualdragmanager.pas => laz.virtualdragmanager.pas} (99%) rename components/virtualtreeview/units/{gtk/virtualpanningwindow.pas => cocoa/laz.virtualpanningwindow.pas} (95%) delete mode 100644 components/virtualtreeview/units/gtk/fakeactivex.pas create mode 100644 components/virtualtreeview/units/gtk/laz.fakeactivex.pas rename components/virtualtreeview/units/gtk/{fakemmsystem.pas => laz.fakemmsystem.pas} (95%) rename components/virtualtreeview/units/{carbon/virtualdragmanager.pas => gtk/laz.virtualdragmanager.pas} (99%) rename components/virtualtreeview/units/{cocoa/virtualpanningwindow.pas => gtk/laz.virtualpanningwindow.pas} (95%) delete mode 100644 components/virtualtreeview/units/gtk2/fakeactivex.pas create mode 100644 components/virtualtreeview/units/gtk2/laz.fakeactivex.pas rename components/virtualtreeview/units/gtk2/{fakemmsystem.pas => laz.fakemmsystem.pas} (94%) rename components/virtualtreeview/units/{qt/virtualdragmanager.pas => gtk2/laz.virtualdragmanager.pas} (99%) rename components/virtualtreeview/units/{carbon/virtualpanningwindow.pas => gtk2/laz.virtualpanningwindow.pas} (95%) rename components/virtualtreeview/units/{dummyactivex.inc => laz.dummyactivex.inc} (100%) delete mode 100644 components/virtualtreeview/units/qt/fakeactivex.pas create mode 100644 components/virtualtreeview/units/qt/laz.fakeactivex.pas rename components/virtualtreeview/units/{carbon/fakemmsystem.pas => qt/laz.fakemmsystem.pas} (95%) rename components/virtualtreeview/units/{gtk/virtualdragmanager.pas => qt/laz.virtualdragmanager.pas} (99%) create mode 100644 components/virtualtreeview/units/qt/laz.virtualpanningwindow.pas delete mode 100644 components/virtualtreeview/units/qt/virtualpanningwindow.pas delete mode 100644 components/virtualtreeview/units/qt5/fakeactivex.pas delete mode 100644 components/virtualtreeview/units/qt5/fakemmsystem.pas create mode 100644 components/virtualtreeview/units/qt5/laz.fakeactivex.pas create mode 100644 components/virtualtreeview/units/qt5/laz.fakemmsystem.pas create mode 100644 components/virtualtreeview/units/qt5/laz.virtualdragmanager.pas create mode 100644 components/virtualtreeview/units/qt5/laz.virtualpanningwindow.pas delete mode 100644 components/virtualtreeview/units/qt5/virtualdragmanager.pas delete mode 100644 components/virtualtreeview/units/qt5/virtualpanningwindow.pas rename components/virtualtreeview/units/win32/{virtualdragmanager.pas => laz.virtualdragmanager.pas} (99%) rename components/virtualtreeview/units/win32/{virtualpanningwindow.pas => laz.virtualpanningwindow.pas} (98%) delete mode 100644 components/virtualtreeview/virtualtreeview_package.pas diff --git a/.gitattributes b/.gitattributes index a8ba4487d6..c0f822b6ea 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5513,151 +5513,148 @@ components/virtualtreeview/CHANGES.txt svneol=native#text/plain components/virtualtreeview/Makefile svneol=native#text/plain components/virtualtreeview/Makefile.compiled svneol=native#text/plain components/virtualtreeview/Makefile.fpc svneol=native#text/plain -components/virtualtreeview/VTAccessibility.pas svneol=native#text/pascal -components/virtualtreeview/VTAccessibilityFactory.pas svneol=native#text/pascal -components/virtualtreeview/VTConfig.inc svneol=native#text/plain -components/virtualtreeview/VTGraphics.pas svneol=native#text/pascal -components/virtualtreeview/VTHeaderPopup.pas svneol=native#text/pascal -components/virtualtreeview/VTIDEEditors.pas svneol=native#text/pascal -components/virtualtreeview/VirtualTrees.pas svneol=native#text/pascal -components/virtualtreeview/VirtualTrees.res -text -components/virtualtreeview/ideicons.res -text -components/virtualtreeview/images/components/tvirtualdrawtree.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualdrawtree_150.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualdrawtree_200.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualexplorertree.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualexplorertree_150.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualexplorertree_200.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualstringtree.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualstringtree_150.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvirtualstringtree_200.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvtheaderpopupmenu.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvtheaderpopupmenu_150.png -text svneol=unset#image/png -components/virtualtreeview/images/components/tvtheaderpopupmenu_200.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvirtualdrawtree.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvirtualdrawtree_150.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvirtualdrawtree_200.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvirtualstringtree.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvirtualstringtree_150.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvirtualstringtree_200.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvtheaderpopupmenu.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvtheaderpopupmenu_150.png -text svneol=unset#image/png +components/virtualtreeview/images/components/tlazvtheaderpopupmenu_200.png -text svneol=unset#image/png components/virtualtreeview/images/ideicons_list.txt svneol=native#text/plain +components/virtualtreeview/images/laz_vt_check_dark.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_check_dark_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_check_dark_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_check_light.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_check_light_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_check_light_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_flat.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_flat_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_flat_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_headersplit.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_moveall.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_moveall_bmp.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_moveall_bmp_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_moveall_bmp_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_movee.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_moveew.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_moveew_bmp.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_moveew_bmp_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_moveew_bmp_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_moven.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_movene.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_movens.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_movens_bmp.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_movens_bmp_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_movens_bmp_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_movenw.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_moves.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_movese.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_movesw.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_movew.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_tick_dark.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_tick_dark_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_tick_dark_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_tick_light.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_tick_light_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_tick_light_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_utilities.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_utilities_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_utilities_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_vertsplit.cur -text svneol=unset#image/x-icon +components/virtualtreeview/images/laz_vt_xp.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xp_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xp_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xpbuttonminus.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xpbuttonminus_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xpbuttonminus_200.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xpbuttonplus.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xpbuttonplus_150.png -text svneol=unset#image/png +components/virtualtreeview/images/laz_vt_xpbuttonplus_200.png -text svneol=unset#image/png components/virtualtreeview/images/make_res.bat svneol=native#text/plain components/virtualtreeview/images/virtualtrees_list.txt svneol=native#text/plain -components/virtualtreeview/images/vt_check_dark.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_check_dark_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_check_dark_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_check_light.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_check_light_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_check_light_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_flat.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_flat_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_flat_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_headersplit.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_moveall.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_moveall_bmp.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_moveall_bmp_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_moveall_bmp_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_movee.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_moveew.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_moveew_bmp.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_moveew_bmp_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_moveew_bmp_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_moven.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_movene.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_movens.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_movens_bmp.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_movens_bmp_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_movens_bmp_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_movenw.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_moves.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_movese.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_movesw.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_movew.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_tick_dark.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_tick_dark_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_tick_dark_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_tick_light.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_tick_light_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_tick_light_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_utilities.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_utilities_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_utilities_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_vertsplit.cur -text svneol=unset#image/x-icon -components/virtualtreeview/images/vt_xp.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xp_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xp_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xpbuttonminus.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xpbuttonminus_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xpbuttonminus_200.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xpbuttonplus.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xpbuttonplus_150.png -text svneol=unset#image/png -components/virtualtreeview/images/vt_xpbuttonplus_200.png -text svneol=unset#image/png -components/virtualtreeview/include/intf/carbon/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/carbon/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/carbon/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/cocoa/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/cocoa/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/cocoa/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/dummydragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/dummyolemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/gtk/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/gtk/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/gtk/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/gtk2/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/gtk2/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/gtk2/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/qt/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/qt/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/qt/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/qt5/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/qt5/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/qt5/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/include/intf/win32/olemethods.inc svneol=native#text/plain -components/virtualtreeview/include/intf/win32/vtgraphicsi.inc svneol=native#text/plain -components/virtualtreeview/include/intf/win32/vtvdragmanager.inc svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.fr.po svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.hu.po svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.po svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.pt_BR.po svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.ru.po svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.uk.po svneol=native#text/plain -components/virtualtreeview/languages/VTHeaderPopup.zh_CN.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.fi.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.fr.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.hu.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.lt.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.pt_BR.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.ru.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.uk.po svneol=native#text/plain -components/virtualtreeview/languages/VirtualTrees.zh_CN.po svneol=native#text/plain -components/virtualtreeview/lclconstants.inc svneol=native#text/plain -components/virtualtreeview/lclfunctions.inc svneol=native#text/plain -components/virtualtreeview/registervirtualtreeview.pas svneol=native#text/pascal -components/virtualtreeview/units/carbon/fakeactivex.pas svneol=native#text/pascal -components/virtualtreeview/units/carbon/fakemmsystem.pas svneol=native#text/pascal -components/virtualtreeview/units/carbon/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/carbon/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/units/cocoa/fakeactivex.pas svneol=native#text/pascal -components/virtualtreeview/units/cocoa/fakemmsystem.pas svneol=native#text/pascal -components/virtualtreeview/units/cocoa/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/cocoa/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/units/dummyactivex.inc svneol=native#text/plain -components/virtualtreeview/units/gtk/fakeactivex.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk/fakemmsystem.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk2/fakeactivex.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk2/fakemmsystem.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk2/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/gtk2/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/units/qt/fakeactivex.pas svneol=native#text/pascal -components/virtualtreeview/units/qt/fakemmsystem.pas svneol=native#text/pascal -components/virtualtreeview/units/qt/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/qt/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/units/qt5/fakeactivex.pas svneol=native#text/pascal -components/virtualtreeview/units/qt5/fakemmsystem.pas svneol=native#text/pascal -components/virtualtreeview/units/qt5/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/qt5/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/units/win32/virtualdragmanager.pas svneol=native#text/pascal -components/virtualtreeview/units/win32/virtualpanningwindow.pas svneol=native#text/pascal -components/virtualtreeview/virtualtreeview_package.lpk svneol=native#text/plain -components/virtualtreeview/virtualtreeview_package.pas svneol=native#text/pascal -components/virtualtreeview/vtlogger.pas svneol=native#text/pascal +components/virtualtreeview/include/intf/carbon/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/carbon/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/carbon/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/cocoa/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/cocoa/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/cocoa/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/gtk/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/gtk/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/gtk/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/gtk2/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/gtk2/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/gtk2/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/laz.dummydragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/laz.dummyolemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/qt/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/qt/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/qt/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/qt5/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/qt5/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/qt5/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/include/intf/win32/laz.olemethods.inc svneol=native#text/plain +components/virtualtreeview/include/intf/win32/laz.vtgraphicsi.inc svneol=native#text/plain +components/virtualtreeview/include/intf/win32/laz.vtvdragmanager.inc svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.fi.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.fr.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.hu.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.lt.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.pt_BR.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.ru.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.uk.po svneol=native#text/plain +components/virtualtreeview/languages/laz.virtualtrees.zh_CN.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.fr.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.hu.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.pt_BR.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.ru.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.uk.po svneol=native#text/plain +components/virtualtreeview/languages/laz.vtheaderpopup.zh_CN.po svneol=native#text/plain +components/virtualtreeview/laz.ideicons.res -text +components/virtualtreeview/laz.lclconstants.inc svneol=native#text/plain +components/virtualtreeview/laz.lclfunctions.inc svneol=native#text/plain +components/virtualtreeview/laz.registervirtualtreeview.pas svneol=native#text/pascal +components/virtualtreeview/laz.virtualtrees.pas svneol=native#text/pascal +components/virtualtreeview/laz.virtualtrees.res -text +components/virtualtreeview/laz.virtualtreeview_package.lpk svneol=native#text/plain +components/virtualtreeview/laz.virtualtreeview_package.pas svneol=native#text/pascal +components/virtualtreeview/laz.vtaccessibility.pas svneol=native#text/pascal +components/virtualtreeview/laz.vtaccessibilityfactory.pas svneol=native#text/pascal +components/virtualtreeview/laz.vtconfig.inc svneol=native#text/plain +components/virtualtreeview/laz.vtgraphics.pas svneol=native#text/pascal +components/virtualtreeview/laz.vtheaderpopup.pas svneol=native#text/pascal +components/virtualtreeview/laz.vtideeditors.pas svneol=native#text/pascal +components/virtualtreeview/laz.vtlogger.pas svneol=native#text/pascal +components/virtualtreeview/units/carbon/laz.fakeactivex.pas svneol=native#text/pascal +components/virtualtreeview/units/carbon/laz.fakemmsystem.pas svneol=native#text/pascal +components/virtualtreeview/units/carbon/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/carbon/laz.virtualpanningwindow.pas svneol=native#text/pascal +components/virtualtreeview/units/cocoa/laz.fakeactivex.pas svneol=native#text/pascal +components/virtualtreeview/units/cocoa/laz.fakemmsystem.pas svneol=native#text/pascal +components/virtualtreeview/units/cocoa/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/cocoa/laz.virtualpanningwindow.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk/laz.fakeactivex.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk/laz.fakemmsystem.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk/laz.virtualpanningwindow.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk2/laz.fakeactivex.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk2/laz.fakemmsystem.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk2/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/gtk2/laz.virtualpanningwindow.pas svneol=native#text/pascal +components/virtualtreeview/units/laz.dummyactivex.inc svneol=native#text/plain +components/virtualtreeview/units/qt/laz.fakeactivex.pas svneol=native#text/pascal +components/virtualtreeview/units/qt/laz.fakemmsystem.pas svneol=native#text/pascal +components/virtualtreeview/units/qt/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/qt/laz.virtualpanningwindow.pas svneol=native#text/pascal +components/virtualtreeview/units/qt5/laz.fakeactivex.pas svneol=native#text/pascal +components/virtualtreeview/units/qt5/laz.fakemmsystem.pas svneol=native#text/pascal +components/virtualtreeview/units/qt5/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/qt5/laz.virtualpanningwindow.pas svneol=native#text/pascal +components/virtualtreeview/units/win32/laz.virtualdragmanager.pas svneol=native#text/pascal +components/virtualtreeview/units/win32/laz.virtualpanningwindow.pas svneol=native#text/pascal components/vlc/README.txt svneol=native#text/plain components/vlc/lazvlc.lpk svneol=native#text/plain components/vlc/lazvlc.pas svneol=native#text/plain diff --git a/components/onlinepackagemanager/onlinepackagemanager.lpk b/components/onlinepackagemanager/onlinepackagemanager.lpk index a39769f771..d71478cfe7 100644 --- a/components/onlinepackagemanager/onlinepackagemanager.lpk +++ b/components/onlinepackagemanager/onlinepackagemanager.lpk @@ -155,7 +155,7 @@ For more info please visit: http://wiki.freepascal.org/Online_Package_Manager"/> - + diff --git a/components/onlinepackagemanager/opkman_categoriesfrm.pas b/components/onlinepackagemanager/opkman_categoriesfrm.pas index 3fce8b68e2..e5be6a64be 100644 --- a/components/onlinepackagemanager/opkman_categoriesfrm.pas +++ b/components/onlinepackagemanager/opkman_categoriesfrm.pas @@ -30,7 +30,7 @@ interface uses Classes, SysUtils, // LCL - Forms, Controls, Graphics, ExtCtrls, StdCtrls, ButtonPanel, VirtualTrees, + Forms, Controls, Graphics, ExtCtrls, StdCtrls, ButtonPanel, laz.VirtualTrees, // OpkMan opkman_const, opkman_common, opkman_options, opkman_maindm; @@ -49,7 +49,7 @@ type procedure FormKeyPress(Sender: TObject; var Key: char); procedure lbMessageResize(Sender: TObject); private - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; FModRes: TModalResult; FCategoriesCSV: String; FLineAdded: Boolean; @@ -117,7 +117,7 @@ procedure TCategoriesFrm.FormCreate(Sender: TObject); begin if not Options.UseDefaultTheme then Self.Color := clBtnFace; - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := Self; @@ -283,7 +283,7 @@ begin else Data^.FType := 0; end; - FVST.SortTree(0, VirtualTrees.sdAscending); + FVST.SortTree(0, laz.VirtualTrees.sdAscending); SL := TStringList.Create; try diff --git a/components/onlinepackagemanager/opkman_createjsonforupdatesfrm.pas b/components/onlinepackagemanager/opkman_createjsonforupdatesfrm.pas index 18f49e63e2..706c528a41 100644 --- a/components/onlinepackagemanager/opkman_createjsonforupdatesfrm.pas +++ b/components/onlinepackagemanager/opkman_createjsonforupdatesfrm.pas @@ -28,7 +28,7 @@ unit opkman_createjsonforupdatesfrm; interface uses - Classes, SysUtils, fpjson, VirtualTrees, + Classes, SysUtils, fpjson, laz.VirtualTrees, // LCL Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, LCLIntf, // OpkMan @@ -55,10 +55,10 @@ type procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; FMetaPackage: TMetaPackage; FSortCol: Integer; - FSortDir: VirtualTrees.TSortDirection; + FSortDir: laz.VirtualTrees.TSortDirection; procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String); procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; @@ -102,7 +102,7 @@ begin bHelp.Caption := rsCreateJSONForUpdatesFrm_bHelp_Caption; bClose.Caption := rsCreateJSONForUpdatesFrm_bClose_Caption; - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := Self; @@ -318,14 +318,14 @@ begin if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then begin SortColumn := HitInfo.Column; - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; end else begin - if SortDirection = VirtualTrees.sdAscending then - SortDirection := VirtualTrees.sdDescending + if SortDirection = laz.VirtualTrees.sdAscending then + SortDirection := laz.VirtualTrees.sdDescending else - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; FSortDir := SortDirection; end; SortTree(SortColumn, SortDirection, False); diff --git a/components/onlinepackagemanager/opkman_createrepositoryfrm.pas b/components/onlinepackagemanager/opkman_createrepositoryfrm.pas index 0d920fd1bf..f1b1be14b6 100644 --- a/components/onlinepackagemanager/opkman_createrepositoryfrm.pas +++ b/components/onlinepackagemanager/opkman_createrepositoryfrm.pas @@ -28,7 +28,7 @@ unit opkman_createrepositoryfrm; interface uses - Classes, SysUtils, FileUtil, fpjson, VirtualTrees, + Classes, SysUtils, FileUtil, fpjson, laz.VirtualTrees, // LCL Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Buttons, Menus, @@ -78,8 +78,8 @@ type procedure pnButtonsResize(Sender: TObject); procedure tmWaitTimer(Sender: TObject); private - FVSTPackages: TVirtualStringTree; - FVSTDetails: TVirtualStringTree; + FVSTPackages: TLazVirtualStringTree; + FVSTDetails: TLazVirtualStringTree; FRepository: TRepository; FSortDirection: TSortDirection; FSerializablePackages: TSerializablePackages; @@ -181,7 +181,7 @@ begin ShowHideControls(0); FSerializablePackages := TSerializablePackages.Create; - FVSTPackages := TVirtualStringTree.Create(nil); + FVSTPackages := TLazVirtualStringTree.Create(nil); with FVSTPackages do begin NodeDataSize := SizeOf(TData); @@ -222,7 +222,7 @@ begin OnFreeNode := @VSTPackagesFreeNode; end; - FVSTDetails := TVirtualStringTree.Create(nil); + FVSTDetails := TLazVirtualStringTree.Create(nil); with FVSTDetails do begin NodeDataSize := SizeOf(TData); @@ -825,14 +825,14 @@ begin if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then begin SortColumn := HitInfo.Column; - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; end else begin - if SortDirection = VirtualTrees.sdAscending then - SortDirection := VirtualTrees.sdDescending + if SortDirection = laz.VirtualTrees.sdAscending then + SortDirection := laz.VirtualTrees.sdDescending else - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; end; SortTree(SortColumn, SortDirection, False); FSortDirection := SortDirection; diff --git a/components/onlinepackagemanager/opkman_createrepositorypackagefrm.pas b/components/onlinepackagemanager/opkman_createrepositorypackagefrm.pas index 4a46c7db4b..a28b46a20d 100644 --- a/components/onlinepackagemanager/opkman_createrepositorypackagefrm.pas +++ b/components/onlinepackagemanager/opkman_createrepositorypackagefrm.pas @@ -28,7 +28,7 @@ unit opkman_createrepositorypackagefrm; interface uses - Classes, SysUtils, md5, fpjson, VirtualTrees, + Classes, SysUtils, md5, fpjson, laz.VirtualTrees, // LCL Forms, Controls, ExtCtrls, StdCtrls, Dialogs, Graphics, Buttons, EditBtn, // IDEIntf @@ -98,8 +98,8 @@ type procedure FormDestroy(Sender: TObject); procedure spCategoriesClick(Sender: TObject); private - FVSTPackages: TVirtualStringTree; - FVSTPackageData: TVirtualStringTree; + FVSTPackages: TLazVirtualStringTree; + FVSTPackageData: TLazVirtualStringTree; FPackageZipper: TPackageZipper; FPackageDir: String; FPackageName: String; @@ -219,7 +219,7 @@ begin if not Options.UseDefaultTheme then Self.Color := clBtnFace; - FVSTPackages := TVirtualStringTree.Create(nil); + FVSTPackages := TLazVirtualStringTree.Create(nil); with FVSTPackages do begin Parent := pnPackages; @@ -256,7 +256,7 @@ begin end; FVSTPackages.NodeDataSize := SizeOf(TData); - FVSTPackageData := TVirtualStringTree.Create(nil); + FVSTPackageData := TLazVirtualStringTree.Create(nil); with FVSTPackageData do begin Parent := pnData; @@ -497,7 +497,7 @@ begin FVSTPackages.Selected[RootNode] := True; CanGo := True; end; - FVSTPackages.SortTree(0, VirtualTrees.sdAscending); + FVSTPackages.SortTree(0, laz.VirtualTrees.sdAscending); end else MessageDlgEx(rsCreateRepositoryPackageFrm_NoPackage, mtInformation, [mbOk], Self); diff --git a/components/onlinepackagemanager/opkman_installer.pas b/components/onlinepackagemanager/opkman_installer.pas index a0636d53d3..ebff5db7db 100644 --- a/components/onlinepackagemanager/opkman_installer.pas +++ b/components/onlinepackagemanager/opkman_installer.pas @@ -266,7 +266,7 @@ begin if LazarusPkg.InternalVersion > LazarusPkg.InternalVersionOld then LazarusPkg.InternalVersionOld := LazarusPkg.InternalVersion; end; - if IDEPackage.PackageType in [lptRunAndDesignTime, lptDesigntime] then + if LazarusPkg.PackageType in [lptRunAndDesignTime, lptDesigntime] then begin DoOnPackageInstallProgress(imInstallPackage, LazarusPkg); if InstallPackage then diff --git a/components/onlinepackagemanager/opkman_intf_packagelistfrm.pas b/components/onlinepackagemanager/opkman_intf_packagelistfrm.pas index f6078196a0..5184da2a10 100644 --- a/components/onlinepackagemanager/opkman_intf_packagelistfrm.pas +++ b/components/onlinepackagemanager/opkman_intf_packagelistfrm.pas @@ -5,7 +5,7 @@ unit opkman_intf_packagelistfrm; interface uses - SysUtils, Classes, VirtualTrees, + SysUtils, Classes, laz.VirtualTrees, // LCL Forms, Controls, Buttons, Graphics, ExtCtrls, StdCtrls, LCLType, ButtonPanel, Menus, @@ -30,9 +30,9 @@ type procedure spCollapseClick(Sender: TObject); procedure spExpandClick(Sender: TObject); private - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; FSortCol: Integer; - FSortDir: VirtualTrees.TSortDirection; + FSortDir: laz.VirtualTrees.TSortDirection; procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String); procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; @@ -94,7 +94,7 @@ begin spCollapse.Caption := ''; spCollapse.Images := MainDM.Images; spCollapse.ImageIndex := IMG_COLLAPSE; - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := Self; @@ -222,14 +222,14 @@ begin if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then begin SortColumn := HitInfo.Column; - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; end else begin - if SortDirection = VirtualTrees.sdAscending then - SortDirection := VirtualTrees.sdDescending + if SortDirection = laz.VirtualTrees.sdAscending then + SortDirection := laz.VirtualTrees.sdDescending else - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; FSortDir := SortDirection; end; SortTree(SortColumn, SortDirection, False); diff --git a/components/onlinepackagemanager/opkman_mainfrm.pas b/components/onlinepackagemanager/opkman_mainfrm.pas index 5429dfdf76..4449c7d7f0 100644 --- a/components/onlinepackagemanager/opkman_mainfrm.pas +++ b/components/onlinepackagemanager/opkman_mainfrm.pas @@ -29,7 +29,7 @@ unit opkman_mainfrm; interface uses - Classes, SysUtils, fpjson, Graphics, VirtualTrees, + Classes, SysUtils, fpjson, Graphics, laz.VirtualTrees, // LCL Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Buttons, Menus, ComCtrls, Clipbrd, LCLIntf, LCLVersion, LCLProc, diff --git a/components/onlinepackagemanager/opkman_packagelistfrm.pas b/components/onlinepackagemanager/opkman_packagelistfrm.pas index 7c70b8cf3f..2dca477deb 100644 --- a/components/onlinepackagemanager/opkman_packagelistfrm.pas +++ b/components/onlinepackagemanager/opkman_packagelistfrm.pas @@ -28,7 +28,7 @@ interface uses SysUtils, // LCL - Forms, Controls, Graphics, ExtCtrls, StdCtrls, VirtualTrees, + Forms, Controls, Graphics, ExtCtrls, StdCtrls, laz.VirtualTrees, // OpkMan opkman_const, opkman_serializablepackages, opkman_options, opkman_visualtree, opkman_maindm; @@ -51,7 +51,7 @@ type procedure FormKeyPress(Sender: TObject; var Key: char); procedure lbMessageResize(Sender: TObject); private - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; FModRes: TModalResult; function GetCount: Integer; procedure SetupControls(const ATyp: Integer); @@ -211,7 +211,7 @@ procedure TPackageListFrm.FormCreate(Sender: TObject); begin if not Options.UseDefaultTheme then Self.Color := clBtnFace; - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := Self; diff --git a/components/onlinepackagemanager/opkman_progressfrm.pas b/components/onlinepackagemanager/opkman_progressfrm.pas index d95ff94216..265e5253e9 100644 --- a/components/onlinepackagemanager/opkman_progressfrm.pas +++ b/components/onlinepackagemanager/opkman_progressfrm.pas @@ -27,7 +27,7 @@ unit opkman_progressfrm; interface uses - SysUtils, Classes, VirtualTrees, + SysUtils, Classes, laz.VirtualTrees, // LCL Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, ExtCtrls, ButtonPanel, // OpkMan @@ -70,7 +70,7 @@ type FMdlRes: TModalResult; FType: Integer; FCnt, FTotCnt: Integer; - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String); procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; @@ -146,7 +146,7 @@ procedure TProgressFrm.FormCreate(Sender: TObject); begin if not Options.UseDefaultTheme then Self.Color := clBtnFace; - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := Self; diff --git a/components/onlinepackagemanager/opkman_repositories.pas b/components/onlinepackagemanager/opkman_repositories.pas index 75566d3e9d..466cd384a4 100644 --- a/components/onlinepackagemanager/opkman_repositories.pas +++ b/components/onlinepackagemanager/opkman_repositories.pas @@ -28,7 +28,7 @@ unit opkman_repositories; interface uses - Classes, SysUtils, VirtualTrees, + Classes, SysUtils, laz.VirtualTrees, // LCL Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, ButtonPanel, // OpkMan @@ -50,9 +50,9 @@ type procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; FSortCol: Integer; - FSortDir: VirtualTrees.TSortDirection; + FSortDir: laz.VirtualTrees.TSortDirection; procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String); procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; @@ -100,7 +100,7 @@ begin //ButtonPanel1.OKButton.Caption := rsRepositories_bOk_Caption; //ButtonPanel1.CancelButton.Caption := rsRepositories_bCancel_Caption; - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := Self; @@ -228,7 +228,7 @@ var begin Options.RemoteRepositoryTmp.Clear; FVST.BeginUpdate; - FVST.SortTree(0, VirtualTrees.sdAscending); + FVST.SortTree(0, laz.VirtualTrees.sdAscending); Node := FVST.GetFirst; while Assigned(Node) do begin @@ -314,14 +314,14 @@ begin if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then begin SortColumn := HitInfo.Column; - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; end else begin - if SortDirection = VirtualTrees.sdAscending then - SortDirection := VirtualTrees.sdDescending + if SortDirection = laz.VirtualTrees.sdAscending then + SortDirection := laz.VirtualTrees.sdDescending else - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; FSortDir := SortDirection; end; SortTree(SortColumn, SortDirection, False); @@ -401,7 +401,7 @@ begin Data^.FUniqueID := UniqueID; end; end; - FVST.SortTree(0, VirtualTrees.sdAscending); + FVST.SortTree(0, laz.VirtualTrees.sdAscending); Node := FVST.GetFirst; if Node <> nil then begin diff --git a/components/onlinepackagemanager/opkman_showhint.pas b/components/onlinepackagemanager/opkman_showhint.pas index e0097b3e86..3130a4ca60 100644 --- a/components/onlinepackagemanager/opkman_showhint.pas +++ b/components/onlinepackagemanager/opkman_showhint.pas @@ -35,7 +35,7 @@ uses //Interface LCLIntf, StdCtrls, //OpkMan - virtualtrees; + laz.virtualtrees; type diff --git a/components/onlinepackagemanager/opkman_visualtree.pas b/components/onlinepackagemanager/opkman_visualtree.pas index 9d695399fd..08709b1e5b 100644 --- a/components/onlinepackagemanager/opkman_visualtree.pas +++ b/components/onlinepackagemanager/opkman_visualtree.pas @@ -30,7 +30,7 @@ unit opkman_visualtree; interface uses - Classes, SysUtils, contnrs, Math, dateutils, VirtualTrees, + Classes, SysUtils, contnrs, Math, dateutils, laz.VirtualTrees, // LCL Controls, Graphics, Menus, Dialogs, Forms, LCLType, Buttons, // IDEIntf @@ -90,7 +90,7 @@ type TOnChecking = procedure(Sender: TObject; const AIsAllChecked: Boolean) of object; TVisualTree = class private - FVST: TVirtualStringTree; + FVST: TLazVirtualStringTree; FHoverNode: PVirtualNode; FHoverNodeOld: PVirtualNode; FHoverP: TPoint; @@ -98,7 +98,7 @@ type FLink: String; FLinkClicked: Boolean; FSortCol: Integer; - FSortDir: VirtualTrees.TSortDirection; + FSortDir: laz.VirtualTrees.TSortDirection; FCheckingNodes: Boolean; FLeaving: Boolean; FOnChecking: TOnChecking; @@ -169,7 +169,7 @@ type published property OnChecking: TOnChecking read FOnChecking write FOnChecking; property OnChecked: TNotifyEvent read FOnChecked write FOnChecked; - property VST: TVirtualStringTree read FVST; + property VST: TLazVirtualStringTree read FVST; property ShowHintFrm: TShowHintFrm read FShowHintFrm; end; @@ -186,7 +186,7 @@ uses constructor TVisualTree.Create(const AParent: TWinControl; const AImgList: TImageList; APopupMenu: TPopupMenu); begin - FVST := TVirtualStringTree.Create(nil); + FVST := TLazVirtualStringTree.Create(nil); with FVST do begin Parent := AParent; @@ -478,7 +478,7 @@ begin GrandChildData^.ButtonID := UniqueID; Data^.CommunityDescription := SerializablePackages.Items[I].CommunityDescription;; end; - FVST.SortTree(0, VirtualTrees.sdAscending); + FVST.SortTree(0, laz.VirtualTrees.sdAscending); ExpandEx; CollapseEx; RootNode := VST.GetFirst; @@ -1595,14 +1595,14 @@ begin if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then begin SortColumn := HitInfo.Column; - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; end else begin - if SortDirection = VirtualTrees.sdAscending then - SortDirection := VirtualTrees.sdDescending + if SortDirection = laz.VirtualTrees.sdAscending then + SortDirection := laz.VirtualTrees.sdDescending else - SortDirection := VirtualTrees.sdAscending; + SortDirection := laz.VirtualTrees.sdAscending; FSortDir := SortDirection; end; SortTree(SortColumn, SortDirection, False); diff --git a/components/virtualtreeview/Makefile b/components/virtualtreeview/Makefile index a0995825da..b2268bfb90 100644 --- a/components/virtualtreeview/Makefile +++ b/components/virtualtreeview/Makefile @@ -330,7 +330,7 @@ FPMAKE_SKIP_CONFIG=-n FPCFPMAKE=$(FPC) endif endif -override PACKAGE_NAME=virtualtreeview_package +override PACKAGE_NAME=laz.virtualtreeview_package override PACKAGE_VERSION=5.5.3.1 ifndef LCL_PLATFORM ifeq ($(OS_TARGET),win32) @@ -353,259 +353,259 @@ ifeq ($(OS_TARGET),darwin) DBG_OPTIONS=-gw endif ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-android) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-aros) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-macos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc-aix) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-netbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-openbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-iphonesim) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),x86_64-dragonfly) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-netbsd) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-gba) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-nds) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-android) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),arm-aros) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),powerpc64-aix) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),mips-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),mipsel-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),mipsel-android) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),jvm-java) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),jvm-android) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i8086-embedded) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i8086-msdos) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i8086-win16) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),aarch64-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),aarch64-darwin) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),wasm-wasm) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),sparc64-linux) -override TARGET_UNITS+=virtualtreeview_package.pas +override TARGET_UNITS+=laz.virtualtreeview_package.pas endif ifeq ($(FULL_TARGET),i386-linux) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) $(wildcard $(COMPILER_UNITTARGETDIR)/*.res) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) @@ -3461,9 +3461,9 @@ include fpcmake.loc endif .PHONY: cleartarget compiled all cleartarget: - -$(DEL) $(COMPILER_UNITTARGETDIR)/virtualtreeview_package$(PPUEXT) + -$(DEL) $(COMPILER_UNITTARGETDIR)/laz.virtualtreeview_package$(PPUEXT) compiled: - $(CPPROG) -f Makefile.compiled $(COMPILER_UNITTARGETDIR)/virtualtreeview_package.compiled -all: cleartarget $(COMPILER_UNITTARGETDIR) virtualtreeview_package$(PPUEXT) compiled + $(CPPROG) -f Makefile.compiled $(COMPILER_UNITTARGETDIR)/laz.virtualtreeview_package.compiled +all: cleartarget $(COMPILER_UNITTARGETDIR) laz.virtualtreeview_package$(PPUEXT) compiled distclean: clean ${DELTREE} lib/* diff --git a/components/virtualtreeview/Makefile.compiled b/components/virtualtreeview/Makefile.compiled index 2a2b15acfb..b2e903acc1 100644 --- a/components/virtualtreeview/Makefile.compiled +++ b/components/virtualtreeview/Makefile.compiled @@ -1,5 +1,5 @@ - + diff --git a/components/virtualtreeview/Makefile.fpc b/components/virtualtreeview/Makefile.fpc index e3146c8932..72f62f150d 100644 --- a/components/virtualtreeview/Makefile.fpc +++ b/components/virtualtreeview/Makefile.fpc @@ -1,11 +1,11 @@ # File generated automatically by Lazarus Package Manager # -# Makefile.fpc for virtualtreeview_package 5.5.3.1 +# Makefile.fpc for laz.virtualtreeview_package 5.5.3.1 # # This file was generated on 04.06.2018 [package] -name=virtualtreeview_package +name=laz.virtualtreeview_package version=5.5.3.1 [compiler] @@ -15,7 +15,7 @@ includedir=include/intf/$(LCL_PLATFORM) units include/intf options= -MObjFPC -Scgim -O1 -g -gl -l -vewnhibq -dLCL -dLCL$(LCL_PLATFORM) $(DBG_OPTIONS) [target] -units=virtualtreeview_package.pas +units=laz.virtualtreeview_package.pas [clean] files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ @@ -54,12 +54,12 @@ endif .PHONY: cleartarget compiled all cleartarget: - -$(DEL) $(COMPILER_UNITTARGETDIR)/virtualtreeview_package$(PPUEXT) + -$(DEL) $(COMPILER_UNITTARGETDIR)/laz.virtualtreeview_package$(PPUEXT) compiled: - $(CPPROG) -f Makefile.compiled $(COMPILER_UNITTARGETDIR)/virtualtreeview_package.compiled + $(CPPROG) -f Makefile.compiled $(COMPILER_UNITTARGETDIR)/laz.virtualtreeview_package.compiled -all: cleartarget $(COMPILER_UNITTARGETDIR) virtualtreeview_package$(PPUEXT) compiled +all: cleartarget $(COMPILER_UNITTARGETDIR) laz.virtualtreeview_package$(PPUEXT) compiled distclean: clean ${DELTREE} lib/* diff --git a/components/virtualtreeview/images/components/tvirtualdrawtree.png b/components/virtualtreeview/images/components/tlazvirtualdrawtree.png similarity index 100% rename from components/virtualtreeview/images/components/tvirtualdrawtree.png rename to components/virtualtreeview/images/components/tlazvirtualdrawtree.png diff --git a/components/virtualtreeview/images/components/tvirtualdrawtree_150.png b/components/virtualtreeview/images/components/tlazvirtualdrawtree_150.png similarity index 100% rename from components/virtualtreeview/images/components/tvirtualdrawtree_150.png rename to components/virtualtreeview/images/components/tlazvirtualdrawtree_150.png diff --git a/components/virtualtreeview/images/components/tvirtualdrawtree_200.png b/components/virtualtreeview/images/components/tlazvirtualdrawtree_200.png similarity index 100% rename from components/virtualtreeview/images/components/tvirtualdrawtree_200.png rename to components/virtualtreeview/images/components/tlazvirtualdrawtree_200.png diff --git a/components/virtualtreeview/images/components/tvirtualstringtree.png b/components/virtualtreeview/images/components/tlazvirtualstringtree.png similarity index 100% rename from components/virtualtreeview/images/components/tvirtualstringtree.png rename to components/virtualtreeview/images/components/tlazvirtualstringtree.png diff --git a/components/virtualtreeview/images/components/tvirtualstringtree_150.png b/components/virtualtreeview/images/components/tlazvirtualstringtree_150.png similarity index 100% rename from components/virtualtreeview/images/components/tvirtualstringtree_150.png rename to components/virtualtreeview/images/components/tlazvirtualstringtree_150.png diff --git a/components/virtualtreeview/images/components/tvirtualstringtree_200.png b/components/virtualtreeview/images/components/tlazvirtualstringtree_200.png similarity index 100% rename from components/virtualtreeview/images/components/tvirtualstringtree_200.png rename to components/virtualtreeview/images/components/tlazvirtualstringtree_200.png diff --git a/components/virtualtreeview/images/components/tvtheaderpopupmenu.png b/components/virtualtreeview/images/components/tlazvtheaderpopupmenu.png similarity index 100% rename from components/virtualtreeview/images/components/tvtheaderpopupmenu.png rename to components/virtualtreeview/images/components/tlazvtheaderpopupmenu.png diff --git a/components/virtualtreeview/images/components/tvtheaderpopupmenu_150.png b/components/virtualtreeview/images/components/tlazvtheaderpopupmenu_150.png similarity index 100% rename from components/virtualtreeview/images/components/tvtheaderpopupmenu_150.png rename to components/virtualtreeview/images/components/tlazvtheaderpopupmenu_150.png diff --git a/components/virtualtreeview/images/components/tvtheaderpopupmenu_200.png b/components/virtualtreeview/images/components/tlazvtheaderpopupmenu_200.png similarity index 100% rename from components/virtualtreeview/images/components/tvtheaderpopupmenu_200.png rename to components/virtualtreeview/images/components/tlazvtheaderpopupmenu_200.png diff --git a/components/virtualtreeview/images/components/tvirtualexplorertree.png b/components/virtualtreeview/images/components/tvirtualexplorertree.png deleted file mode 100644 index c504d00fce5a905f8fbd59e9b7cd2deee90f0c10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1068 zcmV+{1k?M8P)zB0p`j+xK+3{G zLGWO~LZpVyWS1_26d9w5WOp(% z$^7|xkXUE)$CT0shJojM-{<#!-*@43}S%FoZw4=pY(a&EV~XJEBj#oF2$1_lNY3@R=~{6%&@NO_Y#Q&SFhJ^ z4X;+KC>D!YSy=%g#Nx9oYXX1;Kq;M_n3!njy6(_*{Z>G!R6;Nq#PIO2#V-^Jx~6IQ zHh^iGq*N+-7Zw(74R2{~ZVo=5&*B{(9?H#T^HCdMe}DfMTwOdHkH^oG$>iY3$VlHX z04SHssMTsH7K=~X04+tM(GUE7KM93Gc=6;RUhe-0Q&YeaJKjiq4{m6pD<( z0JPshOK!LOK_ZcOohWBep8bkD_df^25}ZDM1TpogrIzJigMZ;`xX14S0FI81WJ!`9 zx7IrX0K6ZGM3_eTDLC%{G*tos2(h~mVs|ZtFaA7)^fY}9I5;@aS(Yty1wd%N z27^Id=C;wS{DtGxM%N=@?GAX}`49l0>pDbHbP_`T=n61RGwAdA6ha6mKhMH59)j>* z9H11GnxLj(`HPutz|a5yl}ZIX&r3TyJ4#mo!!RDF(`f>LRzC-E-+@v)1EnT#9d3eB z1JpF3$uHsdy$t}kxVQizq2(PX|GU>aU|Ck| z31AqeF3a*2%+OKU$#y>ce;Qy9Tmd9W0)We&0G4GhB}uXYz~mPPy~Fzu0f2Zs{;bhx zi~|6r6y)&o|ZG9XL zhn*ge=T<;07Q_1bI>O;FTJ@%BBArf4&1Q4^W~~hXL{U5o1OiMhmx~F4z;hf2MNuHj za>tM3I8aKFN~JJ3I0(Zqu(`RZoSvTkzPGpcc8pz&-xp6rK&fmRot}z0000xn*zFi{W_sgh%;x-kn5xN@88e(_;{Ja;dl%9A}3H|W24)5eln}z`x z9v&tdjZ$ArDe$nG&VM-gb;)M z{r%H=i9%ec;`DChEYo4_xml& zvi=HW&Xje5gb?3%I-S<3Q>P4@Aqaf(Qw$rFf1@SiGdJWT=Klm4`7&1oN@^M?sX3gb zefsn%(P-2VLVWhRemx)|g!tZx6DJJ2-A;VmPbxe`)pyV1+_5X;6nXkD;^Thell2qv-^nZy2blscFAbs-n5M831!`X$FMDLCTC}{C1xGVcr;4GR~Ku z{*h?lUKY^E$Oux(#I9YtM*I5uHUb5~`l9zTAplv1CsbX^Z< zXJuujWf+DHATjv`cDD!b`yU{Sva2>)qqSNp!djuV0<8&+`kC&(i!ffbEr~>eg@pwJ zShWk*1X4=5T`pIqMNwvytvlaFp-{dot~af#}5_+B&BpaolXG|A75T> zo4|~PUL{qzXC|#%jD(h#>s2Y5nVA7VYyF>sfPh77c{e4eMgWLUO^}?Q2CbI>(97rS z>(6>Qp<*!{!6?qI^s}?G09ckaRS=L;YIc5pUI7xdlq4BkHOuRYqb~cDPNh=Iz}8`rX|RhJAKKsX$35JLQBrBQ25B9Y+o<;xoe0@%BEFD)%CdF|;7gJBq}ZVom8 zo6Rgnm}`Of+C=MBR!HVt*~;6ZwO zd+F%tAYYt7Ab?>Qb3UIhy3&?;qpGSZ6pzP0a5x-PS67ovCO0)44hMJc+@YkTgqoTf zOw-I7;c%F%SFc*8X?6#L!B6u71%tsS)z#JS3=a?Q_IkZy%a$#xf^B4!m6h@A*)#6m zy^GiD#p!fr*>Bvq!ILLXgb?Dx$;ruyyg&dI6%~J%Ql5SA;DJXeB}z+6m+Dc0P7B?%%(U*7~&E7t#y{1*;KO<*G8>bn2{ N002ovPDHLkV1n*dH5>o{ diff --git a/components/virtualtreeview/images/components/tvirtualexplorertree_200.png b/components/virtualtreeview/images/components/tvirtualexplorertree_200.png deleted file mode 100644 index c0b456b20eb019e18db1a8da1e243ff505d8f693..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2200 zcmV;J2xs?+P)NGYF4DeqaW)<5_4_5C-^CSPZrot;`V8vO(C^MbO>AM-+ppZ53n z-%2gaOThm9`)v+~;|_4bYPE9m6|%34A^uK-4tNqi(mmKhf5jPX`W%<4?c|r_;&Bix;V@t1Afc1TI~=gvaB-Zntyv z=usRFN3u@SG%6}8@OV6Uy`V zbYQVqvfA72b^t6EOLF$hDnL<`Zh+&*k0XRAxPac?UI3b!n%K5&TTc5>C%$9RO#~p4}qV9G&dgfz4*iYBM%A z27qar@1~aLia@^*qHC)Jv!TAe9;efp)kfEK#>dB(DarRz>#_)B8;Z)S(&|S>MgWjf_5yNkeclhTl=24vU0o}aQg|vJ+OqoQRpbGR zO3Ojy&eo+7WpVN$zQ6x!J$?)i4+9{C_+-8I8+ix51JKdYkt~S5`8@7KE5^{5RvDKy zv{2U2lGCXknq%tScUTHM!3YPjXsff)#QZO%e7tD^&CShDpvh*laq!^5mCl3DJevuzI+>GFGBGicxF62YJU47MTceax)Ya8dR1|+yjPM)Gr4Yhm;rTyr zVJ?L?#ouDrkkKd>tsKR^I-z^<;sx{b^8hd0ZuhHA3jhuP)YjG}3-mWr07%0?8k-{z zU@Qw?`{)2nPEICnM>Dn0OMsMeFF;y(bWP$5+Q~HT76*c1$A{Cq4}cJ2a;pMdz^bH6p9=t>*zD*_^J&B&LE2nHetGnl|3~Lu z15i|6&03@gSZAf&m;en{wsa6rApnG0L@Y9&lW4LoB}!6CV)JtV*j(v{1+%lW0GOuv zVygnI09NaYxr{EvZ;F(71X9SZJTm60|44}>MW~d-7UF*FyPMNGotuk`lTyxXRe%9t znkE2dEQ&M?gb*0Qz*q{!31%Umcpp;9n^Gbp@dePfj(}h=zP2ceGP_j)Z(wCp9r4At zq*6*|?*A)K7g?ZKQLO35tc#0_0GOsZm$7L+{)G^;uo6;XD@Ejy=j01*ozVx92MMaG zMl!X{cO968l?d2(Ht>yKf4V`M8%IKbrfJbkHu+|wt0M6KLM#>oz~ypfJkv=&2kq_c zAG4fseo<&`ZROgvYkAvuc6OrcI!jASwvmyMb)%3Pf%dHu%mugG&C=3RZo_3HrfrMG zQk2mq<$fBdxqbUKyLRo`EXRyEbLI?zK!EA#X?E`1nOB>lq9VfKFj7htSXj>{RlqZ# z#_RR2%6STfii!#XfdFG;W0aMZ<<%xJ)2XVO@zgg}zysjhj~+duxq1C*Z7XPMYQp33 z@bKY74jnp_)7~`A#5y2@!C)wpUGg1J6y+ZPAAa~D!C;WZ#l?bNi9xx4|2}hbbA-d; ztk>AsSYjIe%yn3Y^dN5?m%l)n=~d{;`D{R`aI5tCB(0q>NRmHp+xg9rI9*=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: virtualtrees.scannotsetuserdata -msgctxt "virtualtrees.scannotsetuserdata" +#: laz.virtualtrees.scannotsetuserdata +msgctxt "laz.virtualtrees.scannotsetuserdata" msgid "Cannot set initial user data because there is not enough user data space allocated." msgstr "Неможливо встановити початкові дані користувача через нестачу виділеної для них пам'яті." -#: virtualtrees.sclipboardfailed -msgctxt "virtualtrees.sclipboardfailed" +#: laz.virtualtrees.sclipboardfailed +msgctxt "laz.virtualtrees.sclipboardfailed" msgid "Clipboard operation failed." msgstr "Операція з буфером обміну завершилась з помилкою." -#: virtualtrees.scorruptstream1 -msgctxt "virtualtrees.scorruptstream1" +#: laz.virtualtrees.scorruptstream1 +msgctxt "laz.virtualtrees.scorruptstream1" msgid "Stream data corrupt. A node's anchor chunk is missing." msgstr "Потік даних пошкоджено. Відсутня заголовкова послідовність елемента." -#: virtualtrees.scorruptstream2 -msgctxt "virtualtrees.scorruptstream2" +#: laz.virtualtrees.scorruptstream2 +msgctxt "laz.virtualtrees.scorruptstream2" msgid "Stream data corrupt. Unexpected data after node's end position." msgstr "Потік даних пошкоджено. Виявлено несподівані дані після кінця елемента." -#: virtualtrees.sstreamtoosmall -msgctxt "virtualtrees.sstreamtoosmall" +#: laz.virtualtrees.sstreamtoosmall +msgctxt "laz.virtualtrees.sstreamtoosmall" msgid "Unable to load tree structure, not enough data available." msgstr "Неможливо завантажити структуру дерева через нестачу даних." -#: virtualtrees.swrongmoveerror -msgctxt "virtualtrees.swrongmoveerror" +#: laz.virtualtrees.swrongmoveerror +msgctxt "laz.virtualtrees.swrongmoveerror" msgid "Target node cannot be a child node of the node to be moved." msgstr "Цільовий елемент не може бути дочірнім щодо переміщуваного." -#: virtualtrees.swrongstreamformat -msgctxt "virtualtrees.swrongstreamformat" +#: laz.virtualtrees.swrongstreamformat +msgctxt "laz.virtualtrees.swrongstreamformat" msgid "Unable to load tree structure, the format is wrong." msgstr "Неможливо завантажити структуру дерева через неправильний формат." -#: virtualtrees.swrongstreamversion -msgctxt "virtualtrees.swrongstreamversion" +#: laz.virtualtrees.swrongstreamversion +msgctxt "laz.virtualtrees.swrongstreamversion" msgid "Unable to load tree structure, the version is unknown." msgstr "Неможливо завантажити структуру дерева, невідома версія." diff --git a/components/virtualtreeview/languages/VirtualTrees.zh_CN.po b/components/virtualtreeview/languages/laz.virtualtrees.zh_CN.po similarity index 82% rename from components/virtualtreeview/languages/VirtualTrees.zh_CN.po rename to components/virtualtreeview/languages/laz.virtualtrees.zh_CN.po index 41893d40df..4d5891a163 100644 --- a/components/virtualtreeview/languages/VirtualTrees.zh_CN.po +++ b/components/virtualtreeview/languages/laz.virtualtrees.zh_CN.po @@ -12,35 +12,35 @@ msgstr "" "X-Generator: Poedit 1.8.7.1\n" "X-Poedit-SourceCharset: UTF-8\n" -#: virtualtrees.scannotsetuserdata +#: laz.virtualtrees.scannotsetuserdata msgid "Cannot set initial user data because there is not enough user data space allocated." msgstr "不能设置初始化用户数据 因为这里没有足够的用户数据空间被分配." -#: virtualtrees.sclipboardfailed +#: laz.virtualtrees.sclipboardfailed msgid "Clipboard operation failed." msgstr "剪贴板操作失败." -#: virtualtrees.scorruptstream1 +#: laz.virtualtrees.scorruptstream1 msgid "Stream data corrupt. A node's anchor chunk is missing." msgstr "流数据损坏.一个节点的锚/固定chunk(块)丢失." -#: virtualtrees.scorruptstream2 +#: laz.virtualtrees.scorruptstream2 msgid "Stream data corrupt. Unexpected data after node's end position." msgstr "流数据损坏.意外数据在节点的end位置" -#: virtualtrees.sstreamtoosmall +#: laz.virtualtrees.sstreamtoosmall msgid "Unable to load tree structure, not enough data available." msgstr "不能加载树结构,没有足够的数据可用" -#: virtualtrees.swrongmoveerror +#: laz.virtualtrees.swrongmoveerror msgid "Target node cannot be a child node of the node to be moved." msgstr "目标(Target)节点不能是一个将被移动节点的子节点" -#: virtualtrees.swrongstreamformat +#: laz.virtualtrees.swrongstreamformat msgid "Unable to load tree structure, the format is wrong." msgstr "不能加载树结构,该格式是错误的" -#: virtualtrees.swrongstreamversion +#: laz.virtualtrees.swrongstreamversion msgid "Unable to load tree structure, the version is unknown." msgstr "不能加载树结构,该版本是未知的" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.fr.po b/components/virtualtreeview/languages/laz.vtheaderpopup.fr.po similarity index 85% rename from components/virtualtreeview/languages/VTHeaderPopup.fr.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.fr.po index e3bcef90e1..6d3e00c325 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.fr.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.fr.po @@ -11,7 +11,9 @@ msgstr "" "Language: fr\n" "X-Generator: Poedit 2.0.6\n" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit +#, fuzzy +msgctxt "laz.vtheaderpopup.sresizetofit" msgid "&Resize All Columns To Fit" msgstr "&Redimensionner toutes les colonnes pour les adapter" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.hu.po b/components/virtualtreeview/languages/laz.vtheaderpopup.hu.po similarity index 92% rename from components/virtualtreeview/languages/VTHeaderPopup.hu.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.hu.po index 527420e539..a0ca4c8e21 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.hu.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.hu.po @@ -11,7 +11,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit msgid "&Resize All Columns To Fit" msgstr "Összes oszlop átméretezése a hely kitöltéséhez" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.po b/components/virtualtreeview/languages/laz.vtheaderpopup.po similarity index 75% rename from components/virtualtreeview/languages/VTHeaderPopup.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.po index 04ec30407b..93822df859 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.po @@ -1,7 +1,7 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit msgid "&Resize All Columns To Fit" msgstr "" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.pt_BR.po b/components/virtualtreeview/languages/laz.vtheaderpopup.pt_BR.po similarity index 92% rename from components/virtualtreeview/languages/VTHeaderPopup.pt_BR.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.pt_BR.po index aa07399de2..6b377ca086 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.pt_BR.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.pt_BR.po @@ -11,7 +11,7 @@ msgstr "" "Language: pt_BR\n" "X-Generator: Poedit 1.8.13\n" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit msgid "&Resize All Columns To Fit" msgstr "&Redimensionar todas as colunas para caber" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.ru.po b/components/virtualtreeview/languages/laz.vtheaderpopup.ru.po similarity index 92% rename from components/virtualtreeview/languages/VTHeaderPopup.ru.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.ru.po index 81225e6247..ed01524e2f 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.ru.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.ru.po @@ -11,7 +11,7 @@ msgstr "" "Language: ru\n" "X-Generator: Poedit 1.7.7\n" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit msgid "&Resize All Columns To Fit" msgstr "&Уместить все столбцы изменением их размеров" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.uk.po b/components/virtualtreeview/languages/laz.vtheaderpopup.uk.po similarity index 95% rename from components/virtualtreeview/languages/VTHeaderPopup.uk.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.uk.po index 52aae0e82c..bace470429 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.uk.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.uk.po @@ -12,7 +12,7 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Lokalize 2.0\n" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit msgid "&Resize All Columns To Fit" msgstr "Змінити &ширину всіх стовпців, щоб умістити" diff --git a/components/virtualtreeview/languages/VTHeaderPopup.zh_CN.po b/components/virtualtreeview/languages/laz.vtheaderpopup.zh_CN.po similarity index 93% rename from components/virtualtreeview/languages/VTHeaderPopup.zh_CN.po rename to components/virtualtreeview/languages/laz.vtheaderpopup.zh_CN.po index 934acfcbe5..58f1eb6106 100644 --- a/components/virtualtreeview/languages/VTHeaderPopup.zh_CN.po +++ b/components/virtualtreeview/languages/laz.vtheaderpopup.zh_CN.po @@ -12,7 +12,7 @@ msgstr "" "X-Generator: Poedit 1.8.7.1\n" "X-Poedit-SourceCharset: UTF-8\n" -#: vtheaderpopup.sresizetofit +#: laz.vtheaderpopup.sresizetofit msgid "&Resize All Columns To Fit" msgstr "调整所有列为合适的(&R)" diff --git a/components/virtualtreeview/ideicons.res b/components/virtualtreeview/laz.ideicons.res similarity index 71% rename from components/virtualtreeview/ideicons.res rename to components/virtualtreeview/laz.ideicons.res index 3e0d22b924f69513c4f788590607db3a479c8f50..67d7a3a145a278654fca82de1b05aa6ffca513f0 100644 GIT binary patch delta 297 zcmaE}f^kg);{+9c7X}7~|NprdLKu7)92ue}>Z(rW5UbpHR-T352VF{@J)Xgk!IZ&Z zGNYK<3=AHq=1p!iRi2!n#kM&^%YubJ z07FuB@;N;opkw4W|JJKz!=k`&@(ZuZ&AMir+4<3pKIo)8nMtgEbFZB?rqKtT3_->M bJrK1y*V&#O!{~!fs*`Vd@oawK)xrq?zD`vd delta 5100 zcma)=c|4Te`^RsLeVb$pStI*4LUuxoee64xJwue8dx(l@A(MSc8d)pL5VD12CqlNd zK1i0xzWwfg%kz7l|Gs~n*Xug>ea?Bk&UN0O&vlhzNPZTQBwnJ{007|Zj0UhsK7;X) z0Oe-6FlxPj#3Yie_>%i2?JDu){S^P2;Y)Vlqf0K3kEj%-e@k^m90mY?{|HzC`Tz>B z04xDbz!1;@YyeYeG=X9|{~iA`>Ht8J83rUP(%06s(2FO$Fwqn6VE>$(9)ZwLmeWL3 z3-KG>Ik}dXCp4(h^+`)})1^i0H4aaO)yi9nd6N^i%%>M#Zm`mBfRtzuf4*Bq&2-Di zTiW7Qs$>lFh5Yzi!Lo?X;X<%$A0OwSprC-$ zQREeiZXHB8n&B3;@-`8ngqHbV$M37Ex&p5Qd5l-aYYWj(HdaNu^CUkiLr;QASrxp^~_ z^0ZzABii$o7;kEK^wI$ls3K|_plgma`IADjg*{AjP7;*&)G1q;vecqrGCM{1ltt(J z;H=Mwjtvsv>C>mT^q+Irj3|==A9>=n({v9+6gL1lOHzQUydHidSRzj9R3-MeTqM1s zqT+yUio{)VZT@p_ii`a~iu;-le^n2b9>>iO>y8Szt}%p6AHac^t4i8tcbT+KmuaMp z5X;*K%vw~J)%!moxMMb*xLz{jGF}$A9$?dbn+E{k1(IB)-#}Se8EFl)N^`#%@*>4p zsZ-t|Mx&I;@Iw9<(J?5pVY$3csoC8Idf>x{4*=im2*f*j4H59()$G2KDLJ=gi)h>P z66QqM$~|g^v-(kG7h9{J)Gq7=lHFS@Jp*RnJA>4YK@Jy22a-$rq?qm;AjM5eP``qt zd4Y|xq4fw(f(cPMEgkfHOa|bY7XvN~dRF|AQixmnjCkYTH0DT=}?YCMkF*Otb z^u+&{CI8{`cLrpDD=9=H+k`47rW#Vrh zPt<*7@9k$YQyAwFsn@~hY1$&uDJYv|BU<|~SHA$hDm*W9-q0oiHSZSa6Gmu0NZ^m{ot=r>F&GX`&S!ceXRmQ#t45ju(fT6b6p?r)^KyjT z8;w?@InFOFEiJ6998!$fmkz3Lm}z^)t@^5@gf_GHb2J&{ShX)_ympKRZ}Zp~dvk|c z?#9;)jk2<`#S}OCjj{54aIWixm~LojXbUee>z_u;CYgxDD~4`eYHx41-3{McmywY< zm(Vfq%*nwayM4-7;C1SNtSu`kF$huNt{TZCt&2KQ$}@e0@aRii&EMT1_V4e9q_@t7 z(C+hJHobW>e@gl>4}n04A0M}S-nmfVf+}L3nwt7KQN#FdG;^o}Tni%OjTMeoQP!mz zykVQNI#zx&^8pDvH@6VS6O^;_GYE()=i{}3su86`Ha(G@YIsatof0b>n*u#E6%2!S z>!g&EmoJEg-#ou2=7G zGUo#`f*hyKo?D z4MTc!2p3(=!bcwd78&#$hHFLa)IYHt2i#q81*_5F+XKc2c<%f;URH&}Dw~qC?M~8><6tF5_cyyHPJv+yB-n6qlz-C10 zog`My)QYBcwh#5}@ng@KTm`@B9-1odfl>O_0qCAddCzgdMACRRed&ZGv|IwM-HN!? zqe^k8+;?{!89hDR-0*Jf59oPi4#>o_4@GOc@`lp35mbEs7VDjD**Q7J9gM6n@Dl#6 za<(xEoX6P-o!R_2&PmX+)Z+wkMtVAlhR;cE3&qdb-cfHvw+IIa*O_nM%j0p~!`XYaP4e&3ugblV-LSyE!RH$LfQnBqSt4*H&on zyRw&{8RUV?UU?r|RyHZ8h2JYfOB_3d3{!%DEY<1N;6!#q8|-1heV0r?aNUfWCbt*vov@yuIzzoxl(msQ$q8Li$$5Ab*TF*a#>hgCmRYWT;XD%3|^ni zd;K~#BZI?msE1<~^iM0XerH$U6-0Tz#ble5{C>;jZ{NOc&@nP@?1nYm=uVL+iSfOK zd-3Ae&+mx!=?3iRYWvDv_wRm_A6k+xo5aHBT01*C<3DNuEG#TwDk>*(b0+$_h#=Cy zAoYh?v}yS6Pgj5c#OY}#h&*^a9x_D!t0NNY#HME>hc#+o?gnFRO5nGv17l-0(EDl_ zIlSG+GefUUPvn89+JGR7L+

`_Os8YazSt{8j&|{bHA0b|sPjXOW54l@S0cy8 zJ|vmY{QjDTp1Vkw5<>J*E701L9d5$&-~z>i1G1hV=iSW7p6tM=rQk;5cKu!!5xmOQ z_$igPe2~J|*O!Q5UQ9)G4Pg$+{gGN!u6iQ5dLkRPWh3f)J3A)|y+Y0&5N7QlGLmg> z$5iz2Y->Hr-QC+GA|-kZnom!Td?BaH;Qz^+5U{nNUsqS>U+X~bTCl2=D&_on{?|)k zntS)|4G#~$EEa|2BR-xwLJj267?$hJhkUR4;7EoECA5G^GxeLH&UP$YQAvpy)i0Q& zV_hsnYIIHD?`1PChU*o^Lvo^`qMIQqAq`HJW;h~Q$N8PB0t17CgA(|UZ;C|~(33A4 z8yjCPgolS;1y5C2v2p9`=&tVWQNqx@Z2KDYIc)nS(<{=_GY?fjewU2D{NmtQ%E3<| zxw`8pRfvI-lhl8I(^XVV3^DGN@t}M0)5ad{kQ`_9B&nUfy>cA zU628Xg!As*yDsH672^|YL4Y``LBMXesD>F1jhXLwCJ-z90Rtr?kdcuAX|uiYk*P2Y zGT2h*-E2W}D!#hcxT>lu<}8)wfdM!`PfyRx#^ynAw6Sq|9(b)dhN0 zH8tua3=SXsqpPc{pCG1TlW2t`Js4jbW@2p@Ke9+*x;!vFeHu9f6)$sNk_3bkP^Pca zXM*ZU5>eB(_BDJY&HX@FSeUSg2uZU|mTTi4P12iO7hNr}6fMoN+bstpId )XnYH|X42vXSu`&YNDoughk-J`DWL``=^sa^{nH4FBOredv zqtKlnEX^gSr>A*Fv`_&9GaVlr)3dZ>0V;E+ujNJ}y^K^}5S8O@NFc|Xen#egA0#PI z56N6%obFq;wy~)CAs^JR!S)bO`&W){q##p6xR9z6Wh zjoAZrKUc{(g?8eN(ZoSv)-ta4My0&)UvuQ!+uMNDBzmvJh!$V~hDSz(Xn!l11A46* z9GL=)F5%4OLRtz~ttQkymTdD&z=gn2U*4+7{#AUY7k^2o5ZA^!7xl9~b4V#W6N^no_1(6_ zkho+B0q)`npd4K+oc&X?4NW_>J6~=H52`a0#V_!Se4zR%#znfZS~x+r-jc-6#m)TU zulAbPD5U%PnV1Qi?MoZ8(v^-x5&Pvw27~rNdq_0M~ zwzkGonRO@14ASDoae`0iL~u~ht5qcf1B2?Mq@;WKi5$_pWlTNfH50vGzoO8sZkGyt zvF#|_pwMCzM`3N`k$ip7+PHYfW5vL~=%O{CE`wLl`eeFw=BroyPz8rVve?-43t2WJ zUV@)jciwh|(!?bs(2zz0H*emAWOwnKkjzj~amKG<1(oxA&*{ zUz?k=*BCA;;fAK=dfSwE@3*)JCp&IkG-Y1o0eGVJ`C42OAtJ^&#cS4rXKI0gfw8T# zrK6D8-rzXtS>17WpnRV9>mb7X#ful9dV)5;WpS~Px;yia07Wi3dirxzFjLDHs^Po0 z2uHF#&b4KT!wJ;+2HtrmDyLstL2AF(ke!CxsGc3(3`6%2ncvF5%p z-Qab)w6s(kut@XHxrt(bVrFKB2a#lQ9xz3rwi>6<>ReBB_aGHK$M8@@LZaQ9z^bk7 z=y*{rm$8Z14>A7F?(6~r0+Sy@5#>n-bc$ha^zexYL{dKx`UI&miv?kQs13t4cg8C zJH}Jw4Q<-FfBKEfP%BIu3j9xBZIwkN$tt|^32PG>wc+1Udk&fZ>#UJ;3Q+uOM(|H( zt8qE6!wqLLCHT0RrX7!Q~oO|n4Bd~S6Lwcfcn1xXA5WF diff --git a/components/virtualtreeview/lclconstants.inc b/components/virtualtreeview/laz.lclconstants.inc similarity index 100% rename from components/virtualtreeview/lclconstants.inc rename to components/virtualtreeview/laz.lclconstants.inc diff --git a/components/virtualtreeview/lclfunctions.inc b/components/virtualtreeview/laz.lclfunctions.inc similarity index 100% rename from components/virtualtreeview/lclfunctions.inc rename to components/virtualtreeview/laz.lclfunctions.inc diff --git a/components/virtualtreeview/laz.registervirtualtreeview.pas b/components/virtualtreeview/laz.registervirtualtreeview.pas new file mode 100644 index 0000000000..40c63e3f7d --- /dev/null +++ b/components/virtualtreeview/laz.registervirtualtreeview.pas @@ -0,0 +1,38 @@ +unit laz.RegisterVirtualTreeView; + +{$Mode ObjFpc} +{$H+} + +interface + +procedure Register; + +implementation + +{$R laz.ideicons.res} + + +uses + Classes, SysUtils, LResources, LazarusPackageIntf, + laz.VirtualTrees, laz.VTHeaderPopup, laz.VTIDEEditors, ComponentEditors; + + +procedure RegisterUnitVirtualTrees; +begin + RegisterComponents('LazControls', [TLazVirtualDrawTree, TLazVirtualStringTree]); +end; + +procedure RegisterUnitVTHeaderPopup; +begin + RegisterComponents('LazControls', [TLazVTHeaderPopupMenu]); +end; + +procedure Register; + +begin + RegisterComponentEditor([TLazVirtualDrawTree, TLazVirtualStringTree], TLazVirtualTreeEditor); + RegisterUnit('laz.VirtualTrees', @RegisterUnitVirtualTrees); + RegisterUnit('laz.VTHeaderPopup', @RegisterUnitVTHeaderPopup); +end; + +end. diff --git a/components/virtualtreeview/VirtualTrees.pas b/components/virtualtreeview/laz.virtualtrees.pas similarity index 99% rename from components/virtualtreeview/VirtualTrees.pas rename to components/virtualtreeview/laz.virtualtrees.pas index f8ee6608b0..fcd2d065e0 100644 --- a/components/virtualtreeview/VirtualTrees.pas +++ b/components/virtualtreeview/laz.virtualtrees.pas @@ -1,4 +1,4 @@ -unit VirtualTrees; +unit laz.VirtualTrees; {$mode delphi}{$H+} {$packset 1} @@ -57,7 +57,7 @@ unit VirtualTrees; interface -{$I VTConfig.inc} +{$I laz.vtconfig.inc} uses {$ifdef Windows} @@ -65,7 +65,7 @@ uses ActiveX, CommCtrl, {$else} - FakeActiveX, + laz.FakeActiveX, {$endif} OleUtils, LCLIntf, @@ -73,10 +73,10 @@ uses DelphiCompat, LclExt, {$endif} - virtualpanningwindow, - VTGraphics, //alpha blend functions + laz.virtualpanningwindow, + laz.VTGraphics, //alpha blend functions {$ifdef DEBUG_VTV} - VTLogger, + laz.VTLogger, {$endif} LCLType, LMessages, LCLVersion, Types, SysUtils, Classes, Graphics, Controls, Forms, ImgList, StdCtrls, Menus, Printers, @@ -90,7 +90,7 @@ uses {$endif}; const - {$I lclconstants.inc} + {$I laz.lclconstants.inc} {$if defined(LCLGtk) or defined(LCLGtk2)} {$define Gtk} @@ -3824,6 +3824,8 @@ type //property Touch; end; + TLazVirtualStringTree = class(TVirtualStringTree); + TVTDrawNodeEvent = procedure(Sender: TBaseVirtualTree; const PaintInfo: TVTPaintInfo) of object; TVTGetCellContentMarginEvent = procedure(Sender: TBaseVirtualTree; HintCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; CellContentMarginType: TVTCellContentMarginType; var CellContentMargin: TPoint) of object; @@ -4080,6 +4082,8 @@ type {$ifend} end; + TLazVirtualDrawTree = class(TVirtualDrawTree); + // OLE Clipboard and drag'n drop helper procedure EnumerateVTClipboardFormats(TreeClass: TVirtualTreeClass; const List: TStrings); overload; procedure EnumerateVTClipboardFormats(TreeClass: TVirtualTreeClass; var Formats: TFormatEtcArray); overload; @@ -4105,7 +4109,7 @@ procedure ShowError(const Msg: String; HelpContext: Integer); // [IPK] Surface implementation -{$R VirtualTrees.res} +{$R laz.virtualtrees.res} uses StrUtils, Math, @@ -4115,7 +4119,7 @@ uses {$ifdef Windows} MMSystem, // for animation timer (does not include further resources) {$else} - FakeMMSystem, + laz.FakeMMSystem, {$endif} TypInfo, // for migration stuff ActnList, @@ -4123,7 +4127,7 @@ uses GraphType, LCLProc {$ifdef EnableAccessible} - ,VTAccessibilityFactory + ,laz.VTAccessibilityFactory {$endif}; // accessibility helper class resourcestring @@ -4317,18 +4321,18 @@ const WideCR = WideChar(#13); WideLF = WideChar(#10); - CheckImagesStrings: array [TCheckImageKind] of String = - ('VT_CHECK_LIGHT', - 'VT_CHECK_DARK', - 'VT_TICK_LIGHT', - 'VT_TICK_DARK', - 'VT_FLAT', - 'VT_XP', + CheckImagesStrings: array [TCheckImageKind] of String = ( + 'LAZ_VT_CHECK_LIGHT', + 'LAZ_VT_CHECK_DARK', + 'LAZ_VT_TICK_LIGHT', + 'LAZ_VT_TICK_DARK', + 'LAZ_VT_FLAT', + 'LAZ_VT_XP', '',//ckCustom, // Only the button images are used for ckSystem * // The check buttons are draw at fly as requested - 'VT_FLAT',//ckSystemFlat - 'VT_CHECK_DARK' //ckSystemDefault + 'LAZ_VT_FLAT',//ckSystemFlat + 'LAZ_VT_CHECK_DARK' //ckSystemDefault ); type @@ -5455,15 +5459,15 @@ begin // Register the tree reference clipboard format. Others will be handled in InternalClipboarFormats. CF_VTREFERENCE := ClipboardRegisterFormat(CFSTR_VTREFERENCE); - UtilityImages := CreateBitmapFromResourceName(0, BuildResourceName('vt_utilities')); + UtilityImages := CreateBitmapFromResourceName(0, BuildResourceName('laz_vt_utilities')); UtilityImageSize := UtilityImages.Height; SystemCheckImages := CreateCheckImageList(ckSystemDefault); // Delphi (at least version 6 and lower) does not provide a standard split cursor. // Hence we have to load our own. - Screen.Cursors[crHeaderSplit] := LoadCursor(TheInstance, 'VT_HEADERSPLIT'); - Screen.Cursors[crVertSplit] := LoadCursor(TheInstance, 'VT_VERTSPLIT'); + Screen.Cursors[crHeaderSplit] := LoadCursor(TheInstance, 'laz_VT_HEADERSPLIT'); + Screen.Cursors[crVertSplit] := LoadCursor(TheInstance, 'laz_VT_VERTSPLIT'); // Clipboard format registration. // Native clipboard format. Needs a new identifier and has an average priority to allow other formats to take over. // This format is supposed to use the IStream storage format but unfortunately this does not work when @@ -6016,7 +6020,7 @@ begin inherited; end; -{$i vtvdragmanager.inc} +{$i laz.vtvdragmanager.inc} //----------------- TVirtualTreeHintWindow ----------------------------------------------------------------------------- @@ -14346,7 +14350,7 @@ begin LineTo(Width - p2, Width div 2); end else - LoadBitmapFromResource(FMinusBM, 'vt_xpbuttonminus'); + LoadBitmapFromResource(FMinusBM, 'laz_vt_xpbuttonminus'); FHotMinusBM.Canvas.Draw(0, 0, FMinusBM); end; end; @@ -14391,7 +14395,7 @@ begin LineTo(Width div 2, Width - p2); end else - LoadBitmapFromResource(FPlusBM, 'vt_xpbuttonplus'); + LoadBitmapFromResource(FPlusBM, 'laz_vt_xpbuttonplus'); FHotPlusBM.Canvas.Draw(0, 0, FPlusBM); end; end; @@ -22190,7 +22194,7 @@ end; //---------------------------------------------------------------------------------------------------------------------- -{$i olemethods.inc} +{$i laz.olemethods.inc} //---------------------------------------------------------------------------------------------------------------------- @@ -25243,12 +25247,12 @@ begin if Integer(FRangeX) > ClientWidth then begin if Integer(FRangeY) > ClientHeight then - ImageName := 'VT_MOVEALL_BMP' + ImageName := 'LAZ_VT_MOVEALL_BMP' else - ImageName := 'VT_MOVEEW_BMP'; + ImageName := 'LAZ_VT_MOVEEW_BMP'; end else - ImageName := 'VT_MOVENS_BMP'; + ImageName := 'LAZ_VT_MOVENS_BMP'; bm := CreateBitmapFromResourceName(0, BuildResourceName(ImageName)); // is png! try diff --git a/components/virtualtreeview/VirtualTrees.res b/components/virtualtreeview/laz.virtualtrees.res similarity index 90% rename from components/virtualtreeview/VirtualTrees.res rename to components/virtualtreeview/laz.virtualtrees.res index c3f75c2ac9ce0c18e3e9854e50c756a8aba141a7..5260a85767fa569735e51fb90ce415f3e6cde75e 100644 GIT binary patch delta 1153 zcmX@Hmi590)(I;74h#$o|NnC__%Jv!L@~rq_7{`h=+?)^$?6mzzX_V^ zV9$rF{5EKU*8X2PFa*sb&T^xBY%_OCBc`voQzSR9$@zfck;x#5J(VW>=*CRmKS6r4 zQ0Fps46pB>P{@rg2vjY*IAjhVhAHRQOKvV%6~chV8Srwye8vC z3}dDPMWv^^sW7&0_tarLja`1bnI7Xbn9q1%*=+h{14d71xo8!|dV;|d{|ZOCYg wA-Eo!;Ad=t=0;ewS7Q_0k4=!-7>jmyY=Yg`1kZy69l)sx?xXF(CX8E^06hUU_5c6? delta 736 zcmcbxf%U{%)(I-?77Ppw|NnDMe$64h(XWq#-2uYi{F)<|7sdff%1)N6;@Lbw>;*r& z4OB(D+Fy2d7pV4jHQCJ@^saED3Rs=tW7mNy@AiDi%5DPXRQrGBfOG02&T_-tu{k=W z5y=rboJfwyk=`sU3r*6+b8ogCNi>nK-6t#7Gz{(g7buh z86Psj!fE<+F-H0AN}`NujIhAj4iwU5g7H8K6t{noV0?nm^InEgb~}qS;~j(^pwLZ( z9w1MCx`YNJ&*Xhp3fq+w7?qe|9-gkP$|$`(PnmHYBiyw>p@U3t-fwlrt4uKE+wW^J zUPP$eufv!NS2-QXliePn&p3q%>K&fxzYQ5Zp;5;(9q0_v=@~|hI?zDknZDSF(H72m rkIb<)Mv`eq=3GYR$eSQ3%SPsGN9Hh_A}R9+aUdy~XZvhZ#;r;KTMF=t diff --git a/components/virtualtreeview/virtualtreeview_package.lpk b/components/virtualtreeview/laz.virtualtreeview_package.lpk similarity index 75% rename from components/virtualtreeview/virtualtreeview_package.lpk rename to components/virtualtreeview/laz.virtualtreeview_package.lpk index 6f9f0f584a..1f49ae4fdf 100644 --- a/components/virtualtreeview/virtualtreeview_package.lpk +++ b/components/virtualtreeview/laz.virtualtreeview_package.lpk @@ -1,7 +1,7 @@ - + @@ -43,42 +43,46 @@ end;"/> - - + + + + <_FPMake Items="AllCPUs/AllOSes/TargetCPUs/TargetOSes"/> + - - + + - + - + - - + + - - + + - - + + - - + + - - + + + diff --git a/components/virtualtreeview/laz.virtualtreeview_package.pas b/components/virtualtreeview/laz.virtualtreeview_package.pas new file mode 100644 index 0000000000..503fe176b8 --- /dev/null +++ b/components/virtualtreeview/laz.virtualtreeview_package.pas @@ -0,0 +1,24 @@ +{ This file was automatically created by Lazarus. Do not edit! + This source is only used to compile and install the package. + } + +unit laz.virtualtreeview_package; + +{$warn 5023 off : no warning about unused units} +interface + +uses + laz.VirtualTrees, laz.VTHeaderPopup, laz.RegisterVirtualTreeView, + laz.VTGraphics, laz.VTIDEEditors, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('laz.RegisterVirtualTreeView', + @laz.RegisterVirtualTreeView.Register); +end; + +initialization + RegisterPackage('laz.virtualtreeview_package', @Register); +end. diff --git a/components/virtualtreeview/VTAccessibility.pas b/components/virtualtreeview/laz.vtaccessibility.pas similarity index 99% rename from components/virtualtreeview/VTAccessibility.pas rename to components/virtualtreeview/laz.vtaccessibility.pas index 9dd312d450..ed6eb7316a 100644 --- a/components/virtualtreeview/VTAccessibility.pas +++ b/components/virtualtreeview/laz.vtaccessibility.pas @@ -1,4 +1,4 @@ -unit VTAccessibility; +unit laz.TAccessibility; // This unit implements iAccessible interfaces for the VirtualTree visual components // and the currently focused node. @@ -7,7 +7,9 @@ unit VTAccessibility; interface -uses Windows, Classes, ActiveX, oleacc, VirtualTrees, VTAccessibilityFactory, Controls; +uses + Windows, Classes, ActiveX, oleacc, + laz.VirtualTrees, laz.VTAccessibilityFactory, Controls; type TVirtualTreeAccessibility = class(TInterfacedObject, IDispatch, IAccessible) diff --git a/components/virtualtreeview/VTAccessibilityFactory.pas b/components/virtualtreeview/laz.vtaccessibilityfactory.pas similarity index 98% rename from components/virtualtreeview/VTAccessibilityFactory.pas rename to components/virtualtreeview/laz.vtaccessibilityfactory.pas index 1b582a3d2f..3cc548d685 100644 --- a/components/virtualtreeview/VTAccessibilityFactory.pas +++ b/components/virtualtreeview/laz.vtaccessibilityfactory.pas @@ -1,4 +1,4 @@ -unit VTAccessibilityFactory; +unit laz.VTAccessibilityFactory; // class to create IAccessibles for the tree passed into it. // If not already assigned, creates IAccessibles for the tree itself @@ -14,7 +14,7 @@ unit VTAccessibilityFactory; interface uses - Classes, oleacc, VirtualTrees; + Classes, oleacc, laz.VirtualTrees; type IVTAccessibleProvider = interface diff --git a/components/virtualtreeview/VTConfig.inc b/components/virtualtreeview/laz.vtconfig.inc similarity index 100% rename from components/virtualtreeview/VTConfig.inc rename to components/virtualtreeview/laz.vtconfig.inc diff --git a/components/virtualtreeview/VTGraphics.pas b/components/virtualtreeview/laz.vtgraphics.pas similarity index 94% rename from components/virtualtreeview/VTGraphics.pas rename to components/virtualtreeview/laz.vtgraphics.pas index f7713fd506..50d46f07c5 100644 --- a/components/virtualtreeview/VTGraphics.pas +++ b/components/virtualtreeview/laz.vtgraphics.pas @@ -1,4 +1,4 @@ -unit VTGraphics; +unit laz.VTGraphics; {$mode delphi} @@ -26,7 +26,7 @@ function GetBitmapBitsFromBitmap(Bitmap: HBITMAP): Pointer; implementation -{$i vtgraphicsi.inc} +{$i laz.vtgraphicsi.inc} end. diff --git a/components/virtualtreeview/VTHeaderPopup.pas b/components/virtualtreeview/laz.vtheaderpopup.pas similarity index 98% rename from components/virtualtreeview/VTHeaderPopup.pas rename to components/virtualtreeview/laz.vtheaderpopup.pas index 86b100d765..37e2c4a59a 100644 --- a/components/virtualtreeview/VTHeaderPopup.pas +++ b/components/virtualtreeview/laz.vtheaderpopup.pas @@ -1,4 +1,4 @@ -unit VTHeaderPopup; +unit laz.VTHeaderPopup; //---------------------------------------------------------------------------------------------------------------------- // @@ -69,7 +69,7 @@ unit VTHeaderPopup; interface uses - Menus, VirtualTrees; + Menus, laz.VirtualTrees; type TVTHeaderPopupOption = ( @@ -109,6 +109,7 @@ type property OnAddHeaderPopupItem: TAddHeaderPopupItemEvent read FOnAddHeaderPopupItem write FOnAddHeaderPopupItem; property OnColumnChange: TColumnChangeEvent read FOnColumnChange write FOnColumnChange; end; + TLazVTHeaderPopupMenu = class(TVTHeaderPopupMenu); //---------------------------------------------------------------------------------------------------------------------- diff --git a/components/virtualtreeview/VTIDEEditors.pas b/components/virtualtreeview/laz.vtideeditors.pas similarity index 89% rename from components/virtualtreeview/VTIDEEditors.pas rename to components/virtualtreeview/laz.vtideeditors.pas index 06febfd404..963ebe60a6 100644 --- a/components/virtualtreeview/VTIDEEditors.pas +++ b/components/virtualtreeview/laz.vtideeditors.pas @@ -1,11 +1,11 @@ -unit VTIDEEditors; +unit laz.VTIDEEditors; {$mode objfpc}{$H+} interface uses - ComponentEditors, PropEdits, VirtualTrees; + ComponentEditors, PropEdits, laz.VirtualTrees; type @@ -21,6 +21,8 @@ type function GetVerb(Index: Integer): string; override; procedure ExecuteVerb(Index: Integer); override; end; + TLazVirtualTreeEditor = class(TVirtualTreeEditor); + implementation diff --git a/components/virtualtreeview/vtlogger.pas b/components/virtualtreeview/laz.vtlogger.pas similarity index 97% rename from components/virtualtreeview/vtlogger.pas rename to components/virtualtreeview/laz.vtlogger.pas index 4179168364..f2e73e381e 100644 --- a/components/virtualtreeview/vtlogger.pas +++ b/components/virtualtreeview/laz.vtlogger.pas @@ -1,4 +1,4 @@ -unit VTLogger; +unit laz.VTLogger; {$mode objfpc}{$H+} @@ -52,7 +52,7 @@ var implementation uses - VirtualTrees, sysutils; + laz.VirtualTrees, sysutils; type TNodeData = record diff --git a/components/virtualtreeview/registervirtualtreeview.pas b/components/virtualtreeview/registervirtualtreeview.pas deleted file mode 100644 index 02464c1b51..0000000000 --- a/components/virtualtreeview/registervirtualtreeview.pas +++ /dev/null @@ -1,37 +0,0 @@ -unit registervirtualtreeview; - -{$Mode ObjFpc} -{$H+} - -interface - -procedure Register; - -implementation - -{$R ideicons.res} - -uses - Classes, SysUtils, LResources, LazarusPackageIntf, - VirtualTrees, VTHeaderPopup, VTIDEEditors, ComponentEditors; - - -procedure RegisterUnitVirtualTrees; -begin - RegisterComponents('Virtual Controls', [TVirtualDrawTree, TVirtualStringTree]); -end; - -procedure RegisterUnitVTHeaderPopup; -begin - RegisterComponents('Virtual Controls', [TVTHeaderPopupMenu]); -end; - -procedure Register; - -begin - RegisterComponentEditor([TVirtualDrawTree, TVirtualStringTree], TVirtualTreeEditor); - RegisterUnit('VirtualTrees', @RegisterUnitVirtualTrees); - RegisterUnit('VTHeaderPopup', @RegisterUnitVTHeaderPopup); -end; - -end. diff --git a/components/virtualtreeview/units/carbon/fakeactivex.pas b/components/virtualtreeview/units/carbon/fakeactivex.pas deleted file mode 100644 index f09702de22..0000000000 --- a/components/virtualtreeview/units/carbon/fakeactivex.pas +++ /dev/null @@ -1,3 +0,0 @@ -unit FakeActiveX; - -{$i ../dummyactivex.inc} diff --git a/components/virtualtreeview/units/carbon/laz.fakeactivex.pas b/components/virtualtreeview/units/carbon/laz.fakeactivex.pas new file mode 100644 index 0000000000..5113231ea2 --- /dev/null +++ b/components/virtualtreeview/units/carbon/laz.fakeactivex.pas @@ -0,0 +1,3 @@ +unit laz.FakeActiveX; + +{$i ../laz.dummyactivex.inc} diff --git a/components/virtualtreeview/units/cocoa/fakemmsystem.pas b/components/virtualtreeview/units/carbon/laz.fakemmsystem.pas similarity index 95% rename from components/virtualtreeview/units/cocoa/fakemmsystem.pas rename to components/virtualtreeview/units/carbon/laz.fakemmsystem.pas index f73f1a5b58..d72feef0f1 100644 --- a/components/virtualtreeview/units/cocoa/fakemmsystem.pas +++ b/components/virtualtreeview/units/carbon/laz.fakemmsystem.pas @@ -1,4 +1,4 @@ -unit fakemmsystem; +unit laz.FakeMMSystem; {$mode objfpc}{$H+} diff --git a/components/virtualtreeview/units/gtk2/virtualdragmanager.pas b/components/virtualtreeview/units/carbon/laz.virtualdragmanager.pas similarity index 99% rename from components/virtualtreeview/units/gtk2/virtualdragmanager.pas rename to components/virtualtreeview/units/carbon/laz.virtualdragmanager.pas index b4a205f06a..23ac7b2f27 100644 --- a/components/virtualtreeview/units/gtk2/virtualdragmanager.pas +++ b/components/virtualtreeview/units/carbon/laz.virtualdragmanager.pas @@ -1,4 +1,4 @@ -unit virtualdragmanager; +unit laz.VirtualDragManager; {fake unit just to compile - not used under non windows} {$mode delphi} @@ -490,7 +490,7 @@ type implementation uses - VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif}; + laz.VirtualTrees, Controls {$ifdef DEBUG_VTV}, laz.VTLogger{$endif}; type TVirtualTreeAccess = class (TBaseVirtualTree) diff --git a/components/virtualtreeview/units/gtk2/virtualpanningwindow.pas b/components/virtualtreeview/units/carbon/laz.virtualpanningwindow.pas similarity index 95% rename from components/virtualtreeview/units/gtk2/virtualpanningwindow.pas rename to components/virtualtreeview/units/carbon/laz.virtualpanningwindow.pas index b964cccce6..d8e5237ab2 100644 --- a/components/virtualtreeview/units/gtk2/virtualpanningwindow.pas +++ b/components/virtualtreeview/units/carbon/laz.virtualpanningwindow.pas @@ -1,4 +1,4 @@ -unit virtualpanningwindow; +unit laz.VirtualPanningWindow; {$mode objfpc}{$H+} @@ -29,7 +29,7 @@ implementation {$ifdef DEBUG_VTV} uses - vtlogger; + laz.VTLogger; {$endif} { TVirtualPanningWindow } diff --git a/components/virtualtreeview/units/cocoa/fakeactivex.pas b/components/virtualtreeview/units/cocoa/fakeactivex.pas deleted file mode 100644 index f09702de22..0000000000 --- a/components/virtualtreeview/units/cocoa/fakeactivex.pas +++ /dev/null @@ -1,3 +0,0 @@ -unit FakeActiveX; - -{$i ../dummyactivex.inc} diff --git a/components/virtualtreeview/units/cocoa/laz.fakeactivex.pas b/components/virtualtreeview/units/cocoa/laz.fakeactivex.pas new file mode 100644 index 0000000000..5113231ea2 --- /dev/null +++ b/components/virtualtreeview/units/cocoa/laz.fakeactivex.pas @@ -0,0 +1,3 @@ +unit laz.FakeActiveX; + +{$i ../laz.dummyactivex.inc} diff --git a/components/virtualtreeview/units/qt/fakemmsystem.pas b/components/virtualtreeview/units/cocoa/laz.fakemmsystem.pas similarity index 95% rename from components/virtualtreeview/units/qt/fakemmsystem.pas rename to components/virtualtreeview/units/cocoa/laz.fakemmsystem.pas index f73f1a5b58..d72feef0f1 100644 --- a/components/virtualtreeview/units/qt/fakemmsystem.pas +++ b/components/virtualtreeview/units/cocoa/laz.fakemmsystem.pas @@ -1,4 +1,4 @@ -unit fakemmsystem; +unit laz.FakeMMSystem; {$mode objfpc}{$H+} diff --git a/components/virtualtreeview/units/cocoa/virtualdragmanager.pas b/components/virtualtreeview/units/cocoa/laz.virtualdragmanager.pas similarity index 99% rename from components/virtualtreeview/units/cocoa/virtualdragmanager.pas rename to components/virtualtreeview/units/cocoa/laz.virtualdragmanager.pas index cda8ee6546..c766da90f9 100644 --- a/components/virtualtreeview/units/cocoa/virtualdragmanager.pas +++ b/components/virtualtreeview/units/cocoa/laz.virtualdragmanager.pas @@ -1,4 +1,4 @@ -unit virtualdragmanager; +unit laz.VirtualDragManager; {fake unit just to compile - not used under non windows} {$mode delphi} @@ -490,7 +490,7 @@ type implementation uses - VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif}; + laz.VirtualTrees, Controls {$ifdef DEBUG_VTV}, laz.VTLogger{$endif}; type TVirtualTreeAccess = class (TBaseVirtualTree) diff --git a/components/virtualtreeview/units/gtk/virtualpanningwindow.pas b/components/virtualtreeview/units/cocoa/laz.virtualpanningwindow.pas similarity index 95% rename from components/virtualtreeview/units/gtk/virtualpanningwindow.pas rename to components/virtualtreeview/units/cocoa/laz.virtualpanningwindow.pas index b964cccce6..d8e5237ab2 100644 --- a/components/virtualtreeview/units/gtk/virtualpanningwindow.pas +++ b/components/virtualtreeview/units/cocoa/laz.virtualpanningwindow.pas @@ -1,4 +1,4 @@ -unit virtualpanningwindow; +unit laz.VirtualPanningWindow; {$mode objfpc}{$H+} @@ -29,7 +29,7 @@ implementation {$ifdef DEBUG_VTV} uses - vtlogger; + laz.VTLogger; {$endif} { TVirtualPanningWindow } diff --git a/components/virtualtreeview/units/gtk/fakeactivex.pas b/components/virtualtreeview/units/gtk/fakeactivex.pas deleted file mode 100644 index f09702de22..0000000000 --- a/components/virtualtreeview/units/gtk/fakeactivex.pas +++ /dev/null @@ -1,3 +0,0 @@ -unit FakeActiveX; - -{$i ../dummyactivex.inc} diff --git a/components/virtualtreeview/units/gtk/laz.fakeactivex.pas b/components/virtualtreeview/units/gtk/laz.fakeactivex.pas new file mode 100644 index 0000000000..5113231ea2 --- /dev/null +++ b/components/virtualtreeview/units/gtk/laz.fakeactivex.pas @@ -0,0 +1,3 @@ +unit laz.FakeActiveX; + +{$i ../laz.dummyactivex.inc} diff --git a/components/virtualtreeview/units/gtk/fakemmsystem.pas b/components/virtualtreeview/units/gtk/laz.fakemmsystem.pas similarity index 95% rename from components/virtualtreeview/units/gtk/fakemmsystem.pas rename to components/virtualtreeview/units/gtk/laz.fakemmsystem.pas index f73f1a5b58..d72feef0f1 100644 --- a/components/virtualtreeview/units/gtk/fakemmsystem.pas +++ b/components/virtualtreeview/units/gtk/laz.fakemmsystem.pas @@ -1,4 +1,4 @@ -unit fakemmsystem; +unit laz.FakeMMSystem; {$mode objfpc}{$H+} diff --git a/components/virtualtreeview/units/carbon/virtualdragmanager.pas b/components/virtualtreeview/units/gtk/laz.virtualdragmanager.pas similarity index 99% rename from components/virtualtreeview/units/carbon/virtualdragmanager.pas rename to components/virtualtreeview/units/gtk/laz.virtualdragmanager.pas index b4a205f06a..23ac7b2f27 100644 --- a/components/virtualtreeview/units/carbon/virtualdragmanager.pas +++ b/components/virtualtreeview/units/gtk/laz.virtualdragmanager.pas @@ -1,4 +1,4 @@ -unit virtualdragmanager; +unit laz.VirtualDragManager; {fake unit just to compile - not used under non windows} {$mode delphi} @@ -490,7 +490,7 @@ type implementation uses - VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif}; + laz.VirtualTrees, Controls {$ifdef DEBUG_VTV}, laz.VTLogger{$endif}; type TVirtualTreeAccess = class (TBaseVirtualTree) diff --git a/components/virtualtreeview/units/cocoa/virtualpanningwindow.pas b/components/virtualtreeview/units/gtk/laz.virtualpanningwindow.pas similarity index 95% rename from components/virtualtreeview/units/cocoa/virtualpanningwindow.pas rename to components/virtualtreeview/units/gtk/laz.virtualpanningwindow.pas index b964cccce6..d8e5237ab2 100644 --- a/components/virtualtreeview/units/cocoa/virtualpanningwindow.pas +++ b/components/virtualtreeview/units/gtk/laz.virtualpanningwindow.pas @@ -1,4 +1,4 @@ -unit virtualpanningwindow; +unit laz.VirtualPanningWindow; {$mode objfpc}{$H+} @@ -29,7 +29,7 @@ implementation {$ifdef DEBUG_VTV} uses - vtlogger; + laz.VTLogger; {$endif} { TVirtualPanningWindow } diff --git a/components/virtualtreeview/units/gtk2/fakeactivex.pas b/components/virtualtreeview/units/gtk2/fakeactivex.pas deleted file mode 100644 index f09702de22..0000000000 --- a/components/virtualtreeview/units/gtk2/fakeactivex.pas +++ /dev/null @@ -1,3 +0,0 @@ -unit FakeActiveX; - -{$i ../dummyactivex.inc} diff --git a/components/virtualtreeview/units/gtk2/laz.fakeactivex.pas b/components/virtualtreeview/units/gtk2/laz.fakeactivex.pas new file mode 100644 index 0000000000..5113231ea2 --- /dev/null +++ b/components/virtualtreeview/units/gtk2/laz.fakeactivex.pas @@ -0,0 +1,3 @@ +unit laz.FakeActiveX; + +{$i ../laz.dummyactivex.inc} diff --git a/components/virtualtreeview/units/gtk2/fakemmsystem.pas b/components/virtualtreeview/units/gtk2/laz.fakemmsystem.pas similarity index 94% rename from components/virtualtreeview/units/gtk2/fakemmsystem.pas rename to components/virtualtreeview/units/gtk2/laz.fakemmsystem.pas index 0ccb81599e..ce8f937471 100644 --- a/components/virtualtreeview/units/gtk2/fakemmsystem.pas +++ b/components/virtualtreeview/units/gtk2/laz.fakemmsystem.pas @@ -1,4 +1,4 @@ -unit fakemmsystem; +unit laz.FakeMMSystem; {$mode objfpc}{$H+} diff --git a/components/virtualtreeview/units/qt/virtualdragmanager.pas b/components/virtualtreeview/units/gtk2/laz.virtualdragmanager.pas similarity index 99% rename from components/virtualtreeview/units/qt/virtualdragmanager.pas rename to components/virtualtreeview/units/gtk2/laz.virtualdragmanager.pas index c5c9d7b3a1..23ac7b2f27 100644 --- a/components/virtualtreeview/units/qt/virtualdragmanager.pas +++ b/components/virtualtreeview/units/gtk2/laz.virtualdragmanager.pas @@ -1,4 +1,4 @@ -unit virtualdragmanager; +unit laz.VirtualDragManager; {fake unit just to compile - not used under non windows} {$mode delphi} @@ -490,7 +490,7 @@ type implementation uses - VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger {$endif}; + laz.VirtualTrees, Controls {$ifdef DEBUG_VTV}, laz.VTLogger{$endif}; type TVirtualTreeAccess = class (TBaseVirtualTree) diff --git a/components/virtualtreeview/units/carbon/virtualpanningwindow.pas b/components/virtualtreeview/units/gtk2/laz.virtualpanningwindow.pas similarity index 95% rename from components/virtualtreeview/units/carbon/virtualpanningwindow.pas rename to components/virtualtreeview/units/gtk2/laz.virtualpanningwindow.pas index b964cccce6..d8e5237ab2 100644 --- a/components/virtualtreeview/units/carbon/virtualpanningwindow.pas +++ b/components/virtualtreeview/units/gtk2/laz.virtualpanningwindow.pas @@ -1,4 +1,4 @@ -unit virtualpanningwindow; +unit laz.VirtualPanningWindow; {$mode objfpc}{$H+} @@ -29,7 +29,7 @@ implementation {$ifdef DEBUG_VTV} uses - vtlogger; + laz.VTLogger; {$endif} { TVirtualPanningWindow } diff --git a/components/virtualtreeview/units/dummyactivex.inc b/components/virtualtreeview/units/laz.dummyactivex.inc similarity index 100% rename from components/virtualtreeview/units/dummyactivex.inc rename to components/virtualtreeview/units/laz.dummyactivex.inc diff --git a/components/virtualtreeview/units/qt/fakeactivex.pas b/components/virtualtreeview/units/qt/fakeactivex.pas deleted file mode 100644 index f09702de22..0000000000 --- a/components/virtualtreeview/units/qt/fakeactivex.pas +++ /dev/null @@ -1,3 +0,0 @@ -unit FakeActiveX; - -{$i ../dummyactivex.inc} diff --git a/components/virtualtreeview/units/qt/laz.fakeactivex.pas b/components/virtualtreeview/units/qt/laz.fakeactivex.pas new file mode 100644 index 0000000000..5113231ea2 --- /dev/null +++ b/components/virtualtreeview/units/qt/laz.fakeactivex.pas @@ -0,0 +1,3 @@ +unit laz.FakeActiveX; + +{$i ../laz.dummyactivex.inc} diff --git a/components/virtualtreeview/units/carbon/fakemmsystem.pas b/components/virtualtreeview/units/qt/laz.fakemmsystem.pas similarity index 95% rename from components/virtualtreeview/units/carbon/fakemmsystem.pas rename to components/virtualtreeview/units/qt/laz.fakemmsystem.pas index f73f1a5b58..d72feef0f1 100644 --- a/components/virtualtreeview/units/carbon/fakemmsystem.pas +++ b/components/virtualtreeview/units/qt/laz.fakemmsystem.pas @@ -1,4 +1,4 @@ -unit fakemmsystem; +unit laz.FakeMMSystem; {$mode objfpc}{$H+} diff --git a/components/virtualtreeview/units/gtk/virtualdragmanager.pas b/components/virtualtreeview/units/qt/laz.virtualdragmanager.pas similarity index 99% rename from components/virtualtreeview/units/gtk/virtualdragmanager.pas rename to components/virtualtreeview/units/qt/laz.virtualdragmanager.pas index b4a205f06a..5070834b31 100644 --- a/components/virtualtreeview/units/gtk/virtualdragmanager.pas +++ b/components/virtualtreeview/units/qt/laz.virtualdragmanager.pas @@ -1,4 +1,4 @@ -unit virtualdragmanager; +unit laz.VirtualDragManager; {fake unit just to compile - not used under non windows} {$mode delphi} @@ -490,7 +490,7 @@ type implementation uses - VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif}; + laz.VirtualTrees, Controls {$ifdef DEBUG_VTV}, laz.VTLogger {$endif}; type TVirtualTreeAccess = class (TBaseVirtualTree) diff --git a/components/virtualtreeview/units/qt/laz.virtualpanningwindow.pas b/components/virtualtreeview/units/qt/laz.virtualpanningwindow.pas new file mode 100644 index 0000000000..d8e5237ab2 --- /dev/null +++ b/components/virtualtreeview/units/qt/laz.virtualpanningwindow.pas @@ -0,0 +1,58 @@ +unit laz.VirtualPanningWindow; + +{$mode objfpc}{$H+} + +interface + +uses + LCLType, Graphics, Classes, SysUtils; + +type + + { TVirtualPanningWindow } + + TVirtualPanningWindow = class + private + FHandle: THandle; + FOwnerHandle: THandle; + FImage: TBitmap; + procedure HandlePaintMessage; + public + procedure Start(OwnerHandle: THandle; const Position: TPoint); + procedure Stop; + procedure Show(ClipRegion: HRGN); + property Image: TBitmap read FImage; + property Handle: THandle read FHandle; + end; + +implementation + +{$ifdef DEBUG_VTV} +uses + laz.VTLogger; +{$endif} + +{ TVirtualPanningWindow } + +procedure TVirtualPanningWindow.HandlePaintMessage; +begin +end; + +procedure TVirtualPanningWindow.Start(OwnerHandle: THandle; const Position: TPoint); +begin + FImage := TBitmap.Create; +end; + +procedure TVirtualPanningWindow.Stop; +begin + FImage.Free; + FImage := nil; +end; + +procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); +begin + {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif} +end; + +end. + diff --git a/components/virtualtreeview/units/qt/virtualpanningwindow.pas b/components/virtualtreeview/units/qt/virtualpanningwindow.pas deleted file mode 100644 index b964cccce6..0000000000 --- a/components/virtualtreeview/units/qt/virtualpanningwindow.pas +++ /dev/null @@ -1,58 +0,0 @@ -unit virtualpanningwindow; - -{$mode objfpc}{$H+} - -interface - -uses - LCLType, Graphics, Classes, SysUtils; - -type - - { TVirtualPanningWindow } - - TVirtualPanningWindow = class - private - FHandle: THandle; - FOwnerHandle: THandle; - FImage: TBitmap; - procedure HandlePaintMessage; - public - procedure Start(OwnerHandle: THandle; const Position: TPoint); - procedure Stop; - procedure Show(ClipRegion: HRGN); - property Image: TBitmap read FImage; - property Handle: THandle read FHandle; - end; - -implementation - -{$ifdef DEBUG_VTV} -uses - vtlogger; -{$endif} - -{ TVirtualPanningWindow } - -procedure TVirtualPanningWindow.HandlePaintMessage; -begin -end; - -procedure TVirtualPanningWindow.Start(OwnerHandle: THandle; const Position: TPoint); -begin - FImage := TBitmap.Create; -end; - -procedure TVirtualPanningWindow.Stop; -begin - FImage.Free; - FImage := nil; -end; - -procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); -begin - {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif} -end; - -end. - diff --git a/components/virtualtreeview/units/qt5/fakeactivex.pas b/components/virtualtreeview/units/qt5/fakeactivex.pas deleted file mode 100644 index f09702de22..0000000000 --- a/components/virtualtreeview/units/qt5/fakeactivex.pas +++ /dev/null @@ -1,3 +0,0 @@ -unit FakeActiveX; - -{$i ../dummyactivex.inc} diff --git a/components/virtualtreeview/units/qt5/fakemmsystem.pas b/components/virtualtreeview/units/qt5/fakemmsystem.pas deleted file mode 100644 index f73f1a5b58..0000000000 --- a/components/virtualtreeview/units/qt5/fakemmsystem.pas +++ /dev/null @@ -1,38 +0,0 @@ -unit fakemmsystem; - -{$mode objfpc}{$H+} - -interface - -uses - Classes, SysUtils, Types; - -function timeBeginPeriod(x1: DWord): DWord; - -function timeEndPeriod(x1: DWord): DWord; - -function timeGetTime: DWORD; - -implementation - -function timeBeginPeriod(x1: DWord): DWord; -begin - -end; - -function timeEndPeriod(x1: DWord): DWord; -begin - -end; - -function timeGetTime: DWORD; -var - ATime: TSystemTime; -begin - //todo: properly implement - GetLocalTime(ATime); - Result := ATime.MilliSecond; -end; - -end. - diff --git a/components/virtualtreeview/units/qt5/laz.fakeactivex.pas b/components/virtualtreeview/units/qt5/laz.fakeactivex.pas new file mode 100644 index 0000000000..5113231ea2 --- /dev/null +++ b/components/virtualtreeview/units/qt5/laz.fakeactivex.pas @@ -0,0 +1,3 @@ +unit laz.FakeActiveX; + +{$i ../laz.dummyactivex.inc} diff --git a/components/virtualtreeview/units/qt5/laz.fakemmsystem.pas b/components/virtualtreeview/units/qt5/laz.fakemmsystem.pas new file mode 100644 index 0000000000..d72feef0f1 --- /dev/null +++ b/components/virtualtreeview/units/qt5/laz.fakemmsystem.pas @@ -0,0 +1,38 @@ +unit laz.FakeMMSystem; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, Types; + +function timeBeginPeriod(x1: DWord): DWord; + +function timeEndPeriod(x1: DWord): DWord; + +function timeGetTime: DWORD; + +implementation + +function timeBeginPeriod(x1: DWord): DWord; +begin + +end; + +function timeEndPeriod(x1: DWord): DWord; +begin + +end; + +function timeGetTime: DWORD; +var + ATime: TSystemTime; +begin + //todo: properly implement + GetLocalTime(ATime); + Result := ATime.MilliSecond; +end; + +end. + diff --git a/components/virtualtreeview/units/qt5/laz.virtualdragmanager.pas b/components/virtualtreeview/units/qt5/laz.virtualdragmanager.pas new file mode 100644 index 0000000000..5070834b31 --- /dev/null +++ b/components/virtualtreeview/units/qt5/laz.virtualdragmanager.pas @@ -0,0 +1,1629 @@ +unit laz.VirtualDragManager; +{fake unit just to compile - not used under non windows} + +{$mode delphi} + +interface + +uses + Classes, SysUtils, Types; + +const + // Drag image helpers for Windows 2000 and up. + IID_IDropTargetHelper: TGUID = (D1: $4657278B; D2: $411B; D3: $11D2; D4: ($83, $9A, $00, $C0, $4F, $D9, $18, $D0)); + IID_IDragSourceHelper: TGUID = (D1: $DE5BF786; D2: $477A; D3: $11D2; D4: ($83, $9D, $00, $C0, $4F, $D9, $18, $D0)); + IID_IDropTarget: TGUID = (D1: $00000122; D2: $0000; D3: $0000; D4: ($C0, $00, $00, $00, $00, $00, $00, $46)); + CLSID_DragDropHelper: TGUID = (D1: $4657278A; D2: $411B; D3: $11D2; D4: ($83, $9A, $00, $C0, $4F, $D9, $18, $D0)); + + SID_IDropTargetHelper = '{4657278B-411B-11D2-839A-00C04FD918D0}'; + SID_IDragSourceHelper = '{DE5BF786-477A-11D2-839D-00C04FD918D0}'; + SID_IDropTarget = '{00000122-0000-0000-C000-000000000046}'; + + //Bridge to ActiveX constants + + TYMED_HGLOBAL = 1; + TYMED_ISTREAM = 4; + DVASPECT_CONTENT = 1; + CLSCTX_INPROC_SERVER = $0010; + DROPEFFECT_COPY = 1; + DROPEFFECT_LINK = 4; + DROPEFFECT_MOVE = 2; + DROPEFFECT_NONE = 0; + DROPEFFECT_SCROLL = dword($80000000); + DATADIR_GET = 1; + +type + //types from win unit + Long = LongInt; + WinBool= LongBool; + Bool= WinBool; + ULONG = cardinal; + LONGLONG = int64; + LPDWORD = ^DWORD; + LPVOID = pointer; + + TCOLORREF = cardinal; + + TIID = TGUID; + + LARGE_INTEGER = record + case byte of + 0: (LowPart : DWORD; + HighPart : LONG); + 1: (QuadPart : LONGLONG); + end; + PLARGE_INTEGER = ^LARGE_INTEGER; + _LARGE_INTEGER = LARGE_INTEGER; + + TLargeInteger = Int64; + PLargeInteger = ^TLargeInteger; + + ULARGE_INTEGER = record + case byte of + 0: (LowPart : DWORD; + HighPart : DWORD); + 1: (QuadPart : LONGLONG); + end; + PULARGE_INTEGER = ^ULARGE_INTEGER; + _ULARGE_INTEGER = ULARGE_INTEGER; + + + HANDLE = System.THandle; + HWND = HANDLE; + //HRESULT = System.HResult; + + HBITMAP = HANDLE; + HENHMETAFILE = HANDLE; + + //activex types + + + IMoniker = Interface; + + WINOLEAPI = HResult; + TLCID = DWORD; + + OleChar = WChar; + LPOLESTR = ^OLECHAR; + HMetaFilePict = Pointer; + + + tagBIND_OPTS = Record + cvStruct, // sizeof(BIND_OPTS) + grfFlags, + grfMode, + dwTickCountDeadline : DWord; + End; + TBind_Opts = tagBIND_OPTS; + TCLIPFORMAT = Word; + + tagDVTARGETDEVICE = Record + tdSize : DWord; + tdDriverNameOffset, + tdDeviceNameOffset, + tdPortNameOffset, + tdExtDevmodeOffset : Word; + Data : Record End; + End; + DVTARGETDEVICE = TagDVTARGETDEVICE; + PDVTARGETDEVICE = ^tagDVTARGETDEVICE; + + + + tagFORMATETC = Record + CfFormat : Word {TCLIPFORMAT}; + Ptd : PDVTARGETDEVICE; + dwAspect : DWORD; + lindex : Long; + tymed : DWORD; + End; + FORMATETC = TagFORMATETC; + TFORMATETC = FORMATETC; + LPFORMATETC = ^FORMATETC; + PFormatEtc = LPFORMATETC; + + tagSTATDATA = Record + // field used by: + FORMATETC : Tformatetc; // EnumAdvise, EnumData (cache), EnumFormats + advf : DWord; // EnumAdvise, EnumData (cache) + padvSink : Pointer {IAdviseSink}; // EnumAdvise + dwConnection: DWord; // EnumAdvise + End; + STATDATA = TagStatData; + + + TagSTGMEDIUM = Record + Tymed : DWord; + Case Integer Of + 0 : (HBITMAP : hBitmap; PUnkForRelease : Pointer {IUnknown}); + 1 : (HMETAFILEPICT : hMetaFilePict ); + 2 : (HENHMETAFILE : hEnhMetaFile ); + 3 : (HGLOBAL : hGlobal ); + 4 : (lpszFileName : LPOLESTR ); + 5 : (pstm : Pointer{IStream} ); + 6 : (pstg : Pointer{IStorage} ); + End; + USTGMEDIUM = TagSTGMEDIUM; + STGMEDIUM = USTGMEDIUM; + TStgMedium = TagSTGMEDIUM; + PStgMedium = ^TStgMedium; + LPSTGMEDIUM = ^STGMEDIUM; + + IEnumString = Interface (IUnknown) + ['{00000101-0000-0000-C000-000000000046}'] + Function Next(Celt:ULong;Out xcelt;Out Celtfetched:ULong):HResult; StdCall; +// Function RemoteNext(Celt:ULong; Out celt;Out Celtfetched:ULong):HResult; StdCall; + Function Skip (Celt:ULong):Hresult;StdCall; + Function Reset:HResult;StdCall; + Function Clone(Out penum:IEnumString):HResult;StdCall; + End; + + + IEnumMoniker = Interface (IUnknown) + ['{00000102-0000-0000-C000-000000000046}'] + Function Next(celt:ULong; out Elt;out celftfetched: ULong):HResult; StdCall; +// Function RemoteNext(Celt:ULong; Out rgelt;out celtfetched :ULong):Hresult; StdCall; + Function Skip(celt:Ulong):HResult; StdCall; + Function Reset:HResult; StdCall; + Function Close(out penum:IEnumMoniker):HResult;StdCall; + End; + + IEnumSTATDATA = Interface (IUnknown) + ['{00000105-0000-0000-C000-000000000046}'] + Function Next(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall; +// Function RemoteNext(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall; + Function Skip(Celt:ULong):HResult;StdCall; + Function Reset:HResult;StdCall; + Function Clone(out penum:IEnumstatdata):HResult;StdCall; + End; + + IEnumFORMATETC = Interface (IUnknown) + ['{00000103-0000-0000-C000-000000000046}'] + Function Next(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall; +// Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall; + Function Skip(Celt:ULong):HResult;StdCall; + Function Reset:HResult;StdCall; + Function Clone(out penum:IEnumFORMATETC):HResult;StdCall; + End; + + + + IPersist = Interface (IUnknown) + ['{0000010c-0000-0000-C000-000000000046}'] + Function GetClassId(clsid:TClsId):HResult; StdCall; + End; + + IPersistStream = Interface(IPersist) + ['{00000109-0000-0000-C000-000000000046}'] + Function IsDirty:HResult; StdCall; + Function Load(Const stm: IStream):HResult; StdCall; + Function Save(Const stm: IStream;fClearDirty:Bool):HResult;StdCall; + Function GetSizeMax(Out cbSize:ULarge_Integer):HResult; StdCall; + End; + + + IRunningObjectTable = Interface (IUnknown) + ['{00000010-0000-0000-C000-000000000046}'] + Function Register (grfFlags :DWord;const unkobject:IUnknown;Const mkObjectName:IMoniker;Out dwregister:DWord):HResult;StdCall; + Function Revoke (dwRegister:DWord):HResult; StdCall; + Function IsRunning (Const mkObjectName: IMoniker):HResult;StdCall; + Function GetObject (Const mkObjectName: IMoniker; Out punkObject:IUnknown):HResult; StdCall; + Function NoteChangeTime(dwRegister :DWord;Const FileTime: TFileTime):HResult;StdCall; + Function GetTimeOfLastChange(Const mkObjectName:IMoniker;Out filetime:TFileTime):HResult; StdCall; + Function EnumRunning (Out enumMoniker: IEnumMoniker):HResult; StdCall; + End; + + + IBindCtx = Interface (IUnknown) + ['{0000000e-0000-0000-C000-000000000046}'] + Function RegisterObjectBound(Const punk:IUnknown):HResult; stdCall; + Function RevokeObjectBound (Const Punk:IUnknown):HResult; stdCall; + Function ReleaseBoundObjects :HResult; StdCall; + Function SetBindOptions(Const bindOpts:TBind_Opts):HResult; stdCall; +// Function RemoteSetBindOptions(Const bind_opts: TBind_Opts2):HResult;StdCall; + Function GetBindOptions(var BindOpts:TBind_Opts):HResult; stdCall; +// Function RemoteGetBindOptions(Var bind_opts: TBind_Opts2):HResult;StdCall; + Function GetRunningObjectTable(Out rot : IRunningObjectTable):Hresult; StdCall; + Function RegisterObjectParam(Const pszkey:LPOleStr;const punk:IUnknown):HResult; + Function GetObjectParam(Const pszkey:LPOleStr; out punk: IUnknown):HResult; StdCall; + Function EnumObjectParam (out enum:IEnumString):Hresult;StdCall; + Function RevokeObjectParam(pszKey:LPOleStr):HResult;StdCall; + End; + + + PIMoniker = ^IMoniker; + IMoniker = Interface (IPersistStream) + ['{0000000f-0000-0000-C000-000000000046}'] + Function BindToObject (const pbc:IBindCtx;const mktoleft:IMoniker; RiidResult:TIID;Out vresult):HResult;StdCall; +// Function RemoteBindToObject (const pbc:IBindCtx;const mktoleft:IMoniker;RiidResult:TIID;Out vresult):HResult;StdCall; + Function BindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; Riid:TIID;Out vobj):HResult; StdCall; +// Function RemoteBindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; Riid:TIID;Out vobj):HResult; StdCall; + Function Reduce (const pbc:IBindCtx; dwReduceHowFar:DWord; mktoLeft: PIMoniker; Out mkReduced:IMoniker):HResult; StdCall; + Function ComposeWith(Const MkRight:IMoniker;fOnlyIfNotGeneric:BOOL; OUT mkComposite:IMoniker):HResult; StdCall; + Function Enum(fForward:Bool;Out enumMoniker:IEnumMoniker):HResult;StdCall; + Function IsEqual(Const mkOtherMoniker:IMoniker):HResult;StdCall; + Function Hash (Out dwHash:Dword):HResult;StdCall; + Function IsRunning(Const bc:IBindCtx;Const MkToLeft:IMoniker;Const mknewlyRunning:IMoniker):HResult;StdCall; + Function GetTimeOfLastChange(Const bc:IBindCtx;Const mkToLeft:IMoniker; out ft : FileTime):HResult; StdCall; + Function Inverse(out mk : IMoniker):HResult; StdCall; + Function CommonPrefixWith (Const mkOther:IMoniker):HResult; StdCall; + Function RelativePathTo(Const mkother:IMoniker; Out mkRelPath : IMoniker):HResult;StdCall; + Function GetDisplayName(Const bc:IMoniker;const mktoleft:IMoniker;Out szDisplayName: pOleStr):HResult; StdCall; + Function ParseDisplayName(Const bc:IBindCtx;Const mkToLeft:IMoniker;szDisplayName:POleStr;out cheaten:ULong;out mkOut:IMoniker):HResult; StdCall; + Function IsSystemMonitor(Out dwMkSys:DWord):HResult;StdCall; + End; + + + IAdviseSink = Interface (IUnknown) + ['{0000010f-0000-0000-C000-000000000046}'] + {$ifdef midl500} ['{00000150-0000-0000-C000-000000000046}'] {$endif} + Procedure OnDataChange (Const pformatetc : Formatetc;const pstgmed : STGMEDIUM); StdCall; + Procedure OnViewChange (dwAspect : DWord; lindex : Long); StdCall; + Procedure OnRename (Const pmk : IMoniker); StdCall; + Procedure OnSave; StdCall; + Procedure OnClose; StdCall; + End; + + + //Fake interfaces + IDataObject = Interface (IUnknown) + ['{0000010e-0000-0000-C000-000000000046}'] + Function GetData(Const formatetcIn : FORMATETC;Out medium : STGMEDIUM):HRESULT; STDCALL; + Function GetDataHere(CONST pformatetc : FormatETC; Out medium : STGMEDIUM):HRESULT; STDCALL; + Function QueryGetData(const pformatetc : FORMATETC):HRESULT; STDCALL; + Function GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; STDCALl; + Function SetData (Const pformatetc : FORMATETC; + {$IF FPC_FullVersion >= 30200}var{$ELSE}const{$IFEND} medium:STGMEDIUM; + FRelease : BOOL):HRESULT; StdCall; + Function EnumFormatEtc(dwDirection : DWord; OUT enumformatetcpara : IENUMFORMATETC):HRESULT; StdCall; + Function DAdvise(const formatetc : FORMATETC;advf :DWORD; CONST AdvSink : IAdviseSink;OUT dwConnection:DWORD):HRESULT;StdCall; + Function DUnadvise(dwconnection :DWord) :HRESULT;StdCall; + Function EnumDAvise(Out enumAdvise : IEnumStatData):HResult;StdCall; + End; + + IDropTarget = interface(IUnknown) + ['{00000122-0000-0000-C000-000000000046}'] + function DragEnter(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall; + function DragOver(grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall; + function DragLeave: HResult;StdCall; + function Drop(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD):HResult;StdCall; + end; + + + IDropSource = interface(IUnknown) + ['{00000121-0000-0000-C000-000000000046}'] + function QueryContinueDrag(fEscapePressed: BOOL; + grfKeyState: LongWord):HResult;StdCall; + function GiveFeedback(dwEffect: LongWord): HResult;StdCall; + end; + + + IDataAdviseHolder = Interface (IUnknown) + ['{00000110-0000-0000-C000-000000000046}'] + Function Advise (CONST pdataObject : IDataObject;CONST fetc:FORMATETC;advf : DWORD;Const pAdvise:IAdviseSink;Out DwConnection:DWord):HResult; StdCall; + Function Unadvise (dwConnection:Dword):HResult; StdCall; + Function EnumAdvise(out penumAdvise : IEnumStatData):HResult;StdCall; + Function SendOnDataChange(const pDataObject :IDataObject;DwReserved,advf : DWord):HResult; StdCall; + End; + + + + // OLE drag'n drop support + TFormatEtcArray = array of TFormatEtc; + TFormatArray = array of Word; + + // IDataObject.SetData support + TInternalStgMedium = packed record + Format: TClipFormat; + Medium: TStgMedium; + end; + TInternalStgMediumArray = array of TInternalStgMedium; + + TEnumFormatEtc = class(TInterfacedObject, IEnumFormatEtc) + private + FTree: TObject; + FFormatEtcArray: TFormatEtcArray; + FCurrentIndex: Integer; + public + constructor Create(Tree: TObject; AFormatEtcArray: TFormatEtcArray); + function Clone(out Enum: IEnumFormatEtc): HResult; stdcall; + function Next(celt: LongWord; out elt: FormatEtc; out pceltFetched: LongWord): HResult; stdcall; + function Reset: HResult; stdcall; + function Skip(celt: LongWord): HResult; stdcall; + end; + + IDropTargetHelper = interface(IUnknown) + [SID_IDropTargetHelper] + function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall; + function DragLeave: HRESULT; stdcall; + function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall; + function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall; + function Show(fShow: Boolean): HRESULT; stdcall; + end; + + PSHDragImage = ^TSHDragImage; + TSHDragImage = packed record + sizeDragImage: TSize; + ptOffset: TPoint; + hbmpDragImage: HBITMAP; + ColorRef: TColorRef; + end; + + IDragSourceHelper = interface(IUnknown) + [SID_IDragSourceHelper] + function InitializeFromBitmap(var SHDragImage: TSHDragImage; pDataObject: IDataObject): HRESULT; stdcall; + function InitializeFromWindow(Window: HWND; var ppt: TPoint; pDataObject: IDataObject): HRESULT; stdcall; + end; + + + + IVTDragManager = interface(IUnknown) + ['{C4B25559-14DA-446B-8901-0C879000EB16}'] + procedure ForceDragLeave; stdcall; + function GetDataObject: IDataObject; stdcall; + function GetDragSource: TObject; stdcall; + function GetDropTargetHelperSupported: Boolean; stdcall; + function GetIsDropTarget: Boolean; stdcall; + + property DataObject: IDataObject read GetDataObject; + property DragSource: TObject read GetDragSource; + property DropTargetHelperSupported: Boolean read GetDropTargetHelperSupported; + property IsDropTarget: Boolean read GetIsDropTarget; + end; + + // This data object is used in two different places. One is for clipboard operations and the other while dragging. + TVTDataObject = class(TInterfacedObject, IDataObject) + private + //FOwner: TBaseVirtualTree; // The tree which provides clipboard or drag data. + FOwner: TObject; // The tree which provides clipboard or drag data. + FForClipboard: Boolean; // Determines which data to render with GetData. + FFormatEtcArray: TFormatEtcArray; + FInternalStgMediumArray: TInternalStgMediumArray; // The available formats in the DataObject + FAdviseHolder: IDataAdviseHolder; // Reference to an OLE supplied implementation for advising. + protected + function CanonicalIUnknown(TestUnknown: IUnknown): IUnknown; + function EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; + function FindFormatEtc(TestFormatEtc: TFormatEtc; const FormatEtcArray: TFormatEtcArray): integer; + function FindInternalStgMedium(Format: TClipFormat): PStgMedium; + function HGlobalClone(HGlobal: THandle): THandle; + function RenderInternalOLEData(const FormatEtcIn: TFormatEtc; var Medium: TStgMedium; var OLEResult: HResult): Boolean; + function StgMediumIncRef(const InStgMedium: TStgMedium; var OutStgMedium: TStgMedium; + CopyInMedium: Boolean; DataObject: IDataObject): HRESULT; + + property ForClipboard: Boolean read FForClipboard; + property FormatEtcArray: TFormatEtcArray read FFormatEtcArray write FFormatEtcArray; + property InternalStgMediumArray: TInternalStgMediumArray read FInternalStgMediumArray write FInternalStgMediumArray; + property Owner: TObject read FOwner; + public + constructor Create(AOwner: TObject; ForClipboard: Boolean); virtual; + destructor Destroy; override; + + function DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const advSink: IAdviseSink; out dwConnection: DWord): + HResult; virtual; stdcall; + function DUnadvise(dwConnection: DWord): HResult; virtual; stdcall; + Function EnumDAvise(Out enumAdvise : IEnumStatData):HResult;virtual;StdCall; + function EnumFormatEtc(Direction: DWord; out EnumFormatEtc: IEnumFormatEtc): HResult; virtual; stdcall; + Function GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; virtual; STDCALl; + function GetData(const FormatEtcIn: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall; + function GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall; + function QueryGetData(const FormatEtc: TFormatEtc): HResult; virtual; stdcall; + function SetData(const FormatEtc: TFormatEtc; + {$IF FPC_FullVersion >= 30200}var{$ELSE}const{$IFEND} Medium: TStgMedium; + DoRelease: BOOL): HResult; virtual; stdcall; + end; + + // TVTDragManager is a class to manage drag and drop in a Virtual Treeview. + TVTDragManager = class(TInterfacedObject, IVTDragManager, IDropSource, IDropTarget) + private + FOwner, // The tree which is responsible for drag management. + FDragSource: TObject; // Reference to the source tree if the source was a VT, might be different than + // the owner tree. + FIsDropTarget: Boolean; // True if the owner is currently the drop target. + FDataObject: IDataObject; // A reference to the data object passed in by DragEnter (only used when the owner + // tree is the current drop target). + FDropTargetHelper: IDropTargetHelper; // Win2k > Drag image support + FFullDragging: BOOL; // True, if full dragging is currently enabled in the system. + + function GetDataObject: IDataObject; stdcall; + function GetDragSource: TObject; stdcall; + function GetDropTargetHelperSupported: Boolean; stdcall; + function GetIsDropTarget: Boolean; stdcall; + public + constructor Create(AOwner: TObject); virtual; + destructor Destroy; override; + + function DragEnter(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; + var Effect: LongWord): HResult; stdcall; + function DragLeave: HResult; stdcall; + function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; + function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; + procedure ForceDragLeave; stdcall; + function GiveFeedback(Effect: LongWord): HResult; stdcall; + function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall; + end; + + //Ole helper functions + + function Succeeded(Status : HRESULT) : BOOLEAN; + + function Failed(Status : HRESULT) : BOOLEAN; + + //ActiveX functions that have wrong calling convention in fpc + + function RegisterDragDrop(hwnd:HWND; pDropTarget:IDropTarget):WINOLEAPI;stdcall; + + function RevokeDragDrop(hwnd:HWND):WINOLEAPI;stdcall; + + function DoDragDrop(pDataObj:IDataObject; pDropSource:IDropSource; dwOKEffects:DWORD; pdwEffect:LPDWORD):WINOLEAPI; + + function OleInitialize(pvReserved:LPVOID):WINOLEAPI;stdcall; + + procedure OleUninitialize;stdcall; + + procedure ReleaseStgMedium(_para1:LPSTGMEDIUM);stdcall; + + function OleSetClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall; + + function OleGetClipboard(out ppDataObj:IDataObject):WINOLEAPI;stdcall; + + function OleFlushClipboard:WINOLEAPI;stdcall; + + function OleIsCurrentClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall; + + function CreateStreamOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out stm:IStream):WINOLEAPI;stdcall; + + function CoCreateInstance(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD;const _para4:TIID;out _para5):HRESULT;stdcall; + + //helper functions to isolate windows/OLE specific code + + function RenderOLEData(Tree: TObject; const FormatEtcIn: TFormatEtc; out Medium: TStgMedium; + ForClipboard: Boolean): HResult; + + function GetStreamFromMedium(Medium:TStgMedium):TStream; + + procedure UnlockMediumData(Medium:TStgMedium); + + function GetTreeFromDataObject(const DataObject: IDataObject; var Format: TFormatEtc): TObject; + + function AllocateGlobal(Data: Pointer; DataSize:Cardinal): HGLOBAL; + +implementation + +uses + laz.VirtualTrees, Controls {$ifdef DEBUG_VTV}, laz.VTLogger {$endif}; + +type + TVirtualTreeAccess = class (TBaseVirtualTree) + end; + +function Succeeded(Status : HRESULT) : BOOLEAN; + begin + Succeeded:=Status and HRESULT($80000000)=0; + end; + +function Failed(Status : HRESULT) : BOOLEAN; + begin + Failed:=Status and HRESULT($80000000)<>0; + end; + +function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function RevokeDragDrop(hwnd: HWND): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource; + dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function OleInitialize(pvReserved: LPVOID): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +procedure OleUninitialize; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +procedure ReleaseStgMedium(_para1: LPSTGMEDIUM); +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function OleFlushClipboard: WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out + stm: IStream): WINOLEAPI; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + +function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown; + _para3: DWORD; const _para4: TIID; out _para5): HRESULT; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +end; + + +function RenderOLEData(Tree: TObject; const FormatEtcIn: TFormatEtc; out + Medium: TStgMedium; ForClipboard: Boolean): HResult; +{ + //--------------- local function -------------------------------------------- + + procedure WriteNodes(Stream: TStream); + + var + Selection: TNodeArray; + I: Integer; + + begin + with TVirtualTreeAccess(Tree) do + begin + if ForClipboard then + Selection := GetSortedCutCopySet(True) + else + Selection := GetSortedSelection(True); + for I := 0 to High(Selection) do + WriteNode(Stream, Selection[I]); + end; + end; + + //--------------- end local function ---------------------------------------- +} +var + Data: PCardinal; + ResPointer: Pointer; + ResSize: Integer; + OLEStream: IStream; + VCLStream: TStream; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + VCLStream := nil; + try + Medium.PunkForRelease := nil; + // Return data in one of the supported storage formats, prefer IStream. + if FormatEtcIn.tymed and TYMED_ISTREAM <> 0 then + begin + // Create an IStream on a memory handle (here it is 0 which indicates to implicitely allocated a handle). + // Do not use TStreamAdapter as it is not compatible with OLE (when flushing the clipboard OLE wants the HGlobal + // back which is not supported by TStreamAdapater). + CreateStreamOnHGlobal(0, True, OLEStream); + + VCLStream := TOLEStream.Create(OLEStream); + WriteNodes(VCLStream); + // Rewind stream. + VCLStream.Position := 0; + Medium.tymed := TYMED_ISTREAM; + IUnknown(Medium.Pstm) := OLEStream; + Result := S_OK; + end + else + begin + VCLStream := TMemoryStream.Create; + WriteNodes(VCLStream); + ResPointer := TMemoryStream(VCLStream).Memory; + ResSize := VCLStream.Position; + + // Allocate memory to hold the string. + if ResSize > 0 then + begin + Medium.hGlobal := GlobalAlloc(GHND or GMEM_SHARE, ResSize + SizeOf(Cardinal)); + Data := GlobalLock(Medium.hGlobal); + // Store the size of the data too, for easy retrival. + Data^ := ResSize; + Inc(Data); + Move(ResPointer^, Data^, ResSize); + GlobalUnlock(Medium.hGlobal); + Medium.tymed := TYMED_HGLOBAL; + + Result := S_OK; + end + else + Result := E_FAIL; + end; + finally + // We can free the VCL stream here since it was either a pure memory stream or only a wrapper around + // the OLEStream which exists independently. + VCLStream.Free; + end; + } +end; + + +type + // needed to handle OLE global memory objects + TOLEMemoryStream = class(TCustomMemoryStream) + public + function Write(const Buffer; Count: Integer): Longint; override; + end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + // raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError)); +end; + + +function GetStreamFromMedium(Medium: TStgMedium): TStream; + +var + Data: Pointer; + I: Integer; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +{ + Result := nil; + if Medium.tymed = TYMED_ISTREAM then + Result := TOLEStream.Create(IUnknown(Medium.Pstm) as IStream) + else + begin + Data := GlobalLock(Medium.hGlobal); + if Assigned(Data) then + begin + // Get the total size of data to retrieve. + I := PCardinal(Data)^; + Inc(PCardinal(Data)); + Result := TOLEMemoryStream.Create; + TOLEMemoryStream(Result).SetPointer(Data, I); + end; + end; +} +end; + +procedure UnlockMediumData(Medium: TStgMedium); +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} +{ + if Medium.tymed = TYMED_HGLOBAL then + GlobalUnlock(Medium.hGlobal); + } +end; + +function GetTreeFromDataObject(const DataObject: IDataObject; + var Format: TFormatEtc): TObject; + +var + Medium: TStgMedium; + Data: PVTReference; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := nil; + if Assigned(DataObject) then + begin + Format.cfFormat := CF_VTREFERENCE; + if DataObject.GetData(Format, Medium) = S_OK then + begin + Data := GlobalLock(Medium.hGlobal); + if Assigned(Data) then + begin + if Data.Process = GetCurrentProcessID then + Result := Data.Tree; + GlobalUnlock(Medium.hGlobal); + end; + ReleaseStgMedium(@Medium); + end; + end; + } +end; + +function AllocateGlobal(Data: Pointer; DataSize: Cardinal): HGLOBAL; +var + P:Pointer; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize); + P := GlobalLock(Result); + Move(Data^, P^, DataSize); + GlobalUnlock(Result); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +// OLE drag and drop support classes +// This is quite heavy stuff (compared with the VCL implementation) but is much better suited to fit the needs +// of DD'ing various kinds of virtual data and works also between applications. + +//----------------- TEnumFormatEtc ------------------------------------------------------------------------------------- + +constructor TEnumFormatEtc.Create(Tree: TObject; AFormatEtcArray: TFormatEtcArray); + +var + I: Integer; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + inherited Create; + + FTree := Tree; + // Make a local copy of the format data. + SetLength(FFormatEtcArray, Length(AFormatEtcArray)); + for I := 0 to High(AFormatEtcArray) do + FFormatEtcArray[I] := AFormatEtcArray[I]; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TEnumFormatEtc.Clone(out Enum: IEnumFormatEtc): HResult; + +var + AClone: TEnumFormatEtc; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := S_OK; + try + AClone := TEnumFormatEtc.Create(nil, FFormatEtcArray); + AClone.FCurrentIndex := FCurrentIndex; + Enum := AClone as IEnumFormatEtc; + except + Result := E_FAIL; + end; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TEnumFormatEtc.Next(celt: LongWord; out elt: FormatEtc; out pceltFetched: LongWord): HResult; + +var + CopyCount: LongWord; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := S_FALSE; + CopyCount := Length(FFormatEtcArray) - FCurrentIndex; + if celt < CopyCount then + CopyCount := celt; + if CopyCount > 0 then + begin + Move(FFormatEtcArray[FCurrentIndex], elt, CopyCount * SizeOf(TFormatEtc)); + Inc(FCurrentIndex, CopyCount); + Result := S_OK; + end; + //todo_lcl_check Delphi treats pceltFetched an PInteger. Implemented like in fpc.activex. What heappens with + // a C Program call with a NULL in pCeltFetcjed?? + //Answer: Yes. Is necessary a check here + if @pceltFetched <> nil then + pceltFetched := CopyCount; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TEnumFormatEtc.Reset: HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + FCurrentIndex := 0; + Result := S_OK; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TEnumFormatEtc.Skip(celt: LongWord): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if FCurrentIndex + celt < High(FFormatEtcArray) then + begin + Inc(FCurrentIndex, celt); + Result := S_Ok; + end + else + Result := S_FALSE; + } +end; + + +//----------------- TVTDataObject -------------------------------------------------------------------------------------- + +constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean); + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + inherited Create; + + FOwner := AOwner; + FForClipboard := ForClipboard; + TVirtualTreeAccess(FOwner).GetNativeClipboardFormats(FFormatEtcArray); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +destructor TVTDataObject.Destroy; + +var + I: Integer; + StgMedium: PStgMedium; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + // Cancel a pending clipboard operation if this data object was created for the clipboard and + // is freed because something else is placed there. + if FForClipboard and not (tsClipboardFlushing in TVirtualTreeAccess(FOwner).TreeStates) then + TVirtualTreeAccess(FOwner).CancelCutOrCopy; + + // Release any internal clipboard formats + for I := 0 to High(FormatEtcArray) do + begin + StgMedium := FindInternalStgMedium(FormatEtcArray[I].cfFormat); + if Assigned(StgMedium) then + ReleaseStgMedium(StgMedium); + end; + + FormatEtcArray := nil; + inherited; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.CanonicalIUnknown(TestUnknown: IUnknown): IUnknown; + +// Uses COM object identity: An explicit call to the IUnknown::QueryInterface method, requesting the IUnknown +// interface, will always return the same pointer. + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if Assigned(TestUnknown) then + begin + if TestUnknown.QueryInterface(IUnknown, Result) = 0 then + Result._Release // Don't actually need it just need the pointer value + else + Result := TestUnknown + end + else + Result := TestUnknown + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and + (FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and + (FormatEtc1.tymed and FormatEtc2.tymed <> 0); + + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.FindFormatEtc(TestFormatEtc: TFormatEtc; const FormatEtcArray: TFormatEtcArray): integer; + +var + I: integer; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := -1; + for I := 0 to High(FormatEtcArray) do + begin + if EqualFormatEtc(TestFormatEtc, FormatEtcArray[I]) then + begin + Result := I; + Break; + end + end; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.FindInternalStgMedium(Format: TClipFormat): PStgMedium; + +var + I: integer; +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := nil; + for I := 0 to High(InternalStgMediumArray) do + begin + if Format = InternalStgMediumArray[I].Format then + begin + Result := @InternalStgMediumArray[I].Medium; + Break; + end + end; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.HGlobalClone(HGlobal: THandle): THandle; + +// Returns a global memory block that is a copy of the passed memory block. + +var + Size: Cardinal; + Data, + NewData: PChar; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Size := GlobalSize(HGlobal); + Result := GlobalAlloc(GPTR, Size); + Data := GlobalLock(hGlobal); + try + NewData := GlobalLock(Result); + try + Move(Data^, NewData^, Size); + finally + GlobalUnLock(Result); + end + finally + GlobalUnLock(hGlobal); + end; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.RenderInternalOLEData(const FormatEtcIn: TFormatEtc; var Medium: TStgMedium; + var OLEResult: HResult): Boolean; + +// Tries to render one of the formats which have been stored via the SetData method. +// Since this data is already there it is just copied or its reference count is increased (depending on storage medium). + +var + InternalMedium: PStgMedium; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + + Result := True; + InternalMedium := FindInternalStgMedium(FormatEtcIn.cfFormat); + if Assigned(InternalMedium) then + OLEResult := StgMediumIncRef(InternalMedium^, Medium, False, Self as IDataObject) + else + Result := False; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.StgMediumIncRef(const InStgMedium: TStgMedium; var OutStgMedium: TStgMedium; + CopyInMedium: Boolean; DataObject: IDataObject): HRESULT; + +// InStgMedium is the data that is requested, OutStgMedium is the data that we are to return either a copy of or +// increase the IDataObject's reference and send ourselves back as the data (unkForRelease). The InStgMedium is usually +// the result of a call to find a particular FormatEtc that has been stored locally through a call to SetData. +// If CopyInMedium is not true we already have a local copy of the data when the SetData function was called (during +// that call the CopyInMedium must be true). Then as the caller asks for the data through GetData we do not have to make +// copy of the data for the caller only to have them destroy it then need us to copy it again if necessary. +// This way we increase the reference count to ourselves and pass the STGMEDIUM structure initially stored in SetData. +// This way when the caller frees the structure it sees the unkForRelease is not nil and calls Release on the object +// instead of destroying the actual data. + +var + Len: Integer; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := S_OK; + + // Simply copy all fields to start with. + OutStgMedium := InStgMedium; + // The data handled here always results from a call of SetData we got. This ensures only one storage format + // is indicated and hence the case statement below is safe (IDataObject.GetData can optionally use several + // storage formats). + case InStgMedium.tymed of + TYMED_HGLOBAL: + begin + if CopyInMedium then + begin + // Generate a unique copy of the data passed + OutStgMedium.hGlobal := HGlobalClone(InStgMedium.hGlobal); + if OutStgMedium.hGlobal = 0 then + Result := E_OUTOFMEMORY + end + else + // Don't generate a copy just use ourselves and the copy previously saved. + OutStgMedium.PunkForRelease := Pointer(DataObject); // Does not increase RefCount. + end; + TYMED_FILE: + begin + //todo_lcl_check + Len := Length(WideString(InStgMedium.lpszFileName)) + 1; // Don't forget the terminating null character. + OutStgMedium.lpszFileName := CoTaskMemAlloc(2 * Len); + Move(InStgMedium.lpszFileName^, OutStgMedium.lpszFileName^, 2 * Len); + end; + TYMED_ISTREAM: + IUnknown(OutStgMedium.Pstm)._AddRef; + TYMED_ISTORAGE: + IUnknown(OutStgMedium.Pstg)._AddRef; + TYMED_GDI: + if not CopyInMedium then + // Don't generate a copy just use ourselves and the previously saved data. + OutStgMedium.PunkForRelease := Pointer(DataObject) // Does not increase RefCount. + else + Result := DV_E_TYMED; // Don't know how to copy GDI objects right now. + TYMED_MFPICT: + if not CopyInMedium then + // Don't generate a copy just use ourselves and the previously saved data. + OutStgMedium.PunkForRelease := Pointer(DataObject) // Does not increase RefCount. + else + Result := DV_E_TYMED; // Don't know how to copy MetaFile objects right now. + TYMED_ENHMF: + if not CopyInMedium then + // Don't generate a copy just use ourselves and the previously saved data. + OutStgMedium.PunkForRelease := Pointer(DataObject) // Does not increase RefCount. + else + Result := DV_E_TYMED; // Don't know how to copy enhanced metafiles objects right now. + else + Result := DV_E_TYMED; + end; + + if (Result = S_OK) and Assigned(OutStgMedium.PunkForRelease) then + IUnknown(OutStgMedium.PunkForRelease)._AddRef; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const advSink: IAdviseSink; + out dwConnection: DWord): HResult; + +// Advise sink management is greatly simplified by the IDataAdviseHolder interface. +// We use this interface and forward all concerning calls to it. + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := S_OK; + if FAdviseHolder = nil then + Result := CreateDataAdviseHolder(FAdviseHolder); + if Result = S_OK then + Result := FAdviseHolder.Advise(Self as IDataObject, FormatEtc, advf, advSink, dwConnection); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.DUnadvise(dwConnection: DWord): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if FAdviseHolder = nil then + Result := E_NOTIMPL + else + Result := FAdviseHolder.Unadvise(dwConnection); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if FAdviseHolder = nil then + Result := OLE_E_ADVISENOTSUPPORTED + else + Result := FAdviseHolder.EnumAdvise(enumAdvise); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.EnumFormatEtc(Direction: DWord; out EnumFormatEtc: IEnumFormatEtc): HResult; + +var + NewList: TEnumFormatEtc; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := E_FAIL; + if Direction = DATADIR_GET then + begin + NewList := TEnumFormatEtc.Create(TVirtualTreeAccess(FOwner), FormatEtcArray); + EnumFormatEtc := NewList as IEnumFormatEtc; + Result := S_OK; + end + else + EnumFormatEtc := nil; + if EnumFormatEtc = nil then + Result := OLE_S_USEREG; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + //Result := DATA_S_SAMEFORMATETC; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.GetData(const FormatEtcIn: TFormatEtc; out Medium: TStgMedium): HResult; + +// Data is requested by clipboard or drop target. This method dispatchs the call +// depending on the data being requested. + +var + I: Integer; + Data: PVTReference; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + // The tree reference format is always supported and returned from here. + { + if FormatEtcIn.cfFormat = CF_VTREFERENCE then + begin + // Note: this format is not used while flushing the clipboard to avoid a dangling reference + // when the owner tree is destroyed before the clipboard data is replaced with something else. + if tsClipboardFlushing in TVirtualTreeAccess(FOwner).TreeStates then + Result := E_FAIL + else + begin + Medium.hGlobal := GlobalAlloc(GHND or GMEM_SHARE, SizeOf(TVTReference)); + Data := GlobalLock(Medium.hGlobal); + Data.Process := GetCurrentProcessID; + Data.Tree := TBaseVirtualTree(FOwner); + GlobalUnlock(Medium.hGlobal); + Medium.tymed := TYMED_HGLOBAL; + Medium.PunkForRelease := nil; + Result := S_OK; + end; + end + else + begin + try + // See if we accept this type and if not get the correct return value. + Result := QueryGetData(FormatEtcIn); + if Result = S_OK then + begin + for I := 0 to High(FormatEtcArray) do + begin + if EqualFormatEtc(FormatEtcIn, FormatEtcArray[I]) then + begin + if not RenderInternalOLEData(FormatEtcIn, Medium, Result) then + Result := TVirtualTreeAccess(FOwner).RenderOLEData(FormatEtcIn, Medium, FForClipboard); + Break; + end; + end + end + except + FillChar(Medium, SizeOf(Medium), #0); + Result := E_FAIL; + end; + end; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + //Result := E_NOTIMPL; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.QueryGetData(const FormatEtc: TFormatEtc): HResult; + +var + I: Integer; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + Result := DV_E_CLIPFORMAT; + for I := 0 to High(FFormatEtcArray) do + begin + if FormatEtc.cfFormat = FFormatEtcArray[I].cfFormat then + begin + if (FormatEtc.tymed and FFormatEtcArray[I].tymed) <> 0 then + begin + if FormatEtc.dwAspect = FFormatEtcArray[I].dwAspect then + begin + if FormatEtc.lindex = FFormatEtcArray[I].lindex then + begin + Result := S_OK; + Break; + end + else + Result := DV_E_LINDEX; + end + else + Result := DV_E_DVASPECT; + end + else + Result := DV_E_TYMED; + end; + end + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDataObject.SetData(const FormatEtc: TFormatEtc; + {$IF FPC_FullVersion >= 30200}var{$ELSE}const{$IFEND} Medium: TStgMedium; + DoRelease: BOOL): HResult; + +// Allows dynamic adding to the IDataObject during its existance. Most noteably it is used to implement +// IDropSourceHelper and allows to set a special format for optimized moves during a shell transfer. + +var + Index: Integer; + LocalStgMedium: PStgMedium; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + // See if we already have a format of that type available. + Index := FindFormatEtc(FormatEtc, FormatEtcArray); + if Index > - 1 then + begin + // Just use the TFormatEct in the array after releasing the data. + LocalStgMedium := FindInternalStgMedium(FormatEtcArray[Index].cfFormat); + if Assigned(LocalStgMedium) then + begin + ReleaseStgMedium(LocalStgMedium); + FillChar(LocalStgMedium^, SizeOf(LocalStgMedium^), #0); + end; + end + else + begin + // It is a new format so create a new TFormatCollectionItem, copy the + // FormatEtc parameter into the new object and and put it in the list. + SetLength(FFormatEtcArray, Length(FormatEtcArray) + 1); + FormatEtcArray[High(FormatEtcArray)] := FormatEtc; + + // Create a new InternalStgMedium and initialize it and associate it with the format. + SetLength(FInternalStgMediumArray, Length(InternalStgMediumArray) + 1); + InternalStgMediumArray[High(InternalStgMediumArray)].Format := FormatEtc.cfFormat; + LocalStgMedium := @InternalStgMediumArray[High(InternalStgMediumArray)].Medium; + FillChar(LocalStgMedium^, SizeOf(LocalStgMedium^), #0); + end; + + if DoRelease then + begin + // We are simply being given the data and we take control of it. + LocalStgMedium^ := Medium; + Result := S_OK + end + else + begin + // We need to reference count or copy the data and keep our own references to it. + Result := StgMediumIncRef(Medium, LocalStgMedium^, True, Self as IDataObject); + + // Can get a circular reference if the client calls GetData then calls SetData with the same StgMedium. + // Because the unkForRelease for the IDataObject can be marshalled it is necessary to get pointers that + // can be correctly compared. See the IDragSourceHelper article by Raymond Chen at MSDN. + if Assigned(LocalStgMedium.PunkForRelease) then + begin + if CanonicalIUnknown(Self) = CanonicalIUnknown(IUnknown(LocalStgMedium.PunkForRelease)) then + IUnknown(LocalStgMedium.PunkForRelease) := nil; // release the interface + end; + end; + + // Tell all registered advice sinks about the data change. + if Assigned(FAdviseHolder) then + FAdviseHolder.SendOnDataChange(Self as IDataObject, 0, 0); + } +end; + + +//----------------- TVTDragManager ------------------------------------------------------------------------------------- + +constructor TVTDragManager.Create(AOwner: TObject); + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + inherited Create; + FOwner := AOwner; + + // Create an instance of the drop target helper interface. This will fail but not harm on systems which do + // not support this interface (everything below Windows 2000); + CoCreateInstance(CLSID_DragDropHelper, nil, CLSCTX_INPROC_SERVER, IID_IDropTargetHelper, FDropTargetHelper); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +destructor TVTDragManager.Destroy; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + // Set the owner's reference to us to nil otherwise it will access an invalid pointer + // after our desctruction is complete. + TVirtualTreeAccess(FOwner).FreeDragManager; + inherited; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.GetDataObject: IDataObject; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + // When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem. + // In this case there is no local reference to a data object and one is created (but not stored). + // If there is a local reference then the owner tree is currently the drop target and the stored interface is + // that of the drag initiator. + if Assigned(FDataObject) then + Result := FDataObject + else + begin + Result := TVirtualTreeAccess(FOwner).DoCreateDataObject; + if Result = nil then + Result := TVTDataObject.Create(FOwner, False) as IDataObject; + end; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.GetDragSource: TObject; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + //Result := FDragSource; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.GetDropTargetHelperSupported: Boolean; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + //Result := Assigned(FDropTargetHelper); +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.GetIsDropTarget: Boolean; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + //Result := FIsDropTarget; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.DragEnter(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; + var Effect: LongWord): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + FDataObject := DataObject; + FIsDropTarget := True; + + SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, @FFullDragging, 0); + // If full dragging of window contents is disabled in the system then our tree windows will be locked + // and cannot be updated during a drag operation. With the following call painting is again enabled. + if not FFullDragging then + LockWindowUpdate(0); + if Assigned(FDropTargetHelper) and FFullDragging then + FDropTargetHelper.DragEnter(TBaseVirtualTree(FOwner).Handle, DataObject, Pt, Effect); + + FDragSource := TVirtualTreeAccess(FOwner).GetTreeFromDataObject(DataObject); + Result := TVirtualTreeAccess(FOwner).DragEnter(KeyState, Pt, Effect); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.DragLeave: HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if Assigned(FDropTargetHelper) and FFullDragging then + FDropTargetHelper.DragLeave; + + TVirtualTreeAccess(FOwner).DragLeave; + FIsDropTarget := False; + FDragSource := nil; + FDataObject := nil; + Result := NOERROR; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if Assigned(FDropTargetHelper) and FFullDragging then + FDropTargetHelper.DragOver(Pt, Effect); + + Result := TVirtualTreeAccess(FOwner).DragOver(FDragSource, KeyState, dsDragMove, Pt, Effect); + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; + var Effect: LongWord): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if Assigned(FDropTargetHelper) and FFullDragging then + FDropTargetHelper.Drop(DataObject, Pt, Effect); + + Result := TVirtualTreeAccess(FOwner).DragDrop(DataObject, KeyState, Pt, Effect); + FIsDropTarget := False; + FDataObject := nil; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVTDragManager.ForceDragLeave; + +// Some drop targets, e.g. Internet Explorer leave a drag image on screen instead removing it when they receive +// a drop action. This method calls the drop target helper's DragLeave method to ensure it removes the drag image from +// screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE). + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + if Assigned(FDropTargetHelper) and FFullDragging then + FDropTargetHelper.DragLeave; + } +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.GiveFeedback(Effect: LongWord): HResult; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + //Result := DRAGDROP_S_USEDEFAULTCURSORS; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; + +var + RButton, + LButton: Boolean; + +begin + {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} + {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} + { + LButton := (KeyState and MK_LBUTTON) <> 0; + RButton := (KeyState and MK_RBUTTON) <> 0; + + // Drag'n drop canceled by pressing both mouse buttons or Esc? + if (LButton and RButton) or EscapePressed then + Result := DRAGDROP_S_CANCEL + else + // Drag'n drop finished? + if not (LButton or RButton) then + Result := DRAGDROP_S_DROP + else + Result := S_OK; + } +end; + + +end. + diff --git a/components/virtualtreeview/units/qt5/laz.virtualpanningwindow.pas b/components/virtualtreeview/units/qt5/laz.virtualpanningwindow.pas new file mode 100644 index 0000000000..d8e5237ab2 --- /dev/null +++ b/components/virtualtreeview/units/qt5/laz.virtualpanningwindow.pas @@ -0,0 +1,58 @@ +unit laz.VirtualPanningWindow; + +{$mode objfpc}{$H+} + +interface + +uses + LCLType, Graphics, Classes, SysUtils; + +type + + { TVirtualPanningWindow } + + TVirtualPanningWindow = class + private + FHandle: THandle; + FOwnerHandle: THandle; + FImage: TBitmap; + procedure HandlePaintMessage; + public + procedure Start(OwnerHandle: THandle; const Position: TPoint); + procedure Stop; + procedure Show(ClipRegion: HRGN); + property Image: TBitmap read FImage; + property Handle: THandle read FHandle; + end; + +implementation + +{$ifdef DEBUG_VTV} +uses + laz.VTLogger; +{$endif} + +{ TVirtualPanningWindow } + +procedure TVirtualPanningWindow.HandlePaintMessage; +begin +end; + +procedure TVirtualPanningWindow.Start(OwnerHandle: THandle; const Position: TPoint); +begin + FImage := TBitmap.Create; +end; + +procedure TVirtualPanningWindow.Stop; +begin + FImage.Free; + FImage := nil; +end; + +procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); +begin + {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif} +end; + +end. + diff --git a/components/virtualtreeview/units/qt5/virtualdragmanager.pas b/components/virtualtreeview/units/qt5/virtualdragmanager.pas deleted file mode 100644 index 0ccf9398cf..0000000000 --- a/components/virtualtreeview/units/qt5/virtualdragmanager.pas +++ /dev/null @@ -1,1629 +0,0 @@ -unit virtualdragmanager; -{fake unit just to compile - not used under non windows} - -{$mode delphi} - -interface - -uses - Classes, SysUtils, Types; - -const - // Drag image helpers for Windows 2000 and up. - IID_IDropTargetHelper: TGUID = (D1: $4657278B; D2: $411B; D3: $11D2; D4: ($83, $9A, $00, $C0, $4F, $D9, $18, $D0)); - IID_IDragSourceHelper: TGUID = (D1: $DE5BF786; D2: $477A; D3: $11D2; D4: ($83, $9D, $00, $C0, $4F, $D9, $18, $D0)); - IID_IDropTarget: TGUID = (D1: $00000122; D2: $0000; D3: $0000; D4: ($C0, $00, $00, $00, $00, $00, $00, $46)); - CLSID_DragDropHelper: TGUID = (D1: $4657278A; D2: $411B; D3: $11D2; D4: ($83, $9A, $00, $C0, $4F, $D9, $18, $D0)); - - SID_IDropTargetHelper = '{4657278B-411B-11D2-839A-00C04FD918D0}'; - SID_IDragSourceHelper = '{DE5BF786-477A-11D2-839D-00C04FD918D0}'; - SID_IDropTarget = '{00000122-0000-0000-C000-000000000046}'; - - //Bridge to ActiveX constants - - TYMED_HGLOBAL = 1; - TYMED_ISTREAM = 4; - DVASPECT_CONTENT = 1; - CLSCTX_INPROC_SERVER = $0010; - DROPEFFECT_COPY = 1; - DROPEFFECT_LINK = 4; - DROPEFFECT_MOVE = 2; - DROPEFFECT_NONE = 0; - DROPEFFECT_SCROLL = dword($80000000); - DATADIR_GET = 1; - -type - //types from win unit - Long = LongInt; - WinBool= LongBool; - Bool= WinBool; - ULONG = cardinal; - LONGLONG = int64; - LPDWORD = ^DWORD; - LPVOID = pointer; - - TCOLORREF = cardinal; - - TIID = TGUID; - - LARGE_INTEGER = record - case byte of - 0: (LowPart : DWORD; - HighPart : LONG); - 1: (QuadPart : LONGLONG); - end; - PLARGE_INTEGER = ^LARGE_INTEGER; - _LARGE_INTEGER = LARGE_INTEGER; - - TLargeInteger = Int64; - PLargeInteger = ^TLargeInteger; - - ULARGE_INTEGER = record - case byte of - 0: (LowPart : DWORD; - HighPart : DWORD); - 1: (QuadPart : LONGLONG); - end; - PULARGE_INTEGER = ^ULARGE_INTEGER; - _ULARGE_INTEGER = ULARGE_INTEGER; - - - HANDLE = System.THandle; - HWND = HANDLE; - //HRESULT = System.HResult; - - HBITMAP = HANDLE; - HENHMETAFILE = HANDLE; - - //activex types - - - IMoniker = Interface; - - WINOLEAPI = HResult; - TLCID = DWORD; - - OleChar = WChar; - LPOLESTR = ^OLECHAR; - HMetaFilePict = Pointer; - - - tagBIND_OPTS = Record - cvStruct, // sizeof(BIND_OPTS) - grfFlags, - grfMode, - dwTickCountDeadline : DWord; - End; - TBind_Opts = tagBIND_OPTS; - TCLIPFORMAT = Word; - - tagDVTARGETDEVICE = Record - tdSize : DWord; - tdDriverNameOffset, - tdDeviceNameOffset, - tdPortNameOffset, - tdExtDevmodeOffset : Word; - Data : Record End; - End; - DVTARGETDEVICE = TagDVTARGETDEVICE; - PDVTARGETDEVICE = ^tagDVTARGETDEVICE; - - - - tagFORMATETC = Record - CfFormat : Word {TCLIPFORMAT}; - Ptd : PDVTARGETDEVICE; - dwAspect : DWORD; - lindex : Long; - tymed : DWORD; - End; - FORMATETC = TagFORMATETC; - TFORMATETC = FORMATETC; - LPFORMATETC = ^FORMATETC; - PFormatEtc = LPFORMATETC; - - tagSTATDATA = Record - // field used by: - FORMATETC : Tformatetc; // EnumAdvise, EnumData (cache), EnumFormats - advf : DWord; // EnumAdvise, EnumData (cache) - padvSink : Pointer {IAdviseSink}; // EnumAdvise - dwConnection: DWord; // EnumAdvise - End; - STATDATA = TagStatData; - - - TagSTGMEDIUM = Record - Tymed : DWord; - Case Integer Of - 0 : (HBITMAP : hBitmap; PUnkForRelease : Pointer {IUnknown}); - 1 : (HMETAFILEPICT : hMetaFilePict ); - 2 : (HENHMETAFILE : hEnhMetaFile ); - 3 : (HGLOBAL : hGlobal ); - 4 : (lpszFileName : LPOLESTR ); - 5 : (pstm : Pointer{IStream} ); - 6 : (pstg : Pointer{IStorage} ); - End; - USTGMEDIUM = TagSTGMEDIUM; - STGMEDIUM = USTGMEDIUM; - TStgMedium = TagSTGMEDIUM; - PStgMedium = ^TStgMedium; - LPSTGMEDIUM = ^STGMEDIUM; - - IEnumString = Interface (IUnknown) - ['{00000101-0000-0000-C000-000000000046}'] - Function Next(Celt:ULong;Out xcelt;Out Celtfetched:ULong):HResult; StdCall; -// Function RemoteNext(Celt:ULong; Out celt;Out Celtfetched:ULong):HResult; StdCall; - Function Skip (Celt:ULong):Hresult;StdCall; - Function Reset:HResult;StdCall; - Function Clone(Out penum:IEnumString):HResult;StdCall; - End; - - - IEnumMoniker = Interface (IUnknown) - ['{00000102-0000-0000-C000-000000000046}'] - Function Next(celt:ULong; out Elt;out celftfetched: ULong):HResult; StdCall; -// Function RemoteNext(Celt:ULong; Out rgelt;out celtfetched :ULong):Hresult; StdCall; - Function Skip(celt:Ulong):HResult; StdCall; - Function Reset:HResult; StdCall; - Function Close(out penum:IEnumMoniker):HResult;StdCall; - End; - - IEnumSTATDATA = Interface (IUnknown) - ['{00000105-0000-0000-C000-000000000046}'] - Function Next(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall; -// Function RemoteNext(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall; - Function Skip(Celt:ULong):HResult;StdCall; - Function Reset:HResult;StdCall; - Function Clone(out penum:IEnumstatdata):HResult;StdCall; - End; - - IEnumFORMATETC = Interface (IUnknown) - ['{00000103-0000-0000-C000-000000000046}'] - Function Next(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall; -// Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall; - Function Skip(Celt:ULong):HResult;StdCall; - Function Reset:HResult;StdCall; - Function Clone(out penum:IEnumFORMATETC):HResult;StdCall; - End; - - - - IPersist = Interface (IUnknown) - ['{0000010c-0000-0000-C000-000000000046}'] - Function GetClassId(clsid:TClsId):HResult; StdCall; - End; - - IPersistStream = Interface(IPersist) - ['{00000109-0000-0000-C000-000000000046}'] - Function IsDirty:HResult; StdCall; - Function Load(Const stm: IStream):HResult; StdCall; - Function Save(Const stm: IStream;fClearDirty:Bool):HResult;StdCall; - Function GetSizeMax(Out cbSize:ULarge_Integer):HResult; StdCall; - End; - - - IRunningObjectTable = Interface (IUnknown) - ['{00000010-0000-0000-C000-000000000046}'] - Function Register (grfFlags :DWord;const unkobject:IUnknown;Const mkObjectName:IMoniker;Out dwregister:DWord):HResult;StdCall; - Function Revoke (dwRegister:DWord):HResult; StdCall; - Function IsRunning (Const mkObjectName: IMoniker):HResult;StdCall; - Function GetObject (Const mkObjectName: IMoniker; Out punkObject:IUnknown):HResult; StdCall; - Function NoteChangeTime(dwRegister :DWord;Const FileTime: TFileTime):HResult;StdCall; - Function GetTimeOfLastChange(Const mkObjectName:IMoniker;Out filetime:TFileTime):HResult; StdCall; - Function EnumRunning (Out enumMoniker: IEnumMoniker):HResult; StdCall; - End; - - - IBindCtx = Interface (IUnknown) - ['{0000000e-0000-0000-C000-000000000046}'] - Function RegisterObjectBound(Const punk:IUnknown):HResult; stdCall; - Function RevokeObjectBound (Const Punk:IUnknown):HResult; stdCall; - Function ReleaseBoundObjects :HResult; StdCall; - Function SetBindOptions(Const bindOpts:TBind_Opts):HResult; stdCall; -// Function RemoteSetBindOptions(Const bind_opts: TBind_Opts2):HResult;StdCall; - Function GetBindOptions(var BindOpts:TBind_Opts):HResult; stdCall; -// Function RemoteGetBindOptions(Var bind_opts: TBind_Opts2):HResult;StdCall; - Function GetRunningObjectTable(Out rot : IRunningObjectTable):Hresult; StdCall; - Function RegisterObjectParam(Const pszkey:LPOleStr;const punk:IUnknown):HResult; - Function GetObjectParam(Const pszkey:LPOleStr; out punk: IUnknown):HResult; StdCall; - Function EnumObjectParam (out enum:IEnumString):Hresult;StdCall; - Function RevokeObjectParam(pszKey:LPOleStr):HResult;StdCall; - End; - - - PIMoniker = ^IMoniker; - IMoniker = Interface (IPersistStream) - ['{0000000f-0000-0000-C000-000000000046}'] - Function BindToObject (const pbc:IBindCtx;const mktoleft:IMoniker; RiidResult:TIID;Out vresult):HResult;StdCall; -// Function RemoteBindToObject (const pbc:IBindCtx;const mktoleft:IMoniker;RiidResult:TIID;Out vresult):HResult;StdCall; - Function BindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; Riid:TIID;Out vobj):HResult; StdCall; -// Function RemoteBindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; Riid:TIID;Out vobj):HResult; StdCall; - Function Reduce (const pbc:IBindCtx; dwReduceHowFar:DWord; mktoLeft: PIMoniker; Out mkReduced:IMoniker):HResult; StdCall; - Function ComposeWith(Const MkRight:IMoniker;fOnlyIfNotGeneric:BOOL; OUT mkComposite:IMoniker):HResult; StdCall; - Function Enum(fForward:Bool;Out enumMoniker:IEnumMoniker):HResult;StdCall; - Function IsEqual(Const mkOtherMoniker:IMoniker):HResult;StdCall; - Function Hash (Out dwHash:Dword):HResult;StdCall; - Function IsRunning(Const bc:IBindCtx;Const MkToLeft:IMoniker;Const mknewlyRunning:IMoniker):HResult;StdCall; - Function GetTimeOfLastChange(Const bc:IBindCtx;Const mkToLeft:IMoniker; out ft : FileTime):HResult; StdCall; - Function Inverse(out mk : IMoniker):HResult; StdCall; - Function CommonPrefixWith (Const mkOther:IMoniker):HResult; StdCall; - Function RelativePathTo(Const mkother:IMoniker; Out mkRelPath : IMoniker):HResult;StdCall; - Function GetDisplayName(Const bc:IMoniker;const mktoleft:IMoniker;Out szDisplayName: pOleStr):HResult; StdCall; - Function ParseDisplayName(Const bc:IBindCtx;Const mkToLeft:IMoniker;szDisplayName:POleStr;out cheaten:ULong;out mkOut:IMoniker):HResult; StdCall; - Function IsSystemMonitor(Out dwMkSys:DWord):HResult;StdCall; - End; - - - IAdviseSink = Interface (IUnknown) - ['{0000010f-0000-0000-C000-000000000046}'] - {$ifdef midl500} ['{00000150-0000-0000-C000-000000000046}'] {$endif} - Procedure OnDataChange (Const pformatetc : Formatetc;const pstgmed : STGMEDIUM); StdCall; - Procedure OnViewChange (dwAspect : DWord; lindex : Long); StdCall; - Procedure OnRename (Const pmk : IMoniker); StdCall; - Procedure OnSave; StdCall; - Procedure OnClose; StdCall; - End; - - - //Fake interfaces - IDataObject = Interface (IUnknown) - ['{0000010e-0000-0000-C000-000000000046}'] - Function GetData(Const formatetcIn : FORMATETC;Out medium : STGMEDIUM):HRESULT; STDCALL; - Function GetDataHere(CONST pformatetc : FormatETC; Out medium : STGMEDIUM):HRESULT; STDCALL; - Function QueryGetData(const pformatetc : FORMATETC):HRESULT; STDCALL; - Function GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; STDCALl; - Function SetData (Const pformatetc : FORMATETC; - {$IF FPC_FullVersion >= 30200}var{$ELSE}const{$IFEND} medium:STGMEDIUM; - FRelease : BOOL):HRESULT; StdCall; - Function EnumFormatEtc(dwDirection : DWord; OUT enumformatetcpara : IENUMFORMATETC):HRESULT; StdCall; - Function DAdvise(const formatetc : FORMATETC;advf :DWORD; CONST AdvSink : IAdviseSink;OUT dwConnection:DWORD):HRESULT;StdCall; - Function DUnadvise(dwconnection :DWord) :HRESULT;StdCall; - Function EnumDAvise(Out enumAdvise : IEnumStatData):HResult;StdCall; - End; - - IDropTarget = interface(IUnknown) - ['{00000122-0000-0000-C000-000000000046}'] - function DragEnter(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall; - function DragOver(grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall; - function DragLeave: HResult;StdCall; - function Drop(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD):HResult;StdCall; - end; - - - IDropSource = interface(IUnknown) - ['{00000121-0000-0000-C000-000000000046}'] - function QueryContinueDrag(fEscapePressed: BOOL; - grfKeyState: LongWord):HResult;StdCall; - function GiveFeedback(dwEffect: LongWord): HResult;StdCall; - end; - - - IDataAdviseHolder = Interface (IUnknown) - ['{00000110-0000-0000-C000-000000000046}'] - Function Advise (CONST pdataObject : IDataObject;CONST fetc:FORMATETC;advf : DWORD;Const pAdvise:IAdviseSink;Out DwConnection:DWord):HResult; StdCall; - Function Unadvise (dwConnection:Dword):HResult; StdCall; - Function EnumAdvise(out penumAdvise : IEnumStatData):HResult;StdCall; - Function SendOnDataChange(const pDataObject :IDataObject;DwReserved,advf : DWord):HResult; StdCall; - End; - - - - // OLE drag'n drop support - TFormatEtcArray = array of TFormatEtc; - TFormatArray = array of Word; - - // IDataObject.SetData support - TInternalStgMedium = packed record - Format: TClipFormat; - Medium: TStgMedium; - end; - TInternalStgMediumArray = array of TInternalStgMedium; - - TEnumFormatEtc = class(TInterfacedObject, IEnumFormatEtc) - private - FTree: TObject; - FFormatEtcArray: TFormatEtcArray; - FCurrentIndex: Integer; - public - constructor Create(Tree: TObject; AFormatEtcArray: TFormatEtcArray); - function Clone(out Enum: IEnumFormatEtc): HResult; stdcall; - function Next(celt: LongWord; out elt: FormatEtc; out pceltFetched: LongWord): HResult; stdcall; - function Reset: HResult; stdcall; - function Skip(celt: LongWord): HResult; stdcall; - end; - - IDropTargetHelper = interface(IUnknown) - [SID_IDropTargetHelper] - function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall; - function DragLeave: HRESULT; stdcall; - function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall; - function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall; - function Show(fShow: Boolean): HRESULT; stdcall; - end; - - PSHDragImage = ^TSHDragImage; - TSHDragImage = packed record - sizeDragImage: TSize; - ptOffset: TPoint; - hbmpDragImage: HBITMAP; - ColorRef: TColorRef; - end; - - IDragSourceHelper = interface(IUnknown) - [SID_IDragSourceHelper] - function InitializeFromBitmap(var SHDragImage: TSHDragImage; pDataObject: IDataObject): HRESULT; stdcall; - function InitializeFromWindow(Window: HWND; var ppt: TPoint; pDataObject: IDataObject): HRESULT; stdcall; - end; - - - - IVTDragManager = interface(IUnknown) - ['{C4B25559-14DA-446B-8901-0C879000EB16}'] - procedure ForceDragLeave; stdcall; - function GetDataObject: IDataObject; stdcall; - function GetDragSource: TObject; stdcall; - function GetDropTargetHelperSupported: Boolean; stdcall; - function GetIsDropTarget: Boolean; stdcall; - - property DataObject: IDataObject read GetDataObject; - property DragSource: TObject read GetDragSource; - property DropTargetHelperSupported: Boolean read GetDropTargetHelperSupported; - property IsDropTarget: Boolean read GetIsDropTarget; - end; - - // This data object is used in two different places. One is for clipboard operations and the other while dragging. - TVTDataObject = class(TInterfacedObject, IDataObject) - private - //FOwner: TBaseVirtualTree; // The tree which provides clipboard or drag data. - FOwner: TObject; // The tree which provides clipboard or drag data. - FForClipboard: Boolean; // Determines which data to render with GetData. - FFormatEtcArray: TFormatEtcArray; - FInternalStgMediumArray: TInternalStgMediumArray; // The available formats in the DataObject - FAdviseHolder: IDataAdviseHolder; // Reference to an OLE supplied implementation for advising. - protected - function CanonicalIUnknown(TestUnknown: IUnknown): IUnknown; - function EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; - function FindFormatEtc(TestFormatEtc: TFormatEtc; const FormatEtcArray: TFormatEtcArray): integer; - function FindInternalStgMedium(Format: TClipFormat): PStgMedium; - function HGlobalClone(HGlobal: THandle): THandle; - function RenderInternalOLEData(const FormatEtcIn: TFormatEtc; var Medium: TStgMedium; var OLEResult: HResult): Boolean; - function StgMediumIncRef(const InStgMedium: TStgMedium; var OutStgMedium: TStgMedium; - CopyInMedium: Boolean; DataObject: IDataObject): HRESULT; - - property ForClipboard: Boolean read FForClipboard; - property FormatEtcArray: TFormatEtcArray read FFormatEtcArray write FFormatEtcArray; - property InternalStgMediumArray: TInternalStgMediumArray read FInternalStgMediumArray write FInternalStgMediumArray; - property Owner: TObject read FOwner; - public - constructor Create(AOwner: TObject; ForClipboard: Boolean); virtual; - destructor Destroy; override; - - function DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const advSink: IAdviseSink; out dwConnection: DWord): - HResult; virtual; stdcall; - function DUnadvise(dwConnection: DWord): HResult; virtual; stdcall; - Function EnumDAvise(Out enumAdvise : IEnumStatData):HResult;virtual;StdCall; - function EnumFormatEtc(Direction: DWord; out EnumFormatEtc: IEnumFormatEtc): HResult; virtual; stdcall; - Function GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; virtual; STDCALl; - function GetData(const FormatEtcIn: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall; - function GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall; - function QueryGetData(const FormatEtc: TFormatEtc): HResult; virtual; stdcall; - function SetData(const FormatEtc: TFormatEtc; - {$IF FPC_FullVersion >= 30200}var{$ELSE}const{$IFEND} Medium: TStgMedium; - DoRelease: BOOL): HResult; virtual; stdcall; - end; - - // TVTDragManager is a class to manage drag and drop in a Virtual Treeview. - TVTDragManager = class(TInterfacedObject, IVTDragManager, IDropSource, IDropTarget) - private - FOwner, // The tree which is responsible for drag management. - FDragSource: TObject; // Reference to the source tree if the source was a VT, might be different than - // the owner tree. - FIsDropTarget: Boolean; // True if the owner is currently the drop target. - FDataObject: IDataObject; // A reference to the data object passed in by DragEnter (only used when the owner - // tree is the current drop target). - FDropTargetHelper: IDropTargetHelper; // Win2k > Drag image support - FFullDragging: BOOL; // True, if full dragging is currently enabled in the system. - - function GetDataObject: IDataObject; stdcall; - function GetDragSource: TObject; stdcall; - function GetDropTargetHelperSupported: Boolean; stdcall; - function GetIsDropTarget: Boolean; stdcall; - public - constructor Create(AOwner: TObject); virtual; - destructor Destroy; override; - - function DragEnter(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; - var Effect: LongWord): HResult; stdcall; - function DragLeave: HResult; stdcall; - function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; - function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; - procedure ForceDragLeave; stdcall; - function GiveFeedback(Effect: LongWord): HResult; stdcall; - function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall; - end; - - //Ole helper functions - - function Succeeded(Status : HRESULT) : BOOLEAN; - - function Failed(Status : HRESULT) : BOOLEAN; - - //ActiveX functions that have wrong calling convention in fpc - - function RegisterDragDrop(hwnd:HWND; pDropTarget:IDropTarget):WINOLEAPI;stdcall; - - function RevokeDragDrop(hwnd:HWND):WINOLEAPI;stdcall; - - function DoDragDrop(pDataObj:IDataObject; pDropSource:IDropSource; dwOKEffects:DWORD; pdwEffect:LPDWORD):WINOLEAPI; - - function OleInitialize(pvReserved:LPVOID):WINOLEAPI;stdcall; - - procedure OleUninitialize;stdcall; - - procedure ReleaseStgMedium(_para1:LPSTGMEDIUM);stdcall; - - function OleSetClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall; - - function OleGetClipboard(out ppDataObj:IDataObject):WINOLEAPI;stdcall; - - function OleFlushClipboard:WINOLEAPI;stdcall; - - function OleIsCurrentClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall; - - function CreateStreamOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out stm:IStream):WINOLEAPI;stdcall; - - function CoCreateInstance(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD;const _para4:TIID;out _para5):HRESULT;stdcall; - - //helper functions to isolate windows/OLE specific code - - function RenderOLEData(Tree: TObject; const FormatEtcIn: TFormatEtc; out Medium: TStgMedium; - ForClipboard: Boolean): HResult; - - function GetStreamFromMedium(Medium:TStgMedium):TStream; - - procedure UnlockMediumData(Medium:TStgMedium); - - function GetTreeFromDataObject(const DataObject: IDataObject; var Format: TFormatEtc): TObject; - - function AllocateGlobal(Data: Pointer; DataSize:Cardinal): HGLOBAL; - -implementation - -uses - opkman_VirtualTrees, Controls {$ifdef DEBUG_VTV}, opkman_vtlogger {$endif}; - -type - TVirtualTreeAccess = class (TBaseVirtualTree) - end; - -function Succeeded(Status : HRESULT) : BOOLEAN; - begin - Succeeded:=Status and HRESULT($80000000)=0; - end; - -function Failed(Status : HRESULT) : BOOLEAN; - begin - Failed:=Status and HRESULT($80000000)<>0; - end; - -function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function RevokeDragDrop(hwnd: HWND): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource; - dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function OleInitialize(pvReserved: LPVOID): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -procedure OleUninitialize; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -procedure ReleaseStgMedium(_para1: LPSTGMEDIUM); -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function OleFlushClipboard: WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out - stm: IStream): WINOLEAPI; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - -function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown; - _para3: DWORD; const _para4: TIID; out _para5): HRESULT; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -end; - - -function RenderOLEData(Tree: TObject; const FormatEtcIn: TFormatEtc; out - Medium: TStgMedium; ForClipboard: Boolean): HResult; -{ - //--------------- local function -------------------------------------------- - - procedure WriteNodes(Stream: TStream); - - var - Selection: TNodeArray; - I: Integer; - - begin - with TVirtualTreeAccess(Tree) do - begin - if ForClipboard then - Selection := GetSortedCutCopySet(True) - else - Selection := GetSortedSelection(True); - for I := 0 to High(Selection) do - WriteNode(Stream, Selection[I]); - end; - end; - - //--------------- end local function ---------------------------------------- -} -var - Data: PCardinal; - ResPointer: Pointer; - ResSize: Integer; - OLEStream: IStream; - VCLStream: TStream; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - VCLStream := nil; - try - Medium.PunkForRelease := nil; - // Return data in one of the supported storage formats, prefer IStream. - if FormatEtcIn.tymed and TYMED_ISTREAM <> 0 then - begin - // Create an IStream on a memory handle (here it is 0 which indicates to implicitely allocated a handle). - // Do not use TStreamAdapter as it is not compatible with OLE (when flushing the clipboard OLE wants the HGlobal - // back which is not supported by TStreamAdapater). - CreateStreamOnHGlobal(0, True, OLEStream); - - VCLStream := TOLEStream.Create(OLEStream); - WriteNodes(VCLStream); - // Rewind stream. - VCLStream.Position := 0; - Medium.tymed := TYMED_ISTREAM; - IUnknown(Medium.Pstm) := OLEStream; - Result := S_OK; - end - else - begin - VCLStream := TMemoryStream.Create; - WriteNodes(VCLStream); - ResPointer := TMemoryStream(VCLStream).Memory; - ResSize := VCLStream.Position; - - // Allocate memory to hold the string. - if ResSize > 0 then - begin - Medium.hGlobal := GlobalAlloc(GHND or GMEM_SHARE, ResSize + SizeOf(Cardinal)); - Data := GlobalLock(Medium.hGlobal); - // Store the size of the data too, for easy retrival. - Data^ := ResSize; - Inc(Data); - Move(ResPointer^, Data^, ResSize); - GlobalUnlock(Medium.hGlobal); - Medium.tymed := TYMED_HGLOBAL; - - Result := S_OK; - end - else - Result := E_FAIL; - end; - finally - // We can free the VCL stream here since it was either a pure memory stream or only a wrapper around - // the OLEStream which exists independently. - VCLStream.Free; - end; - } -end; - - -type - // needed to handle OLE global memory objects - TOLEMemoryStream = class(TCustomMemoryStream) - public - function Write(const Buffer; Count: Integer): Longint; override; - end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - // raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError)); -end; - - -function GetStreamFromMedium(Medium: TStgMedium): TStream; - -var - Data: Pointer; - I: Integer; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -{ - Result := nil; - if Medium.tymed = TYMED_ISTREAM then - Result := TOLEStream.Create(IUnknown(Medium.Pstm) as IStream) - else - begin - Data := GlobalLock(Medium.hGlobal); - if Assigned(Data) then - begin - // Get the total size of data to retrieve. - I := PCardinal(Data)^; - Inc(PCardinal(Data)); - Result := TOLEMemoryStream.Create; - TOLEMemoryStream(Result).SetPointer(Data, I); - end; - end; -} -end; - -procedure UnlockMediumData(Medium: TStgMedium); -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} -{ - if Medium.tymed = TYMED_HGLOBAL then - GlobalUnlock(Medium.hGlobal); - } -end; - -function GetTreeFromDataObject(const DataObject: IDataObject; - var Format: TFormatEtc): TObject; - -var - Medium: TStgMedium; - Data: PVTReference; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := nil; - if Assigned(DataObject) then - begin - Format.cfFormat := CF_VTREFERENCE; - if DataObject.GetData(Format, Medium) = S_OK then - begin - Data := GlobalLock(Medium.hGlobal); - if Assigned(Data) then - begin - if Data.Process = GetCurrentProcessID then - Result := Data.Tree; - GlobalUnlock(Medium.hGlobal); - end; - ReleaseStgMedium(@Medium); - end; - end; - } -end; - -function AllocateGlobal(Data: Pointer; DataSize: Cardinal): HGLOBAL; -var - P:Pointer; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize); - P := GlobalLock(Result); - Move(Data^, P^, DataSize); - GlobalUnlock(Result); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -// OLE drag and drop support classes -// This is quite heavy stuff (compared with the VCL implementation) but is much better suited to fit the needs -// of DD'ing various kinds of virtual data and works also between applications. - -//----------------- TEnumFormatEtc ------------------------------------------------------------------------------------- - -constructor TEnumFormatEtc.Create(Tree: TObject; AFormatEtcArray: TFormatEtcArray); - -var - I: Integer; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - inherited Create; - - FTree := Tree; - // Make a local copy of the format data. - SetLength(FFormatEtcArray, Length(AFormatEtcArray)); - for I := 0 to High(AFormatEtcArray) do - FFormatEtcArray[I] := AFormatEtcArray[I]; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TEnumFormatEtc.Clone(out Enum: IEnumFormatEtc): HResult; - -var - AClone: TEnumFormatEtc; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := S_OK; - try - AClone := TEnumFormatEtc.Create(nil, FFormatEtcArray); - AClone.FCurrentIndex := FCurrentIndex; - Enum := AClone as IEnumFormatEtc; - except - Result := E_FAIL; - end; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TEnumFormatEtc.Next(celt: LongWord; out elt: FormatEtc; out pceltFetched: LongWord): HResult; - -var - CopyCount: LongWord; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := S_FALSE; - CopyCount := Length(FFormatEtcArray) - FCurrentIndex; - if celt < CopyCount then - CopyCount := celt; - if CopyCount > 0 then - begin - Move(FFormatEtcArray[FCurrentIndex], elt, CopyCount * SizeOf(TFormatEtc)); - Inc(FCurrentIndex, CopyCount); - Result := S_OK; - end; - //todo_lcl_check Delphi treats pceltFetched an PInteger. Implemented like in fpc.activex. What heappens with - // a C Program call with a NULL in pCeltFetcjed?? - //Answer: Yes. Is necessary a check here - if @pceltFetched <> nil then - pceltFetched := CopyCount; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TEnumFormatEtc.Reset: HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - FCurrentIndex := 0; - Result := S_OK; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TEnumFormatEtc.Skip(celt: LongWord): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if FCurrentIndex + celt < High(FFormatEtcArray) then - begin - Inc(FCurrentIndex, celt); - Result := S_Ok; - end - else - Result := S_FALSE; - } -end; - - -//----------------- TVTDataObject -------------------------------------------------------------------------------------- - -constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean); - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - inherited Create; - - FOwner := AOwner; - FForClipboard := ForClipboard; - TVirtualTreeAccess(FOwner).GetNativeClipboardFormats(FFormatEtcArray); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -destructor TVTDataObject.Destroy; - -var - I: Integer; - StgMedium: PStgMedium; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - // Cancel a pending clipboard operation if this data object was created for the clipboard and - // is freed because something else is placed there. - if FForClipboard and not (tsClipboardFlushing in TVirtualTreeAccess(FOwner).TreeStates) then - TVirtualTreeAccess(FOwner).CancelCutOrCopy; - - // Release any internal clipboard formats - for I := 0 to High(FormatEtcArray) do - begin - StgMedium := FindInternalStgMedium(FormatEtcArray[I].cfFormat); - if Assigned(StgMedium) then - ReleaseStgMedium(StgMedium); - end; - - FormatEtcArray := nil; - inherited; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.CanonicalIUnknown(TestUnknown: IUnknown): IUnknown; - -// Uses COM object identity: An explicit call to the IUnknown::QueryInterface method, requesting the IUnknown -// interface, will always return the same pointer. - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if Assigned(TestUnknown) then - begin - if TestUnknown.QueryInterface(IUnknown, Result) = 0 then - Result._Release // Don't actually need it just need the pointer value - else - Result := TestUnknown - end - else - Result := TestUnknown - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and - (FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and - (FormatEtc1.tymed and FormatEtc2.tymed <> 0); - - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.FindFormatEtc(TestFormatEtc: TFormatEtc; const FormatEtcArray: TFormatEtcArray): integer; - -var - I: integer; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := -1; - for I := 0 to High(FormatEtcArray) do - begin - if EqualFormatEtc(TestFormatEtc, FormatEtcArray[I]) then - begin - Result := I; - Break; - end - end; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.FindInternalStgMedium(Format: TClipFormat): PStgMedium; - -var - I: integer; -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := nil; - for I := 0 to High(InternalStgMediumArray) do - begin - if Format = InternalStgMediumArray[I].Format then - begin - Result := @InternalStgMediumArray[I].Medium; - Break; - end - end; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.HGlobalClone(HGlobal: THandle): THandle; - -// Returns a global memory block that is a copy of the passed memory block. - -var - Size: Cardinal; - Data, - NewData: PChar; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Size := GlobalSize(HGlobal); - Result := GlobalAlloc(GPTR, Size); - Data := GlobalLock(hGlobal); - try - NewData := GlobalLock(Result); - try - Move(Data^, NewData^, Size); - finally - GlobalUnLock(Result); - end - finally - GlobalUnLock(hGlobal); - end; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.RenderInternalOLEData(const FormatEtcIn: TFormatEtc; var Medium: TStgMedium; - var OLEResult: HResult): Boolean; - -// Tries to render one of the formats which have been stored via the SetData method. -// Since this data is already there it is just copied or its reference count is increased (depending on storage medium). - -var - InternalMedium: PStgMedium; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - - Result := True; - InternalMedium := FindInternalStgMedium(FormatEtcIn.cfFormat); - if Assigned(InternalMedium) then - OLEResult := StgMediumIncRef(InternalMedium^, Medium, False, Self as IDataObject) - else - Result := False; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.StgMediumIncRef(const InStgMedium: TStgMedium; var OutStgMedium: TStgMedium; - CopyInMedium: Boolean; DataObject: IDataObject): HRESULT; - -// InStgMedium is the data that is requested, OutStgMedium is the data that we are to return either a copy of or -// increase the IDataObject's reference and send ourselves back as the data (unkForRelease). The InStgMedium is usually -// the result of a call to find a particular FormatEtc that has been stored locally through a call to SetData. -// If CopyInMedium is not true we already have a local copy of the data when the SetData function was called (during -// that call the CopyInMedium must be true). Then as the caller asks for the data through GetData we do not have to make -// copy of the data for the caller only to have them destroy it then need us to copy it again if necessary. -// This way we increase the reference count to ourselves and pass the STGMEDIUM structure initially stored in SetData. -// This way when the caller frees the structure it sees the unkForRelease is not nil and calls Release on the object -// instead of destroying the actual data. - -var - Len: Integer; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := S_OK; - - // Simply copy all fields to start with. - OutStgMedium := InStgMedium; - // The data handled here always results from a call of SetData we got. This ensures only one storage format - // is indicated and hence the case statement below is safe (IDataObject.GetData can optionally use several - // storage formats). - case InStgMedium.tymed of - TYMED_HGLOBAL: - begin - if CopyInMedium then - begin - // Generate a unique copy of the data passed - OutStgMedium.hGlobal := HGlobalClone(InStgMedium.hGlobal); - if OutStgMedium.hGlobal = 0 then - Result := E_OUTOFMEMORY - end - else - // Don't generate a copy just use ourselves and the copy previously saved. - OutStgMedium.PunkForRelease := Pointer(DataObject); // Does not increase RefCount. - end; - TYMED_FILE: - begin - //todo_lcl_check - Len := Length(WideString(InStgMedium.lpszFileName)) + 1; // Don't forget the terminating null character. - OutStgMedium.lpszFileName := CoTaskMemAlloc(2 * Len); - Move(InStgMedium.lpszFileName^, OutStgMedium.lpszFileName^, 2 * Len); - end; - TYMED_ISTREAM: - IUnknown(OutStgMedium.Pstm)._AddRef; - TYMED_ISTORAGE: - IUnknown(OutStgMedium.Pstg)._AddRef; - TYMED_GDI: - if not CopyInMedium then - // Don't generate a copy just use ourselves and the previously saved data. - OutStgMedium.PunkForRelease := Pointer(DataObject) // Does not increase RefCount. - else - Result := DV_E_TYMED; // Don't know how to copy GDI objects right now. - TYMED_MFPICT: - if not CopyInMedium then - // Don't generate a copy just use ourselves and the previously saved data. - OutStgMedium.PunkForRelease := Pointer(DataObject) // Does not increase RefCount. - else - Result := DV_E_TYMED; // Don't know how to copy MetaFile objects right now. - TYMED_ENHMF: - if not CopyInMedium then - // Don't generate a copy just use ourselves and the previously saved data. - OutStgMedium.PunkForRelease := Pointer(DataObject) // Does not increase RefCount. - else - Result := DV_E_TYMED; // Don't know how to copy enhanced metafiles objects right now. - else - Result := DV_E_TYMED; - end; - - if (Result = S_OK) and Assigned(OutStgMedium.PunkForRelease) then - IUnknown(OutStgMedium.PunkForRelease)._AddRef; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const advSink: IAdviseSink; - out dwConnection: DWord): HResult; - -// Advise sink management is greatly simplified by the IDataAdviseHolder interface. -// We use this interface and forward all concerning calls to it. - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := S_OK; - if FAdviseHolder = nil then - Result := CreateDataAdviseHolder(FAdviseHolder); - if Result = S_OK then - Result := FAdviseHolder.Advise(Self as IDataObject, FormatEtc, advf, advSink, dwConnection); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.DUnadvise(dwConnection: DWord): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if FAdviseHolder = nil then - Result := E_NOTIMPL - else - Result := FAdviseHolder.Unadvise(dwConnection); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if FAdviseHolder = nil then - Result := OLE_E_ADVISENOTSUPPORTED - else - Result := FAdviseHolder.EnumAdvise(enumAdvise); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.EnumFormatEtc(Direction: DWord; out EnumFormatEtc: IEnumFormatEtc): HResult; - -var - NewList: TEnumFormatEtc; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := E_FAIL; - if Direction = DATADIR_GET then - begin - NewList := TEnumFormatEtc.Create(TVirtualTreeAccess(FOwner), FormatEtcArray); - EnumFormatEtc := NewList as IEnumFormatEtc; - Result := S_OK; - end - else - EnumFormatEtc := nil; - if EnumFormatEtc = nil then - Result := OLE_S_USEREG; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - //Result := DATA_S_SAMEFORMATETC; -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.GetData(const FormatEtcIn: TFormatEtc; out Medium: TStgMedium): HResult; - -// Data is requested by clipboard or drop target. This method dispatchs the call -// depending on the data being requested. - -var - I: Integer; - Data: PVTReference; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - // The tree reference format is always supported and returned from here. - { - if FormatEtcIn.cfFormat = CF_VTREFERENCE then - begin - // Note: this format is not used while flushing the clipboard to avoid a dangling reference - // when the owner tree is destroyed before the clipboard data is replaced with something else. - if tsClipboardFlushing in TVirtualTreeAccess(FOwner).TreeStates then - Result := E_FAIL - else - begin - Medium.hGlobal := GlobalAlloc(GHND or GMEM_SHARE, SizeOf(TVTReference)); - Data := GlobalLock(Medium.hGlobal); - Data.Process := GetCurrentProcessID; - Data.Tree := TBaseVirtualTree(FOwner); - GlobalUnlock(Medium.hGlobal); - Medium.tymed := TYMED_HGLOBAL; - Medium.PunkForRelease := nil; - Result := S_OK; - end; - end - else - begin - try - // See if we accept this type and if not get the correct return value. - Result := QueryGetData(FormatEtcIn); - if Result = S_OK then - begin - for I := 0 to High(FormatEtcArray) do - begin - if EqualFormatEtc(FormatEtcIn, FormatEtcArray[I]) then - begin - if not RenderInternalOLEData(FormatEtcIn, Medium, Result) then - Result := TVirtualTreeAccess(FOwner).RenderOLEData(FormatEtcIn, Medium, FForClipboard); - Break; - end; - end - end - except - FillChar(Medium, SizeOf(Medium), #0); - Result := E_FAIL; - end; - end; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - //Result := E_NOTIMPL; -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.QueryGetData(const FormatEtc: TFormatEtc): HResult; - -var - I: Integer; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - Result := DV_E_CLIPFORMAT; - for I := 0 to High(FFormatEtcArray) do - begin - if FormatEtc.cfFormat = FFormatEtcArray[I].cfFormat then - begin - if (FormatEtc.tymed and FFormatEtcArray[I].tymed) <> 0 then - begin - if FormatEtc.dwAspect = FFormatEtcArray[I].dwAspect then - begin - if FormatEtc.lindex = FFormatEtcArray[I].lindex then - begin - Result := S_OK; - Break; - end - else - Result := DV_E_LINDEX; - end - else - Result := DV_E_DVASPECT; - end - else - Result := DV_E_TYMED; - end; - end - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDataObject.SetData(const FormatEtc: TFormatEtc; - {$IF FPC_FullVersion >= 30200}var{$ELSE}const{$IFEND} Medium: TStgMedium; - DoRelease: BOOL): HResult; - -// Allows dynamic adding to the IDataObject during its existance. Most noteably it is used to implement -// IDropSourceHelper and allows to set a special format for optimized moves during a shell transfer. - -var - Index: Integer; - LocalStgMedium: PStgMedium; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - // See if we already have a format of that type available. - Index := FindFormatEtc(FormatEtc, FormatEtcArray); - if Index > - 1 then - begin - // Just use the TFormatEct in the array after releasing the data. - LocalStgMedium := FindInternalStgMedium(FormatEtcArray[Index].cfFormat); - if Assigned(LocalStgMedium) then - begin - ReleaseStgMedium(LocalStgMedium); - FillChar(LocalStgMedium^, SizeOf(LocalStgMedium^), #0); - end; - end - else - begin - // It is a new format so create a new TFormatCollectionItem, copy the - // FormatEtc parameter into the new object and and put it in the list. - SetLength(FFormatEtcArray, Length(FormatEtcArray) + 1); - FormatEtcArray[High(FormatEtcArray)] := FormatEtc; - - // Create a new InternalStgMedium and initialize it and associate it with the format. - SetLength(FInternalStgMediumArray, Length(InternalStgMediumArray) + 1); - InternalStgMediumArray[High(InternalStgMediumArray)].Format := FormatEtc.cfFormat; - LocalStgMedium := @InternalStgMediumArray[High(InternalStgMediumArray)].Medium; - FillChar(LocalStgMedium^, SizeOf(LocalStgMedium^), #0); - end; - - if DoRelease then - begin - // We are simply being given the data and we take control of it. - LocalStgMedium^ := Medium; - Result := S_OK - end - else - begin - // We need to reference count or copy the data and keep our own references to it. - Result := StgMediumIncRef(Medium, LocalStgMedium^, True, Self as IDataObject); - - // Can get a circular reference if the client calls GetData then calls SetData with the same StgMedium. - // Because the unkForRelease for the IDataObject can be marshalled it is necessary to get pointers that - // can be correctly compared. See the IDragSourceHelper article by Raymond Chen at MSDN. - if Assigned(LocalStgMedium.PunkForRelease) then - begin - if CanonicalIUnknown(Self) = CanonicalIUnknown(IUnknown(LocalStgMedium.PunkForRelease)) then - IUnknown(LocalStgMedium.PunkForRelease) := nil; // release the interface - end; - end; - - // Tell all registered advice sinks about the data change. - if Assigned(FAdviseHolder) then - FAdviseHolder.SendOnDataChange(Self as IDataObject, 0, 0); - } -end; - - -//----------------- TVTDragManager ------------------------------------------------------------------------------------- - -constructor TVTDragManager.Create(AOwner: TObject); - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - inherited Create; - FOwner := AOwner; - - // Create an instance of the drop target helper interface. This will fail but not harm on systems which do - // not support this interface (everything below Windows 2000); - CoCreateInstance(CLSID_DragDropHelper, nil, CLSCTX_INPROC_SERVER, IID_IDropTargetHelper, FDropTargetHelper); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -destructor TVTDragManager.Destroy; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - // Set the owner's reference to us to nil otherwise it will access an invalid pointer - // after our desctruction is complete. - TVirtualTreeAccess(FOwner).FreeDragManager; - inherited; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.GetDataObject: IDataObject; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - // When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem. - // In this case there is no local reference to a data object and one is created (but not stored). - // If there is a local reference then the owner tree is currently the drop target and the stored interface is - // that of the drag initiator. - if Assigned(FDataObject) then - Result := FDataObject - else - begin - Result := TVirtualTreeAccess(FOwner).DoCreateDataObject; - if Result = nil then - Result := TVTDataObject.Create(FOwner, False) as IDataObject; - end; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.GetDragSource: TObject; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - //Result := FDragSource; -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.GetDropTargetHelperSupported: Boolean; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - //Result := Assigned(FDropTargetHelper); -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.GetIsDropTarget: Boolean; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - //Result := FIsDropTarget; -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.DragEnter(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; - var Effect: LongWord): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - FDataObject := DataObject; - FIsDropTarget := True; - - SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, @FFullDragging, 0); - // If full dragging of window contents is disabled in the system then our tree windows will be locked - // and cannot be updated during a drag operation. With the following call painting is again enabled. - if not FFullDragging then - LockWindowUpdate(0); - if Assigned(FDropTargetHelper) and FFullDragging then - FDropTargetHelper.DragEnter(TBaseVirtualTree(FOwner).Handle, DataObject, Pt, Effect); - - FDragSource := TVirtualTreeAccess(FOwner).GetTreeFromDataObject(DataObject); - Result := TVirtualTreeAccess(FOwner).DragEnter(KeyState, Pt, Effect); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.DragLeave: HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if Assigned(FDropTargetHelper) and FFullDragging then - FDropTargetHelper.DragLeave; - - TVirtualTreeAccess(FOwner).DragLeave; - FIsDropTarget := False; - FDragSource := nil; - FDataObject := nil; - Result := NOERROR; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if Assigned(FDropTargetHelper) and FFullDragging then - FDropTargetHelper.DragOver(Pt, Effect); - - Result := TVirtualTreeAccess(FOwner).DragOver(FDragSource, KeyState, dsDragMove, Pt, Effect); - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; - var Effect: LongWord): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if Assigned(FDropTargetHelper) and FFullDragging then - FDropTargetHelper.Drop(DataObject, Pt, Effect); - - Result := TVirtualTreeAccess(FOwner).DragDrop(DataObject, KeyState, Pt, Effect); - FIsDropTarget := False; - FDataObject := nil; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -procedure TVTDragManager.ForceDragLeave; - -// Some drop targets, e.g. Internet Explorer leave a drag image on screen instead removing it when they receive -// a drop action. This method calls the drop target helper's DragLeave method to ensure it removes the drag image from -// screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE). - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - if Assigned(FDropTargetHelper) and FFullDragging then - FDropTargetHelper.DragLeave; - } -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.GiveFeedback(Effect: LongWord): HResult; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - //Result := DRAGDROP_S_USEDEFAULTCURSORS; -end; - -//---------------------------------------------------------------------------------------------------------------------- - -function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; - -var - RButton, - LButton: Boolean; - -begin - {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} - {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif} - { - LButton := (KeyState and MK_LBUTTON) <> 0; - RButton := (KeyState and MK_RBUTTON) <> 0; - - // Drag'n drop canceled by pressing both mouse buttons or Esc? - if (LButton and RButton) or EscapePressed then - Result := DRAGDROP_S_CANCEL - else - // Drag'n drop finished? - if not (LButton or RButton) then - Result := DRAGDROP_S_DROP - else - Result := S_OK; - } -end; - - -end. - diff --git a/components/virtualtreeview/units/qt5/virtualpanningwindow.pas b/components/virtualtreeview/units/qt5/virtualpanningwindow.pas deleted file mode 100644 index 0580dcffa5..0000000000 --- a/components/virtualtreeview/units/qt5/virtualpanningwindow.pas +++ /dev/null @@ -1,58 +0,0 @@ -unit virtualpanningwindow; - -{$mode objfpc}{$H+} - -interface - -uses - LCLType, Graphics, Classes, SysUtils; - -type - - { TVirtualPanningWindow } - - TVirtualPanningWindow = class - private - FHandle: THandle; - FOwnerHandle: THandle; - FImage: TBitmap; - procedure HandlePaintMessage; - public - procedure Start(OwnerHandle: THandle; const Position: TPoint); - procedure Stop; - procedure Show(ClipRegion: HRGN); - property Image: TBitmap read FImage; - property Handle: THandle read FHandle; - end; - -implementation - -{$ifdef DEBUG_VTV} -uses - opkman_vtlogger; -{$endif} - -{ TVirtualPanningWindow } - -procedure TVirtualPanningWindow.HandlePaintMessage; -begin -end; - -procedure TVirtualPanningWindow.Start(OwnerHandle: THandle; const Position: TPoint); -begin - FImage := TBitmap.Create; -end; - -procedure TVirtualPanningWindow.Stop; -begin - FImage.Free; - FImage := nil; -end; - -procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); -begin - {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif} -end; - -end. - diff --git a/components/virtualtreeview/units/win32/virtualdragmanager.pas b/components/virtualtreeview/units/win32/laz.virtualdragmanager.pas similarity index 99% rename from components/virtualtreeview/units/win32/virtualdragmanager.pas rename to components/virtualtreeview/units/win32/laz.virtualdragmanager.pas index 832d23acc3..76b8b5b0f3 100644 --- a/components/virtualtreeview/units/win32/virtualdragmanager.pas +++ b/components/virtualtreeview/units/win32/laz.virtualdragmanager.pas @@ -1,4 +1,4 @@ -unit virtualdragmanager; +unit laz.VirtualDragManager; {$mode delphi} @@ -227,7 +227,7 @@ type implementation uses - VirtualTrees, Controls, oleutils; + laz.VirtualTrees, Controls, oleutils; type TVirtualTreeAccess = class (TBaseVirtualTree) diff --git a/components/virtualtreeview/units/win32/virtualpanningwindow.pas b/components/virtualtreeview/units/win32/laz.virtualpanningwindow.pas similarity index 98% rename from components/virtualtreeview/units/win32/virtualpanningwindow.pas rename to components/virtualtreeview/units/win32/laz.virtualpanningwindow.pas index 93ca6fbf13..de357194df 100644 --- a/components/virtualtreeview/units/win32/virtualpanningwindow.pas +++ b/components/virtualtreeview/units/win32/laz.virtualpanningwindow.pas @@ -1,4 +1,4 @@ -unit virtualpanningwindow; +unit laz.VirtualPanningWindow; {Adapted from VirtualTrees by Luiz Américo to work in LCL/Lazarus} @@ -29,7 +29,7 @@ implementation {$ifdef DEBUG_VTV} uses - vtlogger; + laz.VTLogger; {$endif} function {%H-}PanningWindowProc(Window: HWnd; Msg: UInt;WPara: WParam; LPara: LParam): LResult; stdcall; diff --git a/components/virtualtreeview/virtualtreeview_package.pas b/components/virtualtreeview/virtualtreeview_package.pas deleted file mode 100644 index 8f7c222f47..0000000000 --- a/components/virtualtreeview/virtualtreeview_package.pas +++ /dev/null @@ -1,23 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! - This source is only used to compile and install the package. - } - -unit virtualtreeview_package; - -{$warn 5023 off : no warning about unused units} -interface - -uses - VirtualTrees, VTHeaderPopup, registervirtualtreeview, VTGraphics, - VTIDEEditors, LazarusPackageIntf; - -implementation - -procedure Register; -begin - RegisterUnit('registervirtualtreeview', @registervirtualtreeview.Register); -end; - -initialization - RegisterPackage('virtualtreeview_package', @Register); -end.