From 3a0bd1ae406adfa8cccbc8b09e104c96b9ff37f6 Mon Sep 17 00:00:00 2001 From: alexs75 Date: Wed, 21 Sep 2016 10:43:42 +0000 Subject: [PATCH] RxFPC:remove depricated component RxAppIcon git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5195 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/trunk/register_rxctrl.pas | 14 +- components/rx/trunk/rxappicon.pas | 171 ------------------- components/rx/trunk/rxnew.lpk | 208 ++++++++++++------------ components/rx/trunk/rxnew.pas | 22 +-- 4 files changed, 120 insertions(+), 295 deletions(-) delete mode 100644 components/rx/trunk/rxappicon.pas diff --git a/components/rx/trunk/register_rxctrl.pas b/components/rx/trunk/register_rxctrl.pas index df5e85818..03232f7d0 100644 --- a/components/rx/trunk/register_rxctrl.pas +++ b/components/rx/trunk/register_rxctrl.pas @@ -49,7 +49,7 @@ type procedure ExecuteVerb(Index:integer);override; end; - +(* { TRxAppIcon } TRxAppIconEditor = class(TComponentEditor) @@ -61,15 +61,15 @@ type function GetVerb(Index:integer):string;override; procedure ExecuteVerb(Index:integer);override; end; - +*) procedure Register; implementation -uses RxLogin, RxAppIcon, Dialogs, rxconst, RxHistoryNavigator, rxpopupunit, +uses RxLogin, Dialogs, rxconst, RxHistoryNavigator, rxpopupunit, rxceEditLookupFields, rxdbgrid, rxdconst, rxduallist, rxstrutils, Forms; resourcestring sTestTRxLoginDialog = 'Test TRxLoginDialog'; - sLoadIcon = 'Load icon'; +// sLoadIcon = 'Load icon'; { TRxLoginDialogEditor } @@ -123,7 +123,7 @@ begin end; end; end; - +(* { TRxAppIcon } type @@ -190,7 +190,7 @@ begin end; end; end; - +*) { THistoryButtonProperty } function THistoryButtonProperty.GetAttributes: TPropertyAttributes; @@ -323,7 +323,7 @@ procedure Register; begin // RegisterComponentEditor(TRxLoginDialog, TRxLoginDialogEditor); - RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor); + //RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor); // RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty); RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty); diff --git a/components/rx/trunk/rxappicon.pas b/components/rx/trunk/rxappicon.pas deleted file mode 100644 index ef47d9674..000000000 --- a/components/rx/trunk/rxappicon.pas +++ /dev/null @@ -1,171 +0,0 @@ -{ rxappicon unit - -Copyright (C) 2005-2016 Lagunov Aleksey alexs75@yandex.ru and Lazarus team -original conception from rx library for Delphi (c) - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version with the following modification: - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent modules,and - to copy and distribute the resulting executable under terms of your choice, - provided that you also meet, for each linked independent module, the terms - and conditions of the license of that module. An independent module is a - module which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the library, - but you are not obligated to do so. If you do not wish to do so, delete this - exception statement from your version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -} - -unit rxappicon; - -{$mode objfpc}{$H+} - -{$IFDEF LCLQT} - {$DEFINE LCLGtk2} -{$ENDIF} - -interface - -uses - Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs; - -type - - { TRxAppIcon } - - TRxAppIcon = class(TComponent) - private - FIcon:TIcon; - FIconStream:TMemoryStream; - function GetAppIcon: TIcon; - procedure SetAppIcon(const AValue: TIcon); - { Private declarations } - protected - procedure Loaded; override; - procedure DefineProperties(Filer: TFiler); override; - procedure ReadData(Stream: TStream); virtual; - procedure WriteData(Stream: TStream); virtual; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure ApplyIcon; - procedure LoadFromFile(AFileName:string); - property Icon:TIcon read GetAppIcon write SetAppIcon; - published - end; - - -implementation -{$IFDEF WIN32} -{$IFNDEF LCLGtk2} -uses Windows, Win32Int, InterfaceBase, vclutils; -{$ENDIF} -{$ENDIF} - - -{ TRxAppIcon } - -procedure TRxAppIcon.SetAppIcon(const AValue: TIcon); -begin - FIcon.Assign(AValue); - Application.Icon:=FIcon; -end; - -procedure TRxAppIcon.Loaded; -begin - inherited Loaded; - if not (csDesigning in ComponentState) then - ApplyIcon; -end; - -procedure TRxAppIcon.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineBinaryProperty('Data', @ReadData, @WriteData, FIconStream.Size>0); -end; - -procedure TRxAppIcon.ReadData(Stream: TStream); -begin - FIconStream.LoadFromStream(Stream); -end; - -procedure TRxAppIcon.WriteData(Stream: TStream); -begin - FIconStream.SaveToStream(Stream); -end; - -constructor TRxAppIcon.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FIcon:=TIcon.Create; - FIconStream:=TMemoryStream.Create; -end; - -destructor TRxAppIcon.Destroy; -begin - FreeAndNil(FIcon); - FreeAndNil(FIconStream); - inherited Destroy; -end; - -procedure TRxAppIcon.ApplyIcon; -{$IFDEF WIN32} -{$IFNDEF LCLGtk2} -procedure DoApply; -var - H:HICON; - CI: TCursorOrIcon; - IconSize, RequestedSize: TPoint; -begin - try - FIconStream.Position := 0; - FIconStream.ReadBuffer(CI, SizeOf(CI)); - RequestedSize.x:=0; - RequestedSize.Y:=0; - ReadIcon(FIconStream, H, CI.Count, SizeOf(CI), RequestedSize, IconSize); - SendMessage(TWin32WidgetSet(WidgetSet).AppHandle, WM_SETICON, 1, H); - SetClassLong(TWin32WidgetSet(WidgetSet).AppHandle, GCL_HICON, H); - Application.Icon:=FIcon; - Application.Icon.Handle:=H; - finally - end; -end; -{$ENDIF} -{$ENDIF} -begin - if FIconStream.Size>0 then - begin - Icon.LoadFromStream(FIconStream); - {$IFDEF WIN32} -{$IFNDEF LCLGtk2} - DoApply; -{$ENDIF} - {$ENDIF} - end; - FIconStream.Position:=0; -end; - -procedure TRxAppIcon.LoadFromFile(AFileName: string); -begin - FIconStream.LoadFromFile(AFileName); -end; - -function TRxAppIcon.GetAppIcon: TIcon; -begin - Result:=FIcon; -end; - -end. diff --git a/components/rx/trunk/rxnew.lpk b/components/rx/trunk/rxnew.lpk index 18928d73b..defe5e6fb 100644 --- a/components/rx/trunk/rxnew.lpk +++ b/components/rx/trunk/rxnew.lpk @@ -26,7 +26,7 @@ translate to Lazarus by alexs in 2005 - 2016 "/> - + @@ -99,213 +99,209 @@ translate to Lazarus by alexs in 2005 - 2016 - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/components/rx/trunk/rxnew.pas b/components/rx/trunk/rxnew.pas index 077707b2b..324fc349d 100644 --- a/components/rx/trunk/rxnew.pas +++ b/components/rx/trunk/rxnew.pas @@ -10,17 +10,17 @@ interface uses RxAutoPanel, rxboxprocs, rxcurredit, rxdbcurredit, rxdbdateedit, rxdbutils, rxduallist, rxfduallst, rxfolderlister, rxpagemngr, rxpickdate, registerrx, - RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon, - rxapputils, rxclock, rxconst, rxctrls, RxDBColorBox, rxdbcomb, RxDBCtrls, - rxdbgrid, rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, - RxDBTimeEdit, rxdconst, rxdice, rxfilterby, rxiconv, rxlogin, rxlookup, - rxmemds, rxpopupunit, rxsortmemds, rxspin, rxswitch, RxSystemServices, - rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxseldsfrm, - rxtooledit, rxvclutils, RxCloseFormValidator, RxHistoryNavigator, - ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby, - RxMDI, RxIniPropStorage, rxDateRangeEditUnit, RxDBGridFooterTools, - rxdbgridfootertools_setup, rxShortCutUnit, RxDBGridExportPdf, - RxDBGridExportPdfSetupUnit, LazarusPackageIntf; + RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxapputils, + rxclock, rxconst, rxctrls, RxDBColorBox, rxdbcomb, RxDBCtrls, rxdbgrid, + rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, RxDBTimeEdit, + rxdconst, rxdice, rxfilterby, rxiconv, rxlogin, rxlookup, rxmemds, + rxpopupunit, rxsortmemds, rxspin, rxswitch, RxSystemServices, rxtbrsetup, + RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxseldsfrm, rxtooledit, + rxvclutils, RxCloseFormValidator, RxHistoryNavigator, ex_rx_bin_datapacket, + ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby, RxMDI, RxIniPropStorage, + rxDateRangeEditUnit, RxDBGridFooterTools, rxdbgridfootertools_setup, + rxShortCutUnit, RxDBGridExportPdf, RxDBGridExportPdfSetupUnit, + LazarusPackageIntf; implementation