2010-03-05 21:57:25 +00:00
|
|
|
{ registerrx unit
|
|
|
|
|
|
|
|
Copyright (C) 2005-2010 Lagunov Aleksey alexs@hotbox.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.
|
|
|
|
}
|
|
|
|
|
2007-08-09 21:36:59 +00:00
|
|
|
unit registerrx;
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
Classes, SysUtils, LResources, LazarusPackageIntf;
|
|
|
|
|
2013-09-10 13:53:45 +00:00
|
|
|
const
|
|
|
|
RxCtrllPageName = 'RX Controls';
|
|
|
|
|
2007-08-09 21:36:59 +00:00
|
|
|
procedure Register;
|
|
|
|
|
|
|
|
implementation
|
2007-10-30 11:43:24 +00:00
|
|
|
uses
|
2011-11-30 16:28:31 +00:00
|
|
|
PropEdits, folderlister, duallist, RxHistoryNavigator,
|
2011-09-23 22:37:57 +00:00
|
|
|
curredit, rxswitch, rxdice, rxtoolbar, rxxpman, PageMngr, RxAppIcon,
|
2010-08-25 17:45:41 +00:00
|
|
|
Dialogs, ComponentEditors, DBPropEdits, DB, rxctrls,
|
2008-02-19 15:55:07 +00:00
|
|
|
RxCustomChartPanel, AutoPanel, pickdate, rxconst, tooledit, rxclock,
|
2010-08-25 17:45:41 +00:00
|
|
|
rxceEditLookupFields, rxpopupunit, rxspin, RxTimeEdit,
|
2012-10-09 10:35:17 +00:00
|
|
|
RxAboutDialog, RxViewsPanel, RxMDI;
|
2007-08-09 21:36:59 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
|
|
|
|
|
2008-05-14 18:28:14 +00:00
|
|
|
{ TPopUpColumnFieldProperty }
|
|
|
|
|
|
|
|
TPopUpColumnFieldProperty = class(TFieldProperty)
|
|
|
|
public
|
|
|
|
procedure FillValues(const Values: TStringList); override;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ TPopUpColumnFieldProperty }
|
|
|
|
|
|
|
|
procedure TPopUpColumnFieldProperty.FillValues(const Values: TStringList);
|
|
|
|
var
|
|
|
|
Column: TPopUpColumn;
|
|
|
|
DataSource: TDataSource;
|
|
|
|
begin
|
|
|
|
Column:=TPopUpColumn(GetComponent(0));
|
|
|
|
if not (Column is TPopUpColumn) then exit;
|
|
|
|
DataSource := TPopUpFormColumns(Column.Collection).PopUpFormOptions.DataSource;
|
|
|
|
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
|
|
|
|
DataSource.DataSet.GetFieldNames(Values);
|
|
|
|
end;
|
|
|
|
|
2011-11-30 16:28:31 +00:00
|
|
|
type
|
|
|
|
|
|
|
|
{ THistoryButtonProperty }
|
|
|
|
|
|
|
|
THistoryButtonProperty = class(TStringPropertyEditor)
|
|
|
|
public
|
|
|
|
function GetAttributes: TPropertyAttributes; override;
|
|
|
|
procedure GetValues(Proc: TGetStrProc); override;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ THistoryButtonProperty }
|
|
|
|
|
|
|
|
function THistoryButtonProperty.GetAttributes: TPropertyAttributes;
|
|
|
|
begin
|
|
|
|
Result:= [paValueList, paSortList, paMultiSelect];
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure THistoryButtonProperty.GetValues(Proc: TGetStrProc);
|
|
|
|
var
|
|
|
|
I: Integer;
|
|
|
|
Navigator:TRxHistoryNavigator;
|
|
|
|
begin
|
|
|
|
Navigator:=TRxHistoryNavigator(GetComponent(0));
|
|
|
|
if Assigned(Navigator) then
|
|
|
|
begin
|
|
|
|
if Assigned(Navigator.ToolPanel) then
|
|
|
|
begin
|
|
|
|
for i:=0 to Navigator.ToolPanel.Items.Count - 1 do
|
|
|
|
begin
|
|
|
|
if Assigned(Navigator.ToolPanel.Items[i].Action) then
|
|
|
|
Proc(Navigator.ToolPanel.Items[i].Action.Name);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|
2007-08-09 21:36:59 +00:00
|
|
|
|
2010-03-05 21:57:25 +00:00
|
|
|
{$IFDEF USE_TRxAppIcon}
|
2007-08-09 21:36:59 +00:00
|
|
|
procedure RegisterRxAppIcon;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxAppIcon]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
2010-03-05 21:57:25 +00:00
|
|
|
{$ENDIF}
|
|
|
|
{$IFDEF USE_TRXXPManifest}
|
2007-08-09 21:36:59 +00:00
|
|
|
procedure RegisterRxXPMan;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRXXPManifest]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
2010-03-05 21:57:25 +00:00
|
|
|
{$ENDIF}
|
2007-08-09 21:36:59 +00:00
|
|
|
|
|
|
|
procedure RegisterPageMngr;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TPageManager]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure RegisterDualList;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TDualListDialog]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterCurrEdit;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TCurrencyEdit]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterRXSwitch;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxSwitch]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterRXDice;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxDice]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterFolderLister;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TFolderLister]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterRxToolBar;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TToolPanel]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterRxCtrls;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxLabel, TSecretPanel, TRxSpeedButton, TRxRadioGroup]);
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
2007-08-10 22:15:51 +00:00
|
|
|
procedure RegisterChartPanel;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxChart]);
|
2007-08-10 22:15:51 +00:00
|
|
|
end;
|
2007-08-09 21:36:59 +00:00
|
|
|
|
2007-08-28 21:55:23 +00:00
|
|
|
procedure RegisterAutoPanel;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TAutoPanel]);
|
2007-08-28 21:55:23 +00:00
|
|
|
end;
|
2007-08-09 21:36:59 +00:00
|
|
|
|
2007-10-17 10:19:26 +00:00
|
|
|
procedure RegisterPickDate;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxCalendarGrid]);
|
2007-10-17 10:19:26 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure RegisterToolEdit;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxDateEdit]);
|
2007-10-17 10:19:26 +00:00
|
|
|
end;
|
|
|
|
|
2008-02-19 15:55:07 +00:00
|
|
|
procedure RegisterRxClock;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxClock]);
|
2008-02-19 15:55:07 +00:00
|
|
|
end;
|
|
|
|
|
2009-01-26 21:09:40 +00:00
|
|
|
procedure RegisterRxSpin;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxSpinButton, TRxSpinEdit]);
|
2009-01-26 21:09:40 +00:00
|
|
|
end;
|
|
|
|
|
2009-02-11 16:34:36 +00:00
|
|
|
procedure RegisterRxTimeEdit;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxTimeEdit]);
|
2009-02-11 16:34:36 +00:00
|
|
|
end;
|
|
|
|
|
2010-03-02 17:47:14 +00:00
|
|
|
procedure RegisterRxAboutDialog;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxAboutDialog]);
|
2010-03-02 17:47:14 +00:00
|
|
|
end;
|
|
|
|
|
2010-08-22 19:37:24 +00:00
|
|
|
procedure RegisterRxViewsPanel;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxViewsPanel]);
|
2010-08-22 19:37:24 +00:00
|
|
|
end;
|
|
|
|
|
2012-10-09 10:35:17 +00:00
|
|
|
procedure RegisterRxMDI;
|
|
|
|
begin
|
2013-09-10 13:53:45 +00:00
|
|
|
RegisterComponents(RxCtrllPageName,[TRxMDICloseButton, TRxMDIPanel, TRxMDITasks]);
|
2012-10-09 10:35:17 +00:00
|
|
|
end;
|
|
|
|
|
2011-11-30 16:28:31 +00:00
|
|
|
procedure RegisterRxHistoryNavigator;
|
|
|
|
begin
|
|
|
|
RegisterComponents('RX Tools',[TRxHistoryNavigator]);
|
|
|
|
end;
|
|
|
|
|
2007-08-09 21:36:59 +00:00
|
|
|
procedure Register;
|
|
|
|
begin
|
|
|
|
//RX
|
|
|
|
RegisterUnit('folderlister', @RegisterFolderLister);
|
|
|
|
RegisterUnit('duallist', @RegisterDualList);
|
|
|
|
RegisterUnit('curredit', @RegisterCurrEdit);
|
|
|
|
RegisterUnit('rxswitch', @RegisterRXSwitch);
|
|
|
|
RegisterUnit('rxdice', @RegisterRXDice);
|
2010-03-05 21:57:25 +00:00
|
|
|
{$IFDEF USE_TRXXPManifest}
|
2007-08-09 21:36:59 +00:00
|
|
|
RegisterUnit('RxXPMan', @RegisterRxXPMan);
|
2010-03-05 21:57:25 +00:00
|
|
|
{$ENDIF}
|
2007-08-09 21:36:59 +00:00
|
|
|
RegisterUnit('PageMngr', @RegisterPageMngr);
|
|
|
|
RegisterUnit('rxtoolbar', @RegisterRxToolBar);
|
2010-03-05 21:57:25 +00:00
|
|
|
{$IFDEF USE_TRxAppIcon}
|
2007-08-09 21:36:59 +00:00
|
|
|
RegisterUnit('rxappicon', @RegisterRxAppIcon);
|
2010-03-05 21:57:25 +00:00
|
|
|
{$ENDIF}
|
2007-08-09 21:36:59 +00:00
|
|
|
RegisterUnit('rxctrls', @RegisterRxCtrls);
|
2007-08-10 22:15:51 +00:00
|
|
|
RegisterUnit('RxCustomChartPanel', @RegisterChartPanel);
|
2007-10-17 10:19:26 +00:00
|
|
|
RegisterUnit('AutoPanel', @RegisterAutoPanel);
|
|
|
|
RegisterUnit('pickdate', @RegisterPickDate);
|
|
|
|
RegisterUnit('tooledit', @RegisterToolEdit);
|
2008-02-19 15:55:07 +00:00
|
|
|
RegisterUnit('rxclock', @RegisterRxClock);
|
2009-01-26 21:09:40 +00:00
|
|
|
RegisterUnit('rxspin', @RegisterRxSpin);
|
2009-02-11 16:34:36 +00:00
|
|
|
RegisterUnit('RxTimeEdit', @RegisterRxTimeEdit);
|
2010-03-02 17:47:14 +00:00
|
|
|
RegisterUnit('RxAboutDialog', @RegisterRxAboutDialog);
|
2010-08-22 19:37:24 +00:00
|
|
|
RegisterUnit('RxViewsPanel', @RegisterRxViewsPanel);
|
2011-11-30 16:28:31 +00:00
|
|
|
RegisterUnit('RxHistoryNavigator', @RegisterRxHistoryNavigator);
|
2012-10-09 10:35:17 +00:00
|
|
|
RegisterUnit('RxMDI', @RegisterRxMDI);
|
|
|
|
|
2011-11-30 16:28:31 +00:00
|
|
|
|
2007-10-17 10:19:26 +00:00
|
|
|
|
2011-09-23 22:37:57 +00:00
|
|
|
//
|
2008-05-14 18:28:14 +00:00
|
|
|
RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty);
|
2011-11-30 16:28:31 +00:00
|
|
|
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty);
|
|
|
|
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'ForwardBtn', THistoryButtonProperty);
|
2007-10-30 11:43:24 +00:00
|
|
|
RegisterCEEditLookupFields;
|
2007-08-09 21:36:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
initialization
|
|
|
|
{$i rx.lrs}
|
|
|
|
end.
|