You've already forked lazarus-ccr
RxFPC: new component - TRxtextHolder
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6710 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -559,6 +559,7 @@ function DoFillDone:string;
|
||||
var
|
||||
i:integer;
|
||||
begin
|
||||
Result:='';
|
||||
for i:=0 to DualListDialog1.List2.Count-1 do
|
||||
Result:=Result + DualListDialog1.List2[i]+';';
|
||||
if Result<>'' then
|
||||
|
51
components/rx/trunk/dcl_rxtools.lpk
Normal file
51
components/rx/trunk/dcl_rxtools.lpk
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Name Value="dcl_rxtools"/>
|
||||
<Type Value="DesignTime"/>
|
||||
<Author Value="Lagunov Aleksey"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="dcl_rxtools"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<License Value="LGPL 2"/>
|
||||
<Version Release="1" Build="1"/>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="dcl_rxtools/register_rxtools.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="register_rxtools"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="dcl_rxtools/rxtextholder_editor.pas"/>
|
||||
<UnitName Value="RxTextHolder_Editor"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
</i18n>
|
||||
<RequiredPkgs Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxtools"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item3>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
98
components/rx/trunk/dcl_rxtools/register_rxtools.pas
Normal file
98
components/rx/trunk/dcl_rxtools/register_rxtools.pas
Normal file
@ -0,0 +1,98 @@
|
||||
{ register_rxtools
|
||||
|
||||
Copyright (C) 2005-2018 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 register_rxtools;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
procedure Register;
|
||||
implementation
|
||||
uses LazarusPackageIntf, RxTextHolder, ComponentEditors, RxTextHolder_Editor,
|
||||
rxconst;
|
||||
|
||||
const
|
||||
sRxToolsPage = 'RX Tools';
|
||||
|
||||
type
|
||||
|
||||
{ TRxTextHolderEditor }
|
||||
|
||||
TRxTextHolderEditor = class(TComponentEditor)
|
||||
public
|
||||
function GetVerbCount:integer;override;
|
||||
function GetVerb(Index:integer):string;override;
|
||||
procedure ExecuteVerb(Index:integer);override;
|
||||
end;
|
||||
|
||||
procedure RegisterRxTextHolder;
|
||||
begin
|
||||
RegisterComponents(sRxToolsPage,[TRxTextHolder]);
|
||||
RegisterComponentEditor(TRxTextHolder, TRxTextHolderEditor);
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('RxTextHolder', @RegisterRxTextHolder);
|
||||
end;
|
||||
|
||||
{ TRxTextHolderEditor }
|
||||
|
||||
function TRxTextHolderEditor.GetVerbCount: integer;
|
||||
begin
|
||||
Result:=1;
|
||||
end;
|
||||
|
||||
function TRxTextHolderEditor.GetVerb(Index: integer): string;
|
||||
begin
|
||||
case Index of
|
||||
0:Result:=sRxTextHolderTextEditor;
|
||||
else
|
||||
Result:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolderEditor.ExecuteVerb(Index: integer);
|
||||
begin
|
||||
if Index = 0 then
|
||||
begin
|
||||
if ShowRxTextHolderEditorForm(Component as TRxTextHolder) then
|
||||
Modified;
|
||||
end
|
||||
else
|
||||
inherited ExecuteVerb(Index);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
178
components/rx/trunk/dcl_rxtools/rxtextholder_editor.lfm
Normal file
178
components/rx/trunk/dcl_rxtools/rxtextholder_editor.lfm
Normal file
@ -0,0 +1,178 @@
|
||||
object RxTextHolder_EditorForm: TRxTextHolder_EditorForm
|
||||
Left = 366
|
||||
Height = 592
|
||||
Top = 183
|
||||
Width = 806
|
||||
Caption = 'RxTextHolder'
|
||||
ClientHeight = 592
|
||||
ClientWidth = 806
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.1.0.0'
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 42
|
||||
Top = 544
|
||||
Width = 794
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
TabOrder = 0
|
||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 538
|
||||
Top = 0
|
||||
Width = 170
|
||||
Align = alLeft
|
||||
ClientHeight = 538
|
||||
ClientWidth = 170
|
||||
TabOrder = 1
|
||||
object ListBox1: TListBox
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideRight.Control = Panel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = BitBtn1
|
||||
Left = 1
|
||||
Height = 507
|
||||
Top = 1
|
||||
Width = 168
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
ItemHeight = 0
|
||||
OnClick = ListBox1Click
|
||||
OnSelectionChange = ListBox1SelectionChange
|
||||
PopupMenu = PopupMenu1
|
||||
ScrollWidth = 166
|
||||
TabOrder = 0
|
||||
TopIndex = -1
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideRight.Control = CLabel1
|
||||
AnchorSideBottom.Control = Panel1
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 29
|
||||
Top = 508
|
||||
Width = 84
|
||||
Action = itemAdd
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
TabOrder = 1
|
||||
end
|
||||
object BitBtn2: TBitBtn
|
||||
AnchorSideLeft.Control = CLabel1
|
||||
AnchorSideRight.Control = Panel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Panel1
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 85
|
||||
Height = 30
|
||||
Top = 507
|
||||
Width = 84
|
||||
Action = itemRemove
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
TabOrder = 2
|
||||
end
|
||||
object CLabel1: TLabel
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 85
|
||||
Height = 1
|
||||
Top = 1
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 170
|
||||
Height = 538
|
||||
Top = 0
|
||||
Width = 5
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 175
|
||||
Height = 538
|
||||
Top = 0
|
||||
Width = 631
|
||||
Align = alClient
|
||||
ClientHeight = 538
|
||||
ClientWidth = 631
|
||||
TabOrder = 3
|
||||
object Edit1: TEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel2
|
||||
AnchorSideRight.Control = Panel2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 57
|
||||
Height = 27
|
||||
Top = 1
|
||||
Width = 573
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
OnExit = Edit1Exit
|
||||
TabOrder = 0
|
||||
end
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Panel2
|
||||
AnchorSideBottom.Control = Edit1
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 17
|
||||
Top = 11
|
||||
Width = 50
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'Caption'
|
||||
ParentColor = False
|
||||
end
|
||||
object Memo1: TMemo
|
||||
AnchorSideLeft.Control = Panel2
|
||||
AnchorSideTop.Control = Edit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Panel2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Panel2
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 509
|
||||
Top = 28
|
||||
Width = 629
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
OnExit = Memo1Exit
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 64
|
||||
Top = 336
|
||||
object MenuItem1: TMenuItem
|
||||
Action = itemAdd
|
||||
end
|
||||
object MenuItem2: TMenuItem
|
||||
Action = itemRemove
|
||||
end
|
||||
end
|
||||
object ActionList1: TActionList
|
||||
Left = 200
|
||||
Top = 336
|
||||
object itemAdd: TAction
|
||||
Caption = 'Add'
|
||||
OnExecute = itemAddExecute
|
||||
end
|
||||
object itemRemove: TAction
|
||||
Caption = 'Remove'
|
||||
OnExecute = itemRemoveExecute
|
||||
end
|
||||
end
|
||||
end
|
220
components/rx/trunk/dcl_rxtools/rxtextholder_editor.pas
Normal file
220
components/rx/trunk/dcl_rxtools/rxtextholder_editor.pas
Normal file
@ -0,0 +1,220 @@
|
||||
{ RxTextHolder_Editor
|
||||
|
||||
Copyright (C) 2005-2018 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 RxTextHolder_Editor;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ButtonPanel, ExtCtrls,
|
||||
StdCtrls, Menus, Buttons, ActnList, ListFilterEdit, RxTextHolder;
|
||||
|
||||
type
|
||||
|
||||
{ TRxTextHolder_EditorForm }
|
||||
|
||||
TRxTextHolder_EditorForm = class(TForm)
|
||||
Edit1: TEdit;
|
||||
itemRemove: TAction;
|
||||
itemAdd: TAction;
|
||||
ActionList1: TActionList;
|
||||
BitBtn1: TBitBtn;
|
||||
BitBtn2: TBitBtn;
|
||||
ButtonPanel1: TButtonPanel;
|
||||
CLabel1: TLabel;
|
||||
Label1: TLabel;
|
||||
ListBox1: TListBox;
|
||||
Memo1: TMemo;
|
||||
MenuItem1: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
PopupMenu1: TPopupMenu;
|
||||
Splitter1: TSplitter;
|
||||
procedure Edit1Exit(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure itemAddExecute(Sender: TObject);
|
||||
procedure itemRemoveExecute(Sender: TObject);
|
||||
procedure ListBox1Click(Sender: TObject);
|
||||
procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
|
||||
procedure Memo1Exit(Sender: TObject);
|
||||
private
|
||||
FTextHolder:TRxTextHolder;
|
||||
FCurrentItem: TRxTextHolderItem;
|
||||
procedure UpdateTextNames;
|
||||
procedure Localize;
|
||||
procedure UpdateCtrlState;
|
||||
function MakeItemName:string;
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function ShowRxTextHolderEditorForm(ATextHolder:TRxTextHolder):boolean;
|
||||
implementation
|
||||
uses rxconst;
|
||||
|
||||
function ShowRxTextHolderEditorForm(ATextHolder:TRxTextHolder):boolean;
|
||||
var
|
||||
RxTextHolder_EditorForm: TRxTextHolder_EditorForm;
|
||||
begin
|
||||
RxTextHolder_EditorForm:=TRxTextHolder_EditorForm.Create(Application);
|
||||
RxTextHolder_EditorForm.FTextHolder.Assign(ATextHolder);
|
||||
RxTextHolder_EditorForm.UpdateTextNames;
|
||||
Result:=RxTextHolder_EditorForm.ShowModal = mrOk;
|
||||
if Result then
|
||||
begin
|
||||
ATextHolder.Assign(RxTextHolder_EditorForm.FTextHolder);
|
||||
end;
|
||||
RxTextHolder_EditorForm.Free;
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TRxTextHolder_EditorForm }
|
||||
|
||||
procedure TRxTextHolder_EditorForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FTextHolder:=TRxTextHolder.Create(Self);
|
||||
Localize;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.itemAddExecute(Sender: TObject);
|
||||
begin
|
||||
FCurrentItem:=FTextHolder.Items.Add(MakeItemName);
|
||||
ListBox1.Items.Add(FCurrentItem.Caption);
|
||||
ListBox1.ItemIndex:=ListBox1.Items.Count-1;
|
||||
ListBox1Click(nil);
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.itemRemoveExecute(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
if Assigned(FCurrentItem) then
|
||||
begin
|
||||
I:=ListBox1.ItemIndex;
|
||||
ListBox1.Items.Delete(I);
|
||||
FTextHolder.Items.Delete(I);
|
||||
if ListBox1.Items.Count > 0 then
|
||||
ListBox1.ItemIndex:=0;
|
||||
ListBox1Click(nil);
|
||||
end;
|
||||
UpdateCtrlState;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.Edit1Exit(Sender: TObject);
|
||||
begin
|
||||
if Assigned(FCurrentItem) then
|
||||
begin
|
||||
FCurrentItem.Caption:=Edit1.Text;
|
||||
ListBox1.Items[ListBox1.ItemIndex]:=Edit1.Text;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.ListBox1Click(Sender: TObject);
|
||||
begin
|
||||
if (ListBox1.ItemIndex>=0) and (ListBox1.ItemIndex<ListBox1.Items.Count) then
|
||||
begin
|
||||
FCurrentItem:=FTextHolder.Items[ListBox1.ItemIndex];
|
||||
Edit1.Text:=FCurrentItem.Caption;
|
||||
Memo1.Text:=FCurrentItem.Lines.Text;
|
||||
if Visible then
|
||||
begin
|
||||
Memo1.Enabled:=true;
|
||||
Memo1.SetFocus
|
||||
end
|
||||
else
|
||||
ActiveControl:=Memo1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FCurrentItem:=Nil;
|
||||
Memo1.Lines.Clear;
|
||||
end;
|
||||
UpdateCtrlState;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.ListBox1SelectionChange(Sender: TObject;
|
||||
User: boolean);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.Memo1Exit(Sender: TObject);
|
||||
begin
|
||||
if Assigned(FCurrentItem) then
|
||||
FCurrentItem.Lines.Assign(Memo1.Lines);
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.UpdateTextNames;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
ListBox1.Items.BeginUpdate;
|
||||
ListBox1.Items.Clear;
|
||||
for i:=0 to FTextHolder.Items.Count-1 do
|
||||
ListBox1.Items.Add(FTextHolder.Items[i].Caption);
|
||||
ListBox1.Items.EndUpdate;
|
||||
if ListBox1.Items.Count > 0 then
|
||||
ListBox1.ItemIndex:=0;
|
||||
ListBox1Click(nil);
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.Localize;
|
||||
begin
|
||||
Caption:=sRxTextHolderEditor;
|
||||
Label1.Caption:=sRxTextHolderTextCaption;
|
||||
itemAdd.Caption:=sRxTextHolderAdd;
|
||||
itemRemove.Caption:=sRxTextHolderRemove;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder_EditorForm.UpdateCtrlState;
|
||||
begin
|
||||
itemRemove.Enabled:=(FTextHolder.Items.Count>0) and Assigned(FCurrentItem);
|
||||
Edit1.Enabled:=Assigned(FCurrentItem);
|
||||
Memo1.Enabled:=Assigned(FCurrentItem);
|
||||
end;
|
||||
|
||||
function TRxTextHolder_EditorForm.MakeItemName: string;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
i:=0;
|
||||
repeat
|
||||
Inc(i);
|
||||
Result:='Item '+IntToStr(i);
|
||||
until (FTextHolder.IndexByName(Result) = -1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
components/rx/trunk/demos/RxTextHolder/project1.ico
Normal file
BIN
components/rx/trunk/demos/RxTextHolder/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
91
components/rx/trunk/demos/RxTextHolder/project1.lpi
Normal file
91
components/rx/trunk/demos/RxTextHolder/project1.lpi
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<AutoCreateForms Value="False"/>
|
||||
<Title Value="project1"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxtools"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="rx"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
components/rx/trunk/demos/RxTextHolder/project1.lpr
Normal file
21
components/rx/trunk/demos/RxTextHolder/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rx, rxnew, lazcontrols;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
BIN
components/rx/trunk/demos/RxTextHolder/project1.res
Normal file
BIN
components/rx/trunk/demos/RxTextHolder/project1.res
Normal file
Binary file not shown.
127
components/rx/trunk/demos/RxTextHolder/unit1.lfm
Normal file
127
components/rx/trunk/demos/RxTextHolder/unit1.lfm
Normal file
@ -0,0 +1,127 @@
|
||||
object Form1: TForm1
|
||||
Left = 542
|
||||
Height = 292
|
||||
Top = 225
|
||||
Width = 383
|
||||
Caption = 'RxTextHolder demo'
|
||||
ClientHeight = 292
|
||||
ClientWidth = 383
|
||||
LCLVersion = '2.1.0.0'
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Memo1: TMemo
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 251
|
||||
Top = 41
|
||||
Width = 383
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ReadOnly = True
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 63
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 2
|
||||
end
|
||||
object Button3: TButton
|
||||
AnchorSideLeft.Control = Button2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 120
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button3Click
|
||||
TabOrder = 3
|
||||
end
|
||||
object Button4: TButton
|
||||
AnchorSideLeft.Control = Button3
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 177
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 4
|
||||
end
|
||||
object RxTextHolder1: TRxTextHolder
|
||||
Items = <
|
||||
item
|
||||
Caption = 'Line 1'
|
||||
Lines.Strings = (
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
)
|
||||
end
|
||||
item
|
||||
Caption = 'Line 2'
|
||||
Lines.Strings = (
|
||||
'Line 2'
|
||||
' Line 2'
|
||||
' Line 2'
|
||||
'Line 2'
|
||||
)
|
||||
end
|
||||
item
|
||||
Caption = 'Line 3'
|
||||
Lines.Strings = (
|
||||
'Line 3'
|
||||
' Line 3'
|
||||
'Line 3'
|
||||
' Line 3'
|
||||
'Line 3'
|
||||
)
|
||||
end
|
||||
item
|
||||
Caption = 'Line 4'
|
||||
Lines.Strings = (
|
||||
'Line 4'
|
||||
'Line 4'
|
||||
'Line 4'
|
||||
'Line 4'
|
||||
)
|
||||
end>
|
||||
Left = 16
|
||||
Top = 16
|
||||
end
|
||||
end
|
62
components/rx/trunk/demos/RxTextHolder/unit1.pas
Normal file
62
components/rx/trunk/demos/RxTextHolder/unit1.pas
Normal file
@ -0,0 +1,62 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, StrHolder,
|
||||
RxHistoryNavigator, RxTextHolder, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Button3: TButton;
|
||||
Button4: TButton;
|
||||
Memo1: TMemo;
|
||||
RxTextHolder1: TRxTextHolder;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure Button4Click(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 1'];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 2'];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button3Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 3'];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button4Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 4'];
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -179,6 +179,26 @@ msgstr "Anterior A?o|"
|
||||
msgid "Error. Expected value for field %s."
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholderadd
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdereditor
|
||||
msgid "RxTextHolder editor"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholderremove
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdertextcaption
|
||||
msgid "Caption"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdertexteditor
|
||||
msgid "Rx text holder editor"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.ssecondhalfofyear
|
||||
msgid "Second half of year"
|
||||
msgstr ""
|
||||
|
@ -177,6 +177,26 @@ msgstr ""
|
||||
msgid "Error. Expected value for field %s."
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholderadd
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdereditor
|
||||
msgid "RxTextHolder editor"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholderremove
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdertextcaption
|
||||
msgid "Caption"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdertexteditor
|
||||
msgid "Rx text holder editor"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.ssecondhalfofyear
|
||||
msgid "Second half of year"
|
||||
msgstr ""
|
||||
|
@ -177,6 +177,26 @@ msgstr "Превыдущий год|"
|
||||
msgid "Error. Expected value for field %s."
|
||||
msgstr "Поле %s. Требуется значение"
|
||||
|
||||
#: rxconst.srxtextholderadd
|
||||
msgid "Add"
|
||||
msgstr "Добавить"
|
||||
|
||||
#: rxconst.srxtextholdereditor
|
||||
msgid "RxTextHolder editor"
|
||||
msgstr "Редактор RxTextHolder"
|
||||
|
||||
#: rxconst.srxtextholderremove
|
||||
msgid "Remove"
|
||||
msgstr "Удалить"
|
||||
|
||||
#: rxconst.srxtextholdertextcaption
|
||||
msgid "Caption"
|
||||
msgstr "Название"
|
||||
|
||||
#: rxconst.srxtextholdertexteditor
|
||||
msgid "Rx text holder editor"
|
||||
msgstr "Редактор RxTextHolder"
|
||||
|
||||
#: rxconst.ssecondhalfofyear
|
||||
msgid "Second half of year"
|
||||
msgstr "Вторая половина года"
|
||||
|
@ -192,6 +192,26 @@ msgstr "Попередній місяць|"
|
||||
msgid "Error. Expected value for field %s."
|
||||
msgstr "Поле %s. Вимагається значення"
|
||||
|
||||
#: rxconst.srxtextholderadd
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdereditor
|
||||
msgid "RxTextHolder editor"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholderremove
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdertextcaption
|
||||
msgid "Caption"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.srxtextholdertexteditor
|
||||
msgid "Rx text holder editor"
|
||||
msgstr ""
|
||||
|
||||
#: rxconst.ssecondhalfofyear
|
||||
msgid "Second half of year"
|
||||
msgstr ""
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ registerrx unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RegisterRxDB unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RegisterRxTools unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ global include module
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxAboutDialog
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxAboutForm
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxapputils unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ AutoPanel unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ boxprocs unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxclock unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxCloseFormValidator unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxctrls unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ curredit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxDateRangeEditUnit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdice unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ duallist unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ fduallst unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ folderlister unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RXHistory unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxHistoryNavigator unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxlclconst unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lclutils unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxlogin unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxMDI unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ pagemngr unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ pickdate unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxapputils unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxShortCutUnit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxspin unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxswitch unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxSystemServices unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxtbrsetup unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxTimeEdit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxtoolbar unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ tooledit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxVersInfo is part of RxFPC library
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxViewsPanel unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ ex_rx_datapacket unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ exsortmds unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdbcomb unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxDBCtrls unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ dbcurredit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ dbdateedit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdbgrid unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdbgrid_columsunit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdbgrid_findunit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdbgrid unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxDBGridExportPdf unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ TPdfExportOptions unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxDBGridPrintGrid unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxDBGridPrintGrid unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxDBSpinEdit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RxDBTimeEdit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ dbutils unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxdbgrid unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxfilterby unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxlookup unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
@ -1244,7 +1244,7 @@ begin
|
||||
if not AResult then
|
||||
UpdateKeyValue
|
||||
else
|
||||
if AResult and not Assigned(FDataLink.DataSource) and (FLookupDataLink.Active) then
|
||||
if AResult and not Assigned(FDataLink.DataSource) and (FLookupDataLink.Active) and Assigned(FKeyField) then
|
||||
begin
|
||||
if FKeyField.IsNull then
|
||||
SetValueKey(FEmptyValue)
|
||||
@ -1252,7 +1252,6 @@ begin
|
||||
SetValueKey(FKeyField.AsString);
|
||||
end
|
||||
else
|
||||
|
||||
if AResult and Assigned(FDataLink.DataSource) then
|
||||
begin
|
||||
FDataLink.Edit;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxmemds unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxpopupunit unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ seldsfrm unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ RXDBGrid unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxsortmemds unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -14,8 +14,8 @@
|
||||
<Description Value="
|
||||
"/>
|
||||
<License Value="LGPL"/>
|
||||
<Version Minor="3" Build="6"/>
|
||||
<Files Count="9">
|
||||
<Version Minor="4" Build="6"/>
|
||||
<Files Count="10">
|
||||
<Item1>
|
||||
<Filename Value="rxtools/rxcrc.pas"/>
|
||||
<UnitName Value="rxCRC"/>
|
||||
@ -51,6 +51,10 @@
|
||||
<Filename Value="rxtools/rxutils.pas"/>
|
||||
<UnitName Value="rxutils"/>
|
||||
</Item9>
|
||||
<Item10>
|
||||
<Filename Value="rxtools/rxtextholder.pas"/>
|
||||
<UnitName Value="RxTextHolder"/>
|
||||
</Item10>
|
||||
</Files>
|
||||
<LazDoc Paths="docs;/usr/local/share/lazarus/components/rxnew/docs"/>
|
||||
<i18n>
|
||||
|
@ -9,7 +9,7 @@ interface
|
||||
|
||||
uses
|
||||
rxCRC, rxConfigValues, rxconst, rxdateutil, rxdconst, rxFileUtils,
|
||||
rxstrutils, rxutils, LazarusPackageIntf;
|
||||
rxstrutils, rxutils, RxTextHolder, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxConfigValues unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ rxconst unit
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
@ -134,6 +134,13 @@ resourcestring
|
||||
sCloseAfterSec = 'Close after %d sec';
|
||||
sCloseMessageHint = 'Close message';
|
||||
|
||||
{ TRxTextHolder }
|
||||
sRxTextHolderTextEditor = 'Rx text holder editor';
|
||||
sRxTextHolderEditor = 'RxTextHolder editor';
|
||||
sRxTextHolderTextCaption = 'Caption';
|
||||
sRxTextHolderAdd = 'Add';
|
||||
sRxTextHolderRemove = 'Remove';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ string const unit fo DB-aware modules
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
Copyright (C) 2005-2018 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
|
||||
|
213
components/rx/trunk/rxtools/rxtextholder.pas
Normal file
213
components/rx/trunk/rxtools/rxtextholder.pas
Normal file
@ -0,0 +1,213 @@
|
||||
{ RxTextHolder unit
|
||||
|
||||
Copyright (C) 2005-2018 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 RxTextHolder;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
type
|
||||
|
||||
{ TRxTextHolderItem }
|
||||
|
||||
TRxTextHolderItem = class(TCollectionItem)
|
||||
private
|
||||
FCaption: string;
|
||||
FLines: TStrings;
|
||||
procedure SetCaption(AValue: string);
|
||||
procedure SetLines(AValue: TStrings);
|
||||
protected
|
||||
function GetDisplayName: string; override;
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
public
|
||||
constructor Create(ACollection: TCollection); override;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property Caption:string read FCaption write SetCaption;
|
||||
property Lines:TStrings read FLines write SetLines;
|
||||
end;
|
||||
|
||||
{ TRxTextHolderItems }
|
||||
|
||||
TRxTextHolderItems = class(TOwnedCollection)
|
||||
private
|
||||
function GetItems(AIndex: Integer): TRxTextHolderItem;
|
||||
public
|
||||
function Add(ACaption:string):TRxTextHolderItem;
|
||||
property Items[AIndex:Integer]:TRxTextHolderItem read GetItems; default;
|
||||
end;
|
||||
|
||||
TRxTextHolder = class(TComponent)
|
||||
private
|
||||
FItems:TRxTextHolderItems;
|
||||
function GetText(ACaption: string): string;
|
||||
procedure SetItems(AValue: TRxTextHolderItems);
|
||||
procedure SetText(ACaption: string; AValue: string);
|
||||
protected
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function IndexByName(ACaption:string):integer;
|
||||
property Text[ACaption:string]:string read GetText write SetText; default;
|
||||
published
|
||||
property Items:TRxTextHolderItems read FItems write SetItems;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TRxTextHolderItems }
|
||||
|
||||
function TRxTextHolderItems.GetItems(AIndex: Integer): TRxTextHolderItem;
|
||||
begin
|
||||
Result:=TRxTextHolderItem(inherited Items[AIndex]);
|
||||
end;
|
||||
|
||||
function TRxTextHolderItems.Add(ACaption: string): TRxTextHolderItem;
|
||||
begin
|
||||
Result:=TRxTextHolderItem.Create(Self);
|
||||
Result.Caption:=ACaption;
|
||||
end;
|
||||
|
||||
{ TRxTextHolder }
|
||||
|
||||
procedure TRxTextHolder.SetItems(AValue: TRxTextHolderItems);
|
||||
begin
|
||||
FItems.Assign(AValue);
|
||||
end;
|
||||
|
||||
function TRxTextHolder.GetText(ACaption: string): string;
|
||||
var
|
||||
Itm: TRxTextHolderItem;
|
||||
I: Integer;
|
||||
begin
|
||||
Result:='';
|
||||
I:=IndexByName(ACaption);
|
||||
if i<0 then Exit;
|
||||
Itm:=FItems[I];
|
||||
if Assigned(Itm) then
|
||||
Result:=Itm.Lines.Text;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder.SetText(ACaption: string; AValue: string);
|
||||
var
|
||||
I: Integer;
|
||||
Itm: TRxTextHolderItem;
|
||||
begin
|
||||
I:=IndexByName(ACaption);
|
||||
if i < 0 then
|
||||
Itm:=Items.Add(ACaption)
|
||||
else
|
||||
Itm:=FItems[I];
|
||||
Itm.Lines.Text:=AValue;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder.AssignTo(Dest: TPersistent);
|
||||
begin
|
||||
if (Dest is TRxTextHolder) then
|
||||
begin
|
||||
TRxTextHolder(Dest).Items.Assign(Items);
|
||||
end
|
||||
else
|
||||
inherited AssignTo(Dest);
|
||||
end;
|
||||
|
||||
constructor TRxTextHolder.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
FItems:=TRxTextHolderItems.Create(Self, TRxTextHolderItem);
|
||||
end;
|
||||
|
||||
destructor TRxTextHolder.Destroy;
|
||||
begin
|
||||
FreeAndNil(FItems);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TRxTextHolder.IndexByName(ACaption: string): integer;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result:=-1;
|
||||
for i:=0 to FItems.Count-1 do
|
||||
if FItems[i].Caption = ACaption then
|
||||
Exit(i);
|
||||
end;
|
||||
|
||||
{ TRxTextHolderItem }
|
||||
|
||||
procedure TRxTextHolderItem.SetCaption(AValue: string);
|
||||
begin
|
||||
if FCaption=AValue then Exit;
|
||||
FCaption:=AValue;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolderItem.SetLines(AValue: TStrings);
|
||||
begin
|
||||
FLines.Assign(AValue);
|
||||
end;
|
||||
|
||||
function TRxTextHolderItem.GetDisplayName: string;
|
||||
begin
|
||||
if Caption <> '' then
|
||||
Result:=Caption
|
||||
else
|
||||
Result:=inherited GetDisplayName;
|
||||
end;
|
||||
|
||||
procedure TRxTextHolderItem.AssignTo(Dest: TPersistent);
|
||||
begin
|
||||
if (Dest is TRxTextHolderItem) then
|
||||
begin
|
||||
TRxTextHolderItem(Dest).Lines.Assign(Lines);
|
||||
TRxTextHolderItem(Dest).Caption:=FCaption;
|
||||
end
|
||||
else
|
||||
inherited AssignTo(Dest);
|
||||
end;
|
||||
|
||||
constructor TRxTextHolderItem.Create(ACollection: TCollection);
|
||||
begin
|
||||
inherited Create(ACollection);
|
||||
FLines:=TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TRxTextHolderItem.Destroy;
|
||||
begin
|
||||
FreeAndNil(FLines);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user