From c0c6b89b60bba906edd235350ba16e1ea7afbe9a Mon Sep 17 00:00:00 2001 From: blikblum Date: Mon, 20 Jun 2011 01:06:11 +0000 Subject: [PATCH] * Improve design time editor git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1711 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../spktoolbar/SpkToolbar/spkt_Buttons.pas | 9 ------- .../spktoolbar/SpkToolbar/spkt_Pane.pas | 7 ----- components/spktoolbar/SpkToolbar/spkt_Tab.pas | 7 ----- components/spktoolbar/registerspktoolbar.pas | 27 +++++++++++++++++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/components/spktoolbar/SpkToolbar/spkt_Buttons.pas b/components/spktoolbar/SpkToolbar/spkt_Buttons.pas index 0b2770080..91a923c9c 100644 --- a/components/spktoolbar/SpkToolbar/spkt_Buttons.pas +++ b/components/spktoolbar/SpkToolbar/spkt_Buttons.pas @@ -2176,14 +2176,5 @@ begin FToolbarDispatch.NotifyMetricsChanged; end; -initialization - -RegisterClass(TSpkLargeButton); -RegisterClass(TSpkSmallButton); - -finalization - -UnRegisterClass(TSpkLargeButton); -UnRegisterClass(TSpkSmallButton); end. diff --git a/components/spktoolbar/SpkToolbar/spkt_Pane.pas b/components/spktoolbar/SpkToolbar/spkt_Pane.pas index 5379f16a6..5616e867d 100644 --- a/components/spktoolbar/SpkToolbar/spkt_Pane.pas +++ b/components/spktoolbar/SpkToolbar/spkt_Pane.pas @@ -1102,12 +1102,5 @@ begin FToolbarDispatch.NotifyItemsChanged; end; -initialization - -RegisterClass(TSpkPane); - -finalization - -UnregisterClass(TSpkPane); end. diff --git a/components/spktoolbar/SpkToolbar/spkt_Tab.pas b/components/spktoolbar/SpkToolbar/spkt_Tab.pas index 23683b290..d510540d6 100644 --- a/components/spktoolbar/SpkToolbar/spkt_Tab.pas +++ b/components/spktoolbar/SpkToolbar/spkt_Tab.pas @@ -802,12 +802,5 @@ begin FToolbarDispatch.NotifyItemsChanged; end; -initialization - -RegisterClass(TSpkTab); - -finalization - -UnRegisterClass(TSpkTab); end. diff --git a/components/spktoolbar/registerspktoolbar.pas b/components/spktoolbar/registerspktoolbar.pas index d9e28119f..58ef4d9a1 100644 --- a/components/spktoolbar/registerspktoolbar.pas +++ b/components/spktoolbar/registerspktoolbar.pas @@ -5,8 +5,8 @@ unit RegisterSpkToolbar; interface uses - Classes, SysUtils, LazarusPackageIntf, SpkToolbar, PropEdits, - ComponentEditors, SpkToolbarEditor; + Classes, SysUtils, LazarusPackageIntf, SpkToolbar, PropEdits, ComponentEditors, + SpkToolbarEditor, spkt_Buttons, spkt_Pane, spkt_Tab, spkt_Appearance; procedure Register; @@ -17,9 +17,32 @@ begin RegisterComponents('SpkToolbar', [TSpkToolbar]); end; +procedure RegisterUnitSpkt_Buttons; +begin + RegisterNoIcon([TSpkLargeButton, TSpkSmallButton]); +end; + +procedure RegisterUnitSpkt_Pane; +begin + RegisterNoIcon([TSpkPane]); +end; + +procedure RegisterUnitSpkt_Tab; +begin + RegisterNoIcon([TSpkTab]); +end; + procedure Register; begin RegisterUnit('SpkToolbar', @RegisterUnitSpkToolbar); + RegisterUnit('spkt_Buttons', @RegisterUnitSpkt_Buttons); + RegisterUnit('spkt_Pane', @RegisterUnitSpkt_Pane); + RegisterUnit('spkt_Tab', @RegisterUnitSpkt_Tab); + + RegisterComponentEditor(TSpkToolbar, TSpkToolbarEditor); + RegisterPropertyEditor(TypeInfo(TSpkToolbarAppearance), TSpkToolbar, + 'Appearance', TSpkToolbarAppearanceEditor); + //todo: register Caption Editor end; end.