RxFPC:remove depricated component RxAppIcon

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5195 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2016-09-21 10:43:42 +00:00
parent 7c35ddd5c1
commit 3a0bd1ae40
4 changed files with 120 additions and 295 deletions

View File

@ -49,7 +49,7 @@ type
procedure ExecuteVerb(Index:integer);override; procedure ExecuteVerb(Index:integer);override;
end; end;
(*
{ TRxAppIcon } { TRxAppIcon }
TRxAppIconEditor = class(TComponentEditor) TRxAppIconEditor = class(TComponentEditor)
@ -61,15 +61,15 @@ type
function GetVerb(Index:integer):string;override; function GetVerb(Index:integer):string;override;
procedure ExecuteVerb(Index:integer);override; procedure ExecuteVerb(Index:integer);override;
end; end;
*)
procedure Register; procedure Register;
implementation implementation
uses RxLogin, RxAppIcon, Dialogs, rxconst, RxHistoryNavigator, rxpopupunit, uses RxLogin, Dialogs, rxconst, RxHistoryNavigator, rxpopupunit,
rxceEditLookupFields, rxdbgrid, rxdconst, rxduallist, rxstrutils, Forms; rxceEditLookupFields, rxdbgrid, rxdconst, rxduallist, rxstrutils, Forms;
resourcestring resourcestring
sTestTRxLoginDialog = 'Test TRxLoginDialog'; sTestTRxLoginDialog = 'Test TRxLoginDialog';
sLoadIcon = 'Load icon'; // sLoadIcon = 'Load icon';
{ TRxLoginDialogEditor } { TRxLoginDialogEditor }
@ -123,7 +123,7 @@ begin
end; end;
end; end;
end; end;
(*
{ TRxAppIcon } { TRxAppIcon }
type type
@ -190,7 +190,7 @@ begin
end; end;
end; end;
end; end;
*)
{ THistoryButtonProperty } { THistoryButtonProperty }
function THistoryButtonProperty.GetAttributes: TPropertyAttributes; function THistoryButtonProperty.GetAttributes: TPropertyAttributes;
@ -323,7 +323,7 @@ procedure Register;
begin begin
// //
RegisterComponentEditor(TRxLoginDialog, TRxLoginDialogEditor); RegisterComponentEditor(TRxLoginDialog, TRxLoginDialogEditor);
RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor); //RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor);
// //
RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty); RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty);
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty); RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty);

View File

@ -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.

View File

@ -26,7 +26,7 @@ translate to Lazarus by alexs in 2005 - 2016
"/> "/>
<License Value="LGPL"/> <License Value="LGPL"/>
<Version Major="2" Minor="9" Release="4" Build="200"/> <Version Major="2" Minor="9" Release="4" Build="200"/>
<Files Count="69"> <Files Count="68">
<Item1> <Item1>
<Filename Value="rxautopanel.pas"/> <Filename Value="rxautopanel.pas"/>
<UnitName Value="RxAutoPanel"/> <UnitName Value="RxAutoPanel"/>
@ -99,213 +99,209 @@ translate to Lazarus by alexs in 2005 - 2016
<UnitName Value="rxAboutFormUnit"/> <UnitName Value="rxAboutFormUnit"/>
</Item17> </Item17>
<Item18> <Item18>
<Filename Value="rxappicon.pas"/>
<UnitName Value="rxappicon"/>
</Item18>
<Item19>
<Filename Value="rxapputils.pas"/> <Filename Value="rxapputils.pas"/>
<UnitName Value="rxapputils"/> <UnitName Value="rxapputils"/>
</Item19> </Item18>
<Item20> <Item19>
<Filename Value="rxclock.pas"/> <Filename Value="rxclock.pas"/>
<UnitName Value="rxclock"/> <UnitName Value="rxclock"/>
</Item20> </Item19>
<Item21> <Item20>
<Filename Value="rxconst.pas"/> <Filename Value="rxconst.pas"/>
<UnitName Value="rxconst"/> <UnitName Value="rxconst"/>
</Item21> </Item20>
<Item22> <Item21>
<Filename Value="rxctrls.pas"/> <Filename Value="rxctrls.pas"/>
<UnitName Value="rxctrls"/> <UnitName Value="rxctrls"/>
</Item22> </Item21>
<Item23> <Item22>
<Filename Value="rxdbcolorbox.pas"/> <Filename Value="rxdbcolorbox.pas"/>
<UnitName Value="RxDBColorBox"/> <UnitName Value="RxDBColorBox"/>
</Item23> </Item22>
<Item24> <Item23>
<Filename Value="rxdbcomb.pas"/> <Filename Value="rxdbcomb.pas"/>
<UnitName Value="rxdbcomb"/> <UnitName Value="rxdbcomb"/>
</Item24> </Item23>
<Item25> <Item24>
<Filename Value="rxdbctrls.pas"/> <Filename Value="rxdbctrls.pas"/>
<UnitName Value="RxDBCtrls"/> <UnitName Value="RxDBCtrls"/>
</Item25> </Item24>
<Item26> <Item25>
<Filename Value="rxdbgrid.pas"/> <Filename Value="rxdbgrid.pas"/>
<UnitName Value="rxdbgrid"/> <UnitName Value="rxdbgrid"/>
</Item26> </Item25>
<Item27> <Item26>
<Filename Value="rxdbgrid_columsunit.pas"/> <Filename Value="rxdbgrid_columsunit.pas"/>
<UnitName Value="rxdbgrid_columsunit"/> <UnitName Value="rxdbgrid_columsunit"/>
</Item27> </Item26>
<Item28> <Item27>
<Filename Value="rxdbgrid_findunit.pas"/> <Filename Value="rxdbgrid_findunit.pas"/>
<UnitName Value="rxdbgrid_findunit"/> <UnitName Value="rxdbgrid_findunit"/>
</Item28> </Item27>
<Item29> <Item28>
<Filename Value="rxdbspinedit.pas"/> <Filename Value="rxdbspinedit.pas"/>
<UnitName Value="RxDBSpinEdit"/> <UnitName Value="RxDBSpinEdit"/>
</Item29> </Item28>
<Item30> <Item29>
<Filename Value="rxdbtimeedit.pas"/> <Filename Value="rxdbtimeedit.pas"/>
<UnitName Value="RxDBTimeEdit"/> <UnitName Value="RxDBTimeEdit"/>
</Item30> </Item29>
<Item31> <Item30>
<Filename Value="rxdconst.pas"/> <Filename Value="rxdconst.pas"/>
<UnitName Value="rxdconst"/> <UnitName Value="rxdconst"/>
</Item31> </Item30>
<Item32> <Item31>
<Filename Value="rxdice.pas"/> <Filename Value="rxdice.pas"/>
<UnitName Value="rxdice"/> <UnitName Value="rxdice"/>
</Item32> </Item31>
<Item33> <Item32>
<Filename Value="rxfilterby.pas"/> <Filename Value="rxfilterby.pas"/>
<UnitName Value="rxfilterby"/> <UnitName Value="rxfilterby"/>
</Item33> </Item32>
<Item34> <Item33>
<Filename Value="rxiconv.pas"/> <Filename Value="rxiconv.pas"/>
<UnitName Value="rxiconv"/> <UnitName Value="rxiconv"/>
</Item34> </Item33>
<Item35> <Item34>
<Filename Value="rxlogin.pas"/> <Filename Value="rxlogin.pas"/>
<UnitName Value="rxlogin"/> <UnitName Value="rxlogin"/>
</Item35> </Item34>
<Item36> <Item35>
<Filename Value="rxlookup.pas"/> <Filename Value="rxlookup.pas"/>
<UnitName Value="rxlookup"/> <UnitName Value="rxlookup"/>
</Item36> </Item35>
<Item37> <Item36>
<Filename Value="rxmemds.pas"/> <Filename Value="rxmemds.pas"/>
<UnitName Value="rxmemds"/> <UnitName Value="rxmemds"/>
</Item37> </Item36>
<Item38> <Item37>
<Filename Value="rxpopupunit.pas"/> <Filename Value="rxpopupunit.pas"/>
<UnitName Value="rxpopupunit"/> <UnitName Value="rxpopupunit"/>
</Item38> </Item37>
<Item39> <Item38>
<Filename Value="rxsortmemds.pas"/> <Filename Value="rxsortmemds.pas"/>
<UnitName Value="rxsortmemds"/> <UnitName Value="rxsortmemds"/>
</Item39> </Item38>
<Item40> <Item39>
<Filename Value="rxspin.pas"/> <Filename Value="rxspin.pas"/>
<UnitName Value="rxspin"/> <UnitName Value="rxspin"/>
</Item40> </Item39>
<Item41> <Item40>
<Filename Value="rxswitch.pas"/> <Filename Value="rxswitch.pas"/>
<UnitName Value="rxswitch"/> <UnitName Value="rxswitch"/>
</Item41> </Item40>
<Item42> <Item41>
<Filename Value="rxsystemservices.pas"/> <Filename Value="rxsystemservices.pas"/>
<UnitName Value="RxSystemServices"/> <UnitName Value="RxSystemServices"/>
</Item42> </Item41>
<Item43> <Item42>
<Filename Value="rxtbrsetup.pas"/> <Filename Value="rxtbrsetup.pas"/>
<UnitName Value="rxtbrsetup"/> <UnitName Value="rxtbrsetup"/>
</Item43> </Item42>
<Item44> <Item43>
<Filename Value="rxtimeedit.pas"/> <Filename Value="rxtimeedit.pas"/>
<UnitName Value="RxTimeEdit"/> <UnitName Value="RxTimeEdit"/>
</Item44> </Item43>
<Item45> <Item44>
<Filename Value="rxtoolbar.pas"/> <Filename Value="rxtoolbar.pas"/>
<UnitName Value="rxtoolbar"/> <UnitName Value="rxtoolbar"/>
</Item45> </Item44>
<Item46> <Item45>
<Filename Value="rxversinfo.pas"/> <Filename Value="rxversinfo.pas"/>
<UnitName Value="RxVersInfo"/> <UnitName Value="RxVersInfo"/>
</Item46> </Item45>
<Item47> <Item46>
<Filename Value="rxviewspanel.pas"/> <Filename Value="rxviewspanel.pas"/>
<UnitName Value="RxViewsPanel"/> <UnitName Value="RxViewsPanel"/>
</Item47> </Item46>
<Item48> <Item47>
<Filename Value="rxseldsfrm.pas"/> <Filename Value="rxseldsfrm.pas"/>
<UnitName Value="rxseldsfrm"/> <UnitName Value="rxseldsfrm"/>
</Item48> </Item47>
<Item49> <Item48>
<Filename Value="rxtooledit.pas"/> <Filename Value="rxtooledit.pas"/>
<UnitName Value="rxtooledit"/> <UnitName Value="rxtooledit"/>
</Item49> </Item48>
<Item50> <Item49>
<Filename Value="rxvclutils.pas"/> <Filename Value="rxvclutils.pas"/>
<UnitName Value="rxvclutils"/> <UnitName Value="rxvclutils"/>
</Item50> </Item49>
<Item51> <Item50>
<Filename Value="rxcloseformvalidator.pas"/> <Filename Value="rxcloseformvalidator.pas"/>
<UnitName Value="RxCloseFormValidator"/> <UnitName Value="RxCloseFormValidator"/>
</Item51> </Item50>
<Item52> <Item51>
<Filename Value="rxhistorynavigator.pas"/> <Filename Value="rxhistorynavigator.pas"/>
<UnitName Value="RxHistoryNavigator"/> <UnitName Value="RxHistoryNavigator"/>
</Item52> </Item51>
<Item53> <Item52>
<Filename Value="ex_rx_bin_datapacket.pas"/> <Filename Value="ex_rx_bin_datapacket.pas"/>
<UnitName Value="ex_rx_bin_datapacket"/> <UnitName Value="ex_rx_bin_datapacket"/>
</Item53> </Item52>
<Item54> <Item53>
<Filename Value="ex_rx_datapacket.pas"/> <Filename Value="ex_rx_datapacket.pas"/>
<UnitName Value="ex_rx_datapacket"/> <UnitName Value="ex_rx_datapacket"/>
</Item54> </Item53>
<Item55> <Item54>
<Filename Value="ex_rx_xml_datapacket.pas"/> <Filename Value="ex_rx_xml_datapacket.pas"/>
<UnitName Value="ex_rx_xml_datapacket"/> <UnitName Value="ex_rx_xml_datapacket"/>
</Item55> </Item54>
<Item56> <Item55>
<Filename Value="rxsortby.lfm"/> <Filename Value="rxsortby.lfm"/>
<Type Value="LFM"/> <Type Value="LFM"/>
</Item56> </Item55>
<Item57> <Item56>
<Filename Value="rxsortby.pas"/> <Filename Value="rxsortby.pas"/>
<UnitName Value="rxsortby"/> <UnitName Value="rxsortby"/>
</Item57> </Item56>
<Item58> <Item57>
<Filename Value="rxmdi.pas"/> <Filename Value="rxmdi.pas"/>
<UnitName Value="RxMDI"/> <UnitName Value="RxMDI"/>
</Item58> </Item57>
<Item59> <Item58>
<Filename Value="rxinipropstorage.pas"/> <Filename Value="rxinipropstorage.pas"/>
<UnitName Value="RxIniPropStorage"/> <UnitName Value="RxIniPropStorage"/>
</Item59> </Item58>
<Item60> <Item59>
<Filename Value="rx_lcl.res"/> <Filename Value="rx_lcl.res"/>
<Type Value="Binary"/> <Type Value="Binary"/>
</Item60> </Item59>
<Item61> <Item60>
<Filename Value="rxdaterangeeditunit.pas"/> <Filename Value="rxdaterangeeditunit.pas"/>
<UnitName Value="rxDateRangeEditUnit"/> <UnitName Value="rxDateRangeEditUnit"/>
</Item61> </Item60>
<Item62> <Item61>
<Filename Value="rxdbgridfootertools.pas"/> <Filename Value="rxdbgridfootertools.pas"/>
<UnitName Value="RxDBGridFooterTools"/> <UnitName Value="RxDBGridFooterTools"/>
</Item62> </Item61>
<Item63> <Item62>
<Filename Value="rxdbgridfootertools_setup.lfm"/> <Filename Value="rxdbgridfootertools_setup.lfm"/>
<Type Value="LFM"/> <Type Value="LFM"/>
</Item63> </Item62>
<Item64> <Item63>
<Filename Value="rxdbgridfootertools_setup.pas"/> <Filename Value="rxdbgridfootertools_setup.pas"/>
<UnitName Value="rxdbgridfootertools_setup"/> <UnitName Value="rxdbgridfootertools_setup"/>
</Item64> </Item63>
<Item65> <Item64>
<Filename Value="rxshortcutunit.lfm"/> <Filename Value="rxshortcutunit.lfm"/>
<Type Value="LFM"/> <Type Value="LFM"/>
</Item65> </Item64>
<Item66> <Item65>
<Filename Value="rxshortcutunit.pas"/> <Filename Value="rxshortcutunit.pas"/>
<UnitName Value="rxShortCutUnit"/> <UnitName Value="rxShortCutUnit"/>
</Item66> </Item65>
<Item67> <Item66>
<Filename Value="rxdbgridexportpdf.pas"/> <Filename Value="rxdbgridexportpdf.pas"/>
<UnitName Value="RxDBGridExportPdf"/> <UnitName Value="RxDBGridExportPdf"/>
</Item67> </Item66>
<Item68> <Item67>
<Filename Value="rxdbgridexportpdfsetupunit.lfm"/> <Filename Value="rxdbgridexportpdfsetupunit.lfm"/>
<Type Value="LFM"/> <Type Value="LFM"/>
</Item68> </Item67>
<Item69> <Item68>
<Filename Value="rxdbgridexportpdfsetupunit.pas"/> <Filename Value="rxdbgridexportpdfsetupunit.pas"/>
<UnitName Value="RxDBGridExportPdfSetupUnit"/> <UnitName Value="RxDBGridExportPdfSetupUnit"/>
</Item69> </Item68>
</Files> </Files>
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/> <LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
<i18n> <i18n>

View File

@ -10,17 +10,17 @@ interface
uses uses
RxAutoPanel, rxboxprocs, rxcurredit, rxdbcurredit, rxdbdateedit, rxdbutils, RxAutoPanel, rxboxprocs, rxcurredit, rxdbcurredit, rxdbdateedit, rxdbutils,
rxduallist, rxfduallst, rxfolderlister, rxpagemngr, rxpickdate, registerrx, rxduallist, rxfduallst, rxfolderlister, rxpagemngr, rxpickdate, registerrx,
RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon, RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxapputils,
rxapputils, rxclock, rxconst, rxctrls, RxDBColorBox, rxdbcomb, RxDBCtrls, rxclock, rxconst, rxctrls, RxDBColorBox, rxdbcomb, RxDBCtrls, rxdbgrid,
rxdbgrid, rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, RxDBTimeEdit,
RxDBTimeEdit, rxdconst, rxdice, rxfilterby, rxiconv, rxlogin, rxlookup, rxdconst, rxdice, rxfilterby, rxiconv, rxlogin, rxlookup, rxmemds,
rxmemds, rxpopupunit, rxsortmemds, rxspin, rxswitch, RxSystemServices, rxpopupunit, rxsortmemds, rxspin, rxswitch, RxSystemServices, rxtbrsetup,
rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxseldsfrm, RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxseldsfrm, rxtooledit,
rxtooledit, rxvclutils, RxCloseFormValidator, RxHistoryNavigator, rxvclutils, RxCloseFormValidator, RxHistoryNavigator, ex_rx_bin_datapacket,
ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby, RxMDI, RxIniPropStorage,
RxMDI, RxIniPropStorage, rxDateRangeEditUnit, RxDBGridFooterTools, rxDateRangeEditUnit, RxDBGridFooterTools, rxdbgridfootertools_setup,
rxdbgridfootertools_setup, rxShortCutUnit, RxDBGridExportPdf, rxShortCutUnit, RxDBGridExportPdf, RxDBGridExportPdfSetupUnit,
RxDBGridExportPdfSetupUnit, LazarusPackageIntf; LazarusPackageIntf;
implementation implementation