initial import of the rx component version 1.0.12.38

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@232 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
vsnijders
2007-08-09 21:36:59 +00:00
parent 22093d6e75
commit a3d4d0d2fd
116 changed files with 25654 additions and 0 deletions

View File

@ -0,0 +1,60 @@
object AboutForm: TAboutForm
BorderStyle = bsDialog
Caption = 'About...'
ClientHeight = 143
ClientWidth = 249
PixelsPerInch = 96
Position = poDesktopCenter
HorzScrollBar.Page = 248
VertScrollBar.Page = 142
Left = 393
Height = 143
Top = 386
Width = 249
object Label1: TLabel
Alignment = taCenter
Anchors = [akTop, akLeft, akRight]
BorderSpacing.OnChange = nil
Caption = 'FolderLister component demo'
Color = clNone
Left = 8
Height = 17
Top = 16
Width = 237
end
object Label2: TLabel
Alignment = taCenter
Anchors = [akTop, akLeft, akRight]
BorderSpacing.OnChange = nil
Caption = '(c) 2005 by Alexs'
Color = clNone
Left = 8
Height = 13
Top = 56
Width = 236
end
object Label3: TLabel
Alignment = taCenter
Anchors = [akTop, akLeft, akRight]
BorderSpacing.OnChange = nil
Caption = 'alexs75@hotbox.ru'
Color = clNone
Left = 8
Height = 17
Top = 84
Width = 237
end
object BitBtn1: TBitBtn
Anchors = [akLeft, akBottom]
BorderSpacing.OnChange = nil
Caption = '&��'
Default = True
Kind = bkOK
ModalResult = 1
TabOrder = 0
Left = 96
Height = 25
Top = 112
Width = 75
end
end

View File

@ -0,0 +1,21 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TAboutForm','FORMDATA',[
'TPF0'#10'TAboutForm'#9'AboutForm'#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6
+#8'About...'#12'ClientHeight'#3#143#0#11'ClientWidth'#3#249#0#13'PixelsPerIn'
+'ch'#2'`'#8'Position'#7#15'poDesktopCenter'#18'HorzScrollBar.Page'#3#248#0#18
+'VertScrollBar.Page'#3#142#0#4'Left'#3#137#1#6'Height'#3#143#0#3'Top'#3#130#1
+#5'Width'#3#249#0#0#6'TLabel'#6'Label1'#9'Alignment'#7#8'taCenter'#7'Anchors'
+#11#5'akTop'#6'akLeft'#7'akRight'#0#22'BorderSpacing.OnChange'#13#7'Caption'
+#6#27'FolderLister component demo'#5'Color'#7#6'clNone'#4'Left'#2#8#6'Height'
+#2#17#3'Top'#2#16#5'Width'#3#237#0#0#0#6'TLabel'#6'Label2'#9'Alignment'#7#8
+'taCenter'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#22'BorderSpacing.On'
+'Change'#13#7'Caption'#6#17'(c) 2005 by Alexs'#5'Color'#7#6'clNone'#4'Left'#2
+#8#6'Height'#2#13#3'Top'#2'8'#5'Width'#3#236#0#0#0#6'TLabel'#6'Label3'#9'Ali'
+'gnment'#7#8'taCenter'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#22'Bord'
+'erSpacing.OnChange'#13#7'Caption'#6#17'alexs75@hotbox.ru'#5'Color'#7#6'clNo'
+'ne'#4'Left'#2#8#6'Height'#2#17#3'Top'#2'T'#5'Width'#3#237#0#0#0#7'TBitBtn'#7
+'BitBtn1'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#22'BorderSpacing.OnChange'#13
+#7'Caption'#6#3'&'#206#202#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1
+#8'TabOrder'#2#0#4'Left'#2'`'#6'Height'#2#25#3'Top'#2'p'#5'Width'#2'K'#0#0#0
]);

View File

@ -0,0 +1,35 @@
unit AboutUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
StdCtrls;
type
{ TAboutForm }
TAboutForm = class(TForm)
BitBtn1: TBitBtn;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
private
{ private declarations }
public
{ public declarations }
end;
var
AboutForm: TAboutForm;
implementation
initialization
{$I AboutUnit.lrs}
end.

View File

@ -0,0 +1,241 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<Title Value="FolderLister"/>
</General>
<JumpHistory Count="16" HistoryIndex="15">
<Position1>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="86" Column="29" TopLine="79"/>
</Position1>
<Position2>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="18" Column="5" TopLine="15"/>
</Position2>
<Position3>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="108" Column="4" TopLine="104"/>
</Position3>
<Position4>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="71" Column="27" TopLine="58"/>
</Position4>
<Position5>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="78" Column="16" TopLine="65"/>
</Position5>
<Position6>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="80" Column="20" TopLine="67"/>
</Position6>
<Position7>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="95" Column="16" TopLine="82"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="5" TopLine="32"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="67" Column="33" TopLine="51"/>
</Position9>
<Position10>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="22" Column="32" TopLine="21"/>
</Position10>
<Position11>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="137" Column="26" TopLine="135"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="19" Column="5" TopLine="19"/>
</Position12>
<Position13>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="23" Column="1" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="118" Column="5" TopLine="82"/>
</Position14>
<Position15>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="1" Column="7" TopLine="1"/>
</Position15>
<Position16>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Caret Line="5" Column="1" TopLine="1"/>
</Position16>
</JumpHistory>
<Units Count="15">
<Unit0>
<CursorPos X="24" Y="2"/>
<Filename Value="FolderLister.lpr"/>
<IsPartOfProject Value="True"/>
<TopLine Value="1"/>
<UnitName Value="FolderLister"/>
<UsageCount Value="23"/>
</Unit0>
<Unit1>
<CursorPos X="12" Y="23"/>
<EditorIndex Value="0"/>
<Filename Value="unit1.pas"/>
<ComponentName Value="MainForm"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<ResourceFilename Value="unit1.lrs"/>
<TopLine Value="23"/>
<UnitName Value="Unit1"/>
<UsageCount Value="23"/>
</Unit1>
<Unit2>
<CursorPos X="1" Y="88"/>
<EditorIndex Value="1"/>
<Filename Value="C:\lazarus\components\RxNew\FolderLister.pas"/>
<Loaded Value="True"/>
<TopLine Value="70"/>
<UnitName Value="FolderLister"/>
<UsageCount Value="11"/>
</Unit2>
<Unit3>
<CursorPos X="64" Y="123"/>
<Filename Value="c:\lazarus\fpcsrc\rtl\objpas\sysutils\filutilh.inc"/>
<TopLine Value="110"/>
<UsageCount Value="10"/>
</Unit3>
<Unit4>
<CursorPos X="52" Y="331"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\win32\system.pp"/>
<TopLine Value="314"/>
<UnitName Value="System"/>
<UsageCount Value="10"/>
</Unit4>
<Unit5>
<CursorPos X="6" Y="1"/>
<Filename Value="C:\lazarus\components\RxNew\RxAppUtils.pas"/>
<TopLine Value="1"/>
<UnitName Value="RxAppUtils"/>
<UsageCount Value="10"/>
</Unit5>
<Unit6>
<CursorPos X="28" Y="12"/>
<Filename Value="AboutUnit.pas"/>
<ComponentName Value="AboutForm"/>
<IsPartOfProject Value="True"/>
<ResourceFilename Value="AboutUnit.lrs"/>
<TopLine Value="10"/>
<UnitName Value="AboutUnit"/>
<UsageCount Value="22"/>
</Unit6>
<Unit7>
<CursorPos X="43" Y="1700"/>
<Filename Value="C:\lazarus\lcl\include\customform.inc"/>
<TopLine Value="1695"/>
<UsageCount Value="10"/>
</Unit7>
<Unit8>
<CursorPos X="49" Y="2"/>
<Filename Value="unit1.lrs"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit8>
<Unit9>
<CursorPos X="37" Y="1169"/>
<Filename Value="C:\lazarus\lcl\Forms.pp"/>
<TopLine Value="1166"/>
<UnitName Value="Forms"/>
<UsageCount Value="10"/>
</Unit9>
<Unit10>
<CursorPos X="50" Y="146"/>
<Filename Value="C:\lazarus\lcl\include\application.inc"/>
<TopLine Value="142"/>
<UsageCount Value="10"/>
</Unit10>
<Unit11>
<CursorPos X="38" Y="48"/>
<Filename Value="C:\lazarus\lcl\Dialogs.pp"/>
<TopLine Value="37"/>
<UnitName Value="Dialogs"/>
<UsageCount Value="10"/>
</Unit11>
<Unit12>
<CursorPos X="2" Y="1182"/>
<Filename Value="C:\lazarus\lcl\Controls.pp"/>
<TopLine Value="1176"/>
<UnitName Value="Controls"/>
<UsageCount Value="10"/>
</Unit12>
<Unit13>
<CursorPos X="1" Y="1"/>
<EditorIndex Value="2"/>
<Filename Value="C:\lazarus\components\RxNew\RX.INC"/>
<Loaded Value="True"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit13>
<Unit14>
<CursorPos X="1" Y="15"/>
<EditorIndex Value="3"/>
<Filename Value="C:\lazarus\components\RxNew\RXStrutils.pas"/>
<Loaded Value="True"/>
<TopLine Value="1"/>
<UnitName Value="RxStrUtils"/>
<UsageCount Value="10"/>
</Unit14>
</Units>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="RxNew"/>
<MinVersion Major="1" Release="1" Build="2" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
</ProjectOptions>
<CompilerOptions>
<Version Value="4"/>
<PathDelim Value="\"/>
<SearchPaths>
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="2">
<Item1>
<Name Value="ECodetoolError"/>
</Item1>
<Item2>
<Name Value="EFOpenError"/>
</Item2>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,15 @@
program FolderLister;
{$mode objfpc}{$H+}
uses
Interfaces, // this includes the LCL widgetset
Forms
{ add your units here }, Unit1, AboutUnit;
begin
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@ -0,0 +1,126 @@
object MainForm: TMainForm
Caption = 'Main form'
ClientHeight = 281
ClientWidth = 391
Menu = MainMenu1
PixelsPerInch = 96
ShowHint = True
HorzScrollBar.Page = 390
VertScrollBar.Page = 280
Left = 251
Height = 300
Top = 138
Width = 391
object Label1: TLabel
AutoSize = True
BorderSpacing.OnChange = nil
Caption = 'Folder for scan'
Color = clNone
Left = 8
Height = 13
Top = 56
Width = 72
end
object Label2: TLabel
AutoSize = True
BorderSpacing.OnChange = nil
Caption = 'Default ext'
Color = clNone
Left = 8
Height = 13
Top = 8
Width = 54
end
object Button1: TButton
Action = sysScan
BorderSpacing.OnChange = nil
TabOrder = 0
Left = 8
Height = 25
Hint = 'Scan folder'
Top = 112
Width = 75
end
object DirectoryEdit1: TDirectoryEdit
Directory = 'C:\lazarus\components\'
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]
BorderSpacing.OnChange = nil
TabOrder = 1
Anchors = [akTop, akLeft, akRight]
BorderSpacing.OnChange = nil
TabOrder = 1
Text = 'C:\lazarus\components\'
Left = 16
Height = 23
Top = 80
Width = 344
end
object Edit1: TEdit
BorderSpacing.OnChange = nil
TabOrder = 2
Text = '.pas'
Left = 16
Height = 23
Top = 24
Width = 80
end
object ActionList1: TActionList
left = 144
top = 112
object sysExit: TAction
Caption = 'Exit'
Enabled = False
Hint = 'Exit form demo app'
ShortCut = 32856
Category = 'System'
end
object hlpAbout: TAction
Caption = 'About'
Hint = 'Information of app'
OnExecute = hlpAboutExecute
Category = 'Help'
end
object sysScan: TAction
Caption = 'Scan'
Hint = 'Scan folder'
OnExecute = sysRescanExecute
Category = 'System'
end
end
object MainMenu1: TMainMenu
left = 144
top = 48
object SystemItems: TMenuItem
Caption = 'System'
object MenuItem3: TMenuItem
Action = sysScan
OnClick = sysRescanExecute
end
object MenuItem4: TMenuItem
Caption = '-'
end
object MenuItem2: TMenuItem
Action = sysExit
end
end
object FolderItems: TMenuItem
Caption = 'Folder'
end
object HelpItems: TMenuItem
Caption = '������'
object MenuItem1: TMenuItem
Action = hlpAbout
OnClick = hlpAboutExecute
end
end
end
object FolderLister1: TFolderLister
DefaultExt = '.pas'
OnExecuteItem = FolderLister1ExecuteItem
MenuItem = FolderItems
left = 144
top = 12
end
end

View File

@ -0,0 +1,38 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TMainForm','FORMDATA',[
'TPF0'#9'TMainForm'#8'MainForm'#7'Caption'#6#9'Main form'#12'ClientHeight'#3
+#25#1#11'ClientWidth'#3#135#1#4'Menu'#7#9'MainMenu1'#13'PixelsPerInch'#2'`'#8
+'ShowHint'#9#18'HorzScrollBar.Page'#3#134#1#18'VertScrollBar.Page'#3#24#1#4
+'Left'#3#251#0#6'Height'#3','#1#3'Top'#3#138#0#5'Width'#3#135#1#0#6'TLabel'#6
+'Label1'#8'AutoSize'#9#22'BorderSpacing.OnChange'#13#7'Caption'#6#15'Folder '
+'for scan'#5'Color'#7#6'clNone'#4'Left'#2#8#6'Height'#2#13#3'Top'#2'8'#5'Wid'
+'th'#2'H'#0#0#6'TLabel'#6'Label2'#8'AutoSize'#9#22'BorderSpacing.OnChange'#13
+#7'Caption'#6#11'Default ext'#5'Color'#7#6'clNone'#4'Left'#2#8#6'Height'#2#13
+#3'Top'#2#8#5'Width'#2'6'#0#0#7'TButton'#7'Button1'#6'Action'#7#7'sysScan'#22
+'BorderSpacing.OnChange'#13#8'TabOrder'#2#0#4'Left'#2#8#6'Height'#2#25#4'Hin'
+'t'#6#11'Scan folder'#3'Top'#2'p'#5'Width'#2'K'#0#0#14'TDirectoryEdit'#14'Di'
+'rectoryEdit1'#9'Directory'#6#22'C:\lazarus\components\'#11'ButtonWidth'#2#23
+#9'NumGlyphs'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#22'BorderSpa'
+'cing.OnChange'#13#8'TabOrder'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRigh'
+'t'#0#22'BorderSpacing.OnChange'#13#8'TabOrder'#2#1#4'Text'#6#22'C:\lazarus\'
+'components\'#4'Left'#2#16#6'Height'#2#23#3'Top'#2'P'#5'Width'#3'X'#1#0#0#5
+'TEdit'#5'Edit1'#22'BorderSpacing.OnChange'#13#8'TabOrder'#2#2#4'Text'#6#4'.'
+'pas'#4'Left'#2#16#6'Height'#2#23#3'Top'#2#24#5'Width'#2'P'#0#0#11'TActionLi'
+'st'#11'ActionList1'#4'left'#3#144#0#3'top'#2'p'#0#7'TAction'#7'sysExit'#7'C'
+'aption'#6#4'Exit'#7'Enabled'#8#4'Hint'#6#18'Exit form demo app'#8'ShortCut'
+#4'X'#128#0#0#8'Category'#6#6'System'#0#0#7'TAction'#8'hlpAbout'#7'Caption'#6
+#5'About'#4'Hint'#6#18'Information of app'#9'OnExecute'#7#15'hlpAboutExecute'
+#8'Category'#6#4'Help'#0#0#7'TAction'#7'sysScan'#7'Caption'#6#4'Scan'#4'Hint'
+#6#11'Scan folder'#9'OnExecute'#7#16'sysRescanExecute'#8'Category'#6#6'Syste'
+'m'#0#0#0#9'TMainMenu'#9'MainMenu1'#4'left'#3#144#0#3'top'#2'0'#0#9'TMenuIte'
+'m'#11'SystemItems'#7'Caption'#6#6'System'#0#9'TMenuItem'#9'MenuItem3'#6'Act'
+'ion'#7#7'sysScan'#7'OnClick'#7#16'sysRescanExecute'#0#0#9'TMenuItem'#9'Menu'
+'Item4'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem2'#6'Action'#7#7'sysExi'
+'t'#0#0#0#9'TMenuItem'#11'FolderItems'#7'Caption'#6#6'Folder'#0#0#9'TMenuIte'
+'m'#9'HelpItems'#7'Caption'#6#6#207#238#236#238#249#252#0#9'TMenuItem'#9'Men'
+'uItem1'#6'Action'#7#8'hlpAbout'#7'OnClick'#7#15'hlpAboutExecute'#0#0#0#0#13
+'TFolderLister'#13'FolderLister1'#10'DefaultExt'#6#4'.pas'#13'OnExecuteItem'
+#7#24'FolderLister1ExecuteItem'#8'MenuItem'#7#11'FolderItems'#4'left'#3#144#0
+#3'top'#2#12#0#0#0
]);

View File

@ -0,0 +1,80 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ActnList,
Menus, FolderLister, Buttons, EditBtn, StdCtrls;
type
{ TMainForm }
TMainForm = class(TForm)
Edit1: TEdit;
FolderLister1: TFolderLister;
Label2: TLabel;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
sysScan: TAction;
Button1: TButton;
DirectoryEdit1: TDirectoryEdit;
hlpAbout: TAction;
Label1: TLabel;
sysExit: TAction;
ActionList1: TActionList;
MainMenu1: TMainMenu;
SystemItems: TMenuItem;
HelpItems: TMenuItem;
FolderItems: TMenuItem;
procedure FolderLister1ExecuteItem(Sender: TObject);
procedure hlpAboutExecute(Sender: TObject);
procedure sysRescanExecute(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
MainForm: TMainForm;
implementation
uses AboutUnit;
{ TMainForm }
procedure TMainForm.hlpAboutExecute(Sender: TObject);
begin
AboutForm:=TAboutForm.Create(Application);
try
AboutForm.ShowModal;
finally
AboutForm.Free;
end;
end;
procedure TMainForm.FolderLister1ExecuteItem(Sender: TObject);
var
S:string;
begin
S:='Selected: '+FolderLister1.Files[(Sender as TComponent).Tag];
MessageDlg('Result', S, mtInformation, [mbOK], 0);
end;
procedure TMainForm.sysRescanExecute(Sender: TObject);
begin
FolderLister1.FileFolder:=DirectoryEdit1.Text;
FolderLister1.DefaultExt:=Edit1.Text;
FolderLister1.Execute;
end;
initialization
{$I unit1.lrs}
end.

View File

@ -0,0 +1,339 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<LazDoc Paths=""/>
<Units Count="23">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<UsageCount Value="24"/>
</Unit0>
<Unit1>
<CursorPos X="20" Y="27"/>
<EditorIndex Value="0"/>
<Filename Value="unit1.pas"/>
<ComponentName Value="Form1"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<ResourceFilename Value="unit1.lrs"/>
<TopLine Value="7"/>
<UnitName Value="Unit1"/>
<UsageCount Value="24"/>
</Unit1>
<Unit2>
<CursorPos X="83" Y="456"/>
<Filename Value="C:\lazarus\lcl\extctrls.pp"/>
<TopLine Value="451"/>
<UnitName Value="ExtCtrls"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<CursorPos X="26" Y="228"/>
<Filename Value="C:\lazarus\lcl\controls.pp"/>
<TopLine Value="224"/>
<UnitName Value="Controls"/>
<UsageCount Value="10"/>
</Unit3>
<Unit4>
<CursorPos X="102" Y="589"/>
<Filename Value="C:\lazarus\lcl\graphics.pp"/>
<TopLine Value="586"/>
<UnitName Value="Graphics"/>
<UsageCount Value="10"/>
</Unit4>
<Unit5>
<CursorPos X="70" Y="578"/>
<Filename Value="C:\lazarus\lcl\lclproc.pas"/>
<TopLine Value="577"/>
<UnitName Value="LCLProc"/>
<UsageCount Value="10"/>
</Unit5>
<Unit6>
<CursorPos X="58" Y="776"/>
<Filename Value="C:\lazarus\lcl\include\canvas.inc"/>
<TopLine Value="771"/>
<UsageCount Value="10"/>
</Unit6>
<Unit7>
<CursorPos X="81" Y="18"/>
<Filename Value="C:\lazarus\lcl\include\paintbox.inc"/>
<TopLine Value="16"/>
<UsageCount Value="10"/>
</Unit7>
<Unit8>
<CursorPos X="101" Y="26"/>
<Filename Value="C:\lazarus\lcl\include\graphiccontrol.inc"/>
<TopLine Value="21"/>
<UsageCount Value="10"/>
</Unit8>
<Unit9>
<CursorPos X="59" Y="43"/>
<Filename Value="C:\lazarus\lcl\include\controlcanvas.inc"/>
<TopLine Value="36"/>
<UsageCount Value="10"/>
</Unit9>
<Unit10>
<CursorPos X="29" Y="141"/>
<Filename Value="C:\lazarus\lcl\include\bitmap.inc"/>
<TopLine Value="138"/>
<UsageCount Value="10"/>
</Unit10>
<Unit11>
<CursorPos X="69" Y="241"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\classes\classes.inc"/>
<TopLine Value="238"/>
<UsageCount Value="10"/>
</Unit11>
<Unit12>
<CursorPos X="56" Y="181"/>
<Filename Value="C:\lazarus\lcl\include\brush.inc"/>
<TopLine Value="178"/>
<UsageCount Value="10"/>
</Unit12>
<Unit13>
<CursorPos X="52" Y="228"/>
<Filename Value="C:\lazarus\lcl\include\winapi.inc"/>
<TopLine Value="226"/>
<UsageCount Value="10"/>
</Unit13>
<Unit14>
<CursorPos X="67" Y="1319"/>
<Filename Value="C:\lazarus\lcl\interfaces\win32\win32winapi.inc"/>
<TopLine Value="1316"/>
<UsageCount Value="10"/>
</Unit14>
<Unit15>
<CursorPos X="101" Y="117"/>
<Filename Value="C:\lazarus\fpcsrc\fcl\image\fpcanvas.pp"/>
<TopLine Value="117"/>
<UnitName Value="FPCanvas"/>
<UsageCount Value="10"/>
</Unit15>
<Unit16>
<CursorPos X="57" Y="405"/>
<Filename Value="C:\lazarus\components\lazreport\source\LR_BarC.pas"/>
<ComponentName Value="frBarCodeForm"/>
<HasResources Value="True"/>
<TopLine Value="400"/>
<UnitName Value="LR_BarC"/>
<UsageCount Value="10"/>
</Unit16>
<Unit17>
<CursorPos X="38" Y="150"/>
<Filename Value="C:\lazarus\components\lazreport\source\Barcode.pas"/>
<TopLine Value="149"/>
<UnitName Value="Barcode"/>
<UsageCount Value="10"/>
</Unit17>
<Unit18>
<CursorPos X="1" Y="228"/>
<Filename Value="C:\lazarus\components\lazreport\source\LR_Class.pas"/>
<TopLine Value="210"/>
<UnitName Value="LR_Class"/>
<UsageCount Value="10"/>
</Unit18>
<Unit19>
<CursorPos X="46" Y="954"/>
<EditorIndex Value="1"/>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Loaded Value="True"/>
<TopLine Value="931"/>
<UnitName Value="rxdbgrid"/>
<UsageCount Value="11"/>
</Unit19>
<Unit20>
<CursorPos X="22" Y="27"/>
<EditorIndex Value="4"/>
<Filename Value="C:\lazarus\components\rxnew\vclutils.pas"/>
<Loaded Value="True"/>
<TopLine Value="1"/>
<UnitName Value="vclutils"/>
<UsageCount Value="11"/>
</Unit20>
<Unit21>
<CursorPos X="23" Y="152"/>
<EditorIndex Value="2"/>
<Filename Value="C:\lazarus\lcl\dbgrids.pas"/>
<Loaded Value="True"/>
<TopLine Value="151"/>
<UnitName Value="DBGrids"/>
<UsageCount Value="11"/>
</Unit21>
<Unit22>
<CursorPos X="3" Y="3719"/>
<EditorIndex Value="3"/>
<Filename Value="C:\lazarus\lcl\grids.pas"/>
<Loaded Value="True"/>
<TopLine Value="3715"/>
<UnitName Value="Grids"/>
<UsageCount Value="11"/>
</Unit22>
</Units>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<Item1>
<PackageName Value="rxnew"/>
<MinVersion Major="1" Release="11" Build="35" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item3>
</RequiredPackages>
<JumpHistory Count="25" HistoryIndex="24">
<Position1>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="570" Column="1" TopLine="553"/>
</Position1>
<Position2>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="539" Column="1" TopLine="522"/>
</Position2>
<Position3>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="540" Column="1" TopLine="523"/>
</Position3>
<Position4>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="541" Column="1" TopLine="524"/>
</Position4>
<Position5>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="537" Column="53" TopLine="525"/>
</Position5>
<Position6>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="541" Column="58" TopLine="525"/>
</Position6>
<Position7>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="539" Column="1" TopLine="522"/>
</Position7>
<Position8>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="540" Column="1" TopLine="523"/>
</Position8>
<Position9>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="541" Column="1" TopLine="524"/>
</Position9>
<Position10>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="542" Column="1" TopLine="525"/>
</Position10>
<Position11>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="545" Column="1" TopLine="528"/>
</Position11>
<Position12>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="547" Column="1" TopLine="530"/>
</Position12>
<Position13>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="548" Column="1" TopLine="531"/>
</Position13>
<Position14>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="552" Column="1" TopLine="535"/>
</Position14>
<Position15>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="569" Column="1" TopLine="552"/>
</Position15>
<Position16>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="539" Column="1" TopLine="522"/>
</Position16>
<Position17>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="540" Column="1" TopLine="523"/>
</Position17>
<Position18>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="541" Column="1" TopLine="524"/>
</Position18>
<Position19>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="542" Column="1" TopLine="525"/>
</Position19>
<Position20>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="545" Column="1" TopLine="528"/>
</Position20>
<Position21>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="547" Column="1" TopLine="530"/>
</Position21>
<Position22>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="548" Column="1" TopLine="531"/>
</Position22>
<Position23>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="552" Column="1" TopLine="535"/>
</Position23>
<Position24>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="569" Column="1" TopLine="552"/>
</Position24>
<Position25>
<Filename Value="C:\lazarus\components\rxnew\rxdbgrid.pas"/>
<Caret Line="552" Column="72" TopLine="530"/>
</Position25>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="2">
<Item1>
<Name Value="ECodetoolError"/>
</Item1>
<Item2>
<Name Value="EFOpenError"/>
</Item2>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,15 @@
program project1;
{$mode objfpc}{$H+}
uses
Interfaces, // this includes the LCL widgetset
Forms
{ add your units here }, Unit1, rxnew;
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@ -0,0 +1,99 @@
object Form1: TForm1
ActiveControl = Edit1
Caption = 'Form1'
ClientHeight = 463
ClientWidth = 518
OnCreate = FormCreate
PixelsPerInch = 96
HorzScrollBar.Page = 517
VertScrollBar.Page = 462
Left = 470
Height = 463
Top = 247
Width = 518
object PaintBox1: TPaintBox
OnPaint = PaintBox1Paint
Left = 16
Height = 129
Top = 16
Width = 184
end
object Edit1: TEdit
OnChange = Edit1Change
TabOrder = 0
Text = 'Edit1'
Left = 16
Height = 23
Top = 160
Width = 184
end
object RadioGroup1: TRadioGroup
Caption = 'RadioGroup1'
ItemIndex = 4
Items.Strings = (
'0 %'
'90 %'
'180 %'
'270 %'
'360 %'
)
OnClick = CheckBox1Change
TabOrder = 1
Left = 216
Height = 119
Top = 56
Width = 296
end
object RxDBGrid1: TRxDBGrid
Columns = <
item
FieldName = 'DEMO_1'
end>
Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom]
BorderStyle = bsSingle
DataSource = Datasource1
FixedColor = clBtnFace
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
OptionsExtra = [dgeAutoColumns, dgeCheckboxColumn]
ParentColor = False
Scrollbars = ssBoth
Height = 271
Top = 192
Width = 518
end
object RxMemoryData1: TRxMemoryData
FieldDefs = <
item
Name = 'DEMO_1'
DisplayName = 'DEMO_1'
DataType = ftInteger
Precision = -1
end
item
Name = 'Demo2'
DisplayName = 'Demo2'
DataType = ftString
Precision = -1
Size = 40
end>
left = 312
top = 64
object RxMemoryData1DEMO_11: TLongintField
AlignMent = taRightJustify
DisplayWidth = 10
FieldName = 'DEMO_1'
end
object RxMemoryData1Demo21: TStringField
Size = 40
DisplayWidth = 40
FieldName = 'Demo2'
Index = 1
end
end
object Datasource1: TDatasource
DataSet = RxMemoryData1
left = 312
top = 32
end
end

View File

@ -0,0 +1,32 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#13'ActiveControl'#7#5'Edit1'#7'Caption'#6#5'Form1'
+#12'ClientHeight'#3#207#1#11'ClientWidth'#3#6#2#8'OnCreate'#7#10'FormCreate'
+#13'PixelsPerInch'#2'`'#18'HorzScrollBar.Page'#3#5#2#18'VertScrollBar.Page'#3
+#206#1#4'Left'#3#214#1#6'Height'#3#207#1#3'Top'#3#247#0#5'Width'#3#6#2#0#9'T'
+'PaintBox'#9'PaintBox1'#7'OnPaint'#7#14'PaintBox1Paint'#4'Left'#2#16#6'Heigh'
+'t'#3#129#0#3'Top'#2#16#5'Width'#3#184#0#0#0#5'TEdit'#5'Edit1'#8'OnChange'#7
+#11'Edit1Change'#8'TabOrder'#2#0#4'Text'#6#5'Edit1'#4'Left'#2#16#6'Height'#2
+#23#3'Top'#3#160#0#5'Width'#3#184#0#0#0#11'TRadioGroup'#11'RadioGroup1'#7'Ca'
+'ption'#6#11'RadioGroup1'#9'ItemIndex'#2#4#13'Items.Strings'#1#6#3'0 %'#6#4
+'90 %'#6#5'180 %'#6#5'270 %'#6#5'360 %'#0#7'OnClick'#7#15'CheckBox1Change'#8
+'TabOrder'#2#1#4'Left'#3#216#0#6'Height'#2'w'#3'Top'#2'8'#5'Width'#3'('#1#0#0
+#9'TRxDBGrid'#9'RxDBGrid1'#7'Columns'#14#1#9'FieldName'#6#6'DEMO_1'#0#0#5'Al'
+'ign'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0
+#11'BorderStyle'#7#8'bsSingle'#10'DataSource'#7#11'Datasource1'#10'FixedColo'
+'r'#7#9'clBtnFace'#7'Options'#11#9'dgEditing'#8'dgTitles'#11'dgIndicator'#14
+'dgColumnResize'#12'dgColumnMove'#10'dgColLines'#10'dgRowLines'#6'dgTabs'#21
+'dgAlwaysShowSelection'#15'dgConfirmDelete'#14'dgCancelOnExit'#0#12'OptionsE'
+'xtra'#11#14'dgeAutoColumns'#17'dgeCheckboxColumn'#0#11'ParentColor'#8#10'Sc'
+'rollbars'#7#6'ssBoth'#6'Height'#3#15#1#3'Top'#3#192#0#5'Width'#3#6#2#0#0#13
+'TRxMemoryData'#13'RxMemoryData1'#9'FieldDefs'#14#1#4'Name'#6#6'DEMO_1'#11'D'
+'isplayName'#6#6'DEMO_1'#8'DataType'#7#9'ftInteger'#9'Precision'#2#255#0#1#4
+'Name'#6#5'Demo2'#11'DisplayName'#6#5'Demo2'#8'DataType'#7#8'ftString'#9'Pre'
+'cision'#2#255#4'Size'#2'('#0#0#4'left'#3'8'#1#3'top'#2'@'#0#13'TLongintFiel'
+'d'#20'RxMemoryData1DEMO_11'#9'AlignMent'#7#14'taRightJustify'#12'DisplayWid'
+'th'#2#10#9'FieldName'#6#6'DEMO_1'#0#0#12'TStringField'#19'RxMemoryData1Demo'
+'21'#4'Size'#2'('#12'DisplayWidth'#2'('#9'FieldName'#6#5'Demo2'#5'Index'#2#1
+#0#0#0#11'TDatasource'#11'Datasource1'#7'DataSet'#7#13'RxMemoryData1'#4'left'
+#3'8'#1#3'top'#2' '#0#0#0
]);

View File

@ -0,0 +1,88 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, StdCtrls, rxdbgrid, vclutils, rxmemds, db;
type
{ TForm1 }
TForm1 = class(TForm)
Datasource1: TDatasource;
Edit1: TEdit;
PaintBox1: TPaintBox;
RadioGroup1: TRadioGroup;
RxDBGrid1: TRxDBGrid;
RxMemoryData1: TRxMemoryData;
RxMemoryData1Demo21: TStringField;
RxMemoryData1DEMO_11: TLongintField;
procedure CheckBox1Change(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure PaintBox1Paint(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.PaintBox1Paint(Sender: TObject);
var
FOri:TTextOrientation;
begin
PaintBox1.Canvas.TextOut(1,1, '������');
case RadioGroup1.ItemIndex of
0:FOri:=toHorizontal;
1:FOri:=toVertical90;
2:FOri:=toHorizontal180;
3:FOri:=toVertical270;
4:FOri:=toHorizontal360;
end;
OutTextXY90(PaintBox1.Canvas, 1, 20, Edit1.Text, FOri);
end;
procedure TForm1.CheckBox1Change(Sender: TObject);
var
FOri:TTextOrientation;
begin
PaintBox1.Invalidate;
case RadioGroup1.ItemIndex of
0:FOri:=toHorizontal;
1:FOri:=toVertical90;
2:FOri:=toHorizontal180;
3:FOri:=toVertical270;
4:FOri:=toHorizontal360;
end;
(RxDBGrid1.Columns[0].Title as TRxColumnTitle).Orientation:=FOri;
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
PaintBox1.Invalidate;
(RxDBGrid1.Columns[0].Title as TRxColumnTitle).Caption:=Edit1.Text;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RxMemoryData1.Open;
end;
initialization
{$I unit1.lrs}
end.

View File

@ -0,0 +1,26 @@
object AboutForm: TAboutForm
Caption = 'About...'
ClientHeight = 300
ClientWidth = 400
PixelsPerInch = 96
HorzScrollBar.Page = 399
VertScrollBar.Page = 299
Left = 441
Height = 300
Top = 321
Width = 400
object BitBtn1: TBitBtn
Anchors = [akBottom]
BorderSpacing.OnChange = nil
BorderSpacing.InnerBorder = 2
Caption = '&��'
Default = True
Kind = bkOK
ModalResult = 1
TabOrder = 0
Left = 162
Height = 30
Top = 264
Width = 75
end
end

View File

@ -0,0 +1,11 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TAboutForm','FORMDATA',[
'TPF0'#10'TAboutForm'#9'AboutForm'#7'Caption'#6#8'About...'#12'ClientHeight'#3
+','#1#11'ClientWidth'#3#144#1#13'PixelsPerInch'#2'`'#18'HorzScrollBar.Page'#3
+#143#1#18'VertScrollBar.Page'#3'+'#1#4'Left'#3#185#1#6'Height'#3','#1#3'Top'
+#3'A'#1#5'Width'#3#144#1#0#7'TBitBtn'#7'BitBtn1'#7'Anchors'#11#8'akBottom'#0
+#22'BorderSpacing.OnChange'#13#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6
+#3'&'#206#202#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#8'TabOrder'
+#2#0#4'Left'#3#162#0#6'Height'#2#30#3'Top'#3#8#1#5'Width'#2'K'#0#0#0
]);

View File

@ -0,0 +1,31 @@
unit AboutUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons;
type
{ TAboutForm }
TAboutForm = class(TForm)
BitBtn1: TBitBtn;
private
{ private declarations }
public
{ public declarations }
end;
var
AboutForm: TAboutForm;
implementation
initialization
{$I aboutunit.lrs}
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,676 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<Units Count="85">
<Unit0>
<CursorPos X="9" Y="2"/>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<TopLine Value="1"/>
<UnitName Value="project1"/>
<UsageCount Value="46"/>
</Unit0>
<Unit1>
<CursorPos X="15" Y="18"/>
<EditorIndex Value="0"/>
<Filename Value="unit1.pas"/>
<ComponentName Value="MainForm"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<ResourceFilename Value="unit1.lrs"/>
<TopLine Value="18"/>
<UnitName Value="Unit1"/>
<UsageCount Value="46"/>
</Unit1>
<Unit2>
<CursorPos X="47" Y="303"/>
<Filename Value="C:\lazarus\lcl\buttons.pp"/>
<TopLine Value="301"/>
<UnitName Value="Buttons"/>
<UsageCount Value="14"/>
</Unit2>
<Unit3>
<CursorPos X="48" Y="45"/>
<Filename Value="C:\lazarus\lcl\include\speedbutton.inc"/>
<TopLine Value="39"/>
<UsageCount Value="14"/>
</Unit3>
<Unit4>
<CursorPos X="61" Y="1356"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\classes\classesh.inc"/>
<TopLine Value="1344"/>
<UsageCount Value="13"/>
</Unit4>
<Unit5>
<CursorPos X="40" Y="146"/>
<Filename Value="C:\lazarus\lcl\imglist.pp"/>
<TopLine Value="141"/>
<UnitName Value="ImgList"/>
<UsageCount Value="12"/>
</Unit5>
<Unit6>
<CursorPos X="42" Y="2120"/>
<Filename Value="C:\lazarus\lcl\LCLType.pp"/>
<TopLine Value="2104"/>
<UnitName Value="LCLType"/>
<UsageCount Value="11"/>
</Unit6>
<Unit7>
<CursorPos X="46" Y="4"/>
<Filename Value="C:\lazarus\lcl\include\winapih.inc"/>
<TopLine Value="1"/>
<UsageCount Value="11"/>
</Unit7>
<Unit8>
<CursorPos X="89" Y="4"/>
<Filename Value="C:\lazarus\lcl\include\intfbasewinapi.inc"/>
<TopLine Value="1"/>
<UsageCount Value="11"/>
</Unit8>
<Unit9>
<CursorPos X="10" Y="3109"/>
<Filename Value="C:\lazarus\lcl\dbgrids.pas"/>
<TopLine Value="3109"/>
<UnitName Value="DBGrids"/>
<UsageCount Value="14"/>
</Unit9>
<Unit10>
<CursorPos X="26" Y="370"/>
<Filename Value="C:\lazarus\lcl\grids.pas"/>
<TopLine Value="368"/>
<UnitName Value="Grids"/>
<UsageCount Value="14"/>
</Unit10>
<Unit11>
<CursorPos X="71" Y="885"/>
<Filename Value="C:\lazarus\lcl\extctrls.pp"/>
<TopLine Value="882"/>
<UnitName Value="ExtCtrls"/>
<UsageCount Value="12"/>
</Unit11>
<Unit12>
<CursorPos X="49" Y="834"/>
<Filename Value="C:\lazarus\components\RxNew\rxtoolbar.pas"/>
<TopLine Value="826"/>
<UnitName Value="rxtoolbar"/>
<UsageCount Value="17"/>
<Bookmarks Count="1">
<Item0 X="27" Y="1019" ID="1"/>
</Bookmarks>
</Unit12>
<Unit13>
<CursorPos X="76" Y="721"/>
<Filename Value="C:\lazarus\lcl\Controls.pp"/>
<TopLine Value="710"/>
<UnitName Value="Controls"/>
<UsageCount Value="13"/>
</Unit13>
<Unit14>
<CursorPos X="59" Y="1095"/>
<Filename Value="C:\lazarus\lcl\Graphics.pp"/>
<TopLine Value="1090"/>
<UnitName Value="Graphics"/>
<UsageCount Value="11"/>
</Unit14>
<Unit15>
<CursorPos X="52" Y="81"/>
<Filename Value="C:\lazarus\components\RxNew\registerrx.pas"/>
<TopLine Value="75"/>
<UnitName Value="registerrx"/>
<UsageCount Value="11"/>
</Unit15>
<Unit16>
<CursorPos X="60" Y="644"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\classes\reader.inc"/>
<TopLine Value="643"/>
<UsageCount Value="10"/>
</Unit16>
<Unit17>
<CursorPos X="50" Y="181"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\classes\collect.inc"/>
<TopLine Value="174"/>
<UsageCount Value="10"/>
</Unit17>
<Unit18>
<CursorPos X="45" Y="2214"/>
<Filename Value="C:\lazarus\lcl\include\control.inc"/>
<TopLine Value="2200"/>
<UsageCount Value="13"/>
</Unit18>
<Unit19>
<CursorPos X="56" Y="237"/>
<Filename Value="C:\lazarus\lcl\ActnList.pas"/>
<TopLine Value="232"/>
<UnitName Value="ActnList"/>
<UsageCount Value="10"/>
</Unit19>
<Unit20>
<CursorPos X="75" Y="40"/>
<Filename Value="C:\lazarus\lcl\include\graphiccontrol.inc"/>
<TopLine Value="31"/>
<UsageCount Value="10"/>
</Unit20>
<Unit21>
<CursorPos X="44" Y="244"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\classes\compon.inc"/>
<TopLine Value="239"/>
<UsageCount Value="11"/>
</Unit21>
<Unit22>
<CursorPos X="93" Y="1"/>
<Filename Value="C:\lazarus\components\RxNew\tooledit.pas"/>
<TopLine Value="1"/>
<UnitName Value="tooledit"/>
<UsageCount Value="13"/>
</Unit22>
<Unit23>
<CursorPos X="27" Y="4"/>
<Filename Value="C:\lazarus\components\RxNew\rxlookup.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxlookup"/>
<UsageCount Value="13"/>
</Unit23>
<Unit24>
<CursorPos X="61" Y="3022"/>
<Filename Value="C:\lazarus\lcl\include\wincontrol.inc"/>
<TopLine Value="3010"/>
<UsageCount Value="12"/>
</Unit24>
<Unit25>
<CursorPos X="43" Y="41"/>
<Filename Value="C:\lazarus\lcl\xmlpropstorage.pas"/>
<TopLine Value="35"/>
<UnitName Value="XMLPropStorage"/>
<UsageCount Value="10"/>
</Unit25>
<Unit26>
<CursorPos X="50" Y="27"/>
<Filename Value="C:\lazarus\lcl\inipropstorage.pas"/>
<TopLine Value="23"/>
<UnitName Value="IniPropStorage"/>
<UsageCount Value="10"/>
</Unit26>
<Unit27>
<CursorPos X="51" Y="469"/>
<Filename Value="C:\lazarus\lcl\Forms.pp"/>
<TopLine Value="461"/>
<UnitName Value="Forms"/>
<UsageCount Value="10"/>
</Unit27>
<Unit28>
<CursorPos X="29" Y="1350"/>
<Filename Value="C:\lazarus\lcl\include\customform.inc"/>
<TopLine Value="1349"/>
<UsageCount Value="10"/>
</Unit28>
<Unit29>
<CursorPos X="49" Y="146"/>
<Filename Value="C:\lazarus\lcl\propertystorage.pas"/>
<TopLine Value="139"/>
<UnitName Value="PropertyStorage"/>
<UsageCount Value="12"/>
</Unit29>
<Unit30>
<CursorPos X="49" Y="312"/>
<Filename Value="C:\lazarus\lcl\menus.pp"/>
<TopLine Value="311"/>
<UnitName Value="Menus"/>
<UsageCount Value="10"/>
</Unit30>
<Unit31>
<CursorPos X="40" Y="26"/>
<Filename Value="C:\lazarus\components\RxNew\RxTBRSetup.pas"/>
<ComponentName Value="ToolPanelSetupForm"/>
<ResourceFilename Value="C:\lazarus\components\RxNew\rxtbrsetup.lrs"/>
<TopLine Value="25"/>
<UnitName Value="rxtbrsetup"/>
<UsageCount Value="12"/>
</Unit31>
<Unit32>
<CursorPos X="36" Y="61"/>
<Filename Value="C:\lazarus\lcl\include\lclintfh.inc"/>
<TopLine Value="52"/>
<UsageCount Value="10"/>
</Unit32>
<Unit33>
<CursorPos X="49" Y="137"/>
<Filename Value="C:\lazarus\lcl\include\intfbaselcl.inc"/>
<TopLine Value="134"/>
<UsageCount Value="10"/>
</Unit33>
<Unit34>
<CursorPos X="62" Y="36"/>
<Filename Value="C:\lazarus\lcl\GraphType.pp"/>
<TopLine Value="27"/>
<UnitName Value="GraphType"/>
<UsageCount Value="10"/>
</Unit34>
<Unit35>
<CursorPos X="48" Y="470"/>
<Filename Value="C:\lazarus\lcl\LCLProc.pas"/>
<TopLine Value="469"/>
<UnitName Value="LCLProc"/>
<UsageCount Value="10"/>
</Unit35>
<Unit36>
<CursorPos X="39" Y="59"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\types.pp"/>
<TopLine Value="53"/>
<UnitName Value="types"/>
<UsageCount Value="10"/>
</Unit36>
<Unit37>
<CursorPos X="6" Y="1"/>
<Filename Value="C:\lazarus\components\RxNew\VCLUtils.pas"/>
<TopLine Value="1"/>
<UnitName Value="vclutils"/>
<UsageCount Value="11"/>
</Unit37>
<Unit38>
<CursorPos X="41" Y="5"/>
<Filename Value="C:\lazarus\lcl\include\winapi.inc"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit38>
<Unit39>
<CursorPos X="61" Y="1529"/>
<Filename Value="C:\lazarus\lcl\include\application.inc"/>
<TopLine Value="1526"/>
<UsageCount Value="10"/>
</Unit39>
<Unit40>
<CursorPos X="51" Y="199"/>
<Filename Value="C:\lazarus\lcl\include\bitbtn.inc"/>
<TopLine Value="196"/>
<UsageCount Value="10"/>
</Unit40>
<Unit41>
<CursorPos X="46" Y="24"/>
<Filename Value="C:\lazarus\lcl\include\buttons.inc"/>
<TopLine Value="24"/>
<UsageCount Value="10"/>
</Unit41>
<Unit42>
<CursorPos X="49" Y="45"/>
<Filename Value="C:\lazarus\lcl\include\canvas.inc"/>
<TopLine Value="33"/>
<UsageCount Value="10"/>
</Unit42>
<Unit43>
<CursorPos X="73" Y="10"/>
<Filename Value="C:\lazarus\lcl\include\dragdock.inc"/>
<TopLine Value="5"/>
<UsageCount Value="10"/>
</Unit43>
<Unit44>
<CursorPos X="48" Y="11"/>
<Filename Value="C:\lazarus\components\RxNew\fduallst.lfm"/>
<SyntaxHighlighter Value="LFM"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit44>
<Unit45>
<CursorPos X="24" Y="5"/>
<Filename Value="C:\lazarus\components\RxNew\rxdbgrid.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxdbgrid"/>
<UsageCount Value="10"/>
</Unit45>
<Unit46>
<CursorPos X="84" Y="1"/>
<Filename Value="C:\lazarus\components\RxNew\rxdice.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxdice"/>
<UsageCount Value="10"/>
</Unit46>
<Unit47>
<CursorPos X="74" Y="5"/>
<Filename Value="C:\lazarus\components\RxNew\rx.inc"/>
<TopLine Value="1"/>
<UnitName Value="RX"/>
<UsageCount Value="10"/>
</Unit47>
<Unit48>
<CursorPos X="82" Y="7"/>
<Filename Value="C:\lazarus\components\RxNew\folderlister.pas"/>
<TopLine Value="1"/>
<UnitName Value="folderlister"/>
<UsageCount Value="10"/>
</Unit48>
<Unit49>
<CursorPos X="80" Y="2"/>
<Filename Value="C:\lazarus\components\RxNew\rxdbcomb.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxdbcomb"/>
<UsageCount Value="10"/>
</Unit49>
<Unit50>
<CursorPos X="63" Y="9"/>
<Filename Value="C:\lazarus\lcl\DbCtrls.pp"/>
<TopLine Value="1"/>
<UnitName Value="DbCtrls"/>
<UsageCount Value="10"/>
</Unit50>
<Unit51>
<CursorPos X="76" Y="9"/>
<Filename Value="C:\lazarus\components\RxNew\dateutil.pas"/>
<TopLine Value="1"/>
<UnitName Value="dateutil"/>
<UsageCount Value="10"/>
</Unit51>
<Unit52>
<CursorPos X="13" Y="10"/>
<Filename Value="C:\lazarus\components\RxNew\dbutils.pas"/>
<TopLine Value="1"/>
<UnitName Value="dbutils"/>
<UsageCount Value="10"/>
</Unit52>
<Unit53>
<CursorPos X="77" Y="9"/>
<Filename Value="C:\lazarus\components\RxNew\rxapputils.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxapputils"/>
<UsageCount Value="10"/>
</Unit53>
<Unit54>
<CursorPos X="74" Y="146"/>
<Filename Value="C:\lazarus\components\RxNew\rxdconst.pas"/>
<TopLine Value="140"/>
<UnitName Value="rxdconst"/>
<UsageCount Value="10"/>
</Unit54>
<Unit55>
<CursorPos X="74" Y="6"/>
<Filename Value="C:\lazarus\components\RxNew\rxstrutils.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxstrutils"/>
<UsageCount Value="10"/>
</Unit55>
<Unit56>
<CursorPos X="74" Y="4"/>
<Filename Value="C:\lazarus\components\RxNew\dbdateedit.pas"/>
<TopLine Value="1"/>
<UnitName Value="dbdateedit"/>
<UsageCount Value="10"/>
</Unit56>
<Unit57>
<CursorPos X="83" Y="7"/>
<Filename Value="C:\lazarus\components\RxNew\curredit.pas"/>
<TopLine Value="1"/>
<UnitName Value="curredit"/>
<UsageCount Value="10"/>
</Unit57>
<Unit58>
<CursorPos X="72" Y="202"/>
<Filename Value="C:\lazarus\components\RxNew\rxmemds.pas"/>
<TopLine Value="197"/>
<UnitName Value="rxmemds"/>
<UsageCount Value="10"/>
</Unit58>
<Unit59>
<CursorPos X="49" Y="40"/>
<Filename Value="C:\lazarus\components\RxNew\boxprocs.pas"/>
<TopLine Value="32"/>
<UnitName Value="boxprocs"/>
<UsageCount Value="11"/>
</Unit59>
<Unit60>
<CursorPos X="80" Y="70"/>
<Filename Value="C:\lazarus\components\RxNew\duallist.pas"/>
<TopLine Value="59"/>
<UnitName Value="duallist"/>
<UsageCount Value="10"/>
</Unit60>
<Unit61>
<CursorPos X="78" Y="1"/>
<Filename Value="C:\lazarus\components\RxNew\rxswitch.pas"/>
<TopLine Value="1"/>
<UnitName Value="rxswitch"/>
<UsageCount Value="10"/>
</Unit61>
<Unit62>
<CursorPos X="25" Y="123"/>
<Filename Value="C:\lazarus\components\RxNew\fduallst.pas"/>
<ComponentName Value="DualListForm"/>
<HasResources Value="True"/>
<ResourceFilename Value="C:\lazarus\components\RxNew\fduallst.lrs"/>
<TopLine Value="119"/>
<UnitName Value="fduallst"/>
<UsageCount Value="10"/>
</Unit62>
<Unit63>
<CursorPos X="50" Y="431"/>
<Filename Value="C:\lazarus\lcl\stdctrls.pp"/>
<TopLine Value="422"/>
<UnitName Value="StdCtrls"/>
<UsageCount Value="10"/>
</Unit63>
<Unit64>
<CursorPos X="45" Y="314"/>
<Filename Value="C:\lazarus\lcl\include\customlistbox.inc"/>
<TopLine Value="309"/>
<UsageCount Value="10"/>
</Unit64>
<Unit65>
<CursorPos X="65" Y="72"/>
<Filename Value="C:\lazarus\lcl\include\controlactionlink.inc"/>
<TopLine Value="65"/>
<UsageCount Value="10"/>
</Unit65>
<Unit66>
<CursorPos X="65" Y="143"/>
<Filename Value="C:\lazarus\lcl\include\customaction.inc"/>
<TopLine Value="136"/>
<UsageCount Value="10"/>
</Unit66>
<Unit67>
<CursorPos X="71" Y="256"/>
<Filename Value="C:\lazarus\lcl\LMessages.pp"/>
<TopLine Value="245"/>
<UnitName Value="LMessages"/>
<UsageCount Value="10"/>
</Unit67>
<Unit68>
<CursorPos X="63" Y="36"/>
<Filename Value="C:\lazarus\lcl\include\menuactionlink.inc"/>
<TopLine Value="30"/>
<UsageCount Value="10"/>
</Unit68>
<Unit69>
<CursorPos X="60" Y="26"/>
<Filename Value="C:\lazarus\lcl\include\actionlink.inc"/>
<TopLine Value="19"/>
<UsageCount Value="10"/>
</Unit69>
<Unit70>
<CursorPos X="40" Y="228"/>
<Filename Value="C:\lazarus\fpcsrc\fcl\image\fpcanvas.pp"/>
<TopLine Value="215"/>
<UnitName Value="FPCanvas"/>
<UsageCount Value="10"/>
</Unit70>
<Unit71>
<CursorPos X="41" Y="270"/>
<Filename Value="C:\lazarus\fpcsrc\fcl\image\FPCanvas.inc"/>
<TopLine Value="269"/>
<UsageCount Value="10"/>
</Unit71>
<Unit72>
<CursorPos X="48" Y="215"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\sysutils\sysutilh.inc"/>
<TopLine Value="207"/>
<UsageCount Value="10"/>
</Unit72>
<Unit73>
<CursorPos X="51" Y="102"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\sysutils\sysutils.inc"/>
<TopLine Value="100"/>
<UsageCount Value="10"/>
</Unit73>
<Unit74>
<CursorPos X="65" Y="88"/>
<Filename Value="C:\lazarus\lcl\include\custompanel.inc"/>
<TopLine Value="79"/>
<UsageCount Value="10"/>
</Unit74>
<Unit75>
<CursorPos X="72" Y="305"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\classes\lists.inc"/>
<TopLine Value="298"/>
<UsageCount Value="10"/>
</Unit75>
<Unit76>
<CursorPos X="48" Y="990"/>
<Filename Value="C:\lazarus\lcl\include\imglist.inc"/>
<TopLine Value="986"/>
<UsageCount Value="10"/>
</Unit76>
<Unit77>
<CursorPos X="47" Y="488"/>
<Filename Value="C:\lazarus\lcl\include\bitmap.inc"/>
<TopLine Value="486"/>
<UsageCount Value="10"/>
</Unit77>
<Unit78>
<CursorPos X="45" Y="120"/>
<Filename Value="C:\lazarus\lcl\include\customcheckbox.inc"/>
<TopLine Value="120"/>
<UsageCount Value="10"/>
</Unit78>
<Unit79>
<CursorPos X="22" Y="200"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\objpas\typinfo.pp"/>
<TopLine Value="197"/>
<UnitName Value="typinfo"/>
<UsageCount Value="10"/>
</Unit79>
<Unit80>
<CursorPos X="79" Y="34"/>
<Filename Value="C:\lazarus\lcl\LCLClasses.pp"/>
<TopLine Value="24"/>
<UnitName Value="LCLClasses"/>
<UsageCount Value="10"/>
</Unit80>
<Unit81>
<CursorPos X="49" Y="122"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\inc\objpash.inc"/>
<TopLine Value="116"/>
<UsageCount Value="10"/>
</Unit81>
<Unit82>
<CursorPos X="49" Y="116"/>
<Filename Value="C:\lazarus\fpcsrc\rtl\inc\objpas.inc"/>
<TopLine Value="111"/>
<UsageCount Value="10"/>
</Unit82>
<Unit83>
<CursorPos X="60" Y="41"/>
<Filename Value="C:\lazarus\components\RxNew\rxappicon.pas"/>
<TopLine Value="36"/>
<UnitName Value="RxAppIcon"/>
<UsageCount Value="10"/>
</Unit83>
<Unit84>
<CursorPos X="40" Y="5"/>
<EditorIndex Value="1"/>
<Filename Value="aboutunit.pas"/>
<ComponentName Value="AboutForm"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<ResourceFilename Value="aboutunit.lrs"/>
<TopLine Value="1"/>
<UnitName Value="AboutUnit"/>
<UsageCount Value="20"/>
</Unit84>
</Units>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<Item1>
<PackageName Value="RxNew"/>
<MinVersion Major="1" Release="5" Build="11" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
<Item3>
<PackageName Value="IDEIntf"/>
<MinVersion Major="1" Valid="True"/>
</Item3>
</RequiredPackages>
<JumpHistory Count="6" HistoryIndex="5">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="32" TopLine="10"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="19" Column="26" TopLine="10"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="42" Column="48" TopLine="32"/>
</Position3>
<Position4>
<Filename Value="aboutunit.pas"/>
<Caret Line="11" Column="13" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="aboutunit.pas"/>
<Caret Line="20" Column="1" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="unit1.pas"/>
<Caret Line="41" Column="49" TopLine="27"/>
</Position6>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="2">
<Item1>
<Name Value="ECodetoolError"/>
</Item1>
<Item2>
<Name Value="EFOpenError"/>
</Item2>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,16 @@
program project1;
{$mode objfpc}{$H+}
uses
Interfaces, // this includes the LCL widgetset
Forms
{ add your units here }, Unit1, RxNew, AboutUnit;
begin
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TAboutForm, AboutForm);
Application.Run;
end.

View File

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<TApplication>
<Form1 Form1_Width="592" Form1_Height="289" Form1_Left="310" Form1_Top="255" Form1.ToolPanel1.Version="1" Form1.ToolPanel1.ShowHint="1" Form1.ToolPanel1.Options="tpFlatBtns,tpCustomizable,tpGlyphPopup,tpCaptionPopup" Form1.ToolPanel1.ToolBarStyle="tbsStandart" Form1.ToolPanel1.Count="7" Form1.ToolPanel1.Item0.Action="actNew" Form1.ToolPanel1.Item0.Visible="1" Form1.ToolPanel1.Item0.ShowCaption="1" Form1.ToolPanel1.Item0.Top="4" Form1.ToolPanel1.Item0.Left="8" Form1.ToolPanel1.Item0.Width="49" Form1.ToolPanel1.Item1.Action="actCustom" Form1.ToolPanel1.Item1.Visible="1" Form1.ToolPanel1.Item1.ShowCaption="1" Form1.ToolPanel1.Item1.Top="4" Form1.ToolPanel1.Item1.Left="328" Form1.ToolPanel1.Item1.Width="64" Form1.ToolPanel1.Item2.Action="actNext" Form1.ToolPanel1.Item2.Visible="1" Form1.ToolPanel1.Item2.ShowCaption="0" Form1.ToolPanel1.Item2.Top="4" Form1.ToolPanel1.Item2.Left="152" Form1.ToolPanel1.Item2.Width="24" Form1.ToolPanel1.Item3.Action="actPrior" Form1.ToolPanel1.Item3.Visible="1" Form1.ToolPanel1.Item3.ShowCaption="1" Form1.ToolPanel1.Item3.Top="4" Form1.ToolPanel1.Item3.Left="96" Form1.ToolPanel1.Item3.Width="50" Form1.ToolPanel1.Item4.Action="actExit" Form1.ToolPanel1.Item4.Visible="1" Form1.ToolPanel1.Item4.ShowCaption="1" Form1.ToolPanel1.Item4.Top="4" Form1.ToolPanel1.Item4.Left="504" Form1.ToolPanel1.Item4.Width="46" Form1.ToolPanel1.Item5.Action="actDemo" Form1.ToolPanel1.Item5.Visible="1" Form1.ToolPanel1.Item5.ShowCaption="1" Form1.ToolPanel1.Item5.Top="4" Form1.ToolPanel1.Item5.Left="216" Form1.ToolPanel1.Item5.Width="85" Form1.ToolPanel1.Item6.Action="actCustom" Form1.ToolPanel1.Item6.Visible="1" Form1.ToolPanel1.Item6.ShowCaption="1" Form1.ToolPanel1.Item6.Top="4" Form1.ToolPanel1.Item6.Left="328" Form1.ToolPanel1.Item6.Width="64"/>
<MainForm MainForm_Width="596" MainForm_Height="289" MainForm_Left="342" MainForm_Top="269" MainForm.ToolPanel1.Version="1" MainForm.ToolPanel1.ShowHint="1" MainForm.ToolPanel1.Options="tpFlatBtns,tpCustomizable,tpGlyphPopup,tpCaptionPopup" MainForm.ToolPanel1.ToolBarStyle="tbsStandart" MainForm.ToolPanel1.Count="7" MainForm.ToolPanel1.Item0.Action="actNew" MainForm.ToolPanel1.Item0.Visible="1" MainForm.ToolPanel1.Item0.ShowCaption="1" MainForm.ToolPanel1.Item0.Top="4" MainForm.ToolPanel1.Item0.Left="8" MainForm.ToolPanel1.Item0.Width="49" MainForm.ToolPanel1.Item1.Action="actCustom" MainForm.ToolPanel1.Item1.Visible="1" MainForm.ToolPanel1.Item1.ShowCaption="1" MainForm.ToolPanel1.Item1.Top="4" MainForm.ToolPanel1.Item1.Left="424" MainForm.ToolPanel1.Item1.Width="64" MainForm.ToolPanel1.Item2.Action="actNext" MainForm.ToolPanel1.Item2.Visible="1" MainForm.ToolPanel1.Item2.ShowCaption="1" MainForm.ToolPanel1.Item2.Top="4" MainForm.ToolPanel1.Item2.Left="121" MainForm.ToolPanel1.Item2.Width="51" MainForm.ToolPanel1.Item3.Action="actPrior" MainForm.ToolPanel1.Item3.Visible="1" MainForm.ToolPanel1.Item3.ShowCaption="1" MainForm.ToolPanel1.Item3.Top="4" MainForm.ToolPanel1.Item3.Left="71" MainForm.ToolPanel1.Item3.Width="50" MainForm.ToolPanel1.Item4.Action="actExit" MainForm.ToolPanel1.Item4.Visible="1" MainForm.ToolPanel1.Item4.ShowCaption="1" MainForm.ToolPanel1.Item4.Top="4" MainForm.ToolPanel1.Item4.Left="547" MainForm.ToolPanel1.Item4.Width="46" MainForm.ToolPanel1.Item5.Action="actSysMenu" MainForm.ToolPanel1.Item5.Visible="1" MainForm.ToolPanel1.Item5.ShowCaption="1" MainForm.ToolPanel1.Item5.Top="4" MainForm.ToolPanel1.Item5.Left="8" MainForm.ToolPanel1.Item5.Width="63" MainForm.ToolPanel1.Item6.Action="sysAbout" MainForm.ToolPanel1.Item6.Visible="1" MainForm.ToolPanel1.Item6.ShowCaption="1" MainForm.ToolPanel1.Item6.Top="4" MainForm.ToolPanel1.Item6.Left="489" MainForm.ToolPanel1.Item6.Width="57"/>
</TApplication>
</CONFIG>

View File

@ -0,0 +1,370 @@
object MainForm: TMainForm
Caption = 'ToolPanel demo'
ClientHeight = 289
ClientWidth = 559
PixelsPerInch = 96
Position = poDesktopCenter
SessionProperties = 'Width;Height;Left;Top'
ShowHint = True
HorzScrollBar.Page = 558
VertScrollBar.Page = 288
Left = 440
Height = 289
Top = 277
Width = 559
object ToolPanel1: TToolPanel
Items = <
item
Action = actNew
Visible = True
Left = 216
Height = 24
Top = 4
Width = 49
DropDownMenu = PopupMenu1
ShowCaption = True
ButtonStyle = tbrDropDown
end
item
Action = actCustom
Visible = True
Left = 384
Height = 24
Top = 4
Width = 64
ShowCaption = True
end
item
Action = actNext
Visible = True
Left = 168
Height = 24
Top = 4
Width = 24
end
item
Action = actPrior
Visible = True
Left = 112
Height = 24
Top = 4
Width = 50
ShowCaption = True
end
item
Action = actExit
Visible = True
Left = 504
Height = 24
Top = 4
Width = 46
ShowCaption = True
end
item
Action = actSysMenu
Visible = True
Left = 8
Height = 24
Top = 4
Width = 85
DropDownMenu = PopupMenu1
ShowCaption = True
ButtonStyle = tbrDropDown
end
item
Action = sysAbout
Visible = True
Left = 448
Height = 24
Top = 4
Width = 57
ShowCaption = True
end>
ImageList = ImageList1
PropertyStorage = XMLPropStorage1
BtnWidth = 23
BtnHeight = 24
ToolBarStyle = tbsWindowsXP
Options = [tpFlatBtns, tpCustomizable, tpGlyphPopup, tpCaptionPopup]
Version = 1
Align = alTop
AutoSize = True
BorderWidth = 4
ClientHeight = 32
ClientWidth = 559
FullRepaint = False
ParentColor = True
TabOrder = 0
Height = 32
Width = 559
end
object ImageList1: TImageList
left = 216
top = 8
Bitmap = {
6C69070000001000000010000000C30100002F2A2058504D202A2F0A73746174
69632063686172202A546F6F6C734E6F726D616C4269746D61705B5D3D7B0A22
313620313620352031222C0A222E2063204E6F6E65222C0A2223206320233030
30303030222C0A226220632023383030303030222C0A22612063202338303830
3030222C0A226320632023633063306330222C0A222E2E2E2E2E2E2E2E2E2E2E
2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E
2E2E2E2E2E232323232E2E2E2E222C0A222E2E2E2E2E2E2E232361612323232E
2E222C0A222E2E2E2323232E2E2E2323616161232E222C0A222E2E2E2E23232E
2E2E2E23616161232E222C0A222E232E2E23232E2E2E2E232361612323222C0A
222E23232323232E2E2E23622323236161222C0A222E2323232363232E236223
2E2E236123222C0A222E2E2E2E2E23632362232E2E2E2E232E222C0A222E2E2E
2E2E2E2363232E2E2E2E2E2E2E222C0A222E2E2E2E2E23622363232E2E2E2E2E
2E222C0A222E2E2E2E2362232E2363232E2E2E2E2E222C0A222E2E2E2362232E
2E2E2363232E2E2E2E222C0A222E2E2362232E2E2E2E2E2363232E2E2E222C0A
222E2E23232E2E2E2E2E2E2E23232E2E2E227D3B0AA50100002F2A2058504D20
2A2F0A7374617469632063686172202A5072696F724E6F726D616C4269746D61
705B5D3D7B0A22313620313620332031222C0A222E2063204E6F6E65222C0A22
2320632023303030303030222C0A226120632023666666666666222C0A222E2E
2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
232E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E23232E2E2E2E2E2E2E2E2E222C
0A222E2E2E2E2361232E2E2E2E2E2E2E2E2E222C0A222E2E2E23616123232323
232323232E2E222C0A222E2E2361616161616161616161232E2E222C0A222E2E
2361616161616161616161232E2E222C0A222E2E2E2361612323232323232323
2E2E222C0A222E2E2E2E2361232E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E23
232E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E232E2E2E2E2E2E2E2E2E222C
0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D3B0AA401
00002F2A2058504D202A2F0A7374617469632063686172202A4E6578744E6F72
6D616C4269746D61705B5D3D7B0A22313620313620332031222C0A222E206320
4E6F6E65222C0A222320632023303030303030222C0A22612063202366666666
6666222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E
2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C
0A222E2E2E2E2E2E2E2E2E232E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E23
232E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2361232E2E2E2E222C0A222E2E
23232323232323236161232E2E2E222C0A222E2E236161616161616161616123
2E2E222C0A222E2E2361616161616161616161232E2E222C0A222E2E23232323
232323236161232E2E2E222C0A222E2E2E2E2E2E2E2E2E2361232E2E2E2E222C
0A222E2E2E2E2E2E2E2E2E23232E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E23
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E
2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
2E2E227D3B0AA30100002F2A2058504D202A2F0A737461746963206368617220
2A4E65774E6F726D616C4269746D61705B5D3D7B0A2231362031362033203122
2C0A222E2063204E6F6E65222C0A222320632023303030303030222C0A226120
632023666666666666222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A
222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2323232323232323
2E2E2E2E2E222C0A222E2E2E2361616161616123232E2E2E2E222C0A222E2E2E
236161616161612361232E2E2E222C0A222E2E2E23616161616161232323232E
2E222C0A222E2E2E23616161616161616161232E2E222C0A222E2E2E23616161
616161616161232E2E222C0A222E2E2E23616161616161616161232E2E222C0A
222E2E2E23616161616161616161232E2E222C0A222E2E2E2361616161616161
6161232E2E222C0A222E2E2E23616161616161616161232E2E222C0A222E2E2E
23616161616161616161232E2E222C0A222E2E2E23616161616161616161232E
2E222C0A222E2E2E23232323232323232323232E2E222C0A222E2E2E2E2E2E2E
2E2E2E2E2E2E2E2E2E227D3B0AC60100002F2A2058504D202A2F0A7374617469
632063686172202A50726F70657274794E6F726D616C4269746D61705B5D3D7B
0A22313620313620352031222C0A222E2063204E6F6E65222C0A222320632023
303030303030222C0A226120632023303030303830222C0A2262206320236330
63306330222C0A226320632023666666666666222C0A222E2E2E2E2E2E2E2E2E
2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E
2E2E2E2E2E2E2E2323232323232E61222C0A222E2E2E2E2E2E2E236262626262
622361222C0A222E2E2E2E2E2E23622362626262626261222C0A222E23232323
2362236223626262626261222C0A222E23636323622362236223626262236122
2C0A222E236323622363236223622323232E61222C0A222E2363232363636323
622363232E2E2E222C0A222E2363636363636363236363232E2E2E222C0A222E
2363636363636363636363232E2E2E222C0A222E236361616361616161616323
2E2E2E222C0A222E2363636363636363636363232E2E2E222C0A222E23636161
63616161616163232E2E2E222C0A222E2363636363636363636363232E2E2E22
2C0A222E2323232323232323232323232E2E2E227D3B0A0E0200002F2A205850
4D202A2F0A7374617469632063686172202A457869744E6F726D616C4269746D
61705B5D3D7B0A2231362031362031302031222C0A222E2063204E6F6E65222C
0A222320632023303030303030222C0A226220632023303030303830222C0A22
6320632023303030306666222C0A226120632023303038303030222C0A226720
632023303038303830222C0A226420632023303066666666222C0A2266206320
23383038303830222C0A226820632023633063306330222C0A22652063202366
6666666666222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E
2E2E2323232323232E2E2E2E2E222C0A222E2E2E2E2E2361616161232E2E2E2E
2E222C0A222E2E2E2E2E2323232323232E2E2E2E2E222C0A222E2E2E2E2E2E2E
2E2E2E2E2E2E2E2E2E222C0A222E2E2E626262626262626262622E2E2E222C0A
222E2E2E626362632364656465622E2E2E222C0A222E2E2E6262636223656465
64622E2E2E222C0A222E2E2E626362632364656465622E2E2E222C0A222E2E2E
626263622365646564622E2E2E222C0A222E2E2E626362632365656565622E2E
2E222C0A222E2E2E626263622365656565622E2E2E222C0A222E2E2E62636223
2366656565622E2E2E222C0A2262626262232366666665656562626262222C0A
2266666666666666666666666566656666222C0A226766666666666666666665
6866686566227D3B0AF00100002F2A2058504D202A2F0A737461746963206368
6172202A437573746F6D42746E5F4E6F726D616C5B5D3D7B0A22313820313820
332031222C0A222E2063204E6F6E65222C0A222320632023303030303030222C
0A226120632023666666663030222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E
2E2E2E2E23232323232E2E2E2E2E2E222C0A222E2E2E2E2E2323616161616123
232E2E2E2E222C0A222E2E2E2E23616161616161616161232E2E2E222C0A222E
2E2E236161616161616161616161232E2E222C0A222E2E2E2361612323616161
23236161232E2E222C0A222E2E2361616123236161612323616161232E222C0A
222E2E2361616161616161616161616161232E222C0A222E2E23616161616161
61616161616161232E222C0A222E2E2361612361616161616161236161232E22
2C0A222E2E2361616123616161616123616161232E222C0A222E2E2E23616161
2323232323616161232E2E222C0A222E2E2E236161616161616161616161232E
2E222C0A222E2E2E2E23616161616161616161232E2E2E222C0A222E2E2E2E2E
2323616161616123232E2E2E2E222C0A222E2E2E2E2E2E2E23232323232E2E2E
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D3B0A
}
end
object ActionList1: TActionList
Images = ImageList1
left = 216
top = 40
object actNew: TAction
Caption = 'New'
Hint = '������� � 1'
ImageIndex = 3
end
object actNext: TAction
Caption = 'Next'
Hint = '������� � 2'
ImageIndex = 2
OnExecute = Action1Execute
end
object actPrior: TAction
Caption = 'Prior'
Hint = '������� � 3'
ImageIndex = 1
OnExecute = Action1Execute
end
object actCustom: TAction
Caption = 'Custom'
Hint = '��������� ������ ������������'
ImageIndex = 0
OnExecute = actCustomExecute
end
object actExit: TAction
Caption = 'Exit'
ImageIndex = 5
OnExecute = actExitExecute
ShortCut = 32856
end
object actSysMenu: TAction
Caption = 'System'
ImageIndex = 4
Tag = 4
end
object sysAbout: TAction
Caption = 'About'
ImageIndex = 6
OnExecute = sysAboutExecute
Category = 'System'
end
end
object XMLPropStorage1: TXMLPropStorage
StoredValues = <>
FileName = 'toolbardemo.cfg'
left = 216
top = 88
end
object PopupMenu1: TPopupMenu
left = 96
top = 8
object MenuItem1: TMenuItem
Action = actNew
OnClick = Action1Execute
end
object MenuItem2: TMenuItem
Caption = '-'
end
object MenuItem4: TMenuItem
Action = actNext
OnClick = Action1Execute
end
object MenuItem3: TMenuItem
Action = actPrior
OnClick = Action1Execute
end
object MenuItem8: TMenuItem
Caption = '-'
end
object MenuItem9: TMenuItem
Action = actCustom
end
object MenuItem7: TMenuItem
Action = sysAbout
end
object MenuItem6: TMenuItem
Caption = '-'
end
object MenuItem5: TMenuItem
Action = actExit
OnClick = actExitExecute
end
end
object RxAppIcon1: TRxAppIcon
left = 216
top = 128
Data = {
0000010001002020000001000800A80800001600000028000000200000004000
0000010008000000000080040000000000000000000000010000000000000000
0000000080000080000000808000800000008000800080800000C0C0C000C0DC
C000F0CAA600D4F0FF00B1E2FF008ED4FF006BC6FF0048B8FF0025AAFF0000AA
FF000092DC00007AB90000629600004A730000325000D4E3FF00B1C7FF008EAB
FF006B8FFF004873FF002557FF000055FF000049DC00003DB900003196000025
730000195000D4D4FF00B1B1FF008E8EFF006B6BFF004848FF002525FF000000
FE000000DC000000B900000096000000730000005000E3D4FF00C7B1FF00AB8E
FF008F6BFF007348FF005725FF005500FF004900DC003D00B900310096002500
730019005000F0D4FF00E2B1FF00D48EFF00C66BFF00B848FF00AA25FF00AA00
FF009200DC007A00B900620096004A00730032005000FFD4FF00FFB1FF00FF8E
FF00FF6BFF00FF48FF00FF25FF00FE00FE00DC00DC00B900B900960096007300
730050005000FFD4F000FFB1E200FF8ED400FF6BC600FF48B800FF25AA00FF00
AA00DC009200B9007A009600620073004A0050003200FFD4E300FFB1C700FF8E
AB00FF6B8F00FF487300FF255700FF005500DC004900B9003D00960031007300
250050001900FFD4D400FFB1B100FF8E8E00FF6B6B00FF484800FF252500FE00
0000DC000000B9000000960000007300000050000000FFE3D400FFC7B100FFAB
8E00FF8F6B00FF734800FF572500FF550000DC490000B93D0000963100007325
000050190000FFF0D400FFE2B100FFD48E00FFC66B00FFB84800FFAA2500FFAA
0000DC920000B97A000096620000734A000050320000FFFFD400FFFFB100FFFF
8E00FFFF6B00FFFF4800FFFF2500FEFE0000DCDC0000B9B90000969600007373
000050500000F0FFD400E2FFB100D4FF8E00C6FF6B00B8FF4800AAFF2500AAFF
000092DC00007AB90000629600004A73000032500000E3FFD400C7FFB100ABFF
8E008FFF6B0073FF480057FF250055FF000049DC00003DB90000319600002573
000019500000D4FFD400B1FFB1008EFF8E006BFF6B0048FF480025FF250000FE
000000DC000000B90000009600000073000000500000D4FFE300B1FFC7008EFF
AB006BFF8F0048FF730025FF570000FF550000DC490000B93D00009631000073
250000501900D4FFF000B1FFE2008EFFD4006BFFC60048FFB80025FFAA0000FF
AA0000DC920000B97A000096620000734A0000503200D4FFFF00B1FFFF008EFF
FF006BFFFF0048FFFF0025FFFF0000FEFE0000DCDC0000B9B900009696000073
730000505000F2F2F200E6E6E600DADADA00CECECE00C2C2C200B6B6B600AAAA
AA009E9E9E0092929200868686007A7A7A006E6E6E0062626200565656004A4A
4A003E3E3E0032323200262626001A1A1A000E0E0E00F0FBFF00A4A0A0008080
80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
0000000000000000001300000000000000000000000000000000000000000000
000000000000000013D913000000000000000000000000000000000000000000
0000000000000013D9D9D913000000000000000000000000000000000000EFEF
EFEFEFEFEFEF13D9D9D9D9D913EFEFEFEF00000000000000000000000000EFE7
E7E7E7E7E813D9D9D9D972D9D913E7E7EF00000000000000000000000000EFE2
E2E4E8E813D9D972D9D9D972D9D913E7EF00000000000000000000000000EFE2
E4E7E813D9D9D9D972D9D9D972D9D913EF00000000000000000000000000EFE4
E7E813D9D9D9D9D9D9D9D9D9D972D9D91300000000000000000000000000EFE2
E413D9D9D9D972D9D9D972D9D9D972D9D913000000000000000000000000EFE2
13D9D972D9D9D972D9D9D972D9D9D972D9D9130000000000000000000000EF13
D9D9D9D972D9D9D972D9D9D9D9D9D9D9D913000000000000000000000000EFE2
13D9D9D9D972D9D9D9D9000000D9D9D91300000000000000000000000000EFE2
E213D9D9D9D972D9D90095959500D913EF00000000009595950000000000EFE2
E2E213D9D9D9D9D900919100919500E8EF00000000090909099500000000EFE2
E2E2E213D9D9D9000991919100919500EF00000009910909090995000000EFE2
E26D6D6D13D9D90009919191910095000000000009910909090995000000EFE2
E2E2E2E2E213D9000991009191919500EF00000009910909090995000000EFE2
E2E2E2E2E2E213D900099191919100E7EF00000000099191910900000000EFE2
E26DE26D6D6D6D13D90009090900E2E7EF00000000000909090000000000EFE2
E2E2E2E2E2E2E2E213E2000000E2E2E7EF00000000000000000000000000EFE2
E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E7EF00000000000000000000000000EFE2
E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E7EF00000000000000000000000000EFE2
E2E2E2E2E2E2E2E2EFE2E2E2E2E2E2E7EF00000000000000000000000000EFE2
E2E2E22AE8E8E2EFE2E2E2E2E2E2E2E7EF00000000000000000000000000EFE2
E2E2E22A2AE8EFE8E2E2E2E2E2E2E2E7EF00000000000000000000000000EFE2
E2E2E22A252AE8E8E8E2E2E2E2E2E2E7EF00000000000000000000000000EFEF
EFEF2A2525252AEFEFEF000000000000EF000000000000000000000000000000
002A2525252A2A2A00000000000000000000000000000000000000000000002A
2A2525252A000000000000000000000000000000000000000000000000000000
2A25252A00000000000000000000000000000000000000000000000000000000
002A2A0000000000000000000000000000000000000000000000000000000000
00002A000000000000000000000000000000000000000000000000000000FFEF
FFFEFFC7FFFEFF83FFFE00001FFE00001FFE00001FFE00001FFE00001FFE0000
0FFE000007FE00000FFE00001F1E00001E0E00001C0600001802000010000000
080300001C0700001E0F00001F1F00001FFF00001FFF00001FFF00001FFF0000
1FFF00001FFF00001FFFE03FFFFF81FFFFFFC3FFFFFFE7FFFFFFF7FFFFFF
}
end
end

View File

@ -0,0 +1,191 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TMainForm','FORMDATA',[
'TPF0'#9'TMainForm'#8'MainForm'#7'Caption'#6#14'ToolPanel demo'#12'ClientHeig'
+'ht'#3'!'#1#11'ClientWidth'#3'/'#2#13'PixelsPerInch'#2'`'#8'Position'#7#15'p'
+'oDesktopCenter'#17'SessionProperties'#6#21'Width;Height;Left;Top'#8'ShowHin'
+'t'#9#18'HorzScrollBar.Page'#3'.'#2#18'VertScrollBar.Page'#3' '#1#4'Left'#3
+#184#1#6'Height'#3'!'#1#3'Top'#3#21#1#5'Width'#3'/'#2#0#10'TToolPanel'#10'To'
+'olPanel1'#5'Items'#14#1#6'Action'#7#6'actNew'#7'Visible'#9#4'Left'#3#216#0#6
+'Height'#2#24#3'Top'#2#4#5'Width'#2'1'#12'DropDownMenu'#7#10'PopupMenu1'#11
+'ShowCaption'#9#11'ButtonStyle'#7#11'tbrDropDown'#0#1#6'Action'#7#9'actCusto'
+'m'#7'Visible'#9#4'Left'#3#128#1#6'Height'#2#24#3'Top'#2#4#5'Width'#2'@'#11
+'ShowCaption'#9#0#1#6'Action'#7#7'actNext'#7'Visible'#9#4'Left'#3#168#0#6'He'
+'ight'#2#24#3'Top'#2#4#5'Width'#2#24#0#1#6'Action'#7#8'actPrior'#7'Visible'#9
+#4'Left'#2'p'#6'Height'#2#24#3'Top'#2#4#5'Width'#2'2'#11'ShowCaption'#9#0#1#6
+'Action'#7#7'actExit'#7'Visible'#9#4'Left'#3#248#1#6'Height'#2#24#3'Top'#2#4
+#5'Width'#2'.'#11'ShowCaption'#9#0#1#6'Action'#7#10'actSysMenu'#7'Visible'#9
+#4'Left'#2#8#6'Height'#2#24#3'Top'#2#4#5'Width'#2'U'#12'DropDownMenu'#7#10'P'
+'opupMenu1'#11'ShowCaption'#9#11'ButtonStyle'#7#11'tbrDropDown'#0#1#6'Action'
+#7#8'sysAbout'#7'Visible'#9#4'Left'#3#192#1#6'Height'#2#24#3'Top'#2#4#5'Widt'
+'h'#2'9'#11'ShowCaption'#9#0#0#9'ImageList'#7#10'ImageList1'#15'PropertyStor'
+'age'#7#15'XMLPropStorage1'#8'BtnWidth'#2#23#9'BtnHeight'#2#24#12'ToolBarSty'
+'le'#7#12'tbsWindowsXP'#7'Options'#11#10'tpFlatBtns'#14'tpCustomizable'#12't'
+'pGlyphPopup'#14'tpCaptionPopup'#0#7'Version'#2#1#5'Align'#7#5'alTop'#8'Auto'
+'Size'#9#11'BorderWidth'#2#4#12'ClientHeight'#2' '#11'ClientWidth'#3'/'#2#11
+'FullRepaint'#8#11'ParentColor'#9#8'TabOrder'#2#0#6'Height'#2' '#5'Width'#3
+'/'#2#0#0#10'TImageList'#10'ImageList1'#4'left'#3#216#0#3'top'#2#8#6'Bitmap'
+#10#157#12#0#0'li'#7#0#0#0#16#0#0#0#16#0#0#0#195#1#0#0'/* XPM */'#10'static '
+'char *ToolsNormalBitmap[]={'#10'"16 16 5 1",'#10'". c None",'#10'"# c #0000'
+'00",'#10'"b c #800000",'#10'"a c #808000",'#10'"c c #c0c0c0",'#10'"........'
+'........",'#10'"................",'#10'"........####....",'#10'".......##aa'
+'###..",'#10'"...###...##aaa#.",'#10'"....##....#aaa#.",'#10'".#..##....##aa'
+'##",'#10'".#####...#b###aa",'#10'".####c#.#b#..#a#",'#10'".....#c#b#....#."'
+','#10'"......#c#.......",'#10'".....#b#c#......",'#10'"....#b#.#c#.....",'
+#10'"...#b#...#c#....",'#10'"..#b#.....#c#...",'#10'"..##.......##..."};'#10
+#165#1#0#0'/* XPM */'#10'static char *PriorNormalBitmap[]={'#10'"16 16 3 1",'
+#10'". c None",'#10'"# c #000000",'#10'"a c #ffffff",'#10'"................"'
+','#10'"................",'#10'"................",'#10'"......#.........",'
+#10'".....##.........",'#10'"....#a#.........",'#10'"...#aa########..",'#10
+'"..#aaaaaaaaaa#..",'#10'"..#aaaaaaaaaa#..",'#10'"...#aa########..",'#10'"..'
+'..#a#.........",'#10'".....##.........",'#10'"......#.........",'#10'".....'
+'...........",'#10'"................",'#10'"................"};'#10#164#1#0#0
+'/* XPM */'#10'static char *NextNormalBitmap[]={'#10'"16 16 3 1",'#10'". c N'
+'one",'#10'"# c #000000",'#10'"a c #ffffff",'#10'"................",'#10'"..'
+'..............",'#10'"................",'#10'".........#......",'#10'".....'
+'....##.....",'#10'".........#a#....",'#10'"..########aa#...",'#10'"..#aaaaa'
+'aaaaa#..",'#10'"..#aaaaaaaaaa#..",'#10'"..########aa#...",'#10'".........#a'
+'#....",'#10'".........##.....",'#10'".........#......",'#10'"..............'
+'..",'#10'"................",'#10'"................"};'#10#163#1#0#0'/* XPM '
+'*/'#10'static char *NewNormalBitmap[]={'#10'"16 16 3 1",'#10'". c None",'#10
+'"# c #000000",'#10'"a c #ffffff",'#10'"................",'#10'"............'
+'....",'#10'"...########.....",'#10'"...#aaaaaa##....",'#10'"...#aaaaaa#a#..'
+'.",'#10'"...#aaaaaa####..",'#10'"...#aaaaaaaaa#..",'#10'"...#aaaaaaaaa#..",'
+#10'"...#aaaaaaaaa#..",'#10'"...#aaaaaaaaa#..",'#10'"...#aaaaaaaaa#..",'#10
+'"...#aaaaaaaaa#..",'#10'"...#aaaaaaaaa#..",'#10'"...#aaaaaaaaa#..",'#10'"..'
+'.###########..",'#10'"................"};'#10#198#1#0#0'/* XPM */'#10'stati'
+'c char *PropertyNormalBitmap[]={'#10'"16 16 5 1",'#10'". c None",'#10'"# c '
+'#000000",'#10'"a c #000080",'#10'"b c #c0c0c0",'#10'"c c #ffffff",'#10'"...'
+'.............",'#10'"................",'#10'"........######.a",'#10'"......'
+'.#bbbbbb#a",'#10'"......#b#bbbbbba",'#10'".#####b#b#bbbbba",'#10'".#cc#b#b#'
+'b#bbb#a",'#10'".#c#b#c#b#b###.a",'#10'".#c##ccc#b#c#...",'#10'".#ccccccc#cc'
+'#...",'#10'".#cccccccccc#...",'#10'".#caacaaaaac#...",'#10'".#cccccccccc#..'
+'.",'#10'".#caacaaaaac#...",'#10'".#cccccccccc#...",'#10'".############..."}'
+';'#10#14#2#0#0'/* XPM */'#10'static char *ExitNormalBitmap[]={'#10'"16 16 1'
+'0 1",'#10'". c None",'#10'"# c #000000",'#10'"b c #000080",'#10'"c c #0000f'
+'f",'#10'"a c #008000",'#10'"g c #008080",'#10'"d c #00ffff",'#10'"f c #8080'
+'80",'#10'"h c #c0c0c0",'#10'"e c #ffffff",'#10'"................",'#10'"...'
,'..######.....",'#10'".....#aaaa#.....",'#10'".....######.....",'#10'"......'
+'..........",'#10'"...bbbbbbbbbb...",'#10'"...bcbc#dedeb...",'#10'"...bbcb#e'
+'dedb...",'#10'"...bcbc#dedeb...",'#10'"...bbcb#ededb...",'#10'"...bcbc#eeee'
+'b...",'#10'"...bbcb#eeeeb...",'#10'"...bcb##feeeb...",'#10'"bbbb##fffeeebbb'
+'b",'#10'"fffffffffffefeff",'#10'"gfffffffffehfhef"};'#10#240#1#0#0'/* XPM *'
+'/'#10'static char *CustomBtn_Normal[]={'#10'"18 18 3 1",'#10'". c None",'#10
+'"# c #000000",'#10'"a c #ffff00",'#10'"..................",'#10'"..........'
+'........",'#10'".......#####......",'#10'".....##aaaaa##....",'#10'"....#aa'
+'aaaaaaa#...",'#10'"...#aaaaaaaaaaa#..",'#10'"...#aa##aaa##aa#..",'#10'"..#a'
+'aa##aaa##aaa#.",'#10'"..#aaaaaaaaaaaaa#.",'#10'"..#aaaaaaaaaaaaa#.",'#10'".'
+'.#aa#aaaaaaa#aa#.",'#10'"..#aaa#aaaaa#aaa#.",'#10'"...#aaa#####aaa#..",'#10
+'"...#aaaaaaaaaaa#..",'#10'"....#aaaaaaaaa#...",'#10'".....##aaaaa##....",'
+#10'".......#####......",'#10'".................."};'#10#0#0#11'TActionList'
+#11'ActionList1'#6'Images'#7#10'ImageList1'#4'left'#3#216#0#3'top'#2'('#0#7
+'TAction'#6'actNew'#7'Caption'#6#3'New'#4'Hint'#6#11#209#238#225#251#242#232
+#229' '#185' 1'#10'ImageIndex'#2#3#0#0#7'TAction'#7'actNext'#7'Caption'#6#4
+'Next'#4'Hint'#6#11#209#238#225#251#242#232#229' '#185' 2'#10'ImageIndex'#2#2
+#9'OnExecute'#7#14'Action1Execute'#0#0#7'TAction'#8'actPrior'#7'Caption'#6#5
+'Prior'#4'Hint'#6#11#209#238#225#251#242#232#229' '#185' 3'#10'ImageIndex'#2
+#1#9'OnExecute'#7#14'Action1Execute'#0#0#7'TAction'#9'actCustom'#7'Caption'#6
+#6'Custom'#4'Hint'#6#29#205#224#241#242#240#238#233#234#224' '#239#224#237
+#229#235#232' '#232#237#241#242#240#243#236#229#237#242#238#226#10'ImageInde'
+'x'#2#0#9'OnExecute'#7#16'actCustomExecute'#0#0#7'TAction'#7'actExit'#7'Capt'
+'ion'#6#4'Exit'#10'ImageIndex'#2#5#9'OnExecute'#7#14'actExitExecute'#8'Short'
+'Cut'#4'X'#128#0#0#0#0#7'TAction'#10'actSysMenu'#7'Caption'#6#6'System'#10'I'
+'mageIndex'#2#4#3'Tag'#2#4#0#0#7'TAction'#8'sysAbout'#7'Caption'#6#5'About'
+#10'ImageIndex'#2#6#9'OnExecute'#7#15'sysAboutExecute'#8'Category'#6#6'Syste'
+'m'#0#0#0#15'TXMLPropStorage'#15'XMLPropStorage1'#12'StoredValues'#14#0#8'Fi'
+'leName'#6#15'toolbardemo.cfg'#4'left'#3#216#0#3'top'#2'X'#0#0#10'TPopupMenu'
+#10'PopupMenu1'#4'left'#2'`'#3'top'#2#8#0#9'TMenuItem'#9'MenuItem1'#6'Action'
+#7#6'actNew'#7'OnClick'#7#14'Action1Execute'#0#0#9'TMenuItem'#9'MenuItem2'#7
+'Caption'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem4'#6'Action'#7#7'actNext'#7'OnCl'
+'ick'#7#14'Action1Execute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7#8'actPr'
+'ior'#7'OnClick'#7#14'Action1Execute'#0#0#9'TMenuItem'#9'MenuItem8'#7'Captio'
+'n'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem9'#6'Action'#7#9'actCustom'#0#0#9'TMen'
+'uItem'#9'MenuItem7'#6'Action'#7#8'sysAbout'#0#0#9'TMenuItem'#9'MenuItem6'#7
+'Caption'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem5'#6'Action'#7#7'actExit'#7'OnCl'
+'ick'#7#14'actExitExecute'#0#0#0#10'TRxAppIcon'#10'RxAppIcon1'#4'left'#3#216
+#0#3'top'#3#128#0#4'Data'#10#190#8#0#0#0#0#1#0#1#0' '#0#0#1#0#8#0#168#8#0#0
+#22#0#0#0'('#0#0#0' '#0#0#0'@'#0#0#0#1#0#8#0#0#0#0#0#128#4#0#0#0#0#0#0#0#0#0
+#0#0#1#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0
+#128#0#128#128#0#0#192#192#192#0#192#220#192#0#240#202#166#0#212#240#255#0
+#177#226#255#0#142#212#255#0'k'#198#255#0'H'#184#255#0'%'#170#255#0#0#170#255
+#0#0#146#220#0#0'z'#185#0#0'b'#150#0#0'Js'#0#0'2P'#0#212#227#255#0#177#199
+#255#0#142#171#255#0'k'#143#255#0'Hs'#255#0'%W'#255#0#0'U'#255#0#0'I'#220#0#0
+'='#185#0#0'1'#150#0#0'%s'#0#0#25'P'#0#212#212#255#0#177#177#255#0#142#142
+#255#0'kk'#255#0'HH'#255#0'%%'#255#0#0#0#254#0#0#0#220#0#0#0#185#0#0#0#150#0
+#0#0's'#0#0#0'P'#0#227#212#255#0#199#177#255#0#171#142#255#0#143'k'#255#0'sH'
+#255#0'W%'#255#0'U'#0#255#0'I'#0#220#0'='#0#185#0'1'#0#150#0'%'#0's'#0#25#0
+'P'#0#240#212#255#0#226#177#255#0#212#142#255#0#198'k'#255#0#184'H'#255#0#170
+'%'#255#0#170#0#255#0#146#0#220#0'z'#0#185#0'b'#0#150#0'J'#0's'#0'2'#0'P'#0
+#255#212#255#0#255#177#255#0#255#142#255#0#255'k'#255#0#255'H'#255#0#255'%'
+#255#0#254#0#254#0#220#0#220#0#185#0#185#0#150#0#150#0's'#0's'#0'P'#0'P'#0
+#255#212#240#0#255#177#226#0#255#142#212#0#255'k'#198#0#255'H'#184#0#255'%'
+#170#0#255#0#170#0#220#0#146#0#185#0'z'#0#150#0'b'#0's'#0'J'#0'P'#0'2'#0#255
+#212#227#0#255#177#199#0#255#142#171#0#255'k'#143#0#255'Hs'#0#255'%W'#0#255#0
+'U'#0#220#0'I'#0#185#0'='#0#150#0'1'#0's'#0'%'#0'P'#0#25#0#255#212#212#0#255
+#177#177#0#255#142#142#0#255'kk'#0#255'HH'#0#255'%%'#0#254#0#0#0#220#0#0#0
+#185#0#0#0#150#0#0#0's'#0#0#0'P'#0#0#0#255#227#212#0#255#199#177#0#255#171
+#142#0#255#143'k'#0#255'sH'#0#255'W%'#0#255'U'#0#0#220'I'#0#0#185'='#0#0#150
+'1'#0#0's%'#0#0'P'#25#0#0#255#240#212#0#255#226#177#0#255#212#142#0#255#198
+'k'#0#255#184'H'#0#255#170'%'#0#255#170#0#0#220#146#0#0#185'z'#0#0#150'b'#0#0
+'sJ'#0#0'P2'#0#0#255#255#212#0#255#255#177#0#255#255#142#0#255#255'k'#0#255
+#255'H'#0#255#255'%'#0#254#254#0#0#220#220#0#0#185#185#0#0#150#150#0#0'ss'#0
,#0'PP'#0#0#240#255#212#0#226#255#177#0#212#255#142#0#198#255'k'#0#184#255'H'
+#0#170#255'%'#0#170#255#0#0#146#220#0#0'z'#185#0#0'b'#150#0#0'Js'#0#0'2P'#0#0
+#227#255#212#0#199#255#177#0#171#255#142#0#143#255'k'#0's'#255'H'#0'W'#255'%'
+#0'U'#255#0#0'I'#220#0#0'='#185#0#0'1'#150#0#0'%s'#0#0#25'P'#0#0#212#255#212
+#0#177#255#177#0#142#255#142#0'k'#255'k'#0'H'#255'H'#0'%'#255'%'#0#0#254#0#0
+#0#220#0#0#0#185#0#0#0#150#0#0#0's'#0#0#0'P'#0#0#212#255#227#0#177#255#199#0
+#142#255#171#0'k'#255#143#0'H'#255's'#0'%'#255'W'#0#0#255'U'#0#0#220'I'#0#0
+#185'='#0#0#150'1'#0#0's%'#0#0'P'#25#0#212#255#240#0#177#255#226#0#142#255
+#212#0'k'#255#198#0'H'#255#184#0'%'#255#170#0#0#255#170#0#0#220#146#0#0#185
+'z'#0#0#150'b'#0#0'sJ'#0#0'P2'#0#212#255#255#0#177#255#255#0#142#255#255#0'k'
+#255#255#0'H'#255#255#0'%'#255#255#0#0#254#254#0#0#220#220#0#0#185#185#0#0
+#150#150#0#0'ss'#0#0'PP'#0#242#242#242#0#230#230#230#0#218#218#218#0#206#206
+#206#0#194#194#194#0#182#182#182#0#170#170#170#0#158#158#158#0#146#146#146#0
+#134#134#134#0'zzz'#0'nnn'#0'bbb'#0'VVV'#0'JJJ'#0'>>>'#0'222'#0'&&&'#0#26#26
+#26#0#14#14#14#0#240#251#255#0#164#160#160#0#128#128#128#0#0#0#255#0#0#255#0
+#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#0#0#0#0#0#0#0
+#0#0#0#0#19#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#19
+#217#19#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#19#217#217
+#217#19#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#239#239#239#239#239#239#239#239
+#19#217#217#217#217#217#19#239#239#239#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239#231
+#231#231#231#231#232#19#217#217#217#217'r'#217#217#19#231#231#239#0#0#0#0#0#0
+#0#0#0#0#0#0#0#239#226#226#228#232#232#19#217#217'r'#217#217#217'r'#217#217
+#19#231#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239#226#228#231#232#19#217#217#217#217
+'r'#217#217#217'r'#217#217#19#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239#228#231#232
+#19#217#217#217#217#217#217#217#217#217#217'r'#217#217#19#0#0#0#0#0#0#0#0#0#0
+#0#0#0#239#226#228#19#217#217#217#217'r'#217#217#217'r'#217#217#217'r'#217
+#217#19#0#0#0#0#0#0#0#0#0#0#0#0#239#226#19#217#217'r'#217#217#217'r'#217#217
+#217'r'#217#217#217'r'#217#217#19#0#0#0#0#0#0#0#0#0#0#0#239#19#217#217#217
+#217'r'#217#217#217'r'#217#217#217#217#217#217#217#217#19#0#0#0#0#0#0#0#0#0#0
+#0#0#239#226#19#217#217#217#217'r'#217#217#217#217#0#0#0#217#217#217#19#0#0#0
+#0#0#0#0#0#0#0#0#0#0#239#226#226#19#217#217#217#217'r'#217#217#0#149#149#149
+#0#217#19#239#0#0#0#0#0#149#149#149#0#0#0#0#0#239#226#226#226#19#217#217#217
+#217#217#0#145#145#0#145#149#0#232#239#0#0#0#0#9#9#9#9#149#0#0#0#0#239#226
+#226#226#226#19#217#217#217#0#9#145#145#145#0#145#149#0#239#0#0#0#9#145#9#9#9
+#9#149#0#0#0#239#226#226'mmm'#19#217#217#0#9#145#145#145#145#0#149#0#0#0#0#0
+#9#145#9#9#9#9#149#0#0#0#239#226#226#226#226#226#226#19#217#0#9#145#0#145#145
+#145#149#0#239#0#0#0#9#145#9#9#9#9#149#0#0#0#239#226#226#226#226#226#226#226
+#19#217#0#9#145#145#145#145#0#231#239#0#0#0#0#9#145#145#145#9#0#0#0#0#239#226
+#226'm'#226'mmmm'#19#217#0#9#9#9#0#226#231#239#0#0#0#0#0#9#9#9#0#0#0#0#0#239
+#226#226#226#226#226#226#226#226#226#19#226#0#0#0#226#226#231#239#0#0#0#0#0#0
+#0#0#0#0#0#0#0#239#226#226#226#226#226#226#226#226#226#226#226#226#226#226
+#226#226#231#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239#226#226#226#226#226#226#226
+#226#226#226#226#226#226#226#226#226#231#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239
+#226#226#226#226#226#226#226#226#226#239#226#226#226#226#226#226#231#239#0#0
+#0#0#0#0#0#0#0#0#0#0#0#239#226#226#226#226'*'#232#232#226#239#226#226#226#226
+#226#226#226#231#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239#226#226#226#226'**'#232
+#239#232#226#226#226#226#226#226#226#231#239#0#0#0#0#0#0#0#0#0#0#0#0#0#239
+#226#226#226#226'*%*'#232#232#232#226#226#226#226#226#226#231#239#0#0#0#0#0#0
+#0#0#0#0#0#0#0#239#239#239#239'*%%%*'#239#239#239#0#0#0#0#0#0#239#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0'*%%%***'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+'**%%%*'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'*%%*'#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'**'#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'*'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#255#239#255#254#255#199#255#254#255#131#255#254#0#0#31
+#254#0#0#31#254#0#0#31#254#0#0#31#254#0#0#31#254#0#0#15#254#0#0#7#254#0#0#15
+#254#0#0#31#30#0#0#30#14#0#0#28#6#0#0#24#2#0#0#16#0#0#0#8#3#0#0#28#7#0#0#30
+#15#0#0#31#31#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31
+#255#0#0#31#255#224'?'#255#255#129#255#255#255#195#255#255#255#231#255#255
+#255#247#255#255#255#0#0#0
]);

View File

@ -0,0 +1,86 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, StdCtrls, DBGrids, rxtoolbar, ActnList, XMLPropStorage,
IniPropStorage, Menus, RxAppIcon;
type
{ TMainForm }
TMainForm = class(TForm)
actExit: TAction;
actSysMenu: TAction;
MenuItem6: TMenuItem;
MenuItem7: TMenuItem;
sysAbout: TAction;
actNew: TAction;
actNext: TAction;
actPrior: TAction;
actCustom: TAction;
ActionList1: TActionList;
ImageList1: TImageList;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
PopupMenu1: TPopupMenu;
RxAppIcon1: TRxAppIcon;
SpeedButton2: TSpeedButton;
ToolPanel1: TToolPanel;
XMLPropStorage1: TXMLPropStorage;
procedure Action1Execute(Sender: TObject);
procedure actCustomExecute(Sender: TObject);
procedure actExitExecute(Sender: TObject);
procedure sysAboutExecute(Sender: TObject);
private
//
public
{ public declarations }
end;
var
MainForm: TMainForm;
implementation
uses AboutUnit;
{ TMainForm }
procedure TMainForm.Action1Execute(Sender: TObject);
begin
ShowMessage('Hi');
end;
procedure TMainForm.actCustomExecute(Sender: TObject);
begin
ToolPanel1.Customize(0);
end;
procedure TMainForm.actExitExecute(Sender: TObject);
begin
Close;
end;
procedure TMainForm.sysAboutExecute(Sender: TObject);
begin
AboutForm:=TAboutForm.Create(Application);
AboutForm.ShowModal;
AboutForm.Free;
end;
initialization
{$I unit1.lrs}
end.

BIN
components/rx/WindowsXP.RES Normal file

Binary file not shown.

BIN
components/rx/WindowsXP.or Normal file

Binary file not shown.

304
components/rx/boxprocs.pas Normal file
View File

@ -0,0 +1,304 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995 AO ROSNO }
{ Copyright (c) 1997, 1998 Master-Bank }
{ }
{*******************************************************}
unit boxprocs;
{$I rx.inc}
interface
uses Classes, Controls, StdCtrls;
const
LB_ERR = -1;
procedure BoxMoveSelectedItems(SrcList, DstList: TWinControl);
procedure BoxMoveAllItems(SrcList, DstList: TWinControl);
procedure BoxDragOver(List: TWinControl; Source: TObject;
X, Y: Integer; State: TDragState; var Accept: Boolean; Sorted: Boolean);
procedure BoxMoveFocusedItem(List: TWinControl; DstIndex: Integer);
procedure BoxMoveSelected(List: TWinControl; Items: TStrings);
procedure BoxSetItem(List: TWinControl; Index: Integer);
function BoxGetFirstSelection(List: TWinControl): Integer;
function BoxCanDropItem(List: TWinControl; X, Y: Integer;
var DragIndex: Integer): Boolean;
implementation
uses LCLIntf, Graphics;
function BoxItems(List: TWinControl): TStrings;
begin
if List is TCustomListBox then
Result := TCustomListBox(List).Items
{ else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).Items}
else Result := nil;
end;
function BoxGetSelected(List: TWinControl; Index: Integer): Boolean;
begin
if List is TCustomListBox then
begin
if TCustomListBox(List).MultiSelect then
Result := TCustomListBox(List).Selected[Index]
else
Result := TCustomListBox(List).ItemIndex = Index
end
{ else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).Selected[Index]}
else Result := False;
end;
procedure BoxSetSelected(List: TWinControl; Index: Integer; Value: Boolean);
begin
if List is TCustomListBox then
TCustomListBox(List).Selected[Index] := Value
{ else if List is TRxCustomListBox then
TRxCustomListBox(List).Selected[Index] := Value;}
end;
function BoxGetItemIndex(List: TWinControl): Integer;
begin
if List is TCustomListBox then
Result := TCustomListBox(List).ItemIndex
{ else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).ItemIndex}
else Result := -1;
end;
{$IFNDEF WIN32}
{function BoxGetCanvas(List: TWinControl): TCanvas;
begin
if List is TCustomListBox then
Result := TCustomListBox(List).Canvas
else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).Canvas
else Result := nil;
end;
}
{$ENDIF}
procedure BoxSetItemIndex(List: TWinControl; Index: Integer);
begin
if List is TCustomListBox then
TCustomListBox(List).ItemIndex := Index
{ else if List is TRxCustomListBox then
TRxCustomListBox(List).ItemIndex := Index;}
end;
function BoxMultiSelect(List: TWinControl): Boolean;
begin
if List is TCustomListBox then
Result := TListBox(List).MultiSelect
{ else if List is TRxCustomListBox then
Result := TRxCheckListBox(List).MultiSelect}
else Result := False;
end;
function BoxSelCount(List: TWinControl): Integer;
begin
if List is TCustomListBox then
Result := TCustomListBox(List).SelCount
{ else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).SelCount}
else Result := 0;
end;
function BoxItemAtPos(List: TWinControl; Pos: TPoint;
Existing: Boolean): Integer;
begin
if List is TCustomListBox then
Result := TCustomListBox(List).ItemAtPos(Pos, Existing)
{ else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).ItemAtPos(Pos, Existing)}
else Result := LB_ERR;
end;
function BoxItemRect(List: TWinControl; Index: Integer): TRect;
begin
if List is TCustomListBox then
Result := TCustomListBox(List).ItemRect(Index)
{ else if List is TRxCustomListBox then
Result := TRxCustomListBox(List).ItemRect(Index)}
else FillChar(Result, SizeOf(Result), 0);
end;
procedure BoxMoveSelected(List: TWinControl; Items: TStrings);
var
I: Integer;
begin
if BoxItems(List) = nil then Exit;
I := 0;
while I < BoxItems(List).Count do begin
if BoxGetSelected(List, I) then begin
Items.AddObject(BoxItems(List).Strings[I], BoxItems(List).Objects[I]);
BoxItems(List).Delete(I);
end
else Inc(I);
end;
end;
function BoxGetFirstSelection(List: TWinControl): Integer;
var
I: Integer;
begin
Result := LB_ERR;
if BoxItems(List) = nil then Exit;
for I := 0 to BoxItems(List).Count - 1 do begin
if BoxGetSelected(List, I) then begin
Result := I;
Exit;
end;
end;
Result := LB_ERR;
end;
procedure BoxSetItem(List: TWinControl; Index: Integer);
var
MaxIndex: Integer;
begin
if BoxItems(List) = nil then Exit;
with List do begin
if CanFocus then SetFocus;
MaxIndex := BoxItems(List).Count - 1;
if Index = LB_ERR then Index := 0
else if Index > MaxIndex then Index := MaxIndex;
if Index >= 0 then begin
if BoxMultiSelect(List) then BoxSetSelected(List, Index, True)
else BoxSetItemIndex(List, Index);
end;
end;
end;
procedure BoxMoveSelectedItems(SrcList, DstList: TWinControl);
var
Index, I, NewIndex: Integer;
begin
Index := BoxGetFirstSelection(SrcList);
if Index <> LB_ERR then
begin
BoxItems(SrcList).BeginUpdate;
BoxItems(DstList).BeginUpdate;
try
I := 0;
while I < BoxItems(SrcList).Count do
begin
if BoxGetSelected(SrcList, I) then
begin
NewIndex := BoxItems(DstList).AddObject(BoxItems(SrcList).Strings[I],
BoxItems(SrcList).Objects[I]);
{ if (SrcList is TRxCheckListBox) and (DstList is TRxCheckListBox) then
begin
TRxCheckListBox(DstList).State[NewIndex] :=
TRxCheckListBox(SrcList).State[I];
end;}
BoxItems(SrcList).Delete(I);
end
else Inc(I);
end;
BoxSetItem(SrcList, Index);
finally
BoxItems(SrcList).EndUpdate;
BoxItems(DstList).EndUpdate;
end;
end;
end;
procedure BoxMoveAllItems(SrcList, DstList: TWinControl);
var
I, NewIndex: Integer;
begin
for I := 0 to BoxItems(SrcList).Count - 1 do begin
NewIndex := BoxItems(DstList).AddObject(BoxItems(SrcList)[I],
BoxItems(SrcList).Objects[I]);
{ if (SrcList is TRxCheckListBox) and (DstList is TRxCheckListBox) then
begin
TRxCheckListBox(DstList).State[NewIndex] :=
TRxCheckListBox(SrcList).State[I];
end;}
end;
BoxItems(SrcList).Clear;
BoxSetItem(SrcList, 0);
end;
function BoxCanDropItem(List: TWinControl; X, Y: Integer;
var DragIndex: Integer): Boolean;
var
Focused: Integer;
begin
Result := False;
{ if (BoxSelCount(List) = 1) or (not BoxMultiSelect(List)) then begin
Focused := BoxGetItemIndex(List);
if Focused <> LB_ERR then begin
DragIndex := BoxItemAtPos(List, Point(X, Y), True);
if (DragIndex >= 0) and (DragIndex <> Focused) then begin
Result := True;
end;
end;
end;}
end;
procedure BoxDragOver(List: TWinControl; Source: TObject;
X, Y: Integer; State: TDragState; var Accept: Boolean; Sorted: Boolean);
var
DragIndex: Integer;
R: TRect;
(*
procedure DrawItemFocusRect(Idx: Integer);
{$IFDEF WIN32}
var
P: TPoint;
DC: HDC;
{$ENDIF}
begin
R := BoxItemRect(List, Idx);
{$IFDEF WIN32}
P := List.ClientToScreen(R.TopLeft);
R := Bounds(P.X, P.Y, R.Right - R.Left, R.Bottom - R.Top);
DC := GetDC(0);
DrawFocusRect(DC, R);
ReleaseDC(0, DC);
{$ELSE}
BoxGetCanvas(List).DrawFocusRect(R);
{$ENDIF}
end;
*)
begin
{ if Source <> List then
Accept := (Source is TWinControl) or (Source is TRxCustomListBox)
else begin
if Sorted then Accept := False
else begin
Accept := BoxCanDropItem(List, X, Y, DragIndex);
if ((List.Tag - 1) = DragIndex) and (DragIndex >= 0) then begin
if State = dsDragLeave then begin
DrawItemFocusRect(List.Tag - 1);
List.Tag := 0;
end;
end
else begin
if List.Tag > 0 then DrawItemFocusRect(List.Tag - 1);
if DragIndex >= 0 then DrawItemFocusRect(DragIndex);
List.Tag := DragIndex + 1;
end;
end;
end;}
end;
procedure BoxMoveFocusedItem(List: TWinControl; DstIndex: Integer);
begin
if (DstIndex >= 0) and (DstIndex < BoxItems(List).Count) then
if (DstIndex <> BoxGetItemIndex(List)) then begin
BoxItems(List).Move(BoxGetItemIndex(List), DstIndex);
BoxSetItem(List, DstIndex);
end;
end;
end.

695
components/rx/curredit.pas Normal file
View File

@ -0,0 +1,695 @@
unit curredit;
{$I rx.inc}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
LMessages, MaskEdit;
type
{ TCustomNumEdit }
TCustomNumEdit = class(TCustomMaskEdit)
private
FCanvas: TControlCanvas;
FAlignment: TAlignment;
FBeepOnError: Boolean;
FCheckOnExit: Boolean;
FDecimalPlaces: Cardinal;
FDisplayFormat: string;
FFormatOnEditing: Boolean;
FFormatting: Boolean;
FMaxValue: Extended;
FMinValue: Extended;
FValue: Extended;
FFocused: Boolean;
FZeroEmpty: Boolean;
function GetAsInteger: Longint;
function GetText: string;
function GetValue: Extended;
function IsFormatStored: boolean;
procedure SetAlignment(const AValue: TAlignment);
procedure SetAsInteger(const AValue: Longint);
procedure SetBeepOnError(const AValue: Boolean);
procedure SetDecimalPlaces(const AValue: Cardinal);
procedure SetDisplayFormat(const AValue: string);
procedure SetFormatOnEditing(const AValue: Boolean);
procedure SetMaxValue(const AValue: Extended);
procedure SetMinValue(const AValue: Extended);
procedure SetText(const AValue: string);
procedure SetValue(const AValue: Extended);
procedure SetZeroEmpty(const AValue: Boolean);
function TextToValText(const AValue: string): string;
function CheckValue(NewValue: Extended; RaiseOnError: Boolean): Extended;
procedure SetFocused(aValue: Boolean);
protected
//messages
procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED;
procedure CMEnter(var Message: TLMEnter); message LM_ENTER;
procedure WMExit(var Message: TLMExit); message LM_EXIT;
procedure CMFontChanged(var Message: TLMessage); message CM_FONTCHANGED;
procedure WMPaint(var Message: TLMPaint); message LM_PAINT;
procedure WMPaste(var Message: TLMessage); message LM_PASTEFROMCLIP;
procedure GetSel(var ASelStart: Integer; var SelStop: Integer);
procedure DoEnter; override;
procedure DoExit; override;
// procedure AcceptValue(const Value: Variant); override;
procedure Change; override;
procedure ReformatEditText; dynamic;
procedure DataChanged; virtual;
function DefaultDisplayFormat: string; virtual;
procedure KeyPress(var Key: Char); override;
function IsValidChar(Key: Char): Boolean; virtual;
function FormatDisplayText(aValue: Extended): string;
function GetDisplayText: string; virtual;
procedure Reset; override;
procedure CheckRange;
procedure UpdateData;
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
property Formatting: Boolean read FFormatting;
property BeepOnError: Boolean read FBeepOnError write SetBeepOnError
default True;
property CheckOnExit: Boolean read FCheckOnExit write FCheckOnExit default False;
property DecimalPlaces: Cardinal read FDecimalPlaces write SetDecimalPlaces
default 2;
property DisplayFormat: string read FDisplayFormat write SetDisplayFormat stored IsFormatStored;
property MaxValue: Extended read FMaxValue write SetMaxValue;
property MinValue: Extended read FMinValue write SetMinValue;
property FormatOnEditing: Boolean read FFormatOnEditing
write SetFormatOnEditing default False;
property Text: string read GetText write SetText stored False;
property MaxLength default 0;
property ZeroEmpty: Boolean read FZeroEmpty write SetZeroEmpty default True;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Clear;
property AsInteger: Longint read GetAsInteger write SetAsInteger;
property DisplayText: string read GetDisplayText;
property Value: Extended read GetValue write SetValue;
published
{ Published declarations }
end;
{ TCurrencyEdit }
TCurrencyEdit = class(TCustomNumEdit)
protected
function DefaultDisplayFormat: string; override;
public
constructor Create(AOwner: TComponent); override;
published
property Alignment;
// property AutoSelect;
property AutoSize;
property BeepOnError;
property BorderStyle;
property CheckOnExit;
property Color;
property Ctl3D;
property DecimalPlaces;
property DisplayFormat;
property DragCursor;
property DragMode;
property Enabled;
property Font;
property FormatOnEditing;
// property HideSelection;
{.$IFDEF RX_D4}
property Anchors;
// property BiDiMode;
property Constraints;
property DragKind;
// property ParentBiDiMode;
{.$ENDIF}
{$IFDEF WIN32}
{$IFNDEF VER90}
// property ImeMode;
// property ImeName;
{$ENDIF}
{$ENDIF}
property MaxLength;
property MaxValue;
property MinValue;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Value;
property Visible;
property ZeroEmpty;
property OnChange;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
{$IFDEF RX_D5}
property OnContextPopup;
{$ENDIF}
{$IFDEF WIN32}
property OnStartDrag;
{$ENDIF}
{$IFDEF RX_D4}
property OnEndDock;
property OnStartDock;
{$ENDIF}
end;
implementation
uses rxstrutils, Math, tooledit;
function IsValidFloat(const Value: string; var RetValue: Extended): Boolean;
var
I: Integer;
Buffer: array[0..63] of Char;
begin
Result := False;
for I := 1 to Length(Value) do
if not (Value[I] in [DecimalSeparator, '-', '+', '0'..'9', 'e', 'E']) then
Exit;
Result := TextToFloat(StrPLCopy(Buffer, Value,
SizeOf(Buffer) - 1), RetValue, fvExtended);
end;
function FormatFloatStr(const S: string; Thousands: Boolean): string;
var
I, MaxSym, MinSym, Group: Integer;
IsSign: Boolean;
begin
Result := '';
MaxSym := Length(S);
IsSign := (MaxSym > 0) and (S[1] in ['-', '+']);
if IsSign then MinSym := 2
else MinSym := 1;
I := Pos(DecimalSeparator, S);
if I > 0 then MaxSym := I - 1;
I := Pos('E', AnsiUpperCase(S));
if I > 0 then MaxSym := Min(I - 1, MaxSym);
Result := Copy(S, MaxSym + 1, MaxInt);
Group := 0;
for I := MaxSym downto MinSym do begin
Result := S[I] + Result;
Inc(Group);
if (Group = 3) and Thousands and (I > MinSym) then begin
Group := 0;
Result := ThousandSeparator + Result;
end;
end;
if IsSign then Result := S[1] + Result;
end;
{ TCustomNumEdit }
function TCustomNumEdit.GetAsInteger: Longint;
begin
Result := Trunc(Value);
end;
function TCustomNumEdit.GetDisplayText: string;
begin
Result := FormatDisplayText(FValue);
end;
procedure TCustomNumEdit.Reset;
begin
DataChanged;
SelectAll;
end;
procedure TCustomNumEdit.CheckRange;
begin
if not (csDesigning in ComponentState) and CheckOnExit then
CheckValue(StrToFloat(TextToValText(EditText)), True);
end;
procedure TCustomNumEdit.UpdateData;
begin
ValidateEdit;
FValue := CheckValue(StrToFloat(TextToValText(EditText)), False);
end;
constructor TCustomNumEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := ControlStyle - [csSetCaption];
MaxLength := 0;
FBeepOnError := True;
FAlignment := taRightJustify;
FDisplayFormat := DefaultDisplayFormat;
FDecimalPlaces := 2;
FZeroEmpty := True;
// inherited Text := '';
// inherited Alignment := taLeftJustify;
// FDefNumGlyphs := 2;
{ forces update }
DataChanged;
ControlState := ControlState + [csCreating];
end;
destructor TCustomNumEdit.Destroy;
begin
FCanvas.Free;
{ if FPopup <> nil then begin
TPopupWindow(FPopup).OnCloseUp := nil;
FPopup.Free;
FPopup := nil;
end;}
inherited Destroy;
end;
function TCustomNumEdit.GetText: string;
begin
Result := inherited Text;
end;
function TCustomNumEdit.GetValue: Extended;
begin
if not (csDesigning in ComponentState) then
try
UpdateData;
except
FValue := FMinValue;
end;
Result := FValue;
end;
function TCustomNumEdit.IsFormatStored: boolean;
begin
Result := (DisplayFormat <> DefaultDisplayFormat);
end;
procedure TCustomNumEdit.SetAlignment(const AValue: TAlignment);
begin
if FAlignment=AValue then exit;
FAlignment:=AValue;
Invalidate;
end;
procedure TCustomNumEdit.SetAsInteger(const AValue: Longint);
begin
SetValue(AValue);
end;
procedure TCustomNumEdit.SetBeepOnError(const AValue: Boolean);
begin
if FBeepOnError=AValue then exit;
FBeepOnError:=AValue;
end;
procedure TCustomNumEdit.SetDecimalPlaces(const AValue: Cardinal);
begin
if FDecimalPlaces=AValue then exit;
FDecimalPlaces:=AValue;
DataChanged;
Invalidate;
end;
procedure TCustomNumEdit.SetDisplayFormat(const AValue: string);
begin
if FDisplayFormat=AValue then exit;
FDisplayFormat:=AValue;
Invalidate;
DataChanged;
end;
procedure TCustomNumEdit.SetFormatOnEditing(const AValue: Boolean);
begin
if FFormatOnEditing=AValue then exit;
FFormatOnEditing:=AValue;
if FFormatOnEditing then
// FAlignment := AValue
else
FAlignment := taLeftJustify;
if FFormatOnEditing and FFocused then
ReformatEditText
else
if FFocused then
begin
UpdateData;
DataChanged;
end;
end;
procedure TCustomNumEdit.SetMaxValue(const AValue: Extended);
begin
if FMaxValue=AValue then exit;
FMaxValue:=AValue;
if Value > AValue then
Value:=AValue;
end;
procedure TCustomNumEdit.SetMinValue(const AValue: Extended);
begin
if FMinValue=AValue then exit;
FMinValue:=AValue;
if Value < AValue then
Value:=AValue;
end;
procedure TCustomNumEdit.SetText(const AValue: string);
begin
if not (csReading in ComponentState) then
begin
FValue := CheckValue(StrToFloat(TextToValText(AValue)), False);
DataChanged;
Invalidate;
end;
end;
procedure TCustomNumEdit.SetValue(const AValue: Extended);
begin
FValue := CheckValue(AValue, False);
DataChanged;
Invalidate;
end;
procedure TCustomNumEdit.SetZeroEmpty(const AValue: Boolean);
begin
if FZeroEmpty=AValue then exit;
FZeroEmpty:=AValue;
DataChanged;
end;
function TCustomNumEdit.TextToValText(const AValue: string): string;
begin
Result := DelRSpace(AValue);
if DecimalSeparator <> ThousandSeparator then begin
Result := DelChars(Result, ThousandSeparator);
end;
if (DecimalSeparator <> '.') and (ThousandSeparator <> '.') then
Result := ReplaceStr(Result, '.', DecimalSeparator);
if (DecimalSeparator <> ',') and (ThousandSeparator <> ',') then
Result := ReplaceStr(Result, ',', DecimalSeparator);
if Result = '' then Result := '0'
else if Result = '-' then Result := '-0';
end;
function TCustomNumEdit.CheckValue(NewValue: Extended; RaiseOnError: Boolean
): Extended;
begin
Result := NewValue;
if (FMaxValue <> FMinValue) then begin
if (FMaxValue > FMinValue) then begin
if NewValue < FMinValue then Result := FMinValue
else if NewValue > FMaxValue then Result := FMaxValue;
end
else begin
if FMaxValue = 0 then begin
if NewValue < FMinValue then Result := FMinValue;
end
else if FMinValue = 0 then begin
if NewValue > FMaxValue then Result := FMaxValue;
end;
end;
if RaiseOnError and (Result <> NewValue) then
raise ERangeError.CreateFmt(ReplaceStr('SOutOfRange %d %d %d %d', '%d', '%.*f'),
[DecimalPlaces, FMinValue, DecimalPlaces, FMaxValue]);
end;
end;
procedure TCustomNumEdit.SetFocused(aValue: Boolean);
begin
if FFocused <> aValue then
begin
FFocused := aValue;
Invalidate;
FFormatting := True;
try
DataChanged;
finally
FFormatting := False;
end;
end;
end;
procedure TCustomNumEdit.CMEnabledChanged(var Message: TLMessage);
begin
inherited;
if NewStyleControls and not FFocused then Invalidate;
end;
procedure TCustomNumEdit.CMEnter(var Message: TLMEnter);
begin
SetFocused(True);
if FFormatOnEditing then ReformatEditText;
inherited;
end;
procedure TCustomNumEdit.WMExit(var Message: TLMExit);
begin
inherited;
try
CheckRange;
UpdateData;
except
SelectAll;
if CanFocus then SetFocus;
raise;
end;
SetFocused(False);
SetCursor(0);
DoExit;
end;
procedure TCustomNumEdit.CMFontChanged(var Message: TLMessage);
begin
inherited;
Invalidate;
end;
procedure TCustomNumEdit.WMPaint(var Message: TLMPaint);
var
S: string;
begin
S := GetDisplayText;
if not PaintComboEdit(Self, S, FAlignment, FFocused {and not PopupVisible}, FCanvas, Message) then
inherited;
end;
procedure TCustomNumEdit.WMPaste(var Message: TLMessage);
var
S: string;
begin
S := EditText;
try
inherited;
UpdateData;
except
EditText := S;
SelectAll;
if CanFocus then SetFocus;
// if BeepOnError then MessageBeep(0);
end;
end;
procedure TCustomNumEdit.GetSel(var ASelStart: Integer; var SelStop: Integer);
begin
ASelStart:=SelStart;
SelStop:=SelStart + SelLength;
end;
procedure TCustomNumEdit.DoEnter;
begin
SetFocused(True);
if FFormatOnEditing then ReformatEditText;
inherited DoEnter;
end;
procedure TCustomNumEdit.DoExit;
begin
try
CheckRange;
UpdateData;
except
SelectAll;
if CanFocus then SetFocus;
raise;
end;
SetFocused(False);
SetCursor(0);
inherited DoExit;
Invalidate;
end;
{procedure TCustomNumEdit.AcceptValue(const Value: Variant);
begin
inherited AcceptValue(Value);
end;}
procedure TCustomNumEdit.Change;
begin
if not FFormatting then
begin
if FFormatOnEditing and FFocused then ReformatEditText;
inherited Change;
end;
end;
procedure TCustomNumEdit.ReformatEditText;
var
S: string;
IsEmpty: Boolean;
OldLen, ASelStart, SelStop: Integer;
begin
FFormatting := True;
try
S := inherited Text;
OldLen := Length(S);
IsEmpty := (OldLen = 0) or (S = '-');
if HandleAllocated then GetSel(ASelStart, SelStop);
if not IsEmpty then S := TextToValText(S);
S := FormatFloatStr(S, Pos(',', DisplayFormat) > 0);
inherited Text := S;
{ if HandleAllocated and (GetFocus = Handle) and not
(csDesigning in ComponentState) then
begin
Inc(ASelStart, Length(S) - OldLen);
SetCursor(ASelStart);
end;}
finally
FFormatting := False;
end;
end;
procedure TCustomNumEdit.DataChanged;
var
EditFormat: string;
begin
EditFormat := '0';
if FDecimalPlaces > 0 then
EditFormat := EditFormat + '.' + MakeStr('#', FDecimalPlaces);
if (FValue = 0.0) and FZeroEmpty then
EditText := ''
else
EditText := FormatFloat(EditFormat, FValue);
end;
function TCustomNumEdit.DefaultDisplayFormat: string;
begin
Result := ',0.##';
end;
procedure TCustomNumEdit.KeyPress(var Key: Char);
begin
{ if PopupVisible and (UpCase(Key) in ['0'..'9', DecimalSeparator, '.', ',',
'+', '-', '*', '/', '_', '=', 'C', 'R', 'Q', '%', #8, #13] -
[ThousandSeparator]) then
begin
THack(FPopup).KeyPress(Key);
Key := #0;
end;}
if Key in ['.', ','] - [ThousandSeparator] then
Key := DecimalSeparator;
inherited KeyPress(Key);
if (Key in [#32..#255]) and not IsValidChar(Key) then begin
// if BeepOnError then MessageBeep(0);
Key := #0;
end
else if Key = #27 then begin
Reset;
Key := #0;
end;
end;
function TCustomNumEdit.IsValidChar(Key: Char): Boolean;
var
S: string;
ASelStart, SelStop, DecPos: Integer;
RetValue: Extended;
begin
Result := False;
S := EditText;
GetSel(ASelStart, SelStop);
System.Delete(S, ASelStart + 1, SelStop - ASelStart);
System.Insert(Key, S, ASelStart + 1);
S := TextToValText(S);
DecPos := Pos(DecimalSeparator, S);
if (DecPos > 0) then
begin
ASelStart := Pos('E', UpperCase(S));
if (ASelStart > DecPos) then
DecPos := ASelStart - DecPos
else
DecPos := Length(S) - DecPos;
if DecPos > Integer(FDecimalPlaces) then
Exit;
end;
Result := IsValidFloat(S, RetValue);
if Result and (FMinValue >= 0) and (FMaxValue > 0) and (RetValue < 0) then
Result := False;
end;
function TCustomNumEdit.FormatDisplayText(aValue: Extended): string;
begin
if DisplayFormat <> '' then
Result := FormatFloat(DisplayFormat, aValue)
else
Result := FloatToStr(aValue);
end;
procedure TCustomNumEdit.Clear;
begin
end;
{ TCurrencyEdit }
function TCurrencyEdit.DefaultDisplayFormat: string;
var
CurrStr: string;
I: Integer;
C: Char;
begin
Result := ',0.' + MakeStr('0', CurrencyDecimals);
CurrStr := '';
for I := 1 to Length(CurrencyString) do
begin
C := CurrencyString[I];
if C in [',', '.'] then
begin
//���������������� ����� ����������� ������ � FCL - ������� FormatFloat
// CurrStr := CurrStr + '''' + C + ''''
end
else CurrStr := CurrStr + C;
end;
if Length(CurrStr) > 0 then
case CurrencyFormat of
0: Result := CurrStr + Result; { '$1' }
1: Result := Result + CurrStr; { '1$' }
2: Result := CurrStr + ' ' + Result; { '$ 1' }
3: Result := Result + ' ' + CurrStr; { '1 $' }
end;
Result := Format('%s;-%s', [Result, Result]);
end;
constructor TCurrencyEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlState := ControlState + [csCreating];
try
// ButtonWidth := 0;
finally
ControlState := ControlState - [csCreating];
end;
end;
end.

619
components/rx/dateutil.pas Normal file
View File

@ -0,0 +1,619 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995, 1996 AO ROSNO }
{ Copyright (c) 1997, 1998 Master-Bank }
{ }
{*******************************************************}
unit dateutil;
{$I rx.inc}
interface
function CurrentYear: Word;
function IsLeapYear(AYear: Integer): Boolean;
function DaysPerMonth(AYear, AMonth: Integer): Integer;
function FirstDayOfPrevMonth: TDateTime;
function LastDayOfPrevMonth: TDateTime;
function FirstDayOfNextMonth: TDateTime;
function ExtractDay(ADate: TDateTime): Word;
function ExtractMonth(ADate: TDateTime): Word;
function ExtractYear(ADate: TDateTime): Word;
function IncDate(ADate: TDateTime; Days, Months, Years: Integer): TDateTime;
function IncDay(ADate: TDateTime; Delta: Integer): TDateTime;
function IncMonth(ADate: TDateTime; Delta: Integer): TDateTime;
function IncYear(ADate: TDateTime; Delta: Integer): TDateTime;
function ValidDate(ADate: TDateTime): Boolean;
procedure DateDiff(Date1, Date2: TDateTime; var Days, Months, Years: Word);
function MonthsBetween(Date1, Date2: TDateTime): Double;
function DaysInPeriod(Date1, Date2: TDateTime): Longint;
{ Count days between Date1 and Date2 + 1, so if Date1 = Date2 result = 1 }
function DaysBetween(Date1, Date2: TDateTime): Longint;
{ The same as previous but if Date2 < Date1 result = 0 }
function IncTime(ATime: TDateTime; Hours, Minutes, Seconds, MSecs: Integer): TDateTime;
function IncHour(ATime: TDateTime; Delta: Integer): TDateTime;
function IncMinute(ATime: TDateTime; Delta: Integer): TDateTime;
function IncSecond(ATime: TDateTime; Delta: Integer): TDateTime;
function IncMSec(ATime: TDateTime; Delta: Integer): TDateTime;
function CutTime(ADate: TDateTime): TDateTime; { Set time to 00:00:00:00 }
type
TDateOrder = (doMDY, doDMY, doYMD);
TDayOfWeekName = (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
TDaysOfWeek = set of TDayOfWeekName;
{ String to date conversions }
function GetDateOrder(const DateFormat: string): TDateOrder;
function MonthFromName(const S: string; MaxLen: Byte): Byte;
function StrToDateDef(const S: string; Default: TDateTime): TDateTime;
function StrToDateFmt(const DateFormat, S: string): TDateTime;
function StrToDateFmtDef(const DateFormat, S: string; Default: TDateTime): TDateTime;
function DefDateFormat(FourDigitYear: Boolean): string;
function DefDateMask(BlanksChar: Char; FourDigitYear: Boolean): string;
{$IFDEF WIN32}
function FormatLongDate(Value: TDateTime): string;
function FormatLongDateTime(Value: TDateTime): string;
{$ENDIF}
const
DefaultDateOrder = doDMY;
{$IFDEF USE_FOUR_DIGIT_YEAR}
var
FourDigitYear: Boolean;
{$ELSE}
function FourDigitYear: Boolean;
{$ENDIF USE_FOUR_DIGIT_YEAR}
const
CenturyOffset: Byte = 60;
NullDate: TDateTime = 0;
implementation
uses SysUtils, RXStrUtils, rxdconst{, DBConsts }{$IFDEF WIN32}, Windows{$ENDIF};
function IsLeapYear(AYear: Integer): Boolean;
begin
Result := (AYear mod 4 = 0) and ((AYear mod 100 <> 0) or (AYear mod 400 = 0));
end;
function DaysPerMonth(AYear, AMonth: Integer): Integer;
const
DaysInMonth: array[1..12] of Integer =
(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
begin
Result := DaysInMonth[AMonth];
if (AMonth = 2) and IsLeapYear(AYear) then Inc(Result); { leap-year Feb is special }
end;
function FirstDayOfNextMonth: TDateTime;
var
Year, Month, Day: Word;
begin
DecodeDate(Date, Year, Month, Day);
Day := 1;
if Month < 12 then Inc(Month)
else begin
Inc(Year);
Month := 1;
end;
Result := EncodeDate(Year, Month, Day);
end;
function FirstDayOfPrevMonth: TDateTime;
var
Year, Month, Day: Word;
begin
DecodeDate(Date, Year, Month, Day);
Day := 1;
if Month > 1 then Dec(Month)
else begin
Dec(Year);
Month := 12;
end;
Result := EncodeDate(Year, Month, Day);
end;
function LastDayOfPrevMonth: TDateTime;
var
D: TDateTime;
Year, Month, Day: Word;
begin
D := FirstDayOfPrevMonth;
DecodeDate(D, Year, Month, Day);
Day := DaysPerMonth(Year, Month);
Result := EncodeDate(Year, Month, Day);
end;
function ExtractDay(ADate: TDateTime): Word;
var
M, Y: Word;
begin
DecodeDate(ADate, Y, M, Result);
end;
function ExtractMonth(ADate: TDateTime): Word;
var
D, Y: Word;
begin
DecodeDate(ADate, Y, Result, D);
end;
function ExtractYear(ADate: TDateTime): Word;
var
D, M: Word;
begin
DecodeDate(ADate, Result, M, D);
end;
function IncDate(ADate: TDateTime; Days, Months, Years: Integer): TDateTime;
var
D, M, Y: Word;
Day, Month, Year: Longint;
begin
DecodeDate(ADate, Y, M, D);
Year := Y; Month := M; Day := D;
Inc(Year, Years);
Inc(Year, Months div 12);
Inc(Month, Months mod 12);
if Month < 1 then begin
Inc(Month, 12);
Dec(Year);
end
else if Month > 12 then begin
Dec(Month, 12);
Inc(Year);
end;
if Day > DaysPerMonth(Year, Month) then Day := DaysPerMonth(Year, Month);
Result := EncodeDate(Year, Month, Day) + Days + Frac(ADate);
end;
procedure DateDiff(Date1, Date2: TDateTime; var Days, Months, Years: Word);
{ Corrected by Anatoly A. Sanko (2:450/73) }
var
DtSwap: TDateTime;
Day1, Day2, Month1, Month2, Year1, Year2: Word;
begin
if Date1 > Date2 then begin
DtSwap := Date1;
Date1 := Date2;
Date2 := DtSwap;
end;
DecodeDate(Date1, Year1, Month1, Day1);
DecodeDate(Date2, Year2, Month2, Day2);
Years := Year2 - Year1;
Months := 0;
Days := 0;
if Month2 < Month1 then begin
Inc(Months, 12);
Dec(Years);
end;
Inc(Months, Month2 - Month1);
if Day2 < Day1 then begin
Inc(Days, DaysPerMonth(Year1, Month1));
if Months = 0 then begin
Dec(Years);
Months := 11;
end
else Dec(Months);
end;
Inc(Days, Day2 - Day1);
end;
function IncDay(ADate: TDateTime; Delta: Integer): TDateTime;
begin
Result := ADate + Delta;
end;
function IncMonth(ADate: TDateTime; Delta: Integer): TDateTime;
begin
Result := IncDate(ADate, 0, Delta, 0);
end;
function IncYear(ADate: TDateTime; Delta: Integer): TDateTime;
begin
Result := IncDate(ADate, 0, 0, Delta);
end;
function MonthsBetween(Date1, Date2: TDateTime): Double;
var
D, M, Y: Word;
begin
DateDiff(Date1, Date2, D, M, Y);
Result := 12 * Y + M;
if (D > 1) and (D < 7) then Result := Result + 0.25
else if (D >= 7) and (D < 15) then Result := Result + 0.5
else if (D >= 15) and (D < 21) then Result := Result + 0.75
else if (D >= 21) then Result := Result + 1;
end;
function IsValidDate(Y, M, D: Word): Boolean;
begin
Result := (Y >= 1) and (Y <= 9999) and (M >= 1) and (M <= 12) and
(D >= 1) and (D <= DaysPerMonth(Y, M));
end;
function ValidDate(ADate: TDateTime): Boolean;
var
Year, Month, Day: Word;
begin
try
DecodeDate(ADate, Year, Month, Day);
Result := IsValidDate(Year, Month, Day);
except
Result := False;
end;
end;
function DaysInPeriod(Date1, Date2: TDateTime): Longint;
begin
if ValidDate(Date1) and ValidDate(Date2) then
Result := Abs(Trunc(Date2) - Trunc(Date1)) + 1
else Result := 0;
end;
function DaysBetween(Date1, Date2: TDateTime): Longint;
begin
Result := Trunc(Date2) - Trunc(Date1) + 1;
if Result < 0 then Result := 0;
end;
function IncTime(ATime: TDateTime; Hours, Minutes, Seconds,
MSecs: Integer): TDateTime;
begin
Result := ATime + (Hours div 24) + (((Hours mod 24) * 3600000 +
Minutes * 60000 + Seconds * 1000 + MSecs) / MSecsPerDay);
if Result < 0 then Result := Result + 1;
end;
function IncHour(ATime: TDateTime; Delta: Integer): TDateTime;
begin
Result := IncTime(ATime, Delta, 0, 0, 0);
end;
function IncMinute(ATime: TDateTime; Delta: Integer): TDateTime;
begin
Result := IncTime(ATime, 0, Delta, 0, 0);
end;
function IncSecond(ATime: TDateTime; Delta: Integer): TDateTime;
begin
Result := IncTime(ATime, 0, 0, Delta, 0);
end;
function IncMSec(ATime: TDateTime; Delta: Integer): TDateTime;
begin
Result := IncTime(ATime, 0, 0, 0, Delta);
end;
function CutTime(ADate: TDateTime): TDateTime;
begin
Result := Trunc(ADate);
end;
function CurrentYear: Word;
var
SystemTime: TSystemTime;
begin
GetLocalTime(SystemTime);
Result := SystemTime.Year;
end;
{ String to date conversions. Copied from SYSUTILS.PAS unit. }
procedure ScanBlanks(const S: string; var Pos: Integer);
var
I: Integer;
begin
I := Pos;
while (I <= Length(S)) and (S[I] = ' ') do Inc(I);
Pos := I;
end;
function ScanNumber(const S: string; MaxLength: Integer; var Pos: Integer;
var Number: Longint): Boolean;
var
I: Integer;
N: Word;
begin
Result := False;
ScanBlanks(S, Pos);
I := Pos;
N := 0;
while (I <= Length(S)) and (Longint(I - Pos) < MaxLength) and
(S[I] in ['0'..'9']) and (N < 1000) do
begin
N := N * 10 + (Ord(S[I]) - Ord('0'));
Inc(I);
end;
if I > Pos then begin
Pos := I;
Number := N;
Result := True;
end;
end;
function ScanChar(const S: string; var Pos: Integer; Ch: Char): Boolean;
begin
Result := False;
ScanBlanks(S, Pos);
if (Pos <= Length(S)) and (S[Pos] = Ch) then begin
Inc(Pos);
Result := True;
end;
end;
{$IFDEF RX_D3}
procedure ScanToNumber(const S: string; var Pos: Integer);
begin
while (Pos <= Length(S)) and not (S[Pos] in ['0'..'9']) do begin
if S[Pos] in LeadBytes then Inc(Pos);
Inc(Pos);
end;
end;
{$ENDIF}
function GetDateOrder(const DateFormat: string): TDateOrder;
var
I: Integer;
begin
Result := DefaultDateOrder;
I := 1;
while I <= Length(DateFormat) do begin
case Chr(Ord(DateFormat[I]) and $DF) of
{$IFDEF RX_D3}
'E': Result := doYMD;
{$ENDIF}
'Y': Result := doYMD;
'M': Result := doMDY;
'D': Result := doDMY;
else
Inc(I);
Continue;
end;
Exit;
end;
Result := DefaultDateOrder; { default }
end;
function ExpandYear(Year: Integer): Integer;
var
N: Longint;
begin
Result := Year;
if Result < 100 then begin
N := CurrentYear - CenturyOffset;
Inc(Result, N div 100 * 100);
if (CenturyOffset > 0) and (Result < N) then
Inc(Result, 100);
end;
end;
function ScanDate(const S, DateFormat: string; var Pos: Integer;
var Y, M, D: Integer): Boolean;
var
DateOrder: TDateOrder;
N1, N2, N3: Longint;
begin
Result := False;
Y := 0; M := 0; D := 0;
DateOrder := GetDateOrder(DateFormat);
{$IFDEF RX_D3}
if ShortDateFormat[1] = 'g' then { skip over prefix text }
ScanToNumber(S, Pos);
{$ENDIF RX_D3}
if not (ScanNumber(S, MaxInt, Pos, N1) and ScanChar(S, Pos, DateSeparator) and
ScanNumber(S, MaxInt, Pos, N2)) then Exit;
if ScanChar(S, Pos, DateSeparator) then begin
if not ScanNumber(S, MaxInt, Pos, N3) then Exit;
case DateOrder of
doMDY: begin Y := N3; M := N1; D := N2; end;
doDMY: begin Y := N3; M := N2; D := N1; end;
doYMD: begin Y := N1; M := N2; D := N3; end;
end;
Y := ExpandYear(Y);
end
else begin
Y := CurrentYear;
if DateOrder = doDMY then begin
D := N1; M := N2;
end
else begin
M := N1; D := N2;
end;
end;
ScanChar(S, Pos, DateSeparator);
ScanBlanks(S, Pos);
(*
{$IFDEF RX_D3}
if SysLocale.FarEast and (System.Pos('ddd', ShortDateFormat) <> 0) then
begin { ignore trailing text }
if ShortTimeFormat[1] in ['0'..'9'] then { stop at time digit }
ScanToNumber(S, Pos)
else { stop at time prefix }
repeat
while (Pos <= Length(S)) and (S[Pos] <> ' ') do Inc(Pos);
ScanBlanks(S, Pos);
until (Pos > Length(S)) or
(AnsiCompareText(TimeAMString, Copy(S, Pos, Length(TimeAMString))) = 0) or
(AnsiCompareText(TimePMString, Copy(S, Pos, Length(TimePMString))) = 0);
end;
{$ENDIF RX_D3}
*)
Result := IsValidDate(Y, M, D) and (Pos > Length(S));
end;
function MonthFromName(const S: string; MaxLen: Byte): Byte;
begin
if Length(S) > 0 then
for Result := 1 to 12 do begin
if (Length(LongMonthNames[Result]) > 0) and
(AnsiCompareText(Copy(S, 1, MaxLen),
Copy(LongMonthNames[Result], 1, MaxLen)) = 0) then Exit;
end;
Result := 0;
end;
procedure ExtractMask(const Format, S: string; Ch: Char; Cnt: Integer;
var I: Integer; Blank, Default: Integer);
var
Tmp: string[20];
J, L: Integer;
begin
I := Default;
Ch := UpCase(Ch);
L := Length(Format);
if Length(S) < L then L := Length(S)
else if Length(S) > L then Exit;
J := Pos(MakeStr(Ch, Cnt), AnsiUpperCase(Format));
if J <= 0 then Exit;
Tmp := '';
while (UpCase(Format[J]) = Ch) and (J <= L) do begin
if S[J] <> ' ' then Tmp := Tmp + S[J];
Inc(J);
end;
if Tmp = '' then I := Blank
else if Cnt > 1 then begin
I := MonthFromName(Tmp, Length(Tmp));
if I = 0 then I := -1;
end
else I := StrToIntDef(Tmp, -1);
end;
function ScanDateStr(const Format, S: string; var D, M, Y: Integer): Boolean;
var
Pos: Integer;
begin
ExtractMask(Format, S, 'm', 3, M, -1, 0); { short month name? }
if M = 0 then ExtractMask(Format, S, 'm', 1, M, -1, 0);
ExtractMask(Format, S, 'd', 1, D, -1, 1);
ExtractMask(Format, S, 'y', 1, Y, -1, CurrentYear);
Y := ExpandYear(Y);
Result := IsValidDate(Y, M, D);
if not Result then begin
Pos := 1;
Result := ScanDate(S, Format, Pos, Y, M, D);
end;
end;
function InternalStrToDate(const DateFormat, S: string;
var Date: TDateTime): Boolean;
var
D, M, Y: Integer;
begin
if S = '' then begin
Date := NullDate;
Result := True;
end
else begin
Result := ScanDateStr(DateFormat, S, D, M, Y);
if Result then
try
Date := EncodeDate(Y, M, D);
except
Result := False;
end;
end;
end;
function StrToDateFmt(const DateFormat, S: string): TDateTime;
begin
if not InternalStrToDate(DateFormat, S, Result) then
raise EConvertError.CreateFmt({$IFDEF RX_D3} SInvalidDate {$ELSE}
LoadStr(SInvalidDate) {$ENDIF}, [S]);
end;
function StrToDateDef(const S: string; Default: TDateTime): TDateTime;
begin
if not InternalStrToDate(ShortDateFormat, S, Result) then
Result := Trunc(Default);
end;
function StrToDateFmtDef(const DateFormat, S: string; Default: TDateTime): TDateTime;
begin
if not InternalStrToDate(DateFormat, S, Result) then
Result := Trunc(Default);
end;
function DefDateFormat(FourDigitYear: Boolean): string;
begin
if FourDigitYear then begin
case GetDateOrder(ShortDateFormat) of
doMDY: Result := 'MM/DD/YYYY';
doDMY: Result := 'DD/MM/YYYY';
doYMD: Result := 'YYYY/MM/DD';
end;
end
else begin
case GetDateOrder(ShortDateFormat) of
doMDY: Result := 'MM/DD/YY';
doDMY: Result := 'DD/MM/YY';
doYMD: Result := 'YY/MM/DD';
end;
end;
end;
function DefDateMask(BlanksChar: Char; FourDigitYear: Boolean): string;
begin
if FourDigitYear then begin
case GetDateOrder(ShortDateFormat) of
doMDY, doDMY: Result := '!99/99/9999;1;';
doYMD: Result := '!9999/99/99;1;';
end;
end
else begin
case GetDateOrder(ShortDateFormat) of
doMDY, doDMY: Result := '!99/99/99;1;';
doYMD: Result := '!99/99/99;1;';
end;
end;
if Result <> '' then Result := Result + BlanksChar;
end;
{$IFDEF WIN32}
function FormatLongDate(Value: TDateTime): string;
var
Buffer: array[0..1023] of Char;
SystemTime: TSystemTime;
begin
{$IFDEF RX_D3}
DateTimeToSystemTime(Value, SystemTime);
{$ELSE}
with SystemTime do begin
DecodeDate(Value, wYear, wMonth, wDay);
DecodeTime(Value, wHour, wMinute, wSecond, wMilliseconds);
end;
{$ENDIF}
SetString(Result, Buffer, GetDateFormat(GetThreadLocale, DATE_LONGDATE,
@SystemTime, nil, Buffer, SizeOf(Buffer) - 1));
Result := TrimRight(Result);
end;
function FormatLongDateTime(Value: TDateTime): string;
begin
if Value <> NullDate then
Result := FormatLongDate(Value) + FormatDateTime(' tt', Value)
else Result := '';
end;
{$ENDIF WIN32}
{$IFNDEF USE_FOUR_DIGIT_YEAR}
function FourDigitYear: Boolean;
begin
Result := Pos('YYYY', AnsiUpperCase(ShortDateFormat)) > 0;
end;
{$ENDIF}
{$IFDEF USE_FOUR_DIGIT_YEAR}
initialization
FourDigitYear := Pos('YYYY', AnsiUpperCase(ShortDateFormat)) > 0;
{$ENDIF}
end.

View File

@ -0,0 +1,443 @@
unit dbdateedit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, LMessages, LCLType, Controls, Graphics,
DB, DbCtrls, EditBtn, CurrEdit;
type
{ TDBDateEdit }
TDBDateEdit = class(TDateEdit)
private
FDataLink:TFieldDataLink;
FDefaultToday: Boolean;
procedure DoCheckEnable;
function GetDataField: string;
function GetDataSource: TDataSource;
function GetReadOnly: Boolean;
procedure SetDataField(const AValue: string);
procedure SetDataSource(const AValue: TDataSource);
procedure SetReadOnly(const AValue: Boolean);
protected
procedure ActiveChange(Sender:TObject);
procedure DataChange(Sender:TObject);
procedure EditingChange(Sender: TObject);
procedure UpdateData(Sender:TObject);
procedure CMExit(var Message:TLMessage); message CM_EXIT;
procedure LMCut(var Message: TLMessage); message LM_CUTTOCLIP;
procedure LMPaste(var Message: TLMessage); message LM_PASTEFROMCLIP;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure Change; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure EditingDone; override;
Procedure RunDialog; virtual;
procedure DoButtonClick (Sender: TObject); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property DataField: string read GetDataField write SetDataField;
property DataSource: TDataSource read GetDataSource write SetDataSource;
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
property DefaultToday: Boolean read FDefaultToday write FDefaultToday
default False;
end;
{ TRxDBCalcEdit }
TRxDBCalcEdit = class(TCalcEdit)
private
FDataLink: TFieldDataLink;
procedure DoCheckEnable;
function GetDataField: string;
function GetDataSource: TDataSource;
function GetReadOnly: Boolean;
procedure SetDataField(const AValue: string);
procedure SetDataSource(const AValue: TDataSource);
procedure SetReadOnly(const AValue: Boolean);
protected
procedure ActiveChange(Sender:TObject);
procedure DataChange(Sender:TObject);
procedure EditingChange(Sender: TObject);
procedure UpdateData(Sender:TObject);
procedure CMExit(var Message:TLMessage); message CM_EXIT;
procedure LMCut(var Message: TLMessage); message LM_CUTTOCLIP;
procedure LMPaste(var Message: TLMessage); message LM_PASTEFROMCLIP;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure Change; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure EditingDone; override;
Procedure RunDialog; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property DataField: string read GetDataField write SetDataField;
property DataSource: TDataSource read GetDataSource write SetDataSource;
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
end;
implementation
uses DateUtil;
{ TDBDateEdit }
procedure TDBDateEdit.DoCheckEnable;
begin
Enabled:=FDataLink.Active and (FDataLink.Field<>nil) and (not FDataLink.Field.ReadOnly);
end;
function TDBDateEdit.GetDataField: string;
begin
Result:=FDataLink.FieldName;
end;
function TDBDateEdit.GetDataSource: TDataSource;
begin
Result:=FDataLink.DataSource;
end;
function TDBDateEdit.GetReadOnly: Boolean;
begin
Result:=FDataLink.ReadOnly;
end;
procedure TDBDateEdit.SetDataField(const AValue: string);
begin
try
FDataLink.FieldName:=AValue;
finally
DoCheckEnable;
end;
end;
procedure TDBDateEdit.SetDataSource(const AValue: TDataSource);
begin
FDataLink.DataSource:=AValue;
DoCheckEnable;
end;
procedure TDBDateEdit.SetReadOnly(const AValue: Boolean);
begin
FDataLink.ReadOnly:=AValue;
end;
procedure TDBDateEdit.CMExit(var Message: TLMessage);
begin
try
FDataLink.UpdateRecord;
except
SetFocus;
SelectAll;
raise;
end;
inherited;
end;
procedure TDBDateEdit.LMCut(var Message: TLMessage);
begin
FDataLink.Edit;
inherited;
end;
procedure TDBDateEdit.LMPaste(var Message: TLMessage);
begin
FDataLink.Edit;
inherited;
end;
procedure TDBDateEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if Key=VK_ESCAPE then
begin
//cancel out of editing by reset on esc
FDataLink.Reset;
SelectAll;
Key := VK_UNKNOWN;
end
else
if (Key<>VK_UNKNOWN) then
begin
//make sure we call edit to ensure the datset is in edit,
//this is for where the datasource is in autoedit, so we aren't
//read only even though the dataset isn't realy in edit
FDataLink.Edit;
end;
end;
procedure TDBDateEdit.Change;
begin
FDataLink.Modified;
inherited Change;
end;
procedure TDBDateEdit.Notification(AComponent: TComponent; Operation: TOperation
);
begin
inherited Notification(AComponent, Operation);
// if the datasource is being removed then we need to make sure
// we are updated or we can get AV/Seg's *cough* as I foolishly
// discovered firsthand....
if (Operation=opRemove) then
begin
if (FDataLink<>nil) and (AComponent=DataSource) then
DataSource:=nil;
end;
end;
procedure TDBDateEdit.EditingDone;
begin
inherited EditingDone;
if FDataLink.CanModify then
FDataLink.UpdateRecord;
end;
procedure TDBDateEdit.RunDialog;
begin
if FDataLink.CanModify then
FDataLink.UpdateRecord;
end;
procedure TDBDateEdit.DoButtonClick(Sender: TObject);
begin
inherited DoButtonClick(Sender);
RunDialog;
end;
procedure TDBDateEdit.ActiveChange(Sender: TObject);
begin
DoCheckEnable;
end;
procedure TDBDateEdit.DataChange(Sender: TObject);
begin
if Assigned(FDataLink.Field) and
(FDataLink.Field is TDateTimeField) then
begin
if FDataLink.Field.IsNull then
Text:=''
else
Date:=FDataLink.Field.AsDateTime
end
else Text:='';
end;
procedure TDBDateEdit.EditingChange(Sender: TObject);
begin
inherited ReadOnly := not FDataLink.Editing;
if FDataLink.Editing and DefaultToday and (FDataLink.Field <> nil) and
(FDataLink.Field.AsDateTime = NullDate) then
FDataLink.Field.AsDateTime := SysUtils.Now;
end;
procedure TDBDateEdit.UpdateData(Sender: TObject);
var
D: TDateTime;
begin
if Assigned(FDataLink.Field) then
begin
D := Self.Date;
if (D <> NullDate) then
FDataLink.Field.AsDateTime := D + Frac(FDataLink.Field.AsDateTime)
else
FDataLink.Field.Clear;
end;
end;
constructor TDBDateEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FDataLink:=TFieldDataLink.Create;
FDataLink.Control:=Self;
FDataLink.OnActiveChange:=@ActiveChange;
FDataLink.OnDataChange:=@DataChange;
FDataLink.OnUpdateData:=@UpdateData;
end;
destructor TDBDateEdit.Destroy;
begin
FreeAndNil(FDataLink);
inherited Destroy;
end;
{ TRxDBCalcEdit }
procedure TRxDBCalcEdit.DoCheckEnable;
begin
Enabled:=FDataLink.Active and (FDataLink.Field<>nil) and (not FDataLink.Field.ReadOnly);
end;
function TRxDBCalcEdit.GetDataField: string;
begin
Result:=FDataLink.FieldName;
end;
function TRxDBCalcEdit.GetDataSource: TDataSource;
begin
Result:=FDataLink.DataSource;
end;
function TRxDBCalcEdit.GetReadOnly: Boolean;
begin
Result:=FDataLink.ReadOnly;
end;
procedure TRxDBCalcEdit.SetDataField(const AValue: string);
begin
try
FDataLink.FieldName:=AValue;
finally
DoCheckEnable;
end;
end;
procedure TRxDBCalcEdit.SetDataSource(const AValue: TDataSource);
begin
FDataLink.DataSource:=AValue;
DoCheckEnable;
end;
procedure TRxDBCalcEdit.SetReadOnly(const AValue: Boolean);
begin
FDataLink.ReadOnly:=AValue;
end;
procedure TRxDBCalcEdit.ActiveChange(Sender: TObject);
begin
DoCheckEnable;
end;
procedure TRxDBCalcEdit.DataChange(Sender: TObject);
begin
if Assigned(FDataLink.Field) and
(FDataLink.Field is TNumericField) then
begin
if FDataLink.Field.IsNull then
Text:=''
else
Self.AsFloat:=FDataLink.Field.AsFloat;
end
else Text:='';
end;
procedure TRxDBCalcEdit.EditingChange(Sender: TObject);
begin
inherited ReadOnly := not FDataLink.Editing;
{ if FDataLink.Editing and DefaultToday and (FDataLink.Field <> nil) and
(FDataLink.Field.AsDateTime = NullDate) then
FDataLink.Field.AsDateTime := SysUtils.Now;}
end;
procedure TRxDBCalcEdit.UpdateData(Sender: TObject);
begin
if Assigned(FDataLink.Field) then
begin
if Self.Text<>'' then
FDataLink.Field.AsFloat := Self.AsFloat
else
FDataLink.Field.Clear;
end;
end;
procedure TRxDBCalcEdit.CMExit(var Message: TLMessage);
begin
try
FDataLink.UpdateRecord;
except
SetFocus;
SelectAll;
raise;
end;
inherited;
end;
procedure TRxDBCalcEdit.LMCut(var Message: TLMessage);
begin
FDataLink.Edit;
inherited;
end;
procedure TRxDBCalcEdit.LMPaste(var Message: TLMessage);
begin
FDataLink.Edit;
inherited;
end;
procedure TRxDBCalcEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if Key=VK_ESCAPE then
begin
//cancel out of editing by reset on esc
FDataLink.Reset;
SelectAll;
Key := VK_UNKNOWN;
end
else
if (Key<>VK_UNKNOWN) then
begin
//make sure we call edit to ensure the datset is in edit,
//this is for where the datasource is in autoedit, so we aren't
//read only even though the dataset isn't realy in edit
FDataLink.Edit;
end;
end;
procedure TRxDBCalcEdit.Change;
begin
FDataLink.Modified;
inherited Change;
end;
procedure TRxDBCalcEdit.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
// if the datasource is being removed then we need to make sure
// we are updated or we can get AV/Seg's *cough* as I foolishly
// discovered firsthand....
if (Operation=opRemove) then
begin
if (FDataLink<>nil) and (AComponent=DataSource) then
DataSource:=nil;
end;
end;
procedure TRxDBCalcEdit.EditingDone;
begin
inherited EditingDone;
if FDataLink.CanModify then
FDataLink.UpdateRecord;
end;
procedure TRxDBCalcEdit.RunDialog;
begin
inherited RunDialog;
if FDataLink.CanModify then
FDataLink.UpdateRecord;
end;
constructor TRxDBCalcEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FDataLink:=TFieldDataLink.Create;
FDataLink.Control:=Self;
FDataLink.OnActiveChange:=@ActiveChange;
FDataLink.OnDataChange:=@DataChange;
FDataLink.OnUpdateData:=@UpdateData;
end;
destructor TRxDBCalcEdit.Destroy;
begin
FreeAndNil(FDataLink);
inherited Destroy;
end;
end.

890
components/rx/dbutils.pas Normal file
View File

@ -0,0 +1,890 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995, 1996 AO ROSNO }
{ Copyright (c) 1997, 1998 Master-Bank }
{ }
{*******************************************************}
unit dbutils;
{$I rx.inc}
interface
uses
LCLType, LCLProc, LCLIntf, Registry, Classes, SysUtils, DB, IniFiles;
type
{ TLocateObject }
TLocateObject = class(TObject)
private
FDataSet: TDataSet;
FLookupField: TField;
FLookupValue: string;
FLookupExact, FCaseSensitive: Boolean;
FBookmark: TBookmark;
FIndexSwitch: Boolean;
procedure SetDataSet(Value: TDataSet);
protected
function MatchesLookup(Field: TField): Boolean;
procedure CheckFieldType(Field: TField); virtual;
procedure ActiveChanged; virtual;
function LocateFilter: Boolean; virtual;
function LocateKey: Boolean; virtual;
function LocateFull: Boolean; virtual;
function UseKey: Boolean; virtual;
function FilterApplicable: Boolean; virtual;
property LookupField: TField read FLookupField;
property LookupValue: string read FLookupValue;
property LookupExact: Boolean read FLookupExact;
property CaseSensitive: Boolean read FCaseSensitive;
property Bookmark: TBookmark read FBookmark write FBookmark;
public
function Locate(const KeyField, KeyValue: string; Exact,
ACaseSensitive: Boolean): Boolean;
property DataSet: TDataSet read FDataSet write SetDataSet;
property IndexSwitch: Boolean read FIndexSwitch write FIndexSwitch;
end;
type
TCreateLocateObject = function: TLocateObject;
const
CreateLocateObject: TCreateLocateObject = nil;
function CreateLocate(DataSet: TDataSet): TLocateObject;
{ Utility routines }
function IsDataSetEmpty(DataSet: TDataSet): Boolean;
procedure RefreshQuery(Query: TDataSet);
function DataSetSortedSearch(DataSet: TDataSet; const Value,
FieldName: string; CaseInsensitive: Boolean): Boolean;
function DataSetSectionName(DataSet: TDataSet): string;
procedure InternalSaveFields(DataSet: TDataSet; IniFile: TObject;
const Section: string);
procedure InternalRestoreFields(DataSet: TDataSet; IniFile: TObject;
const Section: string; RestoreVisible: Boolean);
{procedure InternalSaveFields(DataSet: TDataSet; IniFile: TIniFile;
const Section: string);
procedure InternalRestoreFields(DataSet: TDataSet; IniFile: TObject;
const Section: string; RestoreVisible: Boolean);}
function DataSetLocateThrough(DataSet: TDataSet; const KeyFields: string;
const KeyValues: Variant; Options: TLocateOptions): Boolean;
procedure SaveFieldsReg(DataSet: TDataSet; IniFile: TRegIniFile);
procedure RestoreFieldsReg(DataSet: TDataSet; IniFile: TRegIniFile;
RestoreVisible: Boolean);
procedure SaveFields(DataSet: TDataSet; IniFile: TIniFile);
procedure RestoreFields(DataSet: TDataSet; IniFile: TIniFile;
RestoreVisible: Boolean);
procedure AssignRecord(Source, Dest: TDataSet; ByName: Boolean);
function ConfirmDelete: Boolean;
procedure ConfirmDataSetCancel(DataSet: TDataSet);
procedure CheckRequiredField(Field: TField);
procedure CheckRequiredFields(const Fields: array of TField);
function ExtractFieldName(const Fields: string; var Pos: Integer): string;
{ SQL expressions }
function DateToSQL(Value: TDateTime): string;
function FormatSQLDateRange(Date1, Date2: TDateTime;
const FieldName: string): string;
function FormatSQLDateRangeEx(Date1, Date2: TDateTime;
const FieldName: string): string;
function FormatSQLNumericRange(const FieldName: string;
LowValue, HighValue, LowEmpty, HighEmpty: Double; Inclusive: Boolean): string;
function StrMaskSQL(const Value: string): string;
function FormatSQLCondition(const FieldName, AOperator, Value: string;
FieldType: TFieldType; Exact: Boolean): string;
function FormatAnsiSQLCondition(const FieldName, AOperator, Value: string;
FieldType: TFieldType; Exact: Boolean): string;
const
TrueExpr = '0=0';
const
{ Server Date formats}
sdfStandard16 = '''"''mm''/''dd''/''yyyy''"'''; {"mm/dd/yyyy"}
sdfStandard32 = '''''''dd/mm/yyyy'''''''; {'dd/mm/yyyy'}
sdfOracle = '"TO_DATE(''"dd/mm/yyyy"'', ''DD/MM/YYYY'')"';
sdfInterbase = '"CAST(''"mm"/"dd"/"yyyy"'' AS DATE)"';
sdfMSSQL = '"CONVERT(datetime, ''"mm"/"dd"/"yyyy"'', 103)"';
const
ServerDateFmt: string[50] = sdfStandard16;
{const
ftBlobTypes = [Low(TBlobType)..High(TBlobType)];}
procedure _DBError(const Msg: string);
implementation
uses Forms, Controls, Dialogs, RXDConst, VCLUtils, FileUtil,
AppUtils, RxAppUtils, RxStrUtils, Math, DateUtil;
{ Utility routines }
procedure _DBError(const Msg: string);
begin
DatabaseError(Msg);
end;
function ConfirmDelete: Boolean;
begin
Screen.Cursor := crDefault;
Result := MessageDlg(SDeleteRecordQuestion, mtConfirmation,
[mbYes, mbNo], 0) = mrYes;
end;
procedure ConfirmDataSetCancel(DataSet: TDataSet);
begin
if DataSet.State in [dsEdit, dsInsert] then begin
DataSet.UpdateRecord;
if DataSet.Modified then begin
case MessageDlg(SConfirmSave, mtConfirmation, mbYesNoCancel, 0) of
mrYes: DataSet.Post;
mrNo: DataSet.Cancel;
else SysUtils.Abort;
end;
end
else DataSet.Cancel;
end;
end;
function SetToBookmark(ADataSet: TDataSet; ABookmark: TBookmark): Boolean;
begin
Result := False;
with ADataSet do
if Active and (ABookmark <> nil) and not (Bof and Eof) and
BookmarkValid(ABookmark) then
try
ADataSet.GotoBookmark(ABookmark);
Result := True;
except
end;
end;
{ Refresh Query procedure }
procedure RefreshQuery(Query: TDataSet);
var
BookMk: TBookmark;
begin
with Query do
begin
DisableControls;
try
if Active then
BookMk := GetBookmark
else
BookMk := nil;
try
Close;
Open;
SetToBookmark(Query, BookMk);
finally
if BookMk <> nil then
FreeBookmark(BookMk);
end;
finally
EnableControls;
end;
end;
end;
{ TLocateObject }
procedure TLocateObject.SetDataSet(Value: TDataSet);
begin
ActiveChanged;
FDataSet := Value;
end;
function TLocateObject.LocateFull: Boolean;
begin
Result := False;
with DataSet do
begin
First;
while not EOF do
begin
if MatchesLookup(FLookupField) then
begin
Result := True;
Break;
end;
Next;
end;
end;
end;
function TLocateObject.LocateKey: Boolean;
begin
Result := False;
end;
function TLocateObject.FilterApplicable: Boolean;
begin
Result := FLookupField.FieldKind in [fkData, fkInternalCalc];
end;
function TLocateObject.LocateFilter: Boolean;
var
SaveCursor: TCursor;
Options: TLocateOptions;
Value: Variant;
begin
// SaveCursor := Screen.Cursor;
// Screen.Cursor := crHourGlass;
try
Options := [];
if not FCaseSensitive then Include(Options, loCaseInsensitive);
if not FLookupExact then Include(Options, loPartialKey);
if (FLookupValue = '') then
Value:=null //VarClear(Value)
else
Value := FLookupValue;
Result := DataSet.Locate(FLookupField.FieldName, Value, Options);
finally
// Screen.Cursor := SaveCursor;
end;
end;
procedure TLocateObject.CheckFieldType(Field: TField);
begin
end;
function TLocateObject.Locate(const KeyField, KeyValue: string;
Exact, ACaseSensitive: Boolean): Boolean;
var
LookupKey: TField;
begin
if DataSet = nil then
begin
Result := False;
Exit;
end;
DataSet.CheckBrowseMode;
LookupKey := DataSet.FieldByName(KeyField);
DataSet.CursorPosChanged;
FLookupField := LookupKey;
FLookupValue := KeyValue;
FLookupExact := Exact;
FCaseSensitive := ACaseSensitive;
if FLookupField.DataType <> ftString then
begin
FCaseSensitive := True;
try
CheckFieldType(FLookupField);
except
Result := False;
Exit;
end;
end;
FBookmark := DataSet.GetBookmark;
try
DataSet.DisableControls;
try
Result := MatchesLookup(FLookupField);
if not Result then
begin
if UseKey then
Result := LocateKey
else
begin
{ if FilterApplicable then Result := LocateFilter
else} Result := LocateFull;
end;
if not Result then SetToBookmark(DataSet, FBookmark);
end;
finally
DataSet.EnableControls;
end;
finally
FLookupValue := EmptyStr;
FLookupField := nil;
DataSet.FreeBookmark(FBookmark);
FBookmark := nil;
end;
end;
function TLocateObject.UseKey: Boolean;
begin
Result := False;
end;
procedure TLocateObject.ActiveChanged;
begin
end;
function TLocateObject.MatchesLookup(Field: TField): Boolean;
var
Temp: string;
begin
Temp := Field.AsString;
if not FLookupExact then
SetLength(Temp, Min(Length(FLookupValue), Length(Temp)));
if FCaseSensitive then Result := AnsiCompareStr(Temp, FLookupValue) = 0
else Result := AnsiCompareText(Temp, FLookupValue) = 0;
end;
function CreateLocate(DataSet: TDataSet): TLocateObject;
begin
if Assigned(CreateLocateObject) then Result := CreateLocateObject()
else Result := TLocateObject.Create;
if (Result <> nil) and (DataSet <> nil) then
Result.DataSet := DataSet;
end;
{ DataSet locate routines }
function DataSetLocateThrough(DataSet: TDataSet; const KeyFields: string;
const KeyValues: Variant; Options: TLocateOptions): Boolean;
var
FieldCount: Integer;
Fields: TList;
Bookmark: TBookmarkStr;
function CompareField(Field: TField; Value: Variant): Boolean;
var
S,S1: string;
begin
if Field.DataType = ftString then
begin
S := Field.AsString;
S1:=Value;
if (loPartialKey in Options) then
Delete(S, Length(S1) + 1, MaxInt);
if (loCaseInsensitive in Options) then
Result := AnsiCompareText(S, S1) = 0
else
Result := AnsiCompareStr(S, S1) = 0;
end
// else Result := false //(Field.Value = Value);
else Result := (Field.Value = Value);
end;
function CompareRecord: Boolean;
var
I: Integer;
begin
if FieldCount = 1 then
Result := CompareField(TField(Fields.First), KeyValues)
else begin
Result := True;
for I := 0 to FieldCount - 1 do
Result := Result and CompareField(TField(Fields[I]), KeyValues[I]);
end;
end;
begin
Result := False;
with DataSet do begin
CheckBrowseMode;
if BOF and EOF then Exit;
end;
Fields := TList.Create;
try
DataSet.GetFieldList(Fields, KeyFields);
FieldCount := Fields.Count;
Result := CompareRecord;
if Result then Exit;
DataSet.DisableControls;
try
Bookmark := DataSet.Bookmark;
try
with DataSet do begin
First;
while not EOF do begin
Result := CompareRecord;
if Result then Break;
Next;
end;
end;
finally
if not Result and DataSet.BookmarkValid(PChar(Bookmark)) then
DataSet.Bookmark := Bookmark;
end;
finally
DataSet.EnableControls;
end;
finally
Fields.Free;
end;
end;
procedure SaveFields(DataSet: TDataSet; IniFile: TIniFile);
begin
InternalSaveFields(DataSet, IniFile, DataSetSectionName(DataSet));
end;
procedure RestoreFields(DataSet: TDataSet; IniFile: TIniFile;
RestoreVisible: Boolean);
begin
InternalRestoreFields(DataSet, IniFile, DataSetSectionName(DataSet),
RestoreVisible);
end;
procedure SaveFieldsReg(DataSet: TDataSet; IniFile: TRegIniFile);
begin
InternalSaveFields(DataSet, IniFile, DataSetSectionName(DataSet));
end;
procedure RestoreFieldsReg(DataSet: TDataSet; IniFile: TRegIniFile;
RestoreVisible: Boolean);
begin
InternalRestoreFields(DataSet, IniFile, DataSetSectionName(DataSet),
RestoreVisible);
end;
{ DataSetSortedSearch. Navigate on sorted DataSet routine. }
function DataSetSortedSearch(DataSet: TDataSet; const Value,
FieldName: string; CaseInsensitive: Boolean): Boolean;
var
L, H, I: Longint;
CurrentPos: Longint;
CurrentValue: string;
BookMk: TBookmark;
Field: TField;
function UpStr(const Value: string): string;
begin
if CaseInsensitive then Result := AnsiUpperCase(Value)
else Result := Value;
end;
function GetCurrentStr: string;
begin
Result := Field.AsString;
if Length(Result) > Length(Value) then
SetLength(Result, Length(Value));
Result := UpStr(Result);
end;
begin
Result := False;
if DataSet = nil then Exit;
Field := DataSet.FindField(FieldName);
if Field = nil then Exit;
if Field.DataType = ftString then begin
DataSet.DisableControls;
BookMk := DataSet.GetBookmark;
try
L := 0;
DataSet.First;
CurrentPos := 0;
H := DataSet.RecordCount - 1;
if Value <> '' then begin
while L <= H do begin
I := (L + H) shr 1;
if I <> CurrentPos then DataSet.MoveBy(I - CurrentPos);
CurrentPos := I;
CurrentValue := GetCurrentStr;
if (UpStr(Value) > CurrentValue) then
L := I + 1
else begin
H := I - 1;
if (UpStr(Value) = CurrentValue) then Result := True;
end;
end; { while }
if Result then begin
if (L <> CurrentPos) then DataSet.MoveBy(L - CurrentPos);
while (L < DataSet.RecordCount) and
(UpStr(Value) <> GetCurrentStr) do
begin
Inc(L);
DataSet.MoveBy(1);
end;
end;
end
else Result := True;
if not Result then SetToBookmark(DataSet, BookMk);
finally
DataSet.FreeBookmark(BookMk);
DataSet.EnableControls;
end;
end
else
DatabaseErrorFmt(SFieldTypeMismatch, [Field.DisplayName]);
end;
{ Save and restore DataSet Fields layout }
function DataSetSectionName(DataSet: TDataSet): string;
begin
with DataSet do
if (Owner <> nil) and (Owner is TCustomForm) then
Result := GetDefaultSection(Owner as TCustomForm)
else Result := Name;
end;
function CheckSection(DataSet: TDataSet; const Section: string): string;
begin
Result := Section;
if Result = '' then Result := DataSetSectionName(DataSet);
end;
procedure InternalSaveFields(DataSet: TDataSet; IniFile: TObject;
const Section: string);
var
I: Integer;
begin
with DataSet do begin
for I := 0 to FieldCount - 1 do begin
IniWriteString(IniFile, CheckSection(DataSet, Section),
Name + Fields[I].FieldName,
Format('%d,%d,%d', [Fields[I].Index, Fields[I].DisplayWidth,
Integer(Fields[I].Visible)]));
end;
end;
end;
procedure InternalRestoreFields(DataSet: TDataSet; IniFile: TObject;
const Section: string; RestoreVisible: Boolean);
type
TFieldInfo = record
Field: TField;
EndIndex: Integer;
end;
PFieldArray = ^TFieldArray;
TFieldArray = array[0..(65528 div SizeOf(TFieldInfo)) - 1] of TFieldInfo;
const
Delims = [' ',','];
var
I, J: Integer;
S: string;
FieldArray: PFieldArray;
begin
{ with DataSet do begin
FieldArray := AllocMemo(FieldCount * SizeOf(TFieldInfo));
try
for I := 0 to FieldCount - 1 do begin
S := IniReadString(IniFile, CheckSection(DataSet, Section),
Name + Fields[I].FieldName, '');
FieldArray^[I].Field := Fields[I];
FieldArray^[I].EndIndex := Fields[I].Index;
if S <> '' then begin
FieldArray^[I].EndIndex := StrToIntDef(ExtractWord(1, S, Delims),
FieldArray^[I].EndIndex);
Fields[I].DisplayWidth := StrToIntDef(ExtractWord(2, S, Delims),
Fields[I].DisplayWidth);
if RestoreVisible then
Fields[I].Visible := Boolean(StrToIntDef(ExtractWord(3, S, Delims),
Integer(Fields[I].Visible)));
end;
end;
for I := 0 to FieldCount - 1 do begin
for J := 0 to FieldCount - 1 do begin
if FieldArray^[J].EndIndex = I then begin
FieldArray^[J].Field.Index := FieldArray^[J].EndIndex;
Break;
end;
end;
end;
finally
FreeMemo(Pointer(FieldArray));
end;
end;}
end;
(*
procedure InternalSaveFields(DataSet: TDataSet; IniFile: TIniFile;
const Section: string);
var
I: Integer;
begin
with DataSet do
begin
for I := 0 to FieldCount - 1 do
begin
IniWriteString(IniFile, CheckSection(DataSet, Section),
Name + Fields[I].FieldName,
Format('%d,%d,%d', [Fields[I].Index, Fields[I].DisplayWidth,
Integer(Fields[I].Visible)]));
end;
end;
end;
procedure InternalRestoreFields(DataSet: TDataSet; IniFile: TObject;
const Section: string; RestoreVisible: Boolean);
type
TFieldInfo = record
Field: TField;
EndIndex: Integer;
end;
PFieldArray = ^TFieldArray;
TFieldArray = array[0..(65528 div SizeOf(TFieldInfo)) - 1] of TFieldInfo;
const
Delims = [' ',','];
var
I, J: Integer;
S: string;
FieldArray: PFieldArray;
begin
{ with DataSet do
begin
FieldArray := AllocMemo(FieldCount * SizeOf(TFieldInfo));
try
for I := 0 to FieldCount - 1 do begin
S := IniReadString(IniFile, CheckSection(DataSet, Section),
Name + Fields[I].FieldName, '');
FieldArray^[I].Field := Fields[I];
FieldArray^[I].EndIndex := Fields[I].Index;
if S <> '' then begin
FieldArray^[I].EndIndex := StrToIntDef(ExtractWord(1, S, Delims),
FieldArray^[I].EndIndex);
Fields[I].DisplayWidth := StrToIntDef(ExtractWord(2, S, Delims),
Fields[I].DisplayWidth);
if RestoreVisible then
Fields[I].Visible := Boolean(StrToIntDef(ExtractWord(3, S, Delims),
Integer(Fields[I].Visible)));
end;
end;
for I := 0 to FieldCount - 1 do begin
for J := 0 to FieldCount - 1 do begin
if FieldArray^[J].EndIndex = I then begin
FieldArray^[J].Field.Index := FieldArray^[J].EndIndex;
Break;
end;
end;
end;
finally
FreeMemo(Pointer(FieldArray));
end;
end;
}
end;
*)
{
procedure SaveFields(DataSet: TDataSet; IniFile: TIniFile);
begin
InternalSaveFields(DataSet, IniFile, DataSetSectionName(DataSet));
end;
procedure RestoreFields(DataSet: TDataSet; IniFile: TIniFile;
RestoreVisible: Boolean);
begin
InternalRestoreFields(DataSet, IniFile, DataSetSectionName(DataSet),
RestoreVisible);
end;
}
function IsDataSetEmpty(DataSet: TDataSet): Boolean;
begin
with DataSet do Result := (not Active) or (Eof and Bof);
end;
{ SQL expressions }
function DateToSQL(Value: TDateTime): string;
begin
Result := IntToStr(Trunc(Value));
end;
function FormatSQLDateRange(Date1, Date2: TDateTime;
const FieldName: string): string;
begin
Result := TrueExpr;
if (Date1 = Date2) and (Date1 <> NullDate) then
begin
Result := Format('%s = %s', [FieldName, FormatDateTime(ServerDateFmt,
Date1)]);
end
else
if (Date1 <> NullDate) or (Date2 <> NullDate) then
begin
if Date1 = NullDate then
Result := Format('%s < %s', [FieldName,
FormatDateTime(ServerDateFmt, IncDay(Date2, 1))])
else if Date2 = NullDate then
Result := Format('%s > %s', [FieldName,
FormatDateTime(ServerDateFmt, IncDay(Date1, -1))])
else
Result := Format('(%s < %s) AND (%s > %s)',
[FieldName, FormatDateTime(ServerDateFmt, IncDay(Date2, 1)),
FieldName, FormatDateTime(ServerDateFmt, IncDay(Date1, -1))]);
end;
end;
function FormatSQLDateRangeEx(Date1, Date2: TDateTime;
const FieldName: string): string;
begin
Result := TrueExpr;
if (Date1 <> NullDate) or (Date2 <> NullDate) then begin
if Date1 = NullDate then
Result := Format('%s < %s', [FieldName,
FormatDateTime(ServerDateFmt, IncDay(Date2, 1))])
else if Date2 = NullDate then
Result := Format('%s >= %s', [FieldName,
FormatDateTime(ServerDateFmt, Date1)])
else
Result := Format('(%s < %s) AND (%s >= %s)',
[FieldName, FormatDateTime(ServerDateFmt, IncDay(Date2, 1)),
FieldName, FormatDateTime(ServerDateFmt, Date1)]);
end;
end;
function FormatSQLNumericRange(const FieldName: string;
LowValue, HighValue, LowEmpty, HighEmpty: Double; Inclusive: Boolean): string;
const
Operators: array[Boolean, 1..2] of string[2] = (('>', '<'), ('>=', '<='));
begin
Result := TrueExpr;
if (LowValue = HighValue) and (LowValue <> LowEmpty) then begin
Result := Format('%s = %g', [FieldName, LowValue]);
end
else if (LowValue <> LowEmpty) or (HighValue <> HighEmpty) then begin
if LowValue = LowEmpty then
Result := Format('%s %s %g', [FieldName, Operators[Inclusive, 2], HighValue])
else if HighValue = HighEmpty then
Result := Format('%s %s %g', [FieldName, Operators[Inclusive, 1], LowValue])
else begin
Result := Format('(%s %s %g) AND (%s %s %g)',
[FieldName, Operators[Inclusive, 2], HighValue,
FieldName, Operators[Inclusive, 1], LowValue]);
end;
end;
end;
function StrMaskSQL(const Value: string): string;
begin
if (Pos('*', Value) = 0) and (Pos('?', Value) = 0) and (Value <> '') then
Result := '*' + Value + '*'
else Result := Value;
end;
function FormatSQLCondition(const FieldName, AOperator, Value: string;
FieldType: TFieldType; Exact: Boolean): string;
var
EmptyValue: Boolean;
FieldValue: string;
DateValue: TDateTime;
LogicOperator: string;
begin
FieldValue := '';
DateValue := NullDate;
Exact := Exact or not (FieldType in
[ftString, ftDate, ftTime, ftDateTime]);
if FieldType in [ftDate, ftTime, ftDateTime] then
begin
DateValue := StrToDateDef(Value, NullDate);
EmptyValue := (DateValue = NullDate);
FieldValue := FormatDateTime(ServerDateFmt, DateValue);
end
else begin
FieldValue := Value;
EmptyValue := FieldValue = '';
if not (Exact or EmptyValue) then
FieldValue := ReplaceStr(ReplaceStr(StrMaskSQL(FieldValue),
'*', '%'), '?', '_');
if FieldType = ftString then FieldValue := '''' + FieldValue + '''';
end;
LogicOperator := AOperator;
if LogicOperator = '' then begin
if Exact then LogicOperator := '='
else begin
if FieldType = ftString then LogicOperator := 'LIKE'
else LogicOperator := '>=';
end;
end;
if EmptyValue then Result := TrueExpr
else if (FieldType = ftDateTime) and Exact then begin
DateValue := IncDay(DateValue, 1);
Result := Format('(%s >= %s) and (%s < %s)', [FieldName, FieldValue,
FieldName, FormatDateTime(ServerDateFmt, DateValue)]);
end
else Result := Format('%s %s %s', [FieldName, LogicOperator, FieldValue]);
end;
function FormatAnsiSQLCondition(const FieldName, AOperator, Value: string;
FieldType: TFieldType; Exact: Boolean): string;
var
S, Esc: string;
begin
Esc := '';
if not Exact and (FieldType = ftString) then begin
S := ReplaceStr(ReplaceStr(ReplaceStr(Value, '/', '//'),
'_', '/_'), '%', '/%');
if S <> Value then Esc := ' ESCAPE''/''';
end
else S := Value;
Result := FormatSQLCondition(FieldName, AOperator, S, FieldType, Exact) + Esc;
end;
procedure CheckRequiredField(Field: TField);
begin
with Field do
if not ReadOnly and not Calculated and IsNull then begin
FocusControl;
DatabaseErrorFmt(SFieldRequired, [DisplayName]);
(*{$IFDEF WIN32}
{$IFNDEF RX_D3}
DBErrorFmt(SFieldRequired, [DisplayName]);
{$ELSE}
DatabaseErrorFmt(SFieldRequired, [DisplayName]);
{$ENDIF}
{$ELSE}
DBErrorFmt(SFieldRequired, [DisplayName^]);
{$ENDIF WIN32}*)
end;
end;
procedure CheckRequiredFields(const Fields: array of TField);
var
I: Integer;
begin
for I := Low(Fields) to High(Fields) do
CheckRequiredField(Fields[I]);
end;
procedure AssignRecord(Source, Dest: TDataSet; ByName: Boolean);
var
I: Integer;
F, FSrc: TField;
begin
if not (Dest.State in dsEditModes) then _DBError(SNotEditing);
if ByName then begin
for I := 0 to Source.FieldCount - 1 do begin
F := Dest.FindField(Source.Fields[I].FieldName);
if F <> nil then begin
if (F.DataType = Source.Fields[I].DataType) and
(F.DataSize = Source.Fields[I].DataSize) then
F.Assign(Source.Fields[I])
else F.AsString := Source.Fields[I].AsString;
end;
end;
end
else begin
for I := 0 to Min(Source.FieldDefs.Count - 1, Dest.FieldDefs.Count - 1) do
begin
F := Dest.FindField(Dest.FieldDefs[I].Name);
FSrc := Source.FindField(Source.FieldDefs[I].Name);
if (F <> nil) and (FSrc <> nil) then begin
if F.DataType = FSrc.DataType then F.Assign(FSrc)
else F.AsString := FSrc.AsString;
end;
end;
end;
end;
function ExtractFieldName(const Fields: string; var Pos: Integer): string;
var
I: Integer;
begin
I := Pos;
while (I <= Length(Fields)) and (Fields[I] <> ';') do Inc(I);
Result := Trim(Copy(Fields, Pos, I - Pos));
if (I <= Length(Fields)) and (Fields[I] = ';') then Inc(I);
Pos := I;
end;
end.

View File

@ -0,0 +1,184 @@
12.01.2006 - ������ 1.0.12.38
+ � RxDbGrid � ��������� ������� ��������� �������� Orientation - �������� ��
����������� ��������� ������ � ��������� �������
+ ��������� ����� ��� ��������������������� ������ ����������� (��� ����� 90
��������)
21.12.2005
+ � RxDbGrid ��������� �������� AllowedOperation - ��� ������� ��������� ���������
��������
+ � RxDbGrid ��������� ���������� ������� OnGetCellProps
+ � TRxMemoryData ������� �������� OnFilterRecordEx - ��������, ���� � TDataSet
�� ��������� ������ �������� OnFilterRecord
16.12.2005 - ������ 1.0.11.35
+ ���������� ��������� TToolbarButton ��� ��������� ������
� ��������� ������� Lazarus
+ ��������� ������� � ��������� ��������� �������
+ ������� ������ ��� Linux
27.11.2005 - ������ 1.0.11.34
- TToolPanel - ���������� ������ ���������� ������� ������ ���
�������������� �� � runtime
22.10.2005 - ������ 1.0.10.33
+ TRxLabel - ��������� ���������
+ TSecretPanel - ��������� ���������
- TRxMemoryData - ������ ���, ��������� ������ ������������� �������� FieldDefs
� ������ DB - �������� ����� ������ ��� ���������
+ TRxLoginDialog - ����� ���������
- TRxDBComboBox - ��������� �������
15.10.2005 - ������ 1.0.9.30
+ TRxCustomDBLookupCombo - �������� ���������
(������ ����� ��������� ����� ��� ���������� Flat)
+ TRxCustomDBLookupCombo - ��� ������� ������� ESC ���� ��������� (����� DataField.Clear)
- TRxCustomDBLookupCombo - ���������� ������ ��������� ������� �������� DataField � ������
DisplayAllFields - ������������ �������� �������� EmptyValue
- TRxCustomDBLookupCombo - ���������� ������ �������� ������ ���������� �������� ���
������ DataField (������ ����� �� ��������� ������)
- TRxCustomDBLookupCombo - ��������� ������ ������ ����������� ������ � �����������
�� �������� �������� DropDownCount
- TRxCustomDBLookupCombo - ��������� ����� �������� � ���������� ������ ��������
������� Enter
+ TRxMemoryData - ������ ��� ��� ������ ����� Lazarus � �� ���������� ��������� �����
�� ������ FieldDefs, ������� ���� ������� � Design-time
+ TRxMemoryData - ���������� �������� ���������� - ����� ���������� �� �������
DataSet-�
+ TRxDBGrid - ��������� �������� �������� FieldName � �������
+ TRxDBGrid - ����������� ����������� ����������� �������� ��� �����������
����� �������� KeyList � PickList (���������� TRxDBComboBox)
10.10.2005
- ���������� ������ ��� ��������� ����������� � RxDbGrid �� ImageList,
����� �������� ������� ��������
- ���������� ������ ��� ��������� ������ ������� (������� �� 0)
+ ������ ������ ��� ����������� ��������� ������� RxDbGrid ����� FormStorage
- ��������� �������� ��� ������ � ������������� � TToolPanel
+ ������� ��������� TPageManager
+ ������� ����� ��������� TRxAppIcon - ��� ��� ��� ��� �� ����� �������� �
��������� - � ������ ������� ���������� ����� ������������ ��������� ������.
�.�. ��� �������� �� � ����������� �������� ������� - ������� ���������
����� ���������� �� ���������� ������� ������ - �� � ������ �������
�������� ���������. �������� ������ ��� Windows - ���� ��� ����� ��� ���
�������� � ������ �������� - ��������.
����� � ������ �������� ���������� ������ � �������� - ���������� ����
���������� - � ����� ������ �������� ��������� ����������� ������ ��������
��� ��������� - ����� � ���� ���������� ���������� ����� �������
08.10.2005
+ ���� ��������� ������ ����� ������
+ ��� ����� ������ ��������� ����������� ������ ������ � ������ �������
��� �������������� ����� - tpGlyphPopup, tpCaptionPopup
- ��������� ���������
+ ����������� ������ � ������������� � RxDbGrid ����� ImageList (��. readmy.txt)
+ �������� ��������� TRXXPManifest - �������� ������ ��� Windows -
��������� XP ���������
05.10.2005
+ ����� �������� Flat, TransparentBtn
+ ������� �������� Options, ���������� tpFlatBtns, tpTransparentBtns
+ ������� ��������� ���� ��������� ���������� ����� �� ������
������ ������� ����� � ������� Ctrl
- ������� ��� �������������� �������� ���� ��������� ������
+ � TToolbarItem ������� �������� Tag
04.10.2005
+ � TToolPanel �������� ��� �� ������� ���������� ������� ������
+ ��������� ����������� ���������� ������ � ����� WindowsXP
+ ��� � ����� Flat � WindowsXP ��� ��������� ������� �� ������
��� �������������� ��� ������� ������������
- �.�. TImageList.Draw �� ����� �������� ������������ ���������
���������� ��� �������������� Action �� ���������� ��������
����� ��-�� ����� ��� ����������� ������� ����������� � �����
- �������� ��� � ������ ���� � ��������� ������� �������� � ������
������ (�� ����� Items) - ��� �� ���� ��� � ������ � ���������
��� ��������� ��������� ��������� ��������
+ ������� ����� ��� TToolPanel
03.10.2005
+ ������� ��� ����� ������ � ������� ��������
+ � TToolPanel �������� �������� ����
+ �������� ���� ��������� ������
+ �������������� DropDownMenu � ����� ������� ������� ������
+ ������� �� ������ ������ (��������� � run-time)
02.10.2005 (beta)
+ ������ ���������� (��������� ����) TToolPanel - ������ RxToolbar
�� ���������������� ������ �� ����������� ToolBar - �����
����� �������� ����� Actions (��� ���������� ������ ������������ ����� Items)
��������� ��� ����������� ������ - ���������� ������� ���.
��������:
+ ������������ ������������ ������ � �������� ���� � run-time
+ ���������� �� ������� ���������������� ���� ����� propstorage
����� �����������:
- DropDownMenu - � ����������� �� ����� ������ ���� ��������
��� ������� �� ������, ���� ����� ���������� ������� ������ (���.������) ���
������ ����
- ������� �������� ������ (��������� � run-time)
- ����� ����������� (������ �������� Win9x, Flat) - �������� ��� � WinXP
- ������ �������� ������ � DesignTime � ������
�������� �����
- �� ������ �������� ���������������� ��� ������ ������
�������� ������ �� ���������������� � ������
30.10.2005
+ �������
+ ������� RxDice, RxSwith, TRxDBComboBox
+ ������ �� 2 �������� - RX � RX DBAware
- �������� ��� � ��������� �������� � TRxDBLookupCombo
28.10.2005
+ ����������� �������� Currency edit (�� �������� ��� �������)
- ��-�� ������ � �������� FormatFloat �� FCL ������ ������������ � ������
�������������� ��������� ��� ������� ������� - ���������
19.10.2005
+ TRxMemoryData - �������� ����� ��������� - ��� ��������� blob - ���� ���������
+ ����� ������� Currency edit
+ ������ ������
- ��� �� ��� �������� � ������� - ������������ ������ ��������� � ��������
05.10.2005
+ �������� TRxDBGrid - ������� �� "������� �������������, ��� ���� ��� ����������
����� �������, ������ ��� ����� ���������� - ���������� ������� ����������
������� ������ ��� � DBGridEh �� EhLib. � ����� � ������������ ��
Jesus Reyes (����� DBGrid-� � ���������� ����������������) - �� ������, ��� �����
���������� ����������� ��������� � ���������� ����. ������� ���� ��� ����������
����������.
������ �������� ������������� ���������, ������������� ������� �� ���������
��� �� ������ � ������������ ������������ ������� ���������� (�������������� �������)
����� ������� �������� �������������� ��. ���� exSortFB.pas - ��� �������� ���������
���. ������ - ��� ����������� ����� ���������� ������
������� ������� (��������� �� TExDBGridSortEngine) ������� ����� � ����
��������� ������ ����������������� ������. ��� TFBDataSet (������� � FireBird)
����� ��� � ��������� ���� ����������� ����� - ������� ��� ��� ������.
exsortmds.pas - ���� ������ ��� ���������� ������ � ����������� MemDS
������� ��������� �������� - ����������� ��� ���������� ��������� �� �����������
������ ������ (������ � MemDS ���� ��� ���������������� ������� �� 1-� ������)
- TRxMemoryData - ����� ��� ���������������� ����������� ��� ������ - �� ����� ���
���������� ������ - ������ (���������� �� ������������� DataSet-� �� ������� � ������)
���� �����������. ����������� MemDS ��������� - ��� ���� � �������.
31.09.2005
+ Add component TFolderLister - ��� ��� ���������� - �� ������ ��� �������
��� ��������� ��� ���������� ����, ���������� ������ ��� LazReport-a
(������ � ���� � ������� ���� ����� ����������)
07.01.2005
i'm port next RX components:
TDBDateEdit - �� ���� ������� �������� ������ - ���������� �� �������������
TDateEdit
TRxDBCalcEdit
TRXLookupEdit,
TRxDBLookupCombo - ��� ��� - ��� ������� �� ����� �� �������� ���������������
�������, ���������� ������ ��������� - ����� ���� ������� - ��� ��� ������ -
���������.
and next modules:
DateUtil.pas
DbUtils.pas
rxdconst.pas
RXStrutils.pas
VCLUtils.pas
��� ��������� � �����������
������� ������� (alexs)
ALEXS75-��-YANDEX-�����-RU

View File

@ -0,0 +1,4 @@
���������� ��������:
1. �� Linux ��� ���������� � ���������� GTK2
�� ����� ������������ ������ RxToolbar ��� ���������� ����� Flat ���
WinXP

View File

@ -0,0 +1,6 @@
1.
Q. ������ � ���������� ������ TRxCustomDBLookupCombo �������
HOME � END �� ������������� � ������/����� ������
A. ��� ����������� ������ ������������ ������ TRxDBGrid
(������ ��������� TDBGrid) - � ��� ��� ���������������� �
������/����� ������ ������� Ctrl+Home/Ctrl+End

View File

@ -0,0 +1,33 @@
1. ��� ������������� � RxDbGrid ������ ����������� ImageList
���������� ������� � �������� KeyList ������� ������ �����������
� ������� "�������� ����"="��� �����������"
�.�. ���� ���� ��������� �������� 1,2,3 � ��� ���� �������� ����������
������� � �������� 2,5,1 �� ������ ���������� ��������� ���������
�������:
1=2
2=5
3=1
2. TPageManager ������������ ��� ���������� ��������
����� ���������� � ��������� ����� (���� ����������� �������������� �����)
�����, ������� ������������ �� ����� ����������� (������������ ����� ������� Format)
������ ���������� ����� ��������� � ���� ��� ������������� ��������� (%d)
������ - ������� ���
������ - ����� �����
������:
'������ ������. ��� %d �� %d.'
StatusControl - ���� ���������� �� � ��������� ����� ������������ �����
����������.
������� OnCheckPageEnabled ������ ��� ��������, ��� ���������� ��������
��������� ��� ������� �� ������ Next � Prior ��� �������� ������������
3. RxAppIcon - ��� ������ ������ ���������� � ������ ���������� �������
������ ������� ����� �� ���������� � �������� "Load Icon"
� ���-����� ���-�� ������ ����������� �����:
RxAppIcon1.LoadFromFile('full-2.ico');
RxAppIcon1.ApplyIcon;
^^^^^^^^^^^ - ���� � ������

View File

@ -0,0 +1,19 @@
1.
RxTrayIcon
2.
� TPageManager ���������� ���������� �������� ������� ���������
�������� � PageControl-�
3. � RxDBGrid
- �������� ������� ����������� ���������� � ���� �����������:
|-----------------|
| |
|-----------------|
| | |
|-----------------|
����� �������� �� ����� ����� �������� ��������� �������� ������
(������ �������� �� DBGridEh :-) )
��� ����� � ����� - ���� ������ ��� ������
4. TRxDbComboBox �� ��������� ���������� ��������� �������� �� ����

162
components/rx/duallist.pas Normal file
View File

@ -0,0 +1,162 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995, 1996 AO ROSNO }
{ }
{*******************************************************}
unit duallist;
interface
{$I rx.inc}
uses Classes, Controls;
type
{ TDualListDialog }
TDualListDialog = class(TComponent)
private
FCtl3D: Boolean;
FSorted: Boolean;
FTitle:string;
FLabel1Caption: TCaption;
FLabel2Caption: TCaption;
FOkBtnCaption: TCaption;
FCancelBtnCaption: TCaption;
FHelpBtnCaption: TCaption;
FHelpContext: THelpContext;
FList1: TStrings;
FList2: TStrings;
FShowHelp: Boolean;
procedure SetList1(Value: TStrings);
procedure SetList2(Value: TStrings);
function IsLabel1Custom: Boolean;
function IsLabel2Custom: Boolean;
function IsOkBtnCustom: Boolean;
function IsCancelBtnCustom: Boolean;
function IsHelpBtnCustom: Boolean;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function Execute: Boolean;
published
property Ctl3D: Boolean read FCtl3D write FCtl3D default True;
property Sorted: Boolean read FSorted write FSorted;
property Title: string read FTitle write FTitle;
property Label1Caption: TCaption read FLabel1Caption write FLabel1Caption
stored IsLabel1Custom;
property Label2Caption: TCaption read FLabel2Caption write FLabel2Caption
stored IsLabel2Custom;
property OkBtnCaption: TCaption read FOkBtnCaption write FOkBtnCaption
stored IsOkBtnCustom;
property CancelBtnCaption: TCaption read FCancelBtnCaption write FCancelBtnCaption
stored IsCancelBtnCustom;
property HelpBtnCaption: TCaption read FHelpBtnCaption write FHelpBtnCaption
stored IsHelpBtnCustom;
property HelpContext: THelpContext read FHelpContext write FHelpContext;
property List1: TStrings read FList1 write SetList1;
property List2: TStrings read FList2 write SetList2;
property ShowHelp: Boolean read FShowHelp write FShowHelp default True;
end;
implementation
uses SysUtils, Forms, FDualLst, VCLUtils, LCLStrConsts;
{ TDualListDialog }
constructor TDualListDialog.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FCtl3D := True;
FShowHelp := True;
FList1 := TStringList.Create;
FList2 := TStringList.Create;
{ FLabel1Caption := LoadStr(SDualListSrcCaption);
FLabel2Caption := LoadStr(SDualListDestCaption);}
OkBtnCaption := rsmbOK;
CancelBtnCaption := rsmbCancel;
HelpBtnCaption := rsmbHelp;
end;
destructor TDualListDialog.Destroy;
begin
List1.Free;
List2.Free;
inherited Destroy;
end;
procedure TDualListDialog.SetList1(Value: TStrings);
begin
FList1.Assign(Value);
end;
procedure TDualListDialog.SetList2(Value: TStrings);
begin
FList2.Assign(Value);
end;
function TDualListDialog.IsLabel1Custom: Boolean;
begin
Result := true;//CompareStr(Label1Caption, LoadStr(SDualListSrcCaption)) <> 0;
end;
function TDualListDialog.IsLabel2Custom: Boolean;
begin
Result := true;//CompareStr(Label2Caption, LoadStr(SDualListDestCaption)) <> 0;
end;
function TDualListDialog.IsOkBtnCustom: Boolean;
begin
Result := CompareStr(OkBtnCaption, rsmbOK) <> 0;
end;
function TDualListDialog.IsCancelBtnCustom: Boolean;
begin
Result := CompareStr(CancelBtnCaption, rsmbCancel) <> 0;
end;
function TDualListDialog.IsHelpBtnCustom: Boolean;
begin
Result := CompareStr(HelpBtnCaption, rsmbHelp) <> 0;
end;
function TDualListDialog.Execute: Boolean;
var
Form: TDualListForm;
begin
Form := TDualListForm.Create(Application);
try
with Form do
begin
Ctl3D := Self.Ctl3D;
if NewStyleControls then Font.Style := [];
ShowHelp := Self.ShowHelp;
SrcList.Sorted := Sorted;
DstList.Sorted := Sorted;
SrcList.Items := List1;
DstList.Items := List2;
if Self.Title <> '' then Form.Caption := Self.Title;
if Label1Caption <> '' then SrcLabel.Caption := Label1Caption;
if Label2Caption <> '' then DstLabel.Caption := Label2Caption;
OkBtn.Caption := OkBtnCaption;
CancelBtn.Caption := CancelBtnCaption;
HelpBtn.Caption := HelpBtnCaption;
HelpContext := Self.HelpContext;
HelpBtn.HelpContext := HelpContext;
end;
Result := (Form.ShowModal = mrOk);
if Result then begin
List1 := Form.SrcList.Items;
List2 := Form.DstList.Items;
end;
finally
Form.Free;
end;
end;
end.

View File

@ -0,0 +1,34 @@
unit exSortFB;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, DB,
{$IFDEF FPC}
RxDBGrid
{$ELSE}
exDBGrid
{$ENDIF}
;
type
TFBDataSetSortEngine = class(TExDBGridSortEngine)
public
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);override;
end;
implementation
uses FBCustomDataSet;
procedure TFBDataSetSortEngine.Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);
begin
if Assigned(ADataSet) then
(ADataSet as TFBDataSet).SortOnField(Field.FieldName, Asc);
end;
initialization
RegisterExDBGridSortEngine(TFBDataSetSortEngine, TFBDataSet);
end.

185
components/rx/exsortmds.pas Normal file
View File

@ -0,0 +1,185 @@
unit exSortMDS;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, DB, RxDBGrid;
type
TMemDataSetSortEngine = class(TExDBGridSortEngine)
public
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);override;
end;
implementation
uses memds;
type
THackMDS = class(TMemDataSet)
end;
procedure TMemDataSetSortEngine.Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);
var
MS:TMemoryStream;
V, FRecSize, FRecCount, I, J:integer;
BufOrign, BufTest:PChar;
PI, PJ:PInteger;
S1:string;
R1:Double;
I1:integer;
B1:boolean;
D1:TDateTime;
function DoExch:boolean;
begin
Result:=false;
ADataSet.RecNo:=J+1;
if Asc then
begin
case Field.DataType of
ftFixedChar,
ftWideString,
ftString:Result:=S1 > Field.AsString;
ftBoolean:Result:=B1 > Field.AsBoolean;
ftInteger,
ftWord,
ftSmallint,
ftAutoInc,
ftLargeint:
begin
Result:=I1 > Field.AsInteger;
writeln('I1=', I1, ' I2=',Field.AsInteger,' Result=', Result, ' i=',i, ' j=',j);
end;
ftFloat,
ftCurrency,
ftBCD:Result:=R1 > Field.AsFloat;
ftDate,
ftTime,
ftDateTime,
ftTimeStamp:Result:=D1 > Field.AsFloat;
else
exit;
end;
end
else
begin
case Field.DataType of
ftFixedChar,
ftWideString,
ftString:Result:=S1 < Field.AsString;
ftBoolean:Result:=B1 < Field.AsBoolean;
ftInteger,
ftWord,
ftSmallint,
ftAutoInc,
ftLargeint:Result:=I1 < Field.AsInteger;
ftFloat,
ftCurrency,
ftBCD:Result:=R1 < Field.AsFloat;
ftDate,
ftTime,
ftDateTime,
ftTimeStamp:Result:=D1 < Field.AsFloat;
else
exit;
end;
end;
{ if not Asc then
Result:=not Result;
Result:=true;}
end;
begin
if Assigned(ADataSet) then
begin
ADataSet.DisableControls;
MS:=TMemoryStream.Create;
BufOrign:=THackMDS(ADataSet).AllocRecordBuffer;
BufTest:=THackMDS(ADataSet).AllocRecordBuffer;
PI:=@I;
PJ:=@J;
try
THackMDS(ADataSet).SaveDataToStream(MS, true);
MS.Seek(0, soFromBeginning);
MS.Read(V, SizeOf(V)); // Marker
MS.Read(V, SizeOf(V)); // Size
FRecSize:=THackMDS(ADataSet).GetRecordSize;
FRecCount:=V div FRecSize;
for i:=0 to FRecCount-2 do
begin
MS.Seek(FRecSize*I + SizeOf(V)*2, soFromBeginning);
MS.Read(BufOrign^, FRecSize);
if i=0 then //fix error
ADataSet.First
else
ADataSet.RecNo:=I+1;
case Field.DataType of
ftFixedChar,
ftWideString,
ftString:S1:=Field.AsString;
ftBoolean:B1:=Field.AsBoolean;
ftInteger,
ftWord,
ftSmallint,
ftAutoInc,
ftLargeint:I1:=Field.AsInteger;
ftFloat,
ftCurrency,
ftBCD:R1:=Field.AsFloat;
ftDate,
ftTime,
ftDateTime,
ftTimeStamp:D1:=Field.AsFloat;
{ else
exit;}
end;
for j:=i+1 to FRecCount-1 do
begin
MS.Seek(FRecSize*j + SizeOf(V)*2, soFromBeginning);
MS.Read(BufTest^, FRecSize);
if DoExch then
begin
MS.Seek(FRecSize*j + SizeOf(V)*2, soFromBeginning);
MS.Write(BufOrign^, FRecSize);
Move(BufTest^, BufOrign^, FRecSize);
end;
end;
THackMDS(ADataSet).SetBookmarkData(BufOrign, @PI);
MS.Seek(FRecSize*I + SizeOf(V)*2, soFromBeginning);
MS.Write(BufOrign^, FRecSize);
MS.Seek(0, soFromBeginning);
THackMDS(ADataSet).LoadDataFromStream(MS);
end;
// (ADataSet as TFBDataSet).SortOnField(Field.FieldName, Asc);}
MS.Seek(0, soFromBeginning);
THackMDS(ADataSet).LoadDataFromStream(MS);
finally
THackMDS(ADataSet).FreeRecordBuffer(BufOrign);
THackMDS(ADataSet).FreeRecordBuffer(BufTest);
MS.Free;
ADataSet.EnableControls;
end;
THackMDS(ADataSet).First;
end;
end;
initialization
RegisterExDBGridSortEngine(TMemDataSetSortEngine, TMemDataset);
end.

167
components/rx/fduallst.lfm Normal file
View File

@ -0,0 +1,167 @@
object DualListForm: TDualListForm
BorderIcons = []
BorderStyle = bsDialog
Caption = 'DualListForm'
ClientHeight = 269
ClientWidth = 392
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
OnActivate = ListClick
OnCreate = FormCreate
OnShow = ListClick
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 13
HorzScrollBar.Page = 391
VertScrollBar.Page = 268
Left = 311
Height = 269
Top = 225
Width = 392
object Bevel1: TBevel
Height = 224
Left = 4
Name = 'Bevel1'
Top = 7
Width = 384
Left = 4
Height = 224
Top = 7
Width = 384
end
object SrcLabel: TLabel
Caption = 'Source'
Color = clNone
Left = 12
Height = 13
Top = 12
Width = 33
end
object DstLabel: TLabel
Caption = 'Dest'
Color = clNone
Left = 216
Height = 13
Top = 12
Width = 22
end
object SrcList: TListBox
ItemHeight = 13
MultiSelect = True
OnClick = ListClick
OnDblClick = IncBtnClick
OnKeyDown = SrcListKeyDown
ParentShowHint = False
ShowHint = True
Sorted = True
TabOrder = 0
Left = 12
Height = 194
Top = 30
Width = 164
end
object DstList: TListBox
ItemHeight = 13
MultiSelect = True
OnClick = ListClick
OnDblClick = ExclBtnClick
OnKeyDown = DstListKeyDown
ParentShowHint = False
ShowHint = True
Sorted = True
TabOrder = 5
Left = 216
Height = 194
Top = 30
Width = 164
end
object IncBtn: TButton
BorderSpacing.InnerBorder = 2
Caption = '>'
Font.Color = clBlack
Font.Height = -12
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
OnClick = IncBtnClick
TabOrder = 1
Left = 183
Height = 26
Top = 32
Width = 26
end
object IncAllBtn: TButton
BorderSpacing.InnerBorder = 2
Caption = '>>'
Font.Color = clBlack
Font.Height = -12
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
OnClick = IncAllBtnClick
TabOrder = 2
Left = 183
Height = 26
Top = 64
Width = 26
end
object ExclBtn: TButton
BorderSpacing.InnerBorder = 2
Caption = '<'
Font.Color = clBlack
Font.Height = -12
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
OnClick = ExclBtnClick
TabOrder = 3
Left = 183
Height = 26
Top = 97
Width = 26
end
object ExclAllBtn: TButton
BorderSpacing.InnerBorder = 2
Caption = '<<'
Font.Color = clBlack
Font.Height = -12
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
OnClick = ExclAllBtnClick
TabOrder = 4
Left = 183
Height = 26
Top = 129
Width = 26
end
object OkBtn: TButton
BorderSpacing.InnerBorder = 2
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 6
Left = 138
Height = 25
Top = 239
Width = 77
end
object CancelBtn: TButton
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 7
Left = 221
Height = 25
Top = 239
Width = 77
end
object HelpBtn: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 8
Left = 310
Height = 25
Top = 239
Width = 77
end
end

View File

@ -0,0 +1,48 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TDualListForm','FORMDATA',[
'TPF0'#13'TDualListForm'#12'DualListForm'#11'BorderIcons'#11#0#11'BorderStyle'
+#7#8'bsDialog'#7'Caption'#6#12'DualListForm'#12'ClientHeight'#3#13#1#11'Clie'
+'ntWidth'#3#136#1#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#10
+'Font.Style'#11#6'fsBold'#0#10'OnActivate'#7#9'ListClick'#8'OnCreate'#7#10'F'
+'ormCreate'#6'OnShow'#7#9'ListClick'#13'PixelsPerInch'#2'`'#8'Position'#7#14
+'poScreenCenter'#10'TextHeight'#2#13#18'HorzScrollBar.Page'#3#135#1#18'VertS'
+'crollBar.Page'#3#12#1#4'Left'#3'7'#1#6'Height'#3#13#1#3'Top'#3#225#0#5'Widt'
+'h'#3#136#1#0#6'TBevel'#6'Bevel1'#6'Height'#3#224#0#4'Left'#2#4#4'Name'#6#6
+'Bevel1'#3'Top'#2#7#5'Width'#3#128#1#4'Left'#2#4#6'Height'#3#224#0#3'Top'#2#7
+#5'Width'#3#128#1#0#0#6'TLabel'#8'SrcLabel'#7'Caption'#6#6'Source'#5'Color'#7
+#6'clNone'#4'Left'#2#12#6'Height'#2#13#3'Top'#2#12#5'Width'#2'!'#0#0#6'TLabe'
+'l'#8'DstLabel'#7'Caption'#6#4'Dest'#5'Color'#7#6'clNone'#4'Left'#3#216#0#6
+'Height'#2#13#3'Top'#2#12#5'Width'#2#22#0#0#8'TListBox'#7'SrcList'#10'ItemHe'
+'ight'#2#13#11'MultiSelect'#9#7'OnClick'#7#9'ListClick'#10'OnDblClick'#7#11
+'IncBtnClick'#9'OnKeyDown'#7#14'SrcListKeyDown'#14'ParentShowHint'#8#8'ShowH'
+'int'#9#6'Sorted'#9#8'TabOrder'#2#0#4'Left'#2#12#6'Height'#3#194#0#3'Top'#2
+#30#5'Width'#3#164#0#0#0#8'TListBox'#7'DstList'#10'ItemHeight'#2#13#11'Multi'
+'Select'#9#7'OnClick'#7#9'ListClick'#10'OnDblClick'#7#12'ExclBtnClick'#9'OnK'
+'eyDown'#7#14'DstListKeyDown'#14'ParentShowHint'#8#8'ShowHint'#9#6'Sorted'#9
+#8'TabOrder'#2#5#4'Left'#3#216#0#6'Height'#3#194#0#3'Top'#2#30#5'Width'#3#164
+#0#0#0#7'TButton'#6'IncBtn'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#1
+'>'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.Name'#6#13'MS S'
+'ans Serif'#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#11'IncBtnClick'#8'Tab'
+'Order'#2#1#4'Left'#3#183#0#6'Height'#2#26#3'Top'#2' '#5'Width'#2#26#0#0#7'T'
+'Button'#9'IncAllBtn'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'>>'#10
+'Font.Color'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.Name'#6#13'MS Sans Se'
+'rif'#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#14'IncAllBtnClick'#8'TabOrd'
+'er'#2#2#4'Left'#3#183#0#6'Height'#2#26#3'Top'#2'@'#5'Width'#2#26#0#0#7'TBut'
+'ton'#7'ExclBtn'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#1'<'#10'Font'
+'.Color'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.Name'#6#13'MS Sans Serif'
+#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#12'ExclBtnClick'#8'TabOrder'#2#3
+#4'Left'#3#183#0#6'Height'#2#26#3'Top'#2'a'#5'Width'#2#26#0#0#7'TButton'#10
+'ExclAllBtn'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'<<'#10'Font.Co'
+'lor'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.Name'#6#13'MS Sans Serif'#10
+'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#15'ExclAllBtnClick'#8'TabOrder'#2#4
+#4'Left'#3#183#0#6'Height'#2#26#3'Top'#3#129#0#5'Width'#2#26#0#0#7'TButton'#5
+'OkBtn'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'OK'#7'Default'#9#11
+'ModalResult'#2#1#8'TabOrder'#2#6#4'Left'#3#138#0#6'Height'#2#25#3'Top'#3#239
+#0#5'Width'#2'M'#0#0#7'TButton'#9'CancelBtn'#25'BorderSpacing.InnerBorder'#2
+#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#7#4
+'Left'#3#221#0#6'Height'#2#25#3'Top'#3#239#0#5'Width'#2'M'#0#0#7'TButton'#7
+'HelpBtn'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#4'Help'#7'OnClick'#7
+#12'HelpBtnClick'#8'TabOrder'#2#8#4'Left'#3'6'#1#6'Height'#2#25#3'Top'#3#239
+#0#5'Width'#2'M'#0#0#0
]);

226
components/rx/fduallst.pas Normal file
View File

@ -0,0 +1,226 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995 AO ROSNO }
{ }
{*******************************************************}
unit fduallst;
{$I RX.INC}
{$L-,S-}
interface
uses SysUtils, LCLIntf, Messages, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Buttons, LResources, LCLType;
type
TDualListForm = class(TForm)
SrcList: TListBox;
DstList: TListBox;
SrcLabel: TLabel;
DstLabel: TLabel;
IncBtn: TButton;
IncAllBtn: TButton;
ExclBtn: TButton;
ExclAllBtn: TButton;
OkBtn: TButton;
CancelBtn: TButton;
HelpBtn: TButton;
Bevel1: TBevel;
procedure IncBtnClick(Sender: TObject);
procedure IncAllBtnClick(Sender: TObject);
procedure ExclBtnClick(Sender: TObject);
procedure ExclAllBtnClick(Sender: TObject);
procedure SrcListDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure DstListDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure SrcListDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure DstListDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure SrcListKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure DstListKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure HelpBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ListClick(Sender: TObject);
private
{ Private declarations }
function GetShowHelp: Boolean;
procedure SetShowHelp(Value: Boolean);
protected
procedure CreateParams(var Params: TCreateParams); override;
public
{ Public declarations }
procedure SetButtons;
property ShowHelp: Boolean read GetShowHelp write SetShowHelp
default True;
end;
implementation
uses VCLUtils, BOXPROCS;
{ TDualListForm }
procedure TDualListForm.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
end;
procedure TDualListForm.SetButtons;
var
SrcEmpty, DstEmpty: Boolean;
begin
SrcEmpty := (SrcList.Items.Count = 0);
DstEmpty := (DstList.Items.Count = 0);
IncBtn.Enabled := not SrcEmpty and (SrcList.SelCount > 0);
IncAllBtn.Enabled := not SrcEmpty;
ExclBtn.Enabled := not DstEmpty and (DstList.SelCount > 0);
ExclAllBtn.Enabled := not DstEmpty;
end;
function TDualListForm.GetShowHelp: Boolean;
begin
Result := (HelpBtn.Enabled) and (HelpBtn.Visible);
end;
procedure TDualListForm.SetShowHelp(Value: Boolean);
const
x_FrmBtn = 16;
x_GrpBtn = 15;
x_BtnBtn = 8;
begin
with HelpBtn do begin
Enabled := Value;
Visible := Value;
end;
if Value then begin
HelpBtn.Left := Width - HelpBtn.Width - x_FrmBtn;
CancelBtn.Left := HelpBtn.Left - CancelBtn.Width - x_GrpBtn;
OkBtn.Left := CancelBtn.Left - OkBtn.Width - x_BtnBtn;;
end
else begin
CancelBtn.Left := Width - CancelBtn.Width - x_FrmBtn;
OkBtn.Left := CancelBtn.Left - OkBtn.Width - x_BtnBtn;;
end;
end;
procedure TDualListForm.IncBtnClick(Sender: TObject);
begin
BoxMoveSelectedItems(SrcList, DstList);
SetButtons;
end;
procedure TDualListForm.IncAllBtnClick(Sender: TObject);
begin
BoxMoveAllItems(SrcList, DstList);
SetButtons;
end;
procedure TDualListForm.ExclBtnClick(Sender: TObject);
begin
BoxMoveSelectedItems(DstList, SrcList);
SetButtons;
end;
procedure TDualListForm.ExclAllBtnClick(Sender: TObject);
begin
BoxMoveAllItems(DstList, SrcList);
SetButtons;
end;
procedure TDualListForm.SrcListDragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
BoxDragOver(SrcList, Source, X, Y, State, Accept, SrcList.Sorted);
if State = dsDragLeave then
(Source as TListBox).DragCursor := crDrag;
if (State = dsDragEnter) and ((Source as TListBox).SelCount > 1) then
(Source as TListBox).DragCursor := crMultiDrag;
end;
procedure TDualListForm.DstListDragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
BoxDragOver(DstList, Source, X, Y, State, Accept, DstList.Sorted);
if State = dsDragLeave then
(Source as TListBox).DragCursor := crDrag;
if (State = dsDragEnter) and ((Source as TListBox).SelCount > 1) then
(Source as TListBox).DragCursor := crMultiDrag;
end;
procedure TDualListForm.SrcListDragDrop(Sender, Source: TObject; X,
Y: Integer);
begin
if Source = DstList then ExclBtnClick(SrcList)
else if Source = SrcList then begin
BoxMoveFocusedItem(SrcList, SrcList.ItemAtPos(Point(X, Y), True));
end;
end;
procedure TDualListForm.DstListDragDrop(Sender, Source: TObject; X,
Y: Integer);
begin
if Source = SrcList then IncBtnClick(DstList)
else if Source = DstList then begin
BoxMoveFocusedItem(DstList, DstList.ItemAtPos(Point(X, Y), True));
end;
end;
procedure TDualListForm.SrcListKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
Incr: Integer;
begin
if not SrcList.Sorted then begin
if (ssCtrl in Shift) and ((Key = VK_DOWN) or (Key = VK_UP)) then begin
if Key = VK_DOWN then Incr := 1
else Incr := -1;
BoxMoveFocusedItem(SrcList, SrcList.ItemIndex + Incr);
Key := 0;
end;
end;
end;
procedure TDualListForm.DstListKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
Incr: Integer;
begin
if not DstList.Sorted then begin
if (ssCtrl in Shift) and ((Key = VK_DOWN) or (Key = VK_UP)) then begin
if Key = VK_DOWN then Incr := 1
else Incr := -1;
BoxMoveFocusedItem(DstList, DstList.ItemIndex + Incr);
Key := 0;
end;
end;
end;
procedure TDualListForm.HelpBtnClick(Sender: TObject);
begin
Application.HelpContext(HelpContext);
end;
procedure TDualListForm.FormCreate(Sender: TObject);
begin
{ OkBtn.Caption := ResStr(SOKButton);
CancelBtn.Caption := ResStr(SCancelButton);
HelpBtn.Caption := ResStr(SHelpButton);}
if NewStyleControls then Font.Style := [];
end;
procedure TDualListForm.ListClick(Sender: TObject);
begin
SetButtons;
end;
initialization
{$i fduallst.lrs}
end.

View File

@ -0,0 +1,184 @@
unit folderlister;
{$I rx.inc}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Menus;
type
{ TCustomFolderLister }
TCustomFolderLister = class(TComponent)
private
FDefaultExt: string;
FMenuItem: TMenuItem;
FOnExecuteItem: TNotifyEvent;
FFileFolder: string;
FFileList:TStringList;
procedure DoFind(S:string; aMenuItem:TMenuItem);
function GetCount: integer;
function GetFiles(Item: integer): string;
procedure SetMenuItem(const AValue: TMenuItem);
procedure SetFileFolder(const AValue: string);
protected
property FileFolder:string read FFileFolder write SetFileFolder;
property OnExecuteItem:TNotifyEvent read FOnExecuteItem write FOnExecuteItem;
property MenuItem:TMenuItem read FMenuItem write SetMenuItem;
property DefaultExt:string read FDefaultExt write FDefaultExt;
procedure InternalExecute(Sender: TObject);virtual;
public
procedure Execute;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Files[Item:integer]:string read GetFiles;
property Count:integer read GetCount;
published
end;
type
TFolderLister = class(TCustomFolderLister)
published
property DefaultExt;
property FileFolder;
property OnExecuteItem;
property MenuItem;
end;
implementation
uses RxStrUtils, RxAppUtils;
function MenuItemStr(S:string):string;
var
i:integer;
begin
Result:=Copy2Symb(ExtractFileName(S), '.');
if Result='' then exit;
for i:=1 to Length(Result) do
begin
if Result[i]='\' then Result[i]:='/' else
if Result[i]='_' then Result[i]:='.';
end;
end;
{ TCustomFolderLister }
procedure TCustomFolderLister.DoFind(S: string; aMenuItem: TMenuItem);
var
Rec:TSearchRec;
R:integer;
AFileList,
AFolderList:TStringList;
procedure CreateItems;
var
i:integer;
M:TMenuItem;
begin
for I:=0 to AFileList.Count-1 do
begin
FFileList.Add(AFileList[i]);
M:=TMenuItem.Create(Application.MainForm);
M.Caption:=MenuItemStr(AFileList[i]);
M.Hint:=MenuItemStr(AFileList[i]);
MenuItem.Add(M);
M.Tag:=FFileList.Count-1;
M.OnClick:=@InternalExecute;
end;
end;
procedure CreateSubItems;
var
i:integer;
M:TMenuItem;
begin
for i:=0 to AFolderList.Count-1 do
begin
M:=TMenuItem.Create(Application.MainForm);
M.Caption:=MenuItemStr(AFolderList[i]);
aMenuItem.Add(M);
DoFind(AFolderList[i]+DirectorySeparator,M);
end;
end;
begin
AFolderList:=TStringList.Create;
AFolderList.Sorted:=true;
AFileList:=TStringList.Create;
AFolderList.Sorted:=true;
try
R:=FindFirst(S+AllMask,faAnyFile, Rec);
while R=0 do
begin
if ((Rec.Attr and faDirectory) <>0) and (Rec.Name<>'.') and (Rec.Name<>'..') then
AFolderList.Add(S+Rec.Name)
else
begin
if AnsiLowerCase(ExtractFileExt(Rec.Name))=AnsiLowerCase(FDefaultExt) then
AFileList.Add(S+Rec.Name);
end;
R:=FindNext(Rec);
end;
FindClose(Rec);
CreateSubItems;
CreateItems;
finally
AFolderList.Free;
AFileList.Free;
end;
end;
function TCustomFolderLister.GetCount: integer;
begin
Result:=FFileList.Count;
end;
function TCustomFolderLister.GetFiles(Item: integer): string;
begin
Result:=FFileList[Item];
end;
procedure TCustomFolderLister.SetMenuItem(const AValue: TMenuItem);
begin
if FMenuItem=AValue then exit;
FMenuItem:=AValue;
end;
procedure TCustomFolderLister.SetFileFolder(const AValue: string);
begin
if FFileFolder=AValue then exit;
FFileFolder:=AValue;
if FFileFolder<>'' then
if FFileFolder[Length(FFileFolder)]<>DirectorySeparator then
FFileFolder:=FFileFolder+DirectorySeparator;
end;
procedure TCustomFolderLister.InternalExecute(Sender: TObject);
begin
if Assigned(FOnExecuteItem) then
FOnExecuteItem(Sender)
end;
procedure TCustomFolderLister.Execute;
begin
if Assigned(FMenuItem) then
DoFind(FFileFolder, FMenuItem)
else
raise Exception.Create(Name+'. Not assigned property MenuItem');
end;
constructor TCustomFolderLister.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FFileList:=TStringList.Create;
FFileList.Sorted:=false;
end;
destructor TCustomFolderLister.Destroy;
begin
FFileList.Free;
inherited Destroy;
end;
end.

View File

@ -0,0 +1,35 @@
/* XPM */
static char *DBCalcEdit[]={
"24 24 8 1",
"e c #000000",
"f c #000080",
"c c #008080",
"d c #00ffff",
". c #808000",
"# c #808080",
"a c #c0c0c0",
"b c #ffffff",
"........................",
".###############........",
".#a#baaaabaaaaa#........",
".###############........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaabb#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbcccccccccccccc...",
".#####cbdbdbdbdbdbdbce..",
"......cdeeeeeeeeccccfe..",
"......cbebbbbbbaccccfe..",
"......cdeaaaaaaaccccfe..",
"......cbccccccccccccfe..",
"......cdcebebebebebefe..",
"......cbccccccccccccfe..",
"......cdcebebebebbaefe..",
"......cbccccccccccccfe..",
"......ccfffffffffffffe..",
".......eeeeeeeeeeeeee...",
"........................",
"........................"};

View File

@ -0,0 +1,35 @@
/* XPM */
static char *DBLookUp[]={
"24 24 8 1",
"# c #000000",
"c c #000080",
"e c #800000",
". c #808000",
"f c #808080",
"d c #c0c0c0",
"b c #ff0000",
"a c #ffffff",
"..##....................",
".#aa#b.........c........",
"#daaa#b.......cc........",
"#ddaaa#......cccccccc...",
".#ddaaa##.....cc.....c..",
"..#ddaaaa###...c.....c..",
"...#ddaabbbb#........c..",
"....#ddebbb#.........c..",
"..c.#feeeb#d###########.",
"..c..#eef#daaaaaaa#aad#.",
"..c..#ef#dccccccca#a#d#.",
"..c..#e#daaaaaaaaa#ddd#.",
"..c...#.###############.",
"..c.....#aaaaaaaaaaaaa#.",
"..c.....#acccccccccaaa#.",
"..c.c...#ccccccccccccc#.",
"..c.cc..#caaaaaaaaaacc#.",
"...cccc.#ccccccccccccc#.",
"....cc..#acccccccccaaa#.",
"....c...#aaaaaaaaaaaaa#.",
"........#accccccccccaa#.",
"........#aaaaaaaaaaaaa#.",
"........###############.",
"........................"};

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,33 @@
/* XPM */
static char *TCURRENCYEDIT[]={
"24 24 6 1",
". c None",
"a c #000000",
"d c #0000ff",
"# c #808080",
"c c #c0c0c0",
"b c #ffffff",
"........................",
"........................",
"........................",
"........................",
"#######################.",
"#aaaaaaaaaaaaaaaaaaaaab.",
"#abbbbbbbbbbbbbbbbbbbcb.",
"#abbbbbbbbbbbbbaabaabcb.",
"#abbbbbbbbbbbbbbbabbbcb.",
"#abbbbdbbbbbdbbbbabbbcb.",
"#abbbddddbbddbbbbabbbcb.",
"#abbdbdbbbbbdbbbbabbbcb.",
"#abbbdddbbbbdbbbbabbbcb.",
"#abbbbdbdbbbdbbbbabbbcb.",
"#abbddddbbbbdbbbbabbbcb.",
"#abbbbdbbbbdddbbbabbbcb.",
"#abbbbbbbbbbbbbaabaabcb.",
"#abbbbbbbbbbbbbbbbbbbcb.",
"#accccccccccccccccccccb.",
"#bbbbbbbbbbbbbbbbbbbbbb.",
"........................",
"........................",
"........................",
"........................"};

View File

@ -0,0 +1,29 @@
/* XPM */
static char *TDBDateEdit[]={
"18 18 8 1",
"# c None",
"e c #000000",
"c c #000080",
"d c #0000ff",
"f c #800000",
". c #808080",
"a c #c0c0c0",
"b c #ffffff",
"...............###",
".a.baaaabaaaaa.###",
"...............###",
".a.bbbbabbbbbb.###",
".b.baababaaaab.###",
".a.bbcccccccccccc#",
".b.bacdddcdddcddce",
".a.bbcccccccccccce",
".b.bacbbbbbbbbbbce",
".a.bbcbbfbbffffbce",
".....cbffbbfbbbbce",
"#####cbbfbbfffabce",
"#####cbbfbbbbbfbce",
"#####cbbfbbabafbce",
"#####cbfffbfffabce",
"#####cbbbbbbbbbbce",
"#####cccccccccccce",
"######eeeeeeeeeeee"};

View File

@ -0,0 +1,34 @@
/* XPM */
static char *TDualListDialog[]={
"24 24 7 1",
". c None",
"b c #000000",
"e c #000080",
"c c #0000ff",
"# c #808080",
"d c #c0c0c0",
"a c #ffffff",
"........................",
"........................",
".######################.",
".#abccccccccccccccbabab.",
".#bbbbbbbbbbbbbbbbbbbbb.",
".#dadadadadadadadadadab.",
".#adadadadadadadadadadb.",
".#dbbbbadad#dadbbbbadab.",
".#abaabbadab#dabaabbadb.",
".#dbaabdbadbb#dbaabdbab.",
".#abaabbbdabbdabaabbbdb.",
".#dbaaaabadbdadbaaaabab.",
".#abaeeabdadadabaeeabdb.",
".#dbaaaabadabadbaaaabab.",
".#abaeeabdabbdabaeeabdb.",
".#dbaaaaba#bbadbaaaabab.",
".#abaaaabda#bdabaaaabdb.",
".#dbbbbbbada#adbbbbbbab.",
".#adadadadadadadadadadb.",
".#dadadadadadadadadadab.",
".#adadadadadadadadadadb.",
".#bbbbbbbbbbbbbbbbbbbbb.",
"........................",
"........................"};

View File

@ -0,0 +1,35 @@
/* XPM */
static char *TFolderLister[]={
"24 24 8 1",
". c None",
"a c #000000",
"c c #808080",
"# c #848484",
"f c #c0c0c0",
"e c #c6c6c6",
"b c #ffff00",
"d c #ffffff",
"....#a#.................",
".#a#aba#a#..............",
".ab#aba#ba...ccc........",
".##bbbbb##..cdddcc......",
"#aab#a#baa#cddddddcc....",
"abbbadabbbaddddddddda...",
"#aab#a#baa#dddddddda....",
"a##bbbbb##addddddda.....",
"eab#aba#baeddddddadcc...",
".#a#aba#a#dddddddaddda..",
"....#a#dddddddddaddda...",
"....cdfbaaddddddadda....",
"....cdbfbfaadddadda.....",
"....cdfbfcddaadadda.....",
"...cccccccccccccdaa.....",
"...cddddddddddcadaa.....",
"...cdfbfbfbfbfbacca.....",
"....cdfbfbfbfbfcaca.....",
"....cdbfbfbfbfbfaca.....",
".....cdbfbfbfbfbcaa.....",
".....ccccccccccccaa.....",
"......aaaaaaaaaaaaa.....",
"........................",
"........................"};

View File

@ -0,0 +1,33 @@
/* XPM */
static char *TLoginDialog[]={
"24 24 6 1",
". c None",
"b c #000000",
"c c #0000ff",
"# c #808080",
"d c #c0c0c0",
"a c #ffffff",
"........................",
"........................",
".######################.",
".#abccccccccccccccbabab.",
".#bbbbbbbbbbbbbbbbbbbbb.",
".#adadadadadadadadadadb.",
".#dadadadadadadadadadab.",
".#adadadadadadadadadadb.",
".#dadadadadadadadadadab.",
".#adadadadadadadadadadb.",
".#dada#bbadadadadadadab.",
".#ada#b#bbadadadadadadb.",
".#dadbbdabbbbbbbbbbadab.",
".#adabbadbbbbbbbbbbdadb.",
".#dad#b#bbdadbbabbdadab.",
".#adad#bbdadabbdbbadadb.",
".#dadadddadadbbabbdadab.",
".#adadadadadadadadadadb.",
".#dadadadadadadadadadab.",
".#adadadadadadadadadadb.",
".#dadadadadadadadadadab.",
".#bbbbbbbbbbbbbbbbbbbbb.",
"........................",
"........................"};

View File

@ -0,0 +1,35 @@
/* XPM */
static char *TPAGEMANAGER[]={
"24 24 8 1",
". c None",
"b c #000000",
"c c #000080",
"f c #00ffff",
"d c #800000",
"# c #808080",
"e c #ffff00",
"a c #ffffff",
"........................",
"........................",
".........##############.",
".........#aaaaaaaaaaaab.",
".......##############ab.",
".......#aaaaaaaaaaaabab.",
".....##############abab.",
".....#aaaaaaaaaaaababab.",
".....#acccccaddddababab.",
".....#aaaaaaadaadababab.",
".....#accccaadaadababab.",
".....#aaaaaaadaadababab.",
".....#abbbaaaddddababab.",
".bbbbbbeaebaaaaaaababbb.",
".bbbfbeabbbbbbbbaabab...",
".bbbfbaeaeaeaeaebabbb...",
".bbbfbeaeabbbbbbaab.....",
".bbbfbaeaeaeab###bb.....",
".bbbfbeaeabbb...........",
".bbbfbbeaeaeb...........",
".bebbb.bbbbb............",
".bbb....................",
"........................",
"........................"};

View File

@ -0,0 +1,36 @@
/* XPM */
static char *TRXAPPICON[]={
"24 24 9 1",
". c None",
"a c #000000",
"f c #800000",
"c c #808000",
"e c #808080",
"g c #c0c0c0",
"# c #ff0000",
"d c #ffff00",
"b c #ffffff",
"...........###..##...##.",
"............#..#..#.#..#",
"........a...#..#....#..#",
"......aabaa.#..#....#..#",
"....aabbcdda#..#..#.#..#",
"..aabbccccc###..##...##.",
".abbddddddddddda........",
".aaaaaaaaaaaaaaa..##b...",
".abddeebddeebdda...##b..",
"..cceeecceeeccc....###b.",
"..cbebbcbebbcbc.####d#..",
"..cdebbcdebbcee##d##d#b.",
"..cbebbcbebbcebfd#dd#b..",
"..cdebbcdebbcebbfbb##...",
".adddaadddaadebgbf###b..",
".aaaaaaaaaaaebbgegf#....",
".adbdbdbdbdebebegeea....",
".aaaaaaaaaebebeeaaaa....",
".........ebebeea........",
"........ebgbeea.........",
"........agbeea..........",
"........aeeaa...........",
".........aa.............",
"........................"};

View File

@ -0,0 +1,31 @@
/* XPM */
static char *TRXCLOCK[]={
"24 24 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ff0000",
"........................",
"........................",
"........................",
"....##...........##.....",
"...#aa#..#####..#aa#....",
"..#aaa###bbbbb###aaa#...",
"..#aaa#bbbb#bbbb#aaa#...",
"...###bbbbb#bbbbb###....",
"....#bbb#bbbbb#bbb#.....",
"....#bbbbbb#bbbbbb#.....",
"...#bb#bbbb#bbbb#bb#....",
"...#bbbbbbb#bbbbbbb#....",
"...#b##bbbb#bbbb##b#....",
"...#bbbbbbbb#bbbbbb#....",
"...#bb#bbbbbb#bb#bb#....",
"....#bbbbbbbbbbbbb#.....",
"....#bbb#bbbbb#bbb#.....",
".....#bbbbb#bbbbb#......",
"......#bbbb#bbbb#.......",
".....####bbbbb####......",
"....###..#####..###.....",
"....##...........##.....",
"........................",
"........................"};

View File

@ -0,0 +1,33 @@
/* XPM */
static char *TRXDBCOMBOBOX[]={
"24 24 6 1",
". c None",
"c c #000000",
"d c #000080",
"# c #808080",
"a c #c0c0c0",
"b c #ffffff",
"........................",
".###############........",
".#a#baaaabaaaaa#........",
".###############........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaabb#........",
".#a#bbccccccccccccccccc.",
".#b#bacbbbbbbbbbbbcbbac.",
".#a#bbcbdddddddddbcbcac.",
".#####cbbbbbbbbbbbcaaac.",
"......ccccccccccccccccc.",
"...d....cbbbbbbbbbbbbbc.",
"..ddd...cbbddddddddbbbc.",
".ddddd..cdddddddddddddc.",
"...d....cddbbbbbbbbbddc.",
"...d....cdddddddddddddc.",
"...d....cbbddddddddbbbc.",
"...d....cbbbbbbbbbbbbbc.",
"...dddd.cbbdddddddddbbc.",
"........cbbbbbbbbbbbbbc.",
"........ccccccccccccccc.",
"........................"};

View File

@ -0,0 +1,31 @@
/* XPM */
static char *TRXDICE[]={
"24 24 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"........................",
"........................",
"........................",
"...........##...........",
".........##aa##.........",
".......##aa##aa##.......",
".....##aaaa##aaaa##.....",
"...##aaaaaaaaaaaaaa##...",
"...#b##aaaa##aaaa##a#...",
"...#bbb##aa##aa##aaa#...",
"...#bbbbb##aa##aa##a#...",
"...#bbbbbbb##aaaa##a#...",
"...#bbbbbbb#a##aaaaa#...",
"...#bbb##bb#a##aaaaa#...",
"...#bbb##bb#aaaaaaaa#...",
"...#bbbbbbb#aaaaa##a#...",
"...#bbbbbbb#aaaaa##a#...",
"...##bbbbbb#a##aaaa##...",
".....##bbbb#a##aa##.....",
".......##bb#aaa##.......",
".........###a##.........",
"...........##...........",
"........................",
"........................"};

View File

@ -0,0 +1,30 @@
/* XPM */
static char *TRXLABEL[]={
"24 24 3 1",
". c None",
"# c #000000",
"a c #ffffff",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
".........####aa.........",
"..........####aa........",
".........#####aa........",
".........##a###aa.......",
"........##aa.##aa.......",
"........##aa.###aa......",
".......##aa...##aa......",
".......##########aa.....",
"......##aaaaaaa##aa.....",
"......##aa.....###aa....",
".....##aa.......##aa....",
"....####aa.....####aa...",
".....aaaaa......aaaaa...",
"........................",
"........................",
"........................",
"........................",
"........................"};

View File

@ -0,0 +1,34 @@
/* XPM */
static char *TRXLookUpEdit[]={
"24 24 7 1",
". c None",
"# c #000000",
"e c #800000",
"c c #808080",
"d c #c0c0c0",
"b c #ff0000",
"a c #ffffff",
"..##....................",
".#aa#b..ccccccccccccccc.",
"#daaa#b.cdcaddddadddddc.",
"#ddaaa#.ccccccccccccccc.",
".#ddaaa##dcaaaadaaaaaac.",
"..#ddaaaa###ddadaddddac.",
"...#ddaabbbb#aadaaaaaac.",
"....#ddebbb#ddadadddaac.",
"....#ceeeb#aaaadaaaaaac.",
".....#eec#caddadaddddac.",
".....#ec#dcaaaadaaaaaac.",
".....#e#ccccccccccccccc.",
"......#.................",
"..ccccccccccccccccccccc.",
"..c###################a.",
"..c#aaaaaaaaaadaaaaaada.",
"..c#aaaaaaaaaadaddddcda.",
"..c#aaaaaaaaaadad##dcda.",
"..c#aaaaaaaaaadaddddcda.",
"..c#aaaaaaaaaadacccccda.",
"..c#dddddddddddddddddda.",
"..caaaaaaaaaaaaaaaaaaaa.",
"........................",
"........................"};

View File

@ -0,0 +1,32 @@
/* XPM */
static char *TRXSWITCH[]={
"24 24 5 1",
". c None",
"# c #000000",
"b c #808080",
"c c #ff0000",
"a c #ffffff",
"........................",
"........................",
".....##############.....",
".....##############.....",
".....###aaaaaaa#b##.....",
".....##aaaaaaa#bb##.....",
".....#aaaaaaa#bbb##.....",
".....#########bbb##.....",
".....#aaaaaaa#bbb##.....",
".....#aaaaaaaa#bb##.....",
".....##aaaaaaa#bb##.....",
".....##aaaaaaaa#b##.....",
".....###########b##.....",
".....##aaaaaaaa#b##.....",
".....##a######a#b##.....",
".....##a#cccc#a#b##.....",
".....##a######a#b##.....",
".....##aaaaaaaa#b##.....",
".....###########b##.....",
".....###bbbbbbbb###.....",
".....##############.....",
".....##############.....",
"........................",
"........................"};

View File

@ -0,0 +1,36 @@
/* XPM */
static char *TReportManager[]={
"24 24 9 1",
". c None",
"# c #000000",
"c c #0000ff",
"g c #808000",
"f c #808080",
"b c #c0c0c0",
"d c #ff00ff",
"e c #ffff00",
"a c #ffffff",
"........................",
"........................",
"......#########.........",
".....#aaaaaaaa#.........",
".....#a#####a#..........",
"....#aaaaaaaa#..........",
"....#a#####a####........",
"...#aaaaaaaa#b#b#.......",
"..##########b#b##.......",
".#bbbbbbbbbb#b#b#.......",
".#############bb#.......",
".#bccbbbbbbbb#b#d###....",
".#beebb###bbb#b##...#.#.",
".######eae######.....##.",
"..#bbf#aeaeaeae#....###.",
"...####eaeaeaeae###.....",
"......#aeae###########..",
"......#eae#ggggggggg#...",
"......#ae#ggggggggg#....",
"......#e#ggggggggg#.....",
"......##ggggggggg#......",
"......###########.......",
"........................",
"........................"};

View File

@ -0,0 +1,29 @@
/* XPM */
static char *TRxDBCalcEdit_xpm[]={
"18 18 8 1",
"# c None",
"e c #000000",
"f c #000080",
"c c #008080",
"d c #00ffff",
". c #808080",
"a c #c0c0c0",
"b c #ffffff",
"...............###",
".a.baaaabaaaaa.###",
"...............###",
".a.bbbbabbbbbb.###",
".b.baababaaaab.###",
".a.bbbbabbbbbb.###",
".bbcccccccccccccc#",
".acbdbdbdbdbdbdbce",
".bcdeeeeeeeeccccfe",
".acbebbbbbbaccccfe",
"..cdeaaaaaaaccccfe",
"##cbccccccccccccfe",
"##cdcebebebebebefe",
"##cbccccccccccccfe",
"##cdcebebebebbaefe",
"##cbccccccccccccfe",
"##ccfffffffffffffe",
"###eeeeeeeeeeeeee#"};

View File

@ -0,0 +1,32 @@
/* XPM */
static char *TRxDBComboEdit[]={
"24 24 5 1",
". c None",
"c c #000000",
"# c #808080",
"a c #c0c0c0",
"b c #ffffff",
"........................",
".###############........",
".#a#baaaabaaaaa#........",
".###############........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaabb#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbbabbbbbb#........",
".######################.",
"..#cccccccccccccccccccb.",
"..#cbbbbbbbbbabbbbbbbab.",
"..#cbbbbbbbbbabaaaaa#ab.",
"..#cbbbbbbbbbabaaaaa#ab.",
"..#cbbbbbbbbbabac#ca#ab.",
"..#cbbbbbbbbbabaaaaa#ab.",
"..#cbbbbbbbbbabaaaaa#ab.",
"..#cbbbbbbbbbab######ab.",
"..#caaaaaaaaaaaaaaaaaab.",
"..#bbbbbbbbbbbbbbbbbbbb.",
"........................",
"........................"};

View File

@ -0,0 +1,37 @@
/* XPM */
static char *TRxDBGrid[]={
"24 24 10 1",
". c None",
"c c #000000",
"f c #008000",
"e c #00ffff",
"g c #800080",
"# c #808080",
"a c #c0c0c0",
"d c #ff0000",
"h c #ff00ff",
"b c #ffffff",
"........................",
".###############........",
".#a#baaaabaaaaa#........",
".###############........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaabb#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bcccccccccccccccccc.",
".####cacbaaaaabaaaaaaac.",
".....cccccccccccccccccc.",
".....cacbbbbbabbbbbbbbc.",
".....cbcaaaaaaaaaaaaaac.",
".....cacbbbbbabbbbbbbbc.",
".....ccccdddddddddddddc.",
".....cbebcbbbabbbbbbbbc.",
".cccccebecddddddddddddc.",
".cfffcbebccbbabbbbbbbbc.",
".cfffcccccgcaaaaaaaaaac.",
".cfffcbcbchgcabbbbbbbbc.",
".cccccccccghgcccccccccc.",
".........cccccc........."};

View File

@ -0,0 +1,35 @@
/* XPM */
static char *TRxDBLookupCombo[]={
"24 24 8 1",
". c None",
"# c #000000",
"c c #000080",
"e c #800000",
"f c #808080",
"d c #c0c0c0",
"b c #ff0000",
"a c #ffffff",
"..##....................",
".#aa#b.........c........",
"#daaa#b.......cc........",
"#ddaaa#......cccccccc...",
".#ddaaa##.....cc.....c..",
"..#ddaaaa###...c.....c..",
"...#ddaabbbb#........c..",
"....#ddebbb#.........c..",
"..c.#feeeb#d###########.",
"..c..#eef#daaaaaaa#aad#.",
"..c..#ef#dccccccca#a#d#.",
"..c..#e#daaaaaaaaa#ddd#.",
"..c...#.###############.",
"..c.....#aaaaaaaaaaaaa#.",
"..c.....#acccccccccaaa#.",
"..c.c...#ccccccccccccc#.",
"..c.cc..#caaaaaaaaaacc#.",
"...cccc.#ccccccccccccc#.",
"....cc..#acccccccccaaa#.",
"....c...#aaaaaaaaaaaaa#.",
"........#accccccccccaa#.",
"........#aaaaaaaaaaaaa#.",
"........###############.",
"........................"};

View File

@ -0,0 +1,35 @@
/* XPM */
static char *TRxDbLookupList[]={
"24 24 8 1",
". c None",
"# c #000000",
"c c #000080",
"e c #800000",
"f c #808080",
"d c #c0c0c0",
"b c #ff0000",
"a c #ffffff",
"..##....................",
".#aa#b.........c........",
"#daaa#b.......cc........",
"#ddaaa#......ccccccc....",
".#ddaaa##.....cc....c...",
"..#ddaaaa###...c....c...",
"...#ddaabbbb#.......c...",
"....#ddebbb#........c...",
"..c.#feeeb#d###########.",
"..c..#eef#aaaaaaaa#aad#.",
"..c..#ef#dcccccaaa#a#d#.",
"..c..#e#aaaaaaaaaa#ddd#.",
"..c...#daaccccccaa#####.",
"..c....#aaaaaaaaaa#ddd#.",
"..c....#accccccaaa#ddd#.",
"..c.c..#cccccccccc#ddd#.",
"..c.cc.#caaaaaaacc#ddd#.",
"...cccc#cccccccccc#ddd#.",
"....cc.#accccccaaa#####.",
"....c..#aaaaaaaaaa#add#.",
".......#acccccccaa#a#d#.",
".......#aaaaaaaaaa#ddd#.",
".......################.",
"........................"};

View File

@ -0,0 +1,33 @@
/* XPM */
static char *TRxFolderMonitor[]={
"24 24 6 1",
". c None",
"b c #000000",
"# c #808080",
"c c #c0c0c0",
"d c #ffff00",
"a c #ffffff",
"........................",
"........................",
".............###........",
"............#aaa##......",
"...........#aaaaaa##....",
"..........#aaaaaaaaab...",
"..........#aaaaaaaab....",
".........#aaaaaaaab.....",
".........#aaaaaaaba##...",
"......###aaaaaaaabaaab..",
".....#aa#aaaaaaabaaab...",
"....#acdbbaaaaaabaab....",
"....#adcdcbbaaabaab.....",
"....#acdc#aabbabaab.....",
"...#############abb.....",
"...#aaaaaaaaaa#babb.....",
"...#acdcdcdcdcdb##b.....",
"....#acdcdcdcdc#b#b.....",
"....#adcdcdcdcdcb#b.....",
".....#adcdcdcdcd#bb.....",
".....############bb.....",
"......bbbbbbbbbbbbb.....",
"........................",
"........................"};

View File

@ -0,0 +1,33 @@
/* XPM */
static char *TRxMemoryData[]={
"24 24 6 1",
". c None",
"# c #000000",
"c c #000080",
"d c #808080",
"a c #c0c0c0",
"b c #ffffff",
"........................",
"####################....",
"#a#baaaaaabaaaaaaaa#....",
"####################....",
"#a#bbbbbbabbbbbbbbb#....",
"#b#bccccbabcccccccb#....",
"#a#bbbbbbabbbbbbbbb#....",
"#b#bccccbabccccccbb#....",
"#a#bbbbbbabbbbbbbbb#....",
"#b#bccccbabccccccbb#....",
"#a#bbbbbbabbbbbbb###....",
"#b#bccccbabcbbb#daa#....",
"#a#bbbbbbabbb#daaaaa#...",
"#b#bccccbab#daaaaaaaa#..",
"#a#bbbbbb#daaaaaaaaaad#.",
"#b#bcccbdaaaaaaaaaaddd#.",
"#a#bbbbdbaaaaaaaaddd#a#.",
"########abaaaaaddd#ad#..",
"........#dbaaddd#ad#.#..",
".........#dbdd#ad#.#....",
"..........#a#ad#.#......",
"...........#d#.#........",
".............#..........",
"........................"};

View File

@ -0,0 +1,38 @@
/* XPM */
static char *TSECRETPANEL[]={
"24 24 11 1",
". c None",
"# c #000000",
"d c #000080",
"i c #0000ff",
"e c #008000",
"g c #800000",
"a c #808080",
"b c #c0c0c0",
"h c #ff0000",
"f c #ffff00",
"c c #ffffff",
"........................",
"........................",
".######################.",
".#aaaaaaaaaaaaaaaaaaab#.",
".#aaaaaaaaaaaaaaaaaacc#.",
".#aabbbbbbbbbbbbbbbbcc#.",
".#aabbbbbd#dbbbbbbbbcc#.",
".#aabbbbdefedbbbbbbbcc#.",
".#aabbbb#fff#aabbbbbcc#.",
".#aabbbbdefedbb##bbbcc#.",
".#aabbbbbd#dbbbggbbbcc#.",
".#aabbbbabbbbb#hh#bbcc#.",
".#aabbbbabbbbb#hh#bbcc#.",
".#aabb#####bb#hhhh#bcc#.",
".#aabb#iii#bb######bcc#.",
".#aabb#iii#aabbbbbbbcc#.",
".#aabb#iii#bbbbbbbbbcc#.",
".#aabb#####bbbbbbbbbcc#.",
".#aabbbbbbbbbbbbbbbbcc#.",
".#accccccccccccccccccc#.",
".#bccccccccccccccccccc#.",
".######################.",
"........................",
"........................"};

View File

@ -0,0 +1,71 @@
/* XPM */
static char *DICE1[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaaaaaaaaaaa####.....................",
"...................####aaaaaaaaaaaaaaaaaa####...................",
".................####aaaaaaaaaaaaaaaaaaaaaa####.................",
"...............####aaaaaaaaaaaaaaaaaaaaaaaaaa####...............",
".............####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.............",
"...........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......",
".....####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####.....",
"...####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####...",
".####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa####.",
"#####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa#####",
"##b####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####a##",
"##bbb####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####aaa##",
"##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaa###aaaa##",
"##bbbbbbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaa####aaaa######aaa##",
"##bbbbbbbbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaa####aaaaaa######aaa##",
"##bbbbbbbbbbbbbbbbb####aaaaaaaaaaaaaaaaaa####aaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbb####aaaaaaaaaaaaaa####aaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaa###aaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbb###bbbb#######bbb##aaa#######aaaa###aaaaaaaaaaaa##",
"##bbbbbbbbbbb######bbb######bbb##aaa######aaa######aaaaaaaaaaa##",
"##bbbbbbbbbbb######bbbb####bbbb##aaaa####aaaa######aaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbbb###bbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaa###aaaa##",
"##bbb######bbb######bbbbbbbbbbb##aaaaaaaaaaa######aaa######aaa##",
"##bbb######bbbb####bbbbbbbbbbbb##aaaaaaaaaaaa####aaaa######aaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##",
"##bbbb######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa######aaaa##",
"###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaa###",
".####bbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa####.....",
".......####bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa####.......",
".........####bbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaa####.........",
"...........####bbbbbbbbbbbbbbbb##aaa#######aaaaaa####...........",
".............####bbbbbbbbbbbbbb##aaa######aaaaa####.............",
"...............####bbbbbbbbbbbb##aaaa####aaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@ -0,0 +1,71 @@
/* XPM */
static char *DICE2[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaa####aaaaa####.....................",
"...................####aaaaa########aaaaa####...................",
".................####aaaaaa##########aaaaaa####.................",
"...............####aaaaaaaa##########aaaaaaaa####...............",
".............####aaaaaaaaaaa########aaaaaaaaaaa####.............",
"...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......",
".....####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.....",
"...####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####...",
".####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.",
"#####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#####",
"##b####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####a##",
"##bbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaa##",
"##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbbbbbbbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##",
"##bbbbbbbbbbbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##",
"##bbbbbbbbbbbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##",
"##bbbbbbbbbbbbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbb######aaaa###aaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbb###bbbbbbbbbbbbbb##aaa#######aaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbb######bbbbbbbbbbbb##aaa######aaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbb######bbbbbbbbbbbb##aaaa####aaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaa###aaaa##",
"##bbbbbbbbbbbb######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa######aaa##",
"##bbbbbbbbbbbbb####bbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa######aaaa##",
"###bbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaa###",
".####bbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa####.....",
".......####bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa####.......",
".........####bbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaa####.........",
"...........####bbbbbbbbbbbbbbbb##aaa#######aaaaaa####...........",
".............####bbbbbbbbbbbbbb##aaa######aaaaa####.............",
"...............####bbbbbbbbbbbb##aaaa####aaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@ -0,0 +1,71 @@
/* XPM */
static char *DICE3[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaa####aaaaa####.....................",
"...................####aaaaa########aaaaa####...................",
".................####aaaaaa##########aaaaaa####.................",
"...............####aaaaaaaa##########aaaaaaaa####...............",
".............####aaaaaaaaaaa########aaaaaaaaaaa####.............",
"...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......",
".....####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####.....",
"...####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####...",
".####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa####.",
"#####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa#####",
"##b####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####a##",
"##bbb####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####aaa##",
"##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbbbbbbbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##",
"##bbbbbbbbbbbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##",
"##bbbbbbbbbbbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##",
"##bbbbbbbbbbbbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaa###aaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa###aaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaa######aaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa######aaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbb######bbb##aaa######aaaaaaaaaa#######aaa##",
"##bbbbbbbbbbbbbbbbbbbbb####bbbb##aaaa####aaaaaaaaaaa######aaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaaaaa##",
"##bbbb###bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa###aaaa##",
"##bbb######bbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaa######aaa##",
"##bbb######bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa######aaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaa######aaaaaaaaaa#######aaa##",
"##bbbb######bbbbbbbbbbbbbbbbbbb##aaaa####aaaaaaaaaaa######aaaa##",
"###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaa###",
".####bbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa####.....",
".......####bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa####.......",
".........####bbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaa####.........",
"...........####bbbbbbbbbbbbbbbb##aaa#######aaaaaa####...........",
".............####bbbbbbbbbbbbbb##aaa######aaaaa####.............",
"...............####bbbbbbbbbbbb##aaaa####aaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@ -0,0 +1,71 @@
/* XPM */
static char *DICE4[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaa####aaaaa####.....................",
"...................####aaaaa########aaaaa####...................",
".................####aaaaaa##########aaaaaa####.................",
"...............####aaaaaaaa##########aaaaaaaa####...............",
".............####aaaaaaaaaaa########aaaaaaaaaaa####.............",
"...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......",
".....####aaaaa####aaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa####.....",
"...####aaaaa########aaaaaaaaaaaaaaaaaaaaaaaa########aaaaa####...",
".####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.",
"#####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa#####",
"##b####aaaaa########aaaaaaaaaaaaaaaaaaaaaaaa########aaaaa####a##",
"##bbb####aaaaa####aaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa####aaa##",
"##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbb###bbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##",
"##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##",
"##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##",
"##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##",
"##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##",
"##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##",
"##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb###bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbb######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbb####bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb###bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbb######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbb####bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###",
".####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa####.....",
".......####bbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa####.......",
".........####bbbbbbbb#######bbb##aaa#######aaaaaaaa####.........",
"...........####bbbbbb#######bbb##aaa#######aaaaaa####...........",
".............####bbbbb######bbb##aaa######aaaaa####.............",
"...............####bbbb####bbbb##aaaa####aaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@ -0,0 +1,71 @@
/* XPM */
static char *DICE5[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaa####aaaaa####.....................",
"...................####aaaaa########aaaaa####...................",
".................####aaaaaa##########aaaaaa####.................",
"...............####aaaaaaaa##########aaaaaaaa####...............",
".............####aaaaaaaaaaa########aaaaaaaaaaa####.............",
"...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......",
".....####aaaaa####aaaaaaaaaaaa####aaaaaaaaaaaa####aaaaa####.....",
"...####aaaaa########aaaaaaaa########aaaaaaaa########aaaaa####...",
".####aaaaaa##########aaaaaa##########aaaaaa##########aaaaaa####.",
"#####aaaaaa##########aaaaaa##########aaaaaa##########aaaaaa#####",
"##b####aaaaa########aaaaaaaa########aaaaaaaa########aaaaa####a##",
"##bbb####aaaaa####aaaaaaaaaaaa####aaaaaaaaaaaa####aaaaa####aaa##",
"##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbb###bbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaaaaaaaaa##",
"##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaaaaaaaaaaa##",
"##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaa###aaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbb######bbb##aaaaaaaaaaaa######aaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbb####bbbb##aaaaaaaaaaaa######aaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbbb###bbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbb######bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa######aaaaaaaaaaaa##",
"##bbb######bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaa####aaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###",
".####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaa####.....",
".......####bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaa####.......",
".........####bbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaa####.........",
"...........####bbbbbb#######bbb##aaaaaaaaaaaaaaaa####...........",
".............####bbbbb######bbb##aaaaaaaaaaaaaa####.............",
"...............####bbbb####bbbb##aaaaaaaaaaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@ -0,0 +1,71 @@
/* XPM */
static char *DICE6[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaa####aaaaa####.....................",
"...................####aaaaa########aaaaa####...................",
".................####aaaaaa##########aaaaaa####.................",
"...............####aaaaaaaa##########aaaaaaaa####...............",
".............####aaaaaaaaaaa########aa####aaaaa####.............",
"...........####aaaaaaaaaaaaaaa####aa########aaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaa####.......",
".....####aaaaa####aaaaaaaaaaaaaaaaaa########aa####aaaaa####.....",
"...####aaaaa########aaaaaaaaaaaaaaaaaa####aa########aaaaa####...",
".####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.",
"#####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa#####",
"##b####aaaaa########aa####aaaaaaaaaaaaaaaaaa########aaaaa####a##",
"##bbb####aaaaa####aa########aaaaaaaaaaaaaaaaaa####aaaaa####aaa##",
"##bbbbb####aaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaa########aa####aaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbb###bbbb####aaaaa####aa########aaaaaaaaaaa####aaaa###aaaa##",
"##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##",
"##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##",
"##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##",
"##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##",
"##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##",
"##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbb###bbbb#######bbb##aaaaaaaaaaaaaa###aaaaaaaaaaaa##",
"##bbbbbbbbbbb######bbb######bbb##aaaaaaaaaaaa######aaaaaaaaaaa##",
"##bbbbbbbbbbb######bbbb####bbbb##aaaaaaaaaaaa######aaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbbb###bbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##",
"##bbb######bbb######bbbbbbbbbbb##aaaaaaaaaaa######aaaaaaaaaaaa##",
"##bbb######bbbb####bbbbbbbbbbbb##aaaaaaaaaaaa####aaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###",
".####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa####.....",
".......####bbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa####.......",
".........####bbbbbbbb#######bbb##aaa#######aaaaaaaa####.........",
"...........####bbbbbb#######bbb##aaa#######aaaaaa####...........",
".............####bbbbb######bbb##aaa######aaaaa####.............",
"...............####bbbb####bbbb##aaaa####aaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@ -0,0 +1,55 @@
/* XPM */
static char *RXSWITCH_OFF[]={
"32 48 4 1",
". c None",
"# c #000000",
"b c #808080",
"a c #ffffff",
"................................",
"................................",
"................................",
"................................",
"....########################....",
"....#aaaaaaaaaaaaaaaaaaaaaa#....",
"....#a####################a#....",
"....#a####################a#....",
"....#a##aaaaaaaaaaaaaaa#b#a#....",
"....#a#################bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#################bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....##aaa#########aaa#bbb#a#....",
"....##aa#aaaaaaaa#aaa#bbb#a#....",
"....#aaa#aaaaaaa#aaa#bbbb#a#....",
"....#aa#aaaaaaaa#aaa#bbbb#a#....",
"...#aaa#########aaa#bbbbb#a#....",
"...#aaaaaaaaaaaaaaa#bbbbb#a#....",
"..#aaaaaaaaaaaaaaa#bbbbbb#a#....",
"..#################bbbbbb#a#....",
"..#aaaaaaaaaaaaaaa#bbbbbb#a#....",
"...#aaaaaaaaaaaaaaa#bbbbb#a#....",
"....#aaaaaaaaaaaaaaa#bbbb#a#....",
"....##aaaaaaaaaaaaaaa#bbb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a##aaaaaaaaaaaaaaa#b#a#....",
"....#a####################a#....",
"....#a####################a#....",
"....#aaaaaaaaaaaaaaaaaaaaaa#....",
"....########################....",
"................................",
"................................",
"................................",
"................................",
"................................"};

View File

@ -0,0 +1,56 @@
/* XPM */
static char *RXSWITCH_ON[]={
"32 48 5 1",
". c None",
"# c #000000",
"b c #808080",
"c c #ff0000",
"a c #ffffff",
"................................",
"................................",
"................................",
"................................",
"....########################....",
"....#aaaaaaaaaaaaaaaaaaaaaa#....",
"....#a####################a#....",
"....#a####################a#....",
"....#a##aaaaaaaaaaaaaaa#b#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....##aaaaaaaaaaaaaaa#bbb#a#....",
"....#aaaaaaaaaaaaaaa#bbbb#a#....",
"...#aaaaaaaaaaaaaaa#bbbbb#a#....",
"..#aaaaaaaaaaaaaaa#bbbbbb#a#....",
"..#################bbbbbb#a#....",
"..#aaaaaaaaaaaaaaa#bbbbbb#a#....",
"...#aaaaaaaaaaaaaaa#bbbbb#a#....",
"...#aaaaaaaaaaaaaaa#bbbbb#a#....",
"....#aaaaaaaaaaaaaaa#bbbb#a#....",
"....#aaaaaaaaaaaaaaa#bbbb#a#....",
"....##aaaaaaaaaaaaaaa#bbb#a#....",
"....##aaaaaaaaaaaaaaa#bbb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#################bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaa#########aaa#bb#a#....",
"....#a#aaa#ccccccc#aaa#bb#a#....",
"....#a#aaa#ccccccc#aaa#bb#a#....",
"....#a#aaa#ccccccc#aaa#bb#a#....",
"....#a#aaa#ccccccc#aaa#bb#a#....",
"....#a#aaa#########aaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#aaaaaaaaaaaaaaa#bb#a#....",
"....#a#################bb#a#....",
"....#a#bbbbbbbbbbbbbbbb#b#a#....",
"....#a##bbbbbbbbbbbbbbbb##a#....",
"....#a####################a#....",
"....#aaaaaaaaaaaaaaaaaaaaaa#....",
"....########################....",
"................................",
"................................",
"................................",
"................................",
"................................"};

View File

@ -0,0 +1,2 @@
del rx.lrs
C:\lazarus\tools\lazres.exe rx.lrs TDBDateEdit.xpm TRXLookUpEdit.xpm TRxDBCalcEdit.xpm TRxDBLookupCombo.xpm TRxDBGrid.xpm TDualListDialog.xpm TFolderLister.xpm TRxMemoryData.xpm TCURRENCYEDIT.xpm TRXSWITCH.xpm TRXDICE.xpm TRXDBCOMBOBOX.xpm ttoolpanel.xpm trxxpmanifest.xpm TPAGEMANAGER.xpm TRXAPPICON.xpm TSECRETPANEL.xpm TRXLABEL.xpm

269
components/rx/images/rx.lrs Normal file
View File

@ -0,0 +1,269 @@
LazarusResources.Add('TDBDateEdit','XPM',[
'/* XPM */'#10'static char *TDBDateEdit[]={'#10'"18 18 8 1",'#10'"# c None",'
+#10'"e c #000000",'#10'"c c #000080",'#10'"d c #0000ff",'#10'"f c #800000",'
+#10'". c #808080",'#10'"a c #c0c0c0",'#10'"b c #ffffff",'#10'"..............'
+'.###",'#10'".a.baaaabaaaaa.###",'#10'"...............###",'#10'".a.bbbbabbb'
+'bbb.###",'#10'".b.baababaaaab.###",'#10'".a.bbcccccccccccc#",'#10'".b.bacdd'
+'dcdddcddce",'#10'".a.bbcccccccccccce",'#10'".b.bacbbbbbbbbbbce",'#10'".a.bb'
+'cbbfbbffffbce",'#10'".....cbffbbfbbbbce",'#10'"#####cbbfbbfffabce",'#10'"##'
+'###cbbfbbbbbfbce",'#10'"#####cbbfbbabafbce",'#10'"#####cbfffbfffabce",'#10
+'"#####cbbbbbbbbbbce",'#10'"#####cccccccccccce",'#10'"######eeeeeeeeeeee"};'
+#10
]);
LazarusResources.Add('TRXLookUpEdit','XPM',[
'/* XPM */'#10'static char *TRXLookUpEdit[]={'#10'"24 24 7 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"e c #800000",'#10'"c c #808080",'#10'"d c #c0c0c0'
+'",'#10'"b c #ff0000",'#10'"a c #ffffff",'#10'"..##....................",'#10
+'".#aa#b..ccccccccccccccc.",'#10'"#daaa#b.cdcaddddadddddc.",'#10'"#ddaaa#.cc'
+'ccccccccccccc.",'#10'".#ddaaa##dcaaaadaaaaaac.",'#10'"..#ddaaaa###ddadadddd'
+'ac.",'#10'"...#ddaabbbb#aadaaaaaac.",'#10'"....#ddebbb#ddadadddaac.",'#10'"'
+'....#ceeeb#aaaadaaaaaac.",'#10'".....#eec#caddadaddddac.",'#10'".....#ec#dc'
+'aaaadaaaaaac.",'#10'".....#e#ccccccccccccccc.",'#10'"......#...............'
+'..",'#10'"..ccccccccccccccccccccc.",'#10'"..c###################a.",'#10'".'
+'.c#aaaaaaaaaadaaaaaada.",'#10'"..c#aaaaaaaaaadaddddcda.",'#10'"..c#aaaaaaaa'
+'aadad##dcda.",'#10'"..c#aaaaaaaaaadaddddcda.",'#10'"..c#aaaaaaaaaadacccccda'
+'.",'#10'"..c#dddddddddddddddddda.",'#10'"..caaaaaaaaaaaaaaaaaaaa.",'#10'"..'
+'......................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRxDBCalcEdit','XPM',[
'/* XPM */'#10'static char *TRxDBCalcEdit_xpm[]={'#10'"18 18 8 1",'#10'"# c N'
+'one",'#10'"e c #000000",'#10'"f c #000080",'#10'"c c #008080",'#10'"d c #00'
+'ffff",'#10'". c #808080",'#10'"a c #c0c0c0",'#10'"b c #ffffff",'#10'"......'
+'.........###",'#10'".a.baaaabaaaaa.###",'#10'"...............###",'#10'".a.'
+'bbbbabbbbbb.###",'#10'".b.baababaaaab.###",'#10'".a.bbbbabbbbbb.###",'#10'"'
+'.bbcccccccccccccc#",'#10'".acbdbdbdbdbdbdbce",'#10'".bcdeeeeeeeeccccfe",'#10
+'".acbebbbbbbaccccfe",'#10'"..cdeaaaaaaaccccfe",'#10'"##cbccccccccccccfe",'
+#10'"##cdcebebebebebefe",'#10'"##cbccccccccccccfe",'#10'"##cdcebebebebbaefe"'
+','#10'"##cbccccccccccccfe",'#10'"##ccfffffffffffffe",'#10'"###eeeeeeeeeeeee'
+'e#"};'#10
]);
LazarusResources.Add('TRxDBLookupCombo','XPM',[
'/* XPM */'#10'static char *TRxDBLookupCombo[]={'#10'"24 24 8 1",'#10'". c No'
+'ne",'#10'"# c #000000",'#10'"c c #000080",'#10'"e c #800000",'#10'"f c #808'
+'080",'#10'"d c #c0c0c0",'#10'"b c #ff0000",'#10'"a c #ffffff",'#10'"..##...'
+'.................",'#10'".#aa#b.........c........",'#10'"#daaa#b.......cc..'
+'......",'#10'"#ddaaa#......cccccccc...",'#10'".#ddaaa##.....cc.....c..",'#10
+'"..#ddaaaa###...c.....c..",'#10'"...#ddaabbbb#........c..",'#10'"....#ddebb'
+'b#.........c..",'#10'"..c.#feeeb#d###########.",'#10'"..c..#eef#daaaaaaa#aa'
+'d#.",'#10'"..c..#ef#dccccccca#a#d#.",'#10'"..c..#e#daaaaaaaaa#ddd#.",'#10'"'
+'..c...#.###############.",'#10'"..c.....#aaaaaaaaaaaaa#.",'#10'"..c.....#ac'
+'ccccccccaaa#.",'#10'"..c.c...#ccccccccccccc#.",'#10'"..c.cc..#caaaaaaaaaacc'
+'#.",'#10'"...cccc.#ccccccccccccc#.",'#10'"....cc..#acccccccccaaa#.",'#10'".'
+'...c...#aaaaaaaaaaaaa#.",'#10'"........#accccccccccaa#.",'#10'"........#aaa'
+'aaaaaaaaaa#.",'#10'"........###############.",'#10'".......................'
+'."};'#10
]);
LazarusResources.Add('TRxDBGrid','XPM',[
'/* XPM */'#10'static char *TRxDBGrid[]={'#10'"24 24 10 1",'#10'". c None",'
+#10'"c c #000000",'#10'"f c #008000",'#10'"e c #00ffff",'#10'"g c #800080",'
+#10'"# c #808080",'#10'"a c #c0c0c0",'#10'"d c #ff0000",'#10'"h c #ff00ff",'
+#10'"b c #ffffff",'#10'"........................",'#10'".###############....'
+'....",'#10'".#a#baaaabaaaaa#........",'#10'".###############........",'#10
+'".#a#bbbbabbbbbb#........",'#10'".#b#baababaaaab#........",'#10'".#a#bbbbab'
+'bbbbb#........",'#10'".#b#baababaaabb#........",'#10'".#a#bbbbabbbbbb#.....'
+'...",'#10'".#b#baababaaaab#........",'#10'".#a#bcccccccccccccccccc.",'#10'"'
+'.####cacbaaaaabaaaaaaac.",'#10'".....cccccccccccccccccc.",'#10'".....cacbbb'
+'bbabbbbbbbbc.",'#10'".....cbcaaaaaaaaaaaaaac.",'#10'".....cacbbbbbabbbbbbbb'
+'c.",'#10'".....ccccdddddddddddddc.",'#10'".....cbebcbbbabbbbbbbbc.",'#10'".'
+'cccccebecddddddddddddc.",'#10'".cfffcbebccbbabbbbbbbbc.",'#10'".cfffcccccgc'
+'aaaaaaaaaac.",'#10'".cfffcbcbchgcabbbbbbbbc.",'#10'".cccccccccghgcccccccccc'
+'.",'#10'".........cccccc........."};'#10
]);
LazarusResources.Add('TDualListDialog','XPM',[
'/* XPM */'#10'static char *TDualListDialog[]={'#10'"24 24 7 1",'#10'". c Non'
+'e",'#10'"b c #000000",'#10'"e c #000080",'#10'"c c #0000ff",'#10'"# c #8080'
+'80",'#10'"d c #c0c0c0",'#10'"a c #ffffff",'#10'"........................",'
+#10'"........................",'#10'".######################.",'#10'".#abccc'
+'cccccccccccbabab.",'#10'".#bbbbbbbbbbbbbbbbbbbbb.",'#10'".#dadadadadadadada'
+'dadab.",'#10'".#adadadadadadadadadadb.",'#10'".#dbbbbadad#dadbbbbadab.",'#10
+'".#abaabbadab#dabaabbadb.",'#10'".#dbaabdbadbb#dbaabdbab.",'#10'".#abaabbbd'
+'abbdabaabbbdb.",'#10'".#dbaaaabadbdadbaaaabab.",'#10'".#abaeeabdadadabaeeab'
+'db.",'#10'".#dbaaaabadabadbaaaabab.",'#10'".#abaeeabdabbdabaeeabdb.",'#10'"'
+'.#dbaaaaba#bbadbaaaabab.",'#10'".#abaaaabda#bdabaaaabdb.",'#10'".#dbbbbbbad'
+'a#adbbbbbbab.",'#10'".#adadadadadadadadadadb.",'#10'".#dadadadadadadadadada'
+'b.",'#10'".#adadadadadadadadadadb.",'#10'".#bbbbbbbbbbbbbbbbbbbbb.",'#10'".'
+'.......................",'#10'"........................"};'#10
]);
LazarusResources.Add('TFolderLister','XPM',[
'/* XPM */'#10'static char *TFolderLister[]={'#10'"24 24 8 1",'#10'". c None"'
+','#10'"a c #000000",'#10'"c c #808080",'#10'"# c #848484",'#10'"f c #c0c0c0'
+'",'#10'"e c #c6c6c6",'#10'"b c #ffff00",'#10'"d c #ffffff",'#10'"....#a#...'
+'..............",'#10'".#a#aba#a#..............",'#10'".ab#aba#ba...ccc.....'
+'...",'#10'".##bbbbb##..cdddcc......",'#10'"#aab#a#baa#cddddddcc....",'#10'"'
+'abbbadabbbaddddddddda...",'#10'"#aab#a#baa#dddddddda....",'#10'"a##bbbbb##a'
+'ddddddda.....",'#10'"eab#aba#baeddddddadcc...",'#10'".#a#aba#a#dddddddaddda'
+'..",'#10'"....#a#dddddddddaddda...",'#10'"....cdfbaaddddddadda....",'#10'".'
+'...cdbfbfaadddadda.....",'#10'"....cdfbfcddaadadda.....",'#10'"...ccccccccc'
+'ccccdaa.....",'#10'"...cddddddddddcadaa.....",'#10'"...cdfbfbfbfbfbacca....'
+'.",'#10'"....cdfbfbfbfbfcaca.....",'#10'"....cdbfbfbfbfbfaca.....",'#10'"..'
+'...cdbfbfbfbfbcaa.....",'#10'".....ccccccccccccaa.....",'#10'"......aaaaaaa'
+'aaaaaa.....",'#10'"........................",'#10'"........................'
+'"};'#10
]);
LazarusResources.Add('TRxMemoryData','XPM',[
'/* XPM */'#10'static char *TRxMemoryData[]={'#10'"24 24 6 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"c c #000080",'#10'"d c #808080",'#10'"a c #c0c0c0'
+'",'#10'"b c #ffffff",'#10'"........................",'#10'"################'
+'####....",'#10'"#a#baaaaaabaaaaaaaa#....",'#10'"####################....",'
+#10'"#a#bbbbbbabbbbbbbbb#....",'#10'"#b#bccccbabcccccccb#....",'#10'"#a#bbbb'
+'bbabbbbbbbbb#....",'#10'"#b#bccccbabccccccbb#....",'#10'"#a#bbbbbbabbbbbbbb'
+'b#....",'#10'"#b#bccccbabccccccbb#....",'#10'"#a#bbbbbbabbbbbbb###....",'#10
+'"#b#bccccbabcbbb#daa#....",'#10'"#a#bbbbbbabbb#daaaaa#...",'#10'"#b#bccccba'
+'b#daaaaaaaa#..",'#10'"#a#bbbbbb#daaaaaaaaaad#.",'#10'"#b#bcccbdaaaaaaaaaadd'
+'d#.",'#10'"#a#bbbbdbaaaaaaaaddd#a#.",'#10'"########abaaaaaddd#ad#..",'#10'"'
+'........#dbaaddd#ad#.#..",'#10'".........#dbdd#ad#.#....",'#10'"..........#'
+'a#ad#.#......",'#10'"...........#d#.#........",'#10'".............#........'
+'..",'#10'"........................"};'#10
]);
LazarusResources.Add('TCURRENCYEDIT','XPM',[
'/* XPM */'#10'static char *TCURRENCYEDIT[]={'#10'"24 24 6 1",'#10'". c None"'
+','#10'"a c #000000",'#10'"d c #0000ff",'#10'"# c #808080",'#10'"c c #c0c0c0'
+'",'#10'"b c #ffffff",'#10'"........................",'#10'"................'
+'........",'#10'"........................",'#10'"........................",'
+#10'"#######################.",'#10'"#aaaaaaaaaaaaaaaaaaaaab.",'#10'"#abbbbb'
+'bbbbbbbbbbbbbbcb.",'#10'"#abbbbbbbbbbbbbaabaabcb.",'#10'"#abbbbbbbbbbbbbbba'
+'bbbcb.",'#10'"#abbbbdbbbbbdbbbbabbbcb.",'#10'"#abbbddddbbddbbbbabbbcb.",'#10
+'"#abbdbdbbbbbdbbbbabbbcb.",'#10'"#abbbdddbbbbdbbbbabbbcb.",'#10'"#abbbbdbdb'
+'bbdbbbbabbbcb.",'#10'"#abbddddbbbbdbbbbabbbcb.",'#10'"#abbbbdbbbbdddbbbabbb'
+'cb.",'#10'"#abbbbbbbbbbbbbaabaabcb.",'#10'"#abbbbbbbbbbbbbbbbbbbcb.",'#10'"'
+'#accccccccccccccccccccb.",'#10'"#bbbbbbbbbbbbbbbbbbbbbb.",'#10'"...........'
+'.............",'#10'"........................",'#10'"......................'
+'..",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXSWITCH','XPM',[
'/* XPM */'#10'static char *TRXSWITCH[]={'#10'"24 24 5 1",'#10'". c None",'#10
+'"# c #000000",'#10'"b c #808080",'#10'"c c #ff0000",'#10'"a c #ffffff",'#10
+'"........................",'#10'"........................",'#10'".....#####'
+'#########.....",'#10'".....##############.....",'#10'".....###aaaaaaa#b##..'
+'...",'#10'".....##aaaaaaa#bb##.....",'#10'".....#aaaaaaa#bbb##.....",'#10'"'
+'.....#########bbb##.....",'#10'".....#aaaaaaa#bbb##.....",'#10'".....#aaaaa'
+'aaa#bb##.....",'#10'".....##aaaaaaa#bb##.....",'#10'".....##aaaaaaaa#b##...'
+'..",'#10'".....###########b##.....",'#10'".....##aaaaaaaa#b##.....",'#10'".'
+'....##a######a#b##.....",'#10'".....##a#cccc#a#b##.....",'#10'".....##a####'
+'##a#b##.....",'#10'".....##aaaaaaaa#b##.....",'#10'".....###########b##....'
+'.",'#10'".....###bbbbbbbb###.....",'#10'".....##############.....",'#10'"..'
+'...##############.....",'#10'"........................",'#10'".............'
+'..........."};'#10
]);
LazarusResources.Add('TRXDICE','XPM',[
'/* XPM */'#10'static char *TRXDICE[]={'#10'"24 24 4 1",'#10'". c None",'#10
+'"# c #000000",'#10'"b c #c0c0c0",'#10'"a c #ffffff",'#10'".................'
+'.......",'#10'"........................",'#10'"........................",'
+#10'"...........##...........",'#10'".........##aa##.........",'#10'".......'
+'##aa##aa##.......",'#10'".....##aaaa##aaaa##.....",'#10'"...##aaaaaaaaaaaaa'
+'a##...",'#10'"...#b##aaaa##aaaa##a#...",'#10'"...#bbb##aa##aa##aaa#...",'#10
+'"...#bbbbb##aa##aa##a#...",'#10'"...#bbbbbbb##aaaa##a#...",'#10'"...#bbbbbb'
+'b#a##aaaaa#...",'#10'"...#bbb##bb#a##aaaaa#...",'#10'"...#bbb##bb#aaaaaaaa#'
+'...",'#10'"...#bbbbbbb#aaaaa##a#...",'#10'"...#bbbbbbb#aaaaa##a#...",'#10'"'
+'...##bbbbbb#a##aaaa##...",'#10'".....##bbbb#a##aa##.....",'#10'".......##bb'
+'#aaa##.......",'#10'".........###a##.........",'#10'"...........##.........'
+'..",'#10'"........................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXDBCOMBOBOX','XPM',[
'/* XPM */'#10'static char *TRXDBCOMBOBOX[]={'#10'"24 24 6 1",'#10'". c None"'
+','#10'"c c #000000",'#10'"d c #000080",'#10'"# c #808080",'#10'"a c #c0c0c0'
+'",'#10'"b c #ffffff",'#10'"........................",'#10'".###############'
+'........",'#10'".#a#baaaabaaaaa#........",'#10'".###############........",'
+#10'".#a#bbbbabbbbbb#........",'#10'".#b#baababaaaab#........",'#10'".#a#bbb'
+'babbbbbb#........",'#10'".#b#baababaaabb#........",'#10'".#a#bbcccccccccccc'
+'ccccc.",'#10'".#b#bacbbbbbbbbbbbcbbac.",'#10'".#a#bbcbdddddddddbcbcac.",'#10
+'".#####cbbbbbbbbbbbcaaac.",'#10'"......ccccccccccccccccc.",'#10'"...d....cb'
+'bbbbbbbbbbbbc.",'#10'"..ddd...cbbddddddddbbbc.",'#10'".ddddd..cdddddddddddd'
+'dc.",'#10'"...d....cddbbbbbbbbbddc.",'#10'"...d....cdddddddddddddc.",'#10'"'
+'...d....cbbddddddddbbbc.",'#10'"...d....cbbbbbbbbbbbbbc.",'#10'"...dddd.cbb'
+'dddddddddbbc.",'#10'"........cbbbbbbbbbbbbbc.",'#10'"........cccccccccccccc'
+'c.",'#10'"........................"};'#10
]);
LazarusResources.Add('ttoolpanel','XPM',[
'/* XPM */'#10'static char *TToolPanel[]={'#10'"24 24 10 1",'#10'". c None",'
+#10'"# c #000000",'#10'"h c #000080",'#10'"d c #0000ff",'#10'"f c #008000",'
+#10'"b c #808080",'#10'"c c #c0c0c0",'#10'"e c #ff0000",'#10'"g c #ff00ff",'
+#10'"a c #ffffff",'#10'"........................",'#10'"####################'
+'####",'#10'"aaaaab#aaaaab#aaaaab#ccc",'#10'"accccb#accccb#accccb#ccc",'#10
+'"adeecb#afffcb#a#eecb#ccc",'#10'"adddcb#afggcb#ahhhcb#ccc",'#10'"accccb#acc'
+'ccb#accccb#ccc",'#10'"bbbbbb#bbbbbb#bbbbbb#ccc",'#10'"#####################'
+'###",'#10'"....................dd..",'#10'".#################.dddd.",'#10'"'
+'.#a#ddddddddd#a#a#dddddd",'#10'".#################..dd..",'#10'".#ccccccccc'
+'cccccc#..dd..",'#10'".#c####c#######cc#..dd..",'#10'".#c#aa#c#aaaaa#cc#..dd'
+'..",'#10'".#c#aa#c#aaaaa#cc#..dd..",'#10'".#c#aa#c#aaaaa#ddddddd..",'#10'".'
+'#c#aa#c#aaaaa#ddddddd..",'#10'".#c#aa#c#aaaaa#cc#......",'#10'".#c####c####'
+'###cc#......",'#10'".#ccccccccccccccc#......",'#10'".#################.....'
+'.",'#10'"........................"};'#10
]);
LazarusResources.Add('trxxpmanifest','XPM',[
'/* XPM */'#10'static char *trxxpmanifest[]={'#10'"24 24 9 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"c c #000080",'#10'"a c #00ff00",'#10'"e c #9d9da1'
+'",'#10'"g c #e0dfe3",'#10'"b c #ff0000",'#10'"d c #ffff00",'#10'"f c #fffff'
+'f",'#10'"........................",'#10'"........................",'#10'"..'
+'..##...##.####........",'#10'".....##.##..#####.......",'#10'"......###...#'
+'#.##.......",'#10'"......###...#####.......",'#10'".....#####..####........'
+'",'#10'".....##.##..##..........",'#10'"....##...##.##..........",'#10'"...'
+'.....................",'#10'".####################...",'#10'".#aaaaaaaaaaaa'
+'#b#c#d#e..",'#10'".####################e..",'#10'".#ffffffffffffffffff#e.."'
+','#10'".#ffffffffffffffffff#e..",'#10'".#ffffffffffffffffff#e..",'#10'".#ff'
+'ffffffffffffffff#e..",'#10'".#ffffggggggfggggggf#e..",'#10'".#ffffgffff#fgf'
+'fff#f#e..",'#10'".#ffffg#####fg#####f#e..",'#10'".#ffffffffffffffffff#e..",'
+#10'".####################e..",'#10'"..eeeeeeeeeeeeeeeeeeee..",'#10'".......'
+'................."};'#10
]);
LazarusResources.Add('TPAGEMANAGER','XPM',[
'/* XPM */'#10'static char *TPAGEMANAGER[]={'#10'"24 24 8 1",'#10'". c None",'
+#10'"b c #000000",'#10'"c c #000080",'#10'"f c #00ffff",'#10'"d c #800000",'
+#10'"# c #808080",'#10'"e c #ffff00",'#10'"a c #ffffff",'#10'"..............'
+'..........",'#10'"........................",'#10'".........##############."'
+','#10'".........#aaaaaaaaaaaab.",'#10'".......##############ab.",'#10'"....'
+'...#aaaaaaaaaaaabab.",'#10'".....##############abab.",'#10'".....#aaaaaaaaa'
+'aaababab.",'#10'".....#acccccaddddababab.",'#10'".....#aaaaaaadaadababab.",'
+#10'".....#accccaadaadababab.",'#10'".....#aaaaaaadaadababab.",'#10'".....#a'
+'bbbaaaddddababab.",'#10'".bbbbbbeaebaaaaaaababbb.",'#10'".bbbfbeabbbbbbbbaa'
+'bab...",'#10'".bbbfbaeaeaeaeaebabbb...",'#10'".bbbfbeaeabbbbbbaab.....",'#10
+'".bbbfbaeaeaeab###bb.....",'#10'".bbbfbeaeabbb...........",'#10'".bbbfbbeae'
+'aeb...........",'#10'".bebbb.bbbbb............",'#10'".bbb.................'
+'...",'#10'"........................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXAPPICON','XPM',[
'/* XPM */'#10'static char *TRXAPPICON[]={'#10'"24 24 9 1",'#10'". c None",'
+#10'"a c #000000",'#10'"f c #800000",'#10'"c c #808000",'#10'"e c #808080",'
+#10'"g c #c0c0c0",'#10'"# c #ff0000",'#10'"d c #ffff00",'#10'"b c #ffffff",'
+#10'"...........###..##...##.",'#10'"............#..#..#.#..#",'#10'".......'
+'.a...#..#....#..#",'#10'"......aabaa.#..#....#..#",'#10'"....aabbcdda#..#..'
+'#.#..#",'#10'"..aabbccccc###..##...##.",'#10'".abbddddddddddda........",'#10
+'".aaaaaaaaaaaaaaa..##b...",'#10'".abddeebddeebdda...##b..",'#10'"..cceeecce'
+'eeccc....###b.",'#10'"..cbebbcbebbcbc.####d#..",'#10'"..cdebbcdebbcee##d##d'
+'#b.",'#10'"..cbebbcbebbcebfd#dd#b..",'#10'"..cdebbcdebbcebbfbb##...",'#10'"'
+'.adddaadddaadebgbf###b..",'#10'".aaaaaaaaaaaebbgegf#....",'#10'".adbdbdbdbd'
+'ebebegeea....",'#10'".aaaaaaaaaebebeeaaaa....",'#10'".........ebebeea......'
+'..",'#10'"........ebgbeea.........",'#10'"........agbeea..........",'#10'".'
+'.......aeeaa...........",'#10'".........aa.............",'#10'"............'
+'............"};'#10
]);
LazarusResources.Add('TSECRETPANEL','XPM',[
'/* XPM */'#10'static char *TSECRETPANEL[]={'#10'"24 24 11 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"d c #000080",'#10'"i c #0000ff",'#10'"e c #008000'
+'",'#10'"g c #800000",'#10'"a c #808080",'#10'"b c #c0c0c0",'#10'"h c #ff000'
+'0",'#10'"f c #ffff00",'#10'"c c #ffffff",'#10'"........................",'
+#10'"........................",'#10'".######################.",'#10'".#aaaaa'
+'aaaaaaaaaaaaaab#.",'#10'".#aaaaaaaaaaaaaaaaaacc#.",'#10'".#aabbbbbbbbbbbbbb'
+'bbcc#.",'#10'".#aabbbbbd#dbbbbbbbbcc#.",'#10'".#aabbbbdefedbbbbbbbcc#.",'#10
+'".#aabbbb#fff#aabbbbbcc#.",'#10'".#aabbbbdefedbb##bbbcc#.",'#10'".#aabbbbbd'
+'#dbbbggbbbcc#.",'#10'".#aabbbbabbbbb#hh#bbcc#.",'#10'".#aabbbbabbbbb#hh#bbc'
+'c#.",'#10'".#aabb#####bb#hhhh#bcc#.",'#10'".#aabb#iii#bb######bcc#.",'#10'"'
+'.#aabb#iii#aabbbbbbbcc#.",'#10'".#aabb#iii#bbbbbbbbbcc#.",'#10'".#aabb#####'
+'bbbbbbbbbcc#.",'#10'".#aabbbbbbbbbbbbbbbbcc#.",'#10'".#accccccccccccccccccc'
+'#.",'#10'".#bccccccccccccccccccc#.",'#10'".######################.",'#10'".'
+'.......................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXLABEL','XPM',[
'/* XPM */'#10'static char *TRXLABEL[]={'#10'"24 24 3 1",'#10'". c None",'#10
+'"# c #000000",'#10'"a c #ffffff",'#10'"........................",'#10'"....'
+'....................",'#10'"........................",'#10'"...............'
+'.........",'#10'"........................",'#10'"........................",'
+#10'".........####aa.........",'#10'"..........####aa........",'#10'".......'
+'..#####aa........",'#10'".........##a###aa.......",'#10'"........##aa.##aa.'
+'......",'#10'"........##aa.###aa......",'#10'".......##aa...##aa......",'#10
+'".......##########aa.....",'#10'"......##aaaaaaa##aa.....",'#10'"......##aa'
+'.....###aa....",'#10'".....##aa.......##aa....",'#10'"....####aa.....####aa'
+'...",'#10'".....aaaaa......aaaaa...",'#10'"........................",'#10'"'
+'........................",'#10'"........................",'#10'"...........'
+'.............",'#10'"........................"};'#10
]);

View File

@ -0,0 +1,36 @@
/* XPM */
static char *trxxpmanifest[]={
"24 24 9 1",
". c None",
"# c #000000",
"c c #000080",
"a c #00ff00",
"e c #9d9da1",
"g c #e0dfe3",
"b c #ff0000",
"d c #ffff00",
"f c #ffffff",
"........................",
"........................",
"....##...##.####........",
".....##.##..#####.......",
"......###...##.##.......",
"......###...#####.......",
".....#####..####........",
".....##.##..##..........",
"....##...##.##..........",
"........................",
".####################...",
".#aaaaaaaaaaaa#b#c#d#e..",
".####################e..",
".#ffffffffffffffffff#e..",
".#ffffffffffffffffff#e..",
".#ffffffffffffffffff#e..",
".#ffffffffffffffffff#e..",
".#ffffggggggfggggggf#e..",
".#ffffgffff#fgffff#f#e..",
".#ffffg#####fg#####f#e..",
".#ffffffffffffffffff#e..",
".####################e..",
"..eeeeeeeeeeeeeeeeeeee..",
"........................"};

View File

@ -0,0 +1,37 @@
/* XPM */
static char *TToolPanel[]={
"24 24 10 1",
". c None",
"# c #000000",
"h c #000080",
"d c #0000ff",
"f c #008000",
"b c #808080",
"c c #c0c0c0",
"e c #ff0000",
"g c #ff00ff",
"a c #ffffff",
"........................",
"########################",
"aaaaab#aaaaab#aaaaab#ccc",
"accccb#accccb#accccb#ccc",
"adeecb#afffcb#a#eecb#ccc",
"adddcb#afggcb#ahhhcb#ccc",
"accccb#accccb#accccb#ccc",
"bbbbbb#bbbbbb#bbbbbb#ccc",
"########################",
"....................dd..",
".#################.dddd.",
".#a#ddddddddd#a#a#dddddd",
".#################..dd..",
".#ccccccccccccccc#..dd..",
".#c####c#######cc#..dd..",
".#c#aa#c#aaaaa#cc#..dd..",
".#c#aa#c#aaaaa#cc#..dd..",
".#c#aa#c#aaaaa#ddddddd..",
".#c#aa#c#aaaaa#ddddddd..",
".#c#aa#c#aaaaa#cc#......",
".#c####c#######cc#......",
".#ccccccccccccccc#......",
".#################......",
"........................"};

Binary file not shown.

View File

@ -0,0 +1 @@
don't remove file WindowsXP.or

289
components/rx/pagemngr.pas Normal file
View File

@ -0,0 +1,289 @@
unit PageMngr;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls;
const
pageNull = -1;
DefStatusMessage = 'Step %d from %d';
type
TPageOwner = TPageControl;
TCheckPageEnabled = function (APageIndex:integer): Boolean of object;
TPageManagerOption = (pmoSetFormCaption, pmoSetInfoControl);
TPageManagerOptions = set of TPageManagerOption;
{ TPageManager }
TPageManager = class(TComponent)
private
FNextBtn: TControl;
FOnCheckPageEnabled: TCheckPageEnabled;
FOnPageChanged: TNotifyEvent;
FOptions: TPageManagerOptions;
FPageOwner: TPageOwner;
FPriorBtn: TControl;
FSaveBtnNextClick: TNotifyEvent;
FSaveBtnPriorClick: TNotifyEvent;
FStatusControl: TControl;
FStatusMessage: string;
function GetPageCount: Integer;
function GetPageIndex: Integer;
procedure SetNextBtn(const AValue: TControl);
procedure SetOnCheckPageEnabled(const AValue: TCheckPageEnabled);
procedure SetOptions(const AValue: TPageManagerOptions);
procedure SetPageIndex(const AValue: Integer);
procedure SetPageOwner(const AValue: TPageOwner);
procedure SetPriorBtn(const AValue: TControl);
procedure BtnClickNext(Sender: TObject);
procedure BtnClickPrior(Sender: TObject);
procedure SetStatusControl(const AValue: TControl);
procedure SetStatusMessage(const AValue: string);
procedure SyncBtnNextClick(Sync: Boolean);
procedure SyncBtnPriorClick(Sync: Boolean);
protected
function GetPriorPageIndex(Page: Integer): Integer; virtual;
function GetNextPageIndex(Page: Integer): Integer; virtual;
procedure PageChanged;virtual;
procedure Loaded; override;
public
constructor Create(AOwner: TComponent); virtual;
procedure CheckBtnEnabled;
procedure NextPage;
procedure PriorPage;
property PageCount: Integer read GetPageCount;
property PageIndex: Integer read GetPageIndex write SetPageIndex;
published
property PageOwner: TPageOwner read FPageOwner write SetPageOwner;
property NextBtn: TControl read FNextBtn write SetNextBtn;
property PriorBtn: TControl read FPriorBtn write SetPriorBtn;
property OnCheckPageEnabled:TCheckPageEnabled read FOnCheckPageEnabled write SetOnCheckPageEnabled;
property OnPageChanged: TNotifyEvent read FOnPageChanged write FOnPageChanged;
property Options:TPageManagerOptions read FOptions write SetOptions default [];
property StatusControl:TControl read FStatusControl write SetStatusControl;
property StatusMessage:string read FStatusMessage write SetStatusMessage;
end;
implementation
{ TPageManager }
procedure TPageManager.SetNextBtn(const AValue: TControl);
begin
if FNextBtn=AValue then exit;
SyncBtnNextClick(false);
FNextBtn:=AValue;
SyncBtnNextClick(true);
end;
function TPageManager.GetPageCount: Integer;
begin
if Assigned(FPageOwner) then
Result := FPageOwner.PageCount
else
Result := 0;
end;
function TPageManager.GetPageIndex: Integer;
begin
if Assigned(PageOwner) then Result := PageOwner.ActivePageIndex
else Result := pageNull;
end;
procedure TPageManager.SetOnCheckPageEnabled(const AValue: TCheckPageEnabled);
begin
if FOnCheckPageEnabled=AValue then exit;
FOnCheckPageEnabled:=AValue;
end;
procedure TPageManager.SetOptions(const AValue: TPageManagerOptions);
begin
if FOptions=AValue then exit;
FOptions:=AValue;
end;
procedure TPageManager.SetPageIndex(const AValue: Integer);
begin
if Assigned(FPageOwner) and (FPageOwner.ActivePageIndex <> AValue) then
begin
FPageOwner.ActivePageIndex:=AValue;
PageChanged;
end;
end;
procedure TPageManager.SetPageOwner(const AValue: TPageOwner);
begin
if FPageOwner=AValue then exit;
FPageOwner:=AValue;
end;
procedure TPageManager.SetPriorBtn(const AValue: TControl);
begin
if FPriorBtn=AValue then exit;
SyncBtnPriorClick(false);
FPriorBtn:=AValue;
SyncBtnPriorClick(true);
end;
procedure TPageManager.BtnClickNext(Sender: TObject);
begin
if Assigned(FPageOwner) then
begin
FPageOwner.ActivePageIndex:=GetNextPageIndex(FPageOwner.ActivePageIndex);
PageChanged;
end;
end;
procedure TPageManager.BtnClickPrior(Sender: TObject);
begin
if Assigned(FPageOwner) then
begin
FPageOwner.ActivePageIndex:=GetPriorPageIndex(FPageOwner.ActivePageIndex);
PageChanged;
end;
end;
procedure TPageManager.SetStatusControl(const AValue: TControl);
begin
if FStatusControl=AValue then exit;
FStatusControl:=AValue;
end;
procedure TPageManager.SetStatusMessage(const AValue: string);
begin
if FStatusMessage=AValue then exit;
FStatusMessage:=AValue;
end;
procedure TPageManager.SyncBtnNextClick(Sync: Boolean);
begin
if Assigned(FNextBtn) and not (csDesigning in ComponentState) then
begin
if Sync then
begin
FSaveBtnNextClick := FNextBtn.OnClick;
FNextBtn.OnClick := @BtnClickNext;
end
else
begin
FNextBtn.OnClick := FSaveBtnNextClick;
FSaveBtnNextClick := nil;
end;
end;
end;
procedure TPageManager.SyncBtnPriorClick(Sync: Boolean);
begin
if Assigned(FPriorBtn) and not (csDesigning in ComponentState) then
begin
if Sync then
begin
FSaveBtnPriorClick := FPriorBtn.OnClick;
FPriorBtn.OnClick := @BtnClickPrior;
end
else
begin
FPriorBtn.OnClick := FSaveBtnPriorClick;
FSaveBtnPriorClick := nil;
end;
end;
end;
function TPageManager.GetPriorPageIndex(Page: Integer): Integer;
begin
Result:=Page;
while Page > 0 do
begin
Dec(Page);
if Assigned(FOnCheckPageEnabled) then
begin
if FOnCheckPageEnabled(Page) then
break
else
if Page = 0 then
exit;
end
else
break;
end;
Result:=Page;
end;
function TPageManager.GetNextPageIndex(Page: Integer): Integer;
begin
Result:=Page;
if not Assigned(FPageOwner) then exit;
while Page < FPageOwner.PageCount-1 do
begin
Inc(Page);
if Assigned(FOnCheckPageEnabled) then
begin
if FOnCheckPageEnabled(Page) then
break
else
if Page = FPageOwner.PageCount then
exit;
end
else
break;
end;
Result:=Page;
end;
procedure TPageManager.PageChanged;
var
S:string;
begin
if Assigned(OnPageChanged) then
OnPageChanged(Self);
if FStatusMessage <> '' then
begin
S:=Format(FStatusMessage, [PageIndex+1, PageCount]);
if (pmoSetFormCaption in Options) and Assigned(Owner) and (Owner is TCustomForm) then
TCustomForm(Owner).Caption:=S;
if (pmoSetInfoControl in Options) and Assigned(FStatusControl) then
FStatusControl.Caption:=S;
end;
CheckBtnEnabled;
end;
procedure TPageManager.Loaded;
begin
inherited Loaded;
if not (csDesigning in ComponentState) then
begin
SyncBtnNextClick(true);
SyncBtnPriorClick(true);
PageChanged;
end;
end;
constructor TPageManager.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FStatusMessage:=DefStatusMessage;
end;
procedure TPageManager.CheckBtnEnabled;
var
P:integer;
begin
P:=PageIndex;
FNextBtn.Enabled:=GetNextPageIndex(P)>P;
FPriorBtn.Enabled:=GetPriorPageIndex(P)<P;
end;
procedure TPageManager.NextPage;
begin
BtnClickNext(nil);
end;
procedure TPageManager.PriorPage;
begin
BtnClickPrior(nil);
end;
end.

View File

@ -0,0 +1,240 @@
unit registerrx;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, LazarusPackageIntf;
procedure Register;
implementation
uses PropEdits, dbdateedit, rxlookup, folderlister, rxdbgrid, rxmemds, duallist,
curredit, rxswitch, rxdice, rxdbcomb, rxtoolbar, rxxpman, PageMngr, RxAppIcon,
Dialogs, ComponentEditors, seldsfrm, DBPropEdits, DB, rxctrls, RxLogin;
type
{ TRxAppIcon }
TRxAppIconEditor = class(TComponentEditor)
public
DefaultEditor: TBaseComponentEditor;
constructor Create(AComponent: TComponent; ADesigner: TComponentEditorDesigner); override;
destructor Destroy; override;
function GetVerbCount:integer;override;
function GetVerb(Index:integer):string;override;
procedure ExecuteVerb(Index:integer);override;
end;
{ TRxDBGridFieldProperty }
TRxDBGridFieldProperty = class(TFieldProperty)
public
procedure FillValues(const Values: TStringList); override;
end;
{ TRxDBGridFieldProperty }
procedure TRxDBGridFieldProperty.FillValues(const Values: TStringList);
var
Column: TRxColumn;
Grid: TRxDBGrid;
DataSource: TDataSource;
begin
Column:=TRxColumn(GetComponent(0));
if not (Column is TRxColumn) then exit;
Grid:=TRxDBGrid(Column.Grid);
if not (Grid is TRxDBGrid) then exit;
DataSource := Grid.DataSource;
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
DataSource.DataSet.GetFieldNames(Values);
end;
{ TRxAppIcon }
type
PClass = ^TClass;
constructor TRxAppIconEditor.Create(AComponent: TComponent;
ADesigner: TComponentEditorDesigner);
var
CompClass: TClass;
begin
inherited Create(AComponent, ADesigner);
CompClass := PClass(Acomponent)^;
try
PClass(AComponent)^ := TComponent;
DefaultEditor := GetComponentEditor(AComponent, ADesigner);
finally
PClass(AComponent)^ := CompClass;
end;
end;
destructor TRxAppIconEditor.Destroy;
begin
DefaultEditor.Free;
inherited Destroy;
end;
function TRxAppIconEditor.GetVerbCount: integer;
begin
Result:=DefaultEditor.GetVerbCount + 1;
end;
function TRxAppIconEditor.GetVerb(Index: integer): string;
begin
if Index < DefaultEditor.GetVerbCount then
Result := DefaultEditor.GetVerb(Index)
else
begin
case Index - DefaultEditor.GetVerbCount of
0:Result:='Load icon';
end;
end;
end;
procedure TRxAppIconEditor.ExecuteVerb(Index: integer);
var
OpenDialog1: TOpenDialog;
begin
if Index < DefaultEditor.GetVerbCount then
DefaultEditor.ExecuteVerb(Index)
else
begin
case Index - DefaultEditor.GetVerbCount of
0:begin
OpenDialog1:=TOpenDialog.Create(nil);
{$IFDEF WIN32}
OpenDialog1.Filter:='Windows Ico files (*.ico)|*.ico|All files|*.*';
{$ELSE}
OpenDialog1.Filter:='Windows Ico files (*.ico)|*.ico|All files|*';
{$ENDIF}
try
if OpenDialog1.Execute then
(Component as TRxAppIcon).LoadFromFile(OpenDialog1.FileName);
finally
OpenDialog1.Free;
end;
Modified;
end;
end;
end;
end;
procedure RegisterRxAppIcon;
begin
RegisterComponents('RX',[TRxAppIcon]);
end;
procedure RegisterRxXPMan;
begin
RegisterComponents('RX',[TRXXPManifest]);
end;
procedure RegisterPageMngr;
begin
RegisterComponents('RX',[TPageManager]);
end;
procedure RegisterUnitDBDateEdit;
begin
RegisterComponents('RX DBAware',[TDBDateEdit, TRxDBCalcEdit]);
end;
procedure RegisterRXLookup;
begin
RegisterComponents('RX DBAware',[TRXLookupEdit, TRxDBLookupCombo]);
end;
procedure RegisterRxDbGrid;
begin
RegisterComponents('RX DBAware',[TRxDBGrid]);
end;
procedure RegisterRxMemDS;
begin
RegisterComponents('RX DBAware',[TRxMemoryData]);
end;
procedure RegisterRxDBComb;
begin
RegisterComponents('RX DBAware',[TRxDBComboBox]);
end;
procedure RegisterDualList;
begin
RegisterComponents('RX',[TDualListDialog]);
end;
procedure RegisterCurrEdit;
begin
RegisterComponents('RX',[TCurrencyEdit]);
end;
procedure RegisterRXSwitch;
begin
RegisterComponents('RX',[TRxSwitch]);
end;
procedure RegisterRXDice;
begin
RegisterComponents('RX',[TRxDice]);
end;
procedure RegisterFolderLister;
begin
RegisterComponents('RX',[TFolderLister]);
end;
procedure RegisterRxToolBar;
begin
RegisterComponents('RX',[TToolPanel]);
end;
procedure RegisterRxCtrls;
begin
RegisterComponents('RX',[TRxLabel, TSecretPanel]);
end;
procedure RegisterRxLogin;
begin
RegisterComponents('RX',[TRxLoginDialog]);
end;
procedure Register;
begin
//RX
RegisterUnit('folderlister', @RegisterFolderLister);
RegisterUnit('duallist', @RegisterDualList);
RegisterUnit('curredit', @RegisterCurrEdit);
RegisterUnit('rxswitch', @RegisterRXSwitch);
RegisterUnit('rxdice', @RegisterRXDice);
RegisterUnit('RxXPMan', @RegisterRxXPMan);
RegisterUnit('PageMngr', @RegisterPageMngr);
RegisterUnit('rxtoolbar', @RegisterRxToolBar);
RegisterUnit('rxappicon', @RegisterRxAppIcon);
RegisterUnit('rxctrls', @RegisterRxCtrls);
RegisterUnit('RxLogin', @RegisterRxLogin);
//RX DBAware
RegisterUnit('dbdateedit', @RegisterUnitDBDateEdit);
RegisterUnit('rxlookup', @RegisterRXLookup);
RegisterUnit('rxdbgrid', @RegisterRxDbGrid);
RegisterUnit('rxmemds', @RegisterRxMemDS);
RegisterUnit('rxdbcomb', @RegisterRxDBComb);
//Component Editors
RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor);
RegisterComponentEditor(TRxMemoryData, TMemDataSetEditor);
//
RegisterPropertyEditor(TypeInfo(string), TRxColumn, 'FieldName', TRxDBGridFieldProperty);
end;
initialization
{$i rx.lrs}
end.

6
components/rx/rx.inc Normal file
View File

@ -0,0 +1,6 @@
{$mode objfpc}
{$H+}
{$DEFINE RX_D3}
{$DEFINE HASVARIANT}
{.$DEFINE ENABLE_Child_Defs}

269
components/rx/rx.lrs Normal file
View File

@ -0,0 +1,269 @@
LazarusResources.Add('TDBDateEdit','XPM',[
'/* XPM */'#10'static char *TDBDateEdit[]={'#10'"18 18 8 1",'#10'"# c None",'
+#10'"e c #000000",'#10'"c c #000080",'#10'"d c #0000ff",'#10'"f c #800000",'
+#10'". c #808080",'#10'"a c #c0c0c0",'#10'"b c #ffffff",'#10'"..............'
+'.###",'#10'".a.baaaabaaaaa.###",'#10'"...............###",'#10'".a.bbbbabbb'
+'bbb.###",'#10'".b.baababaaaab.###",'#10'".a.bbcccccccccccc#",'#10'".b.bacdd'
+'dcdddcddce",'#10'".a.bbcccccccccccce",'#10'".b.bacbbbbbbbbbbce",'#10'".a.bb'
+'cbbfbbffffbce",'#10'".....cbffbbfbbbbce",'#10'"#####cbbfbbfffabce",'#10'"##'
+'###cbbfbbbbbfbce",'#10'"#####cbbfbbabafbce",'#10'"#####cbfffbfffabce",'#10
+'"#####cbbbbbbbbbbce",'#10'"#####cccccccccccce",'#10'"######eeeeeeeeeeee"};'
+#10
]);
LazarusResources.Add('TRXLookUpEdit','XPM',[
'/* XPM */'#10'static char *TRXLookUpEdit[]={'#10'"24 24 7 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"e c #800000",'#10'"c c #808080",'#10'"d c #c0c0c0'
+'",'#10'"b c #ff0000",'#10'"a c #ffffff",'#10'"..##....................",'#10
+'".#aa#b..ccccccccccccccc.",'#10'"#daaa#b.cdcaddddadddddc.",'#10'"#ddaaa#.cc'
+'ccccccccccccc.",'#10'".#ddaaa##dcaaaadaaaaaac.",'#10'"..#ddaaaa###ddadadddd'
+'ac.",'#10'"...#ddaabbbb#aadaaaaaac.",'#10'"....#ddebbb#ddadadddaac.",'#10'"'
+'....#ceeeb#aaaadaaaaaac.",'#10'".....#eec#caddadaddddac.",'#10'".....#ec#dc'
+'aaaadaaaaaac.",'#10'".....#e#ccccccccccccccc.",'#10'"......#...............'
+'..",'#10'"..ccccccccccccccccccccc.",'#10'"..c###################a.",'#10'".'
+'.c#aaaaaaaaaadaaaaaada.",'#10'"..c#aaaaaaaaaadaddddcda.",'#10'"..c#aaaaaaaa'
+'aadad##dcda.",'#10'"..c#aaaaaaaaaadaddddcda.",'#10'"..c#aaaaaaaaaadacccccda'
+'.",'#10'"..c#dddddddddddddddddda.",'#10'"..caaaaaaaaaaaaaaaaaaaa.",'#10'"..'
+'......................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRxDBCalcEdit','XPM',[
'/* XPM */'#10'static char *TRxDBCalcEdit_xpm[]={'#10'"18 18 8 1",'#10'"# c N'
+'one",'#10'"e c #000000",'#10'"f c #000080",'#10'"c c #008080",'#10'"d c #00'
+'ffff",'#10'". c #808080",'#10'"a c #c0c0c0",'#10'"b c #ffffff",'#10'"......'
+'.........###",'#10'".a.baaaabaaaaa.###",'#10'"...............###",'#10'".a.'
+'bbbbabbbbbb.###",'#10'".b.baababaaaab.###",'#10'".a.bbbbabbbbbb.###",'#10'"'
+'.bbcccccccccccccc#",'#10'".acbdbdbdbdbdbdbce",'#10'".bcdeeeeeeeeccccfe",'#10
+'".acbebbbbbbaccccfe",'#10'"..cdeaaaaaaaccccfe",'#10'"##cbccccccccccccfe",'
+#10'"##cdcebebebebebefe",'#10'"##cbccccccccccccfe",'#10'"##cdcebebebebbaefe"'
+','#10'"##cbccccccccccccfe",'#10'"##ccfffffffffffffe",'#10'"###eeeeeeeeeeeee'
+'e#"};'#10
]);
LazarusResources.Add('TRxDBLookupCombo','XPM',[
'/* XPM */'#10'static char *TRxDBLookupCombo[]={'#10'"24 24 8 1",'#10'". c No'
+'ne",'#10'"# c #000000",'#10'"c c #000080",'#10'"e c #800000",'#10'"f c #808'
+'080",'#10'"d c #c0c0c0",'#10'"b c #ff0000",'#10'"a c #ffffff",'#10'"..##...'
+'.................",'#10'".#aa#b.........c........",'#10'"#daaa#b.......cc..'
+'......",'#10'"#ddaaa#......cccccccc...",'#10'".#ddaaa##.....cc.....c..",'#10
+'"..#ddaaaa###...c.....c..",'#10'"...#ddaabbbb#........c..",'#10'"....#ddebb'
+'b#.........c..",'#10'"..c.#feeeb#d###########.",'#10'"..c..#eef#daaaaaaa#aa'
+'d#.",'#10'"..c..#ef#dccccccca#a#d#.",'#10'"..c..#e#daaaaaaaaa#ddd#.",'#10'"'
+'..c...#.###############.",'#10'"..c.....#aaaaaaaaaaaaa#.",'#10'"..c.....#ac'
+'ccccccccaaa#.",'#10'"..c.c...#ccccccccccccc#.",'#10'"..c.cc..#caaaaaaaaaacc'
+'#.",'#10'"...cccc.#ccccccccccccc#.",'#10'"....cc..#acccccccccaaa#.",'#10'".'
+'...c...#aaaaaaaaaaaaa#.",'#10'"........#accccccccccaa#.",'#10'"........#aaa'
+'aaaaaaaaaa#.",'#10'"........###############.",'#10'".......................'
+'."};'#10
]);
LazarusResources.Add('TRxDBGrid','XPM',[
'/* XPM */'#10'static char *TRxDBGrid[]={'#10'"24 24 10 1",'#10'". c None",'
+#10'"c c #000000",'#10'"f c #008000",'#10'"e c #00ffff",'#10'"g c #800080",'
+#10'"# c #808080",'#10'"a c #c0c0c0",'#10'"d c #ff0000",'#10'"h c #ff00ff",'
+#10'"b c #ffffff",'#10'"........................",'#10'".###############....'
+'....",'#10'".#a#baaaabaaaaa#........",'#10'".###############........",'#10
+'".#a#bbbbabbbbbb#........",'#10'".#b#baababaaaab#........",'#10'".#a#bbbbab'
+'bbbbb#........",'#10'".#b#baababaaabb#........",'#10'".#a#bbbbabbbbbb#.....'
+'...",'#10'".#b#baababaaaab#........",'#10'".#a#bcccccccccccccccccc.",'#10'"'
+'.####cacbaaaaabaaaaaaac.",'#10'".....cccccccccccccccccc.",'#10'".....cacbbb'
+'bbabbbbbbbbc.",'#10'".....cbcaaaaaaaaaaaaaac.",'#10'".....cacbbbbbabbbbbbbb'
+'c.",'#10'".....ccccdddddddddddddc.",'#10'".....cbebcbbbabbbbbbbbc.",'#10'".'
+'cccccebecddddddddddddc.",'#10'".cfffcbebccbbabbbbbbbbc.",'#10'".cfffcccccgc'
+'aaaaaaaaaac.",'#10'".cfffcbcbchgcabbbbbbbbc.",'#10'".cccccccccghgcccccccccc'
+'.",'#10'".........cccccc........."};'#10
]);
LazarusResources.Add('TDualListDialog','XPM',[
'/* XPM */'#10'static char *TDualListDialog[]={'#10'"24 24 7 1",'#10'". c Non'
+'e",'#10'"b c #000000",'#10'"e c #000080",'#10'"c c #0000ff",'#10'"# c #8080'
+'80",'#10'"d c #c0c0c0",'#10'"a c #ffffff",'#10'"........................",'
+#10'"........................",'#10'".######################.",'#10'".#abccc'
+'cccccccccccbabab.",'#10'".#bbbbbbbbbbbbbbbbbbbbb.",'#10'".#dadadadadadadada'
+'dadab.",'#10'".#adadadadadadadadadadb.",'#10'".#dbbbbadad#dadbbbbadab.",'#10
+'".#abaabbadab#dabaabbadb.",'#10'".#dbaabdbadbb#dbaabdbab.",'#10'".#abaabbbd'
+'abbdabaabbbdb.",'#10'".#dbaaaabadbdadbaaaabab.",'#10'".#abaeeabdadadabaeeab'
+'db.",'#10'".#dbaaaabadabadbaaaabab.",'#10'".#abaeeabdabbdabaeeabdb.",'#10'"'
+'.#dbaaaaba#bbadbaaaabab.",'#10'".#abaaaabda#bdabaaaabdb.",'#10'".#dbbbbbbad'
+'a#adbbbbbbab.",'#10'".#adadadadadadadadadadb.",'#10'".#dadadadadadadadadada'
+'b.",'#10'".#adadadadadadadadadadb.",'#10'".#bbbbbbbbbbbbbbbbbbbbb.",'#10'".'
+'.......................",'#10'"........................"};'#10
]);
LazarusResources.Add('TFolderLister','XPM',[
'/* XPM */'#10'static char *TFolderLister[]={'#10'"24 24 8 1",'#10'". c None"'
+','#10'"a c #000000",'#10'"c c #808080",'#10'"# c #848484",'#10'"f c #c0c0c0'
+'",'#10'"e c #c6c6c6",'#10'"b c #ffff00",'#10'"d c #ffffff",'#10'"....#a#...'
+'..............",'#10'".#a#aba#a#..............",'#10'".ab#aba#ba...ccc.....'
+'...",'#10'".##bbbbb##..cdddcc......",'#10'"#aab#a#baa#cddddddcc....",'#10'"'
+'abbbadabbbaddddddddda...",'#10'"#aab#a#baa#dddddddda....",'#10'"a##bbbbb##a'
+'ddddddda.....",'#10'"eab#aba#baeddddddadcc...",'#10'".#a#aba#a#dddddddaddda'
+'..",'#10'"....#a#dddddddddaddda...",'#10'"....cdfbaaddddddadda....",'#10'".'
+'...cdbfbfaadddadda.....",'#10'"....cdfbfcddaadadda.....",'#10'"...ccccccccc'
+'ccccdaa.....",'#10'"...cddddddddddcadaa.....",'#10'"...cdfbfbfbfbfbacca....'
+'.",'#10'"....cdfbfbfbfbfcaca.....",'#10'"....cdbfbfbfbfbfaca.....",'#10'"..'
+'...cdbfbfbfbfbcaa.....",'#10'".....ccccccccccccaa.....",'#10'"......aaaaaaa'
+'aaaaaa.....",'#10'"........................",'#10'"........................'
+'"};'#10
]);
LazarusResources.Add('TRxMemoryData','XPM',[
'/* XPM */'#10'static char *TRxMemoryData[]={'#10'"24 24 6 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"c c #000080",'#10'"d c #808080",'#10'"a c #c0c0c0'
+'",'#10'"b c #ffffff",'#10'"........................",'#10'"################'
+'####....",'#10'"#a#baaaaaabaaaaaaaa#....",'#10'"####################....",'
+#10'"#a#bbbbbbabbbbbbbbb#....",'#10'"#b#bccccbabcccccccb#....",'#10'"#a#bbbb'
+'bbabbbbbbbbb#....",'#10'"#b#bccccbabccccccbb#....",'#10'"#a#bbbbbbabbbbbbbb'
+'b#....",'#10'"#b#bccccbabccccccbb#....",'#10'"#a#bbbbbbabbbbbbb###....",'#10
+'"#b#bccccbabcbbb#daa#....",'#10'"#a#bbbbbbabbb#daaaaa#...",'#10'"#b#bccccba'
+'b#daaaaaaaa#..",'#10'"#a#bbbbbb#daaaaaaaaaad#.",'#10'"#b#bcccbdaaaaaaaaaadd'
+'d#.",'#10'"#a#bbbbdbaaaaaaaaddd#a#.",'#10'"########abaaaaaddd#ad#..",'#10'"'
+'........#dbaaddd#ad#.#..",'#10'".........#dbdd#ad#.#....",'#10'"..........#'
+'a#ad#.#......",'#10'"...........#d#.#........",'#10'".............#........'
+'..",'#10'"........................"};'#10
]);
LazarusResources.Add('TCURRENCYEDIT','XPM',[
'/* XPM */'#10'static char *TCURRENCYEDIT[]={'#10'"24 24 6 1",'#10'". c None"'
+','#10'"a c #000000",'#10'"d c #0000ff",'#10'"# c #808080",'#10'"c c #c0c0c0'
+'",'#10'"b c #ffffff",'#10'"........................",'#10'"................'
+'........",'#10'"........................",'#10'"........................",'
+#10'"#######################.",'#10'"#aaaaaaaaaaaaaaaaaaaaab.",'#10'"#abbbbb'
+'bbbbbbbbbbbbbbcb.",'#10'"#abbbbbbbbbbbbbaabaabcb.",'#10'"#abbbbbbbbbbbbbbba'
+'bbbcb.",'#10'"#abbbbdbbbbbdbbbbabbbcb.",'#10'"#abbbddddbbddbbbbabbbcb.",'#10
+'"#abbdbdbbbbbdbbbbabbbcb.",'#10'"#abbbdddbbbbdbbbbabbbcb.",'#10'"#abbbbdbdb'
+'bbdbbbbabbbcb.",'#10'"#abbddddbbbbdbbbbabbbcb.",'#10'"#abbbbdbbbbdddbbbabbb'
+'cb.",'#10'"#abbbbbbbbbbbbbaabaabcb.",'#10'"#abbbbbbbbbbbbbbbbbbbcb.",'#10'"'
+'#accccccccccccccccccccb.",'#10'"#bbbbbbbbbbbbbbbbbbbbbb.",'#10'"...........'
+'.............",'#10'"........................",'#10'"......................'
+'..",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXSWITCH','XPM',[
'/* XPM */'#10'static char *TRXSWITCH[]={'#10'"24 24 5 1",'#10'". c None",'#10
+'"# c #000000",'#10'"b c #808080",'#10'"c c #ff0000",'#10'"a c #ffffff",'#10
+'"........................",'#10'"........................",'#10'".....#####'
+'#########.....",'#10'".....##############.....",'#10'".....###aaaaaaa#b##..'
+'...",'#10'".....##aaaaaaa#bb##.....",'#10'".....#aaaaaaa#bbb##.....",'#10'"'
+'.....#########bbb##.....",'#10'".....#aaaaaaa#bbb##.....",'#10'".....#aaaaa'
+'aaa#bb##.....",'#10'".....##aaaaaaa#bb##.....",'#10'".....##aaaaaaaa#b##...'
+'..",'#10'".....###########b##.....",'#10'".....##aaaaaaaa#b##.....",'#10'".'
+'....##a######a#b##.....",'#10'".....##a#cccc#a#b##.....",'#10'".....##a####'
+'##a#b##.....",'#10'".....##aaaaaaaa#b##.....",'#10'".....###########b##....'
+'.",'#10'".....###bbbbbbbb###.....",'#10'".....##############.....",'#10'"..'
+'...##############.....",'#10'"........................",'#10'".............'
+'..........."};'#10
]);
LazarusResources.Add('TRXDICE','XPM',[
'/* XPM */'#10'static char *TRXDICE[]={'#10'"24 24 4 1",'#10'". c None",'#10
+'"# c #000000",'#10'"b c #c0c0c0",'#10'"a c #ffffff",'#10'".................'
+'.......",'#10'"........................",'#10'"........................",'
+#10'"...........##...........",'#10'".........##aa##.........",'#10'".......'
+'##aa##aa##.......",'#10'".....##aaaa##aaaa##.....",'#10'"...##aaaaaaaaaaaaa'
+'a##...",'#10'"...#b##aaaa##aaaa##a#...",'#10'"...#bbb##aa##aa##aaa#...",'#10
+'"...#bbbbb##aa##aa##a#...",'#10'"...#bbbbbbb##aaaa##a#...",'#10'"...#bbbbbb'
+'b#a##aaaaa#...",'#10'"...#bbb##bb#a##aaaaa#...",'#10'"...#bbb##bb#aaaaaaaa#'
+'...",'#10'"...#bbbbbbb#aaaaa##a#...",'#10'"...#bbbbbbb#aaaaa##a#...",'#10'"'
+'...##bbbbbb#a##aaaa##...",'#10'".....##bbbb#a##aa##.....",'#10'".......##bb'
+'#aaa##.......",'#10'".........###a##.........",'#10'"...........##.........'
+'..",'#10'"........................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXDBCOMBOBOX','XPM',[
'/* XPM */'#10'static char *TRXDBCOMBOBOX[]={'#10'"24 24 6 1",'#10'". c None"'
+','#10'"c c #000000",'#10'"d c #000080",'#10'"# c #808080",'#10'"a c #c0c0c0'
+'",'#10'"b c #ffffff",'#10'"........................",'#10'".###############'
+'........",'#10'".#a#baaaabaaaaa#........",'#10'".###############........",'
+#10'".#a#bbbbabbbbbb#........",'#10'".#b#baababaaaab#........",'#10'".#a#bbb'
+'babbbbbb#........",'#10'".#b#baababaaabb#........",'#10'".#a#bbcccccccccccc'
+'ccccc.",'#10'".#b#bacbbbbbbbbbbbcbbac.",'#10'".#a#bbcbdddddddddbcbcac.",'#10
+'".#####cbbbbbbbbbbbcaaac.",'#10'"......ccccccccccccccccc.",'#10'"...d....cb'
+'bbbbbbbbbbbbc.",'#10'"..ddd...cbbddddddddbbbc.",'#10'".ddddd..cdddddddddddd'
+'dc.",'#10'"...d....cddbbbbbbbbbddc.",'#10'"...d....cdddddddddddddc.",'#10'"'
+'...d....cbbddddddddbbbc.",'#10'"...d....cbbbbbbbbbbbbbc.",'#10'"...dddd.cbb'
+'dddddddddbbc.",'#10'"........cbbbbbbbbbbbbbc.",'#10'"........cccccccccccccc'
+'c.",'#10'"........................"};'#10
]);
LazarusResources.Add('ttoolpanel','XPM',[
'/* XPM */'#10'static char *TToolPanel[]={'#10'"24 24 10 1",'#10'". c None",'
+#10'"# c #000000",'#10'"h c #000080",'#10'"d c #0000ff",'#10'"f c #008000",'
+#10'"b c #808080",'#10'"c c #c0c0c0",'#10'"e c #ff0000",'#10'"g c #ff00ff",'
+#10'"a c #ffffff",'#10'"........................",'#10'"####################'
+'####",'#10'"aaaaab#aaaaab#aaaaab#ccc",'#10'"accccb#accccb#accccb#ccc",'#10
+'"adeecb#afffcb#a#eecb#ccc",'#10'"adddcb#afggcb#ahhhcb#ccc",'#10'"accccb#acc'
+'ccb#accccb#ccc",'#10'"bbbbbb#bbbbbb#bbbbbb#ccc",'#10'"#####################'
+'###",'#10'"....................dd..",'#10'".#################.dddd.",'#10'"'
+'.#a#ddddddddd#a#a#dddddd",'#10'".#################..dd..",'#10'".#ccccccccc'
+'cccccc#..dd..",'#10'".#c####c#######cc#..dd..",'#10'".#c#aa#c#aaaaa#cc#..dd'
+'..",'#10'".#c#aa#c#aaaaa#cc#..dd..",'#10'".#c#aa#c#aaaaa#ddddddd..",'#10'".'
+'#c#aa#c#aaaaa#ddddddd..",'#10'".#c#aa#c#aaaaa#cc#......",'#10'".#c####c####'
+'###cc#......",'#10'".#ccccccccccccccc#......",'#10'".#################.....'
+'.",'#10'"........................"};'#10
]);
LazarusResources.Add('trxxpmanifest','XPM',[
'/* XPM */'#10'static char *trxxpmanifest[]={'#10'"24 24 9 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"c c #000080",'#10'"a c #00ff00",'#10'"e c #9d9da1'
+'",'#10'"g c #e0dfe3",'#10'"b c #ff0000",'#10'"d c #ffff00",'#10'"f c #fffff'
+'f",'#10'"........................",'#10'"........................",'#10'"..'
+'..##...##.####........",'#10'".....##.##..#####.......",'#10'"......###...#'
+'#.##.......",'#10'"......###...#####.......",'#10'".....#####..####........'
+'",'#10'".....##.##..##..........",'#10'"....##...##.##..........",'#10'"...'
+'.....................",'#10'".####################...",'#10'".#aaaaaaaaaaaa'
+'#b#c#d#e..",'#10'".####################e..",'#10'".#ffffffffffffffffff#e.."'
+','#10'".#ffffffffffffffffff#e..",'#10'".#ffffffffffffffffff#e..",'#10'".#ff'
+'ffffffffffffffff#e..",'#10'".#ffffggggggfggggggf#e..",'#10'".#ffffgffff#fgf'
+'fff#f#e..",'#10'".#ffffg#####fg#####f#e..",'#10'".#ffffffffffffffffff#e..",'
+#10'".####################e..",'#10'"..eeeeeeeeeeeeeeeeeeee..",'#10'".......'
+'................."};'#10
]);
LazarusResources.Add('TPAGEMANAGER','XPM',[
'/* XPM */'#10'static char *TPAGEMANAGER[]={'#10'"24 24 8 1",'#10'". c None",'
+#10'"b c #000000",'#10'"c c #000080",'#10'"f c #00ffff",'#10'"d c #800000",'
+#10'"# c #808080",'#10'"e c #ffff00",'#10'"a c #ffffff",'#10'"..............'
+'..........",'#10'"........................",'#10'".........##############."'
+','#10'".........#aaaaaaaaaaaab.",'#10'".......##############ab.",'#10'"....'
+'...#aaaaaaaaaaaabab.",'#10'".....##############abab.",'#10'".....#aaaaaaaaa'
+'aaababab.",'#10'".....#acccccaddddababab.",'#10'".....#aaaaaaadaadababab.",'
+#10'".....#accccaadaadababab.",'#10'".....#aaaaaaadaadababab.",'#10'".....#a'
+'bbbaaaddddababab.",'#10'".bbbbbbeaebaaaaaaababbb.",'#10'".bbbfbeabbbbbbbbaa'
+'bab...",'#10'".bbbfbaeaeaeaeaebabbb...",'#10'".bbbfbeaeabbbbbbaab.....",'#10
+'".bbbfbaeaeaeab###bb.....",'#10'".bbbfbeaeabbb...........",'#10'".bbbfbbeae'
+'aeb...........",'#10'".bebbb.bbbbb............",'#10'".bbb.................'
+'...",'#10'"........................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXAPPICON','XPM',[
'/* XPM */'#10'static char *TRXAPPICON[]={'#10'"24 24 9 1",'#10'". c None",'
+#10'"a c #000000",'#10'"f c #800000",'#10'"c c #808000",'#10'"e c #808080",'
+#10'"g c #c0c0c0",'#10'"# c #ff0000",'#10'"d c #ffff00",'#10'"b c #ffffff",'
+#10'"...........###..##...##.",'#10'"............#..#..#.#..#",'#10'".......'
+'.a...#..#....#..#",'#10'"......aabaa.#..#....#..#",'#10'"....aabbcdda#..#..'
+'#.#..#",'#10'"..aabbccccc###..##...##.",'#10'".abbddddddddddda........",'#10
+'".aaaaaaaaaaaaaaa..##b...",'#10'".abddeebddeebdda...##b..",'#10'"..cceeecce'
+'eeccc....###b.",'#10'"..cbebbcbebbcbc.####d#..",'#10'"..cdebbcdebbcee##d##d'
+'#b.",'#10'"..cbebbcbebbcebfd#dd#b..",'#10'"..cdebbcdebbcebbfbb##...",'#10'"'
+'.adddaadddaadebgbf###b..",'#10'".aaaaaaaaaaaebbgegf#....",'#10'".adbdbdbdbd'
+'ebebegeea....",'#10'".aaaaaaaaaebebeeaaaa....",'#10'".........ebebeea......'
+'..",'#10'"........ebgbeea.........",'#10'"........agbeea..........",'#10'".'
+'.......aeeaa...........",'#10'".........aa.............",'#10'"............'
+'............"};'#10
]);
LazarusResources.Add('TSECRETPANEL','XPM',[
'/* XPM */'#10'static char *TSECRETPANEL[]={'#10'"24 24 11 1",'#10'". c None"'
+','#10'"# c #000000",'#10'"d c #000080",'#10'"i c #0000ff",'#10'"e c #008000'
+'",'#10'"g c #800000",'#10'"a c #808080",'#10'"b c #c0c0c0",'#10'"h c #ff000'
+'0",'#10'"f c #ffff00",'#10'"c c #ffffff",'#10'"........................",'
+#10'"........................",'#10'".######################.",'#10'".#aaaaa'
+'aaaaaaaaaaaaaab#.",'#10'".#aaaaaaaaaaaaaaaaaacc#.",'#10'".#aabbbbbbbbbbbbbb'
+'bbcc#.",'#10'".#aabbbbbd#dbbbbbbbbcc#.",'#10'".#aabbbbdefedbbbbbbbcc#.",'#10
+'".#aabbbb#fff#aabbbbbcc#.",'#10'".#aabbbbdefedbb##bbbcc#.",'#10'".#aabbbbbd'
+'#dbbbggbbbcc#.",'#10'".#aabbbbabbbbb#hh#bbcc#.",'#10'".#aabbbbabbbbb#hh#bbc'
+'c#.",'#10'".#aabb#####bb#hhhh#bcc#.",'#10'".#aabb#iii#bb######bcc#.",'#10'"'
+'.#aabb#iii#aabbbbbbbcc#.",'#10'".#aabb#iii#bbbbbbbbbcc#.",'#10'".#aabb#####'
+'bbbbbbbbbcc#.",'#10'".#aabbbbbbbbbbbbbbbbcc#.",'#10'".#accccccccccccccccccc'
+'#.",'#10'".#bccccccccccccccccccc#.",'#10'".######################.",'#10'".'
+'.......................",'#10'"........................"};'#10
]);
LazarusResources.Add('TRXLABEL','XPM',[
'/* XPM */'#10'static char *TRXLABEL[]={'#10'"24 24 3 1",'#10'". c None",'#10
+'"# c #000000",'#10'"a c #ffffff",'#10'"........................",'#10'"....'
+'....................",'#10'"........................",'#10'"...............'
+'.........",'#10'"........................",'#10'"........................",'
+#10'".........####aa.........",'#10'"..........####aa........",'#10'".......'
+'..#####aa........",'#10'".........##a###aa.......",'#10'"........##aa.##aa.'
+'......",'#10'"........##aa.###aa......",'#10'".......##aa...##aa......",'#10
+'".......##########aa.....",'#10'"......##aaaaaaa##aa.....",'#10'"......##aa'
+'.....###aa....",'#10'".....##aa.......##aa....",'#10'"....####aa.....####aa'
+'...",'#10'".....aaaaa......aaaaa...",'#10'"........................",'#10'"'
+'........................",'#10'"........................",'#10'"...........'
+'.............",'#10'"........................"};'#10
]);

130
components/rx/rxappicon.pas Normal file
View File

@ -0,0 +1,130 @@
unit rxappicon;
{$mode objfpc}{$H+}
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}
uses Windows, win32int, InterfaceBase, vclutils;
{$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}
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}
begin
if FIconStream.Size>0 then
begin
Icon.LoadFromStream(FIconStream);
{$IFDEF WIN32}
DoApply;
{$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

@ -0,0 +1,142 @@
unit rxapputils;
{$I rx.inc}
interface
uses
Classes, SysUtils, Controls, IniFiles;
const
{$IFNDEF LINUX}
AllMask = '*.*';
{$ELSE}
AllMask = '*';
{$ENDIF}
var
DefCompanyName: string = '';
RegUseAppTitle: Boolean = False;
function GetDefaultSection(Component: TComponent): string;
procedure GetDefaultIniData(Control: TControl; var IniFileName,
Section: string; UseRegistry: Boolean = false);
function GetDefaultIniName: string;
type
TOnGetDefaultIniName = function: string;
const
OnGetDefaultIniName: TOnGetDefaultIniName = nil;
procedure IniWriteString(IniFile: TObject; const Section, Ident,
Value: string);
function GetDefaultIniRegKey: string;
implementation
uses Registry, Forms;
function GetDefaultSection(Component: TComponent): string;
var
F: TCustomForm;
Owner: TComponent;
begin
if Component <> nil then begin
if Component is TCustomForm then Result := Component.ClassName
else begin
Result := Component.Name;
if Component is TControl then begin
F := GetParentForm(TControl(Component));
if F <> nil then Result := F.ClassName + Result
else begin
if TControl(Component).Parent <> nil then
Result := TControl(Component).Parent.Name + Result;
end;
end
else begin
Owner := Component.Owner;
if Owner is TForm then
Result := Format('%s.%s', [Owner.ClassName, Result]);
end;
end;
end
else Result := '';
end;
function GetDefaultIniName: string;
begin
if Assigned(OnGetDefaultIniName) then
Result:= OnGetDefaultIniName()
else
Result := ExtractFileName(ChangeFileExt(Application.ExeName, '.INI'));
end;
procedure GetDefaultIniData(Control: TControl; var IniFileName,
Section: string; UseRegistry: Boolean );
var
I: Integer;
begin
IniFileName := EmptyStr;
{ with Control do
if Owner is TCustomForm then
for I := 0 to Owner.ComponentCount - 1 do
if (Owner.Components[I] is TFormPropertyStorage) then
begin
IniFileName := TFormPropertyStorage(Owner.Components[I]).IniFileName;
Break;
end;}
Section := GetDefaultSection(Control);
if IniFileName = EmptyStr then
if UseRegistry then IniFileName := GetDefaultIniRegKey
else
IniFileName := GetDefaultIniName;
end;
procedure IniWriteString(IniFile: TObject; const Section, Ident,
Value: string);
var
S: string;
begin
if IniFile is TRegIniFile then
TRegIniFile(IniFile).WriteString(Section, Ident, Value)
else begin
S := Value;
if S <> '' then begin
if ((S[1] = '"') and (S[Length(S)] = '"')) or
((S[1] = '''') and (S[Length(S)] = '''')) then
S := '"' + S + '"';
end;
if IniFile is TIniFile then
TIniFile(IniFile).WriteString(Section, Ident, S);
end;
end;
function GetDefaultIniRegKey: string;
begin
if RegUseAppTitle and (Application.Title <> '') then
Result := Application.Title
else Result := ExtractFileName(ChangeFileExt(Application.ExeName, ''));
if DefCompanyName <> '' then
Result := DefCompanyName + '\' + Result;
Result := 'Software\' + Result;
end;
{
procedure IniWriteString(IniFile: TIniFile; const Section, Ident,
Value: string);
var
S: string;
begin
S := Value;
if S <> '' then
begin
if ((S[1] = '"') and (S[Length(S)] = '"')) or
((S[1] = '''') and (S[Length(S)] = '''')) then
S := '"' + S + '"';
end;
if IniFile is TIniFile then
TIniFile(IniFile).WriteString(Section, Ident, S);
end;
}
end.

102
components/rx/rxconst.pas Normal file
View File

@ -0,0 +1,102 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995, 1996 AO ROSNO }
{ Copyright (c) 1997, 1998 Master-Bank }
{ }
{*******************************************************}
unit RXConst;
interface
{$I RX.INC}
uses LMessages, Controls;
const
RX_VERSION = $0002004B; { 2.75 }
const
{ Command message for Speedbar editor }
CM_SPEEDBARCHANGED = CM_BASE + 80;
{ Command message for TRxSpeedButton }
CM_RXBUTTONPRESSED = CM_BASE + 81;
{ Command messages for TRxWindowHook }
CM_RECREATEWINDOW = CM_BASE + 82;
CM_DESTROYHOOK = CM_BASE + 83;
{ Notify message for TRxTrayIcon }
CM_TRAYICON = CM_BASE + 84;
const
crHand = TCursor(14000);
crDragHand = TCursor(14001);
const
{ TBitmap.GetTransparentColor from GRAPHICS.PAS uses this value }
PaletteMask = $02000000;
{$IFDEF VER90}
const
SDelphiKey = 'Software\Borland\Delphi\2.0';
{$ENDIF}
{$IFDEF VER93}
const
SDelphiKey = 'Software\Borland\C++Builder\1.0';
{$ENDIF}
{$IFDEF VER100}
const
SDelphiKey = 'Software\Borland\Delphi\3.0';
{$ENDIF}
{$IFDEF VER110}
const
SDelphiKey = 'Software\Borland\C++Builder\3.0';
{$ENDIF}
{$IFDEF VER120}
const
SDelphiKey = 'Software\Borland\Delphi\4.0';
{$ENDIF}
{$IFDEF VER125}
const
SDelphiKey = 'Software\Borland\C++Builder\4.0';
{$ENDIF}
{$IFDEF VER130}
const
{$IFDEF BCB}
SDelphiKey = 'Software\Borland\C++Builder\5.0';
{$ELSE}
SDelphiKey = 'Software\Borland\Delphi\5.0';
{$ENDIF}
{$ENDIF}
{$IFDEF VER140}
const
SDelphiKey = 'Software\Borland\Delphi\6.0';
{$ENDIF}
{$IFDEF VER150}
const
SDelphiKey = 'Software\Borland\Delphi\7.0';
{$ENDIF}
implementation
uses Forms;
(*
{$IFDEF WIN32}
{$R *.R32}
{$ELSE}
{$R *.R16}
{$ENDIF}
*)
initialization
{ Screen.Cursors[crHand] := LoadCursor(hInstance, 'RX_HANDCUR');
Screen.Cursors[crDragHand] := LoadCursor(hInstance, 'RX_DRAGCUR'); }
end.

5142
components/rx/rxctrls.pas Normal file

File diff suppressed because it is too large Load Diff

515
components/rx/rxdbcomb.pas Normal file
View File

@ -0,0 +1,515 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1997 Master-Bank }
{ }
{*******************************************************}
unit rxdbcomb;
{$I rx.inc}
interface
uses LCLType, LCLProc, LCLIntf, LMessages, Menus, Graphics, Classes, Controls,
DB, StdCtrls, DbCtrls;
type
{ TCustomDBComboBox }
TCustomDBComboBox = class(TCustomComboBox)
private
FDataLink: TFieldDataLink;
procedure DataChange(Sender: TObject);
procedure EditingChange(Sender: TObject);
function GetDataField: string;
function GetDataSource: TDataSource;
function GetField: TField;
function GetReadOnly: Boolean;
procedure SetDataField(const Value: string);
procedure SetDataSource(Value: TDataSource);
procedure SetEditReadOnly;
procedure SetItems(const Value: TStrings);
procedure SetReadOnly(Value: Boolean);
procedure UpdateData(Sender: TObject);
function GetComboText: string; virtual;
procedure SetComboText(const Value: string); virtual;
protected
procedure EditingDone; override;
procedure Change; override;
procedure Click; override;
procedure CreateWnd; override;
procedure DropDown; override;
function GetPaintText: string; virtual;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyPress(var Key: Char); override;
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetStyle(Value: TComboBoxStyle); override;
procedure WndProc(var Message: TLMessage); override;
property ComboText: string read GetComboText write SetComboText;
property DataField: string read GetDataField write SetDataField;
property DataSource: TDataSource read GetDataSource write SetDataSource;
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function ExecuteAction(AAction: TBasicAction): Boolean; override;
function UpdateAction(AAction: TBasicAction): Boolean; override;
function UseRightToLeftAlignment: Boolean;
property Field: TField read GetField;
property Items write SetItems;
property Text;
end;
{ TRxDBComboBox }
TRxDBComboBox = class(TCustomDBComboBox)
private
FValues: TStrings;
FEnableValues: Boolean;
procedure SetEnableValues(Value: Boolean);
procedure SetValues(Value: TStrings);
procedure ValuesChanged(Sender: TObject);
protected
procedure SetStyle(Value: TComboBoxStyle); override;
function GetComboText: string; override;
function GetPaintText: string; override;
procedure SetComboText(const Value: string); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property Style; { must be published before Items }
property Color;
property Ctl3D;
property DataField;
property DataSource;
property DragMode;
property DragCursor;
property DropDownCount;
property Enabled;
property EnableValues: Boolean read FEnableValues write SetEnableValues;
property Font;
property Anchors;
property Constraints;
property DragKind;
property ItemHeight;
property Items;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ReadOnly;
property ShowHint;
property Sorted;
property TabOrder;
property TabStop;
property Values: TStrings read FValues write SetValues;
property Visible;
property OnChange;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnDrawItem;
property OnDropDown;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMeasureItem;
property OnStartDrag;
property OnContextPopup;
property OnEndDock;
property OnStartDock;
end;
implementation
uses DBUtils;
{ TCustomDBComboBox }
constructor TCustomDBComboBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := ControlStyle + [csReplicatable];
FDataLink := TFieldDataLink.Create;
FDataLink.Control := Self;
FDataLink.OnDataChange := @DataChange;
FDataLink.OnUpdateData := @UpdateData;
FDataLink.OnEditingChange := @EditingChange;
end;
destructor TCustomDBComboBox.Destroy;
begin
FDataLink.OnDataChange := nil;
FDataLink.OnUpdateData := nil;
FDataLink.Free;
FDataLink := nil;
inherited Destroy;
end;
procedure TCustomDBComboBox.Loaded;
begin
inherited Loaded;
if (csDesigning in ComponentState) then DataChange(Self);
end;
procedure TCustomDBComboBox.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if (Operation = opRemove) and (FDataLink <> nil) and
(AComponent = DataSource) then DataSource := nil;
end;
procedure TCustomDBComboBox.CreateWnd;
begin
inherited CreateWnd;
SetEditReadOnly;
end;
procedure TCustomDBComboBox.DataChange(Sender: TObject);
begin
if DroppedDown then Exit;
if FDataLink.Field <> nil then ComboText := FDataLink.Field.AsString
else if csDesigning in ComponentState then ComboText := Name
else ComboText := '';
end;
procedure TCustomDBComboBox.UpdateData(Sender: TObject);
begin
FDataLink.Field.Text := ComboText;
FDataLink.Field.AsString := ComboText;
end;
procedure TCustomDBComboBox.SetComboText(const Value: string);
var
I: Integer;
Redraw: Boolean;
begin
if Value <> ComboText then
begin
if Style <> csDropDown then
begin
Redraw := (Style <> csSimple) and HandleAllocated;
// if Redraw then SendMessage(Handle, LM_SETREDRAW, 0, 0);
try
if Value = '' then I := -1 else I := Items.IndexOf(Value);
ItemIndex := I;
finally
if Redraw then
begin
// SendMessage(Handle, WM_SETREDRAW, 1, 0);
Invalidate;
end;
end;
if I >= 0 then Exit;
end;
if Style in [csDropDown, csSimple] then Text := Value;
end;
end;
function TCustomDBComboBox.GetComboText: string;
var
I: Integer;
begin
if Style in [csDropDown, csSimple] then Result := Text
else
begin
I := ItemIndex;
if I < 0 then Result := '' else Result := Items[I];
end;
end;
procedure TCustomDBComboBox.Change;
begin
FDataLink.Edit;
inherited Change;
FDataLink.Modified;
end;
procedure TCustomDBComboBox.Click;
begin
FDataLink.Edit;
inherited Click;
FDataLink.Modified;
end;
procedure TCustomDBComboBox.DropDown;
begin
FDataLink.Edit;
inherited DropDown;
end;
function TCustomDBComboBox.GetDataSource: TDataSource;
begin
Result := FDataLink.DataSource;
end;
procedure TCustomDBComboBox.SetDataSource(Value: TDataSource);
begin
if not (FDataLink.DataSourceFixed and (csLoading in ComponentState)) then
FDataLink.DataSource := Value;
if Value <> nil then Value.FreeNotification(Self);
end;
function TCustomDBComboBox.GetDataField: string;
begin
Result := FDataLink.FieldName;
end;
procedure TCustomDBComboBox.SetDataField(const Value: string);
begin
FDataLink.FieldName := Value;
end;
function TCustomDBComboBox.GetReadOnly: Boolean;
begin
Result := FDataLink.ReadOnly;
end;
procedure TCustomDBComboBox.SetReadOnly(Value: Boolean);
begin
FDataLink.ReadOnly := Value;
end;
function TCustomDBComboBox.GetField: TField;
begin
Result := FDataLink.Field;
end;
procedure TCustomDBComboBox.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if (Key = VK_BACK) or (Key = VK_DELETE) or (Key = VK_UP) or
(Key = VK_DOWN) or (Key in [32..255]) then
begin
if not FDataLink.Edit and (Key in [VK_UP, VK_DOWN]) then
Key := 0;
end;
end;
procedure TCustomDBComboBox.KeyPress(var Key: Char);
begin
inherited KeyPress(Key);
if (Key in [#32..#255]) and (FDataLink.Field <> nil) and
not FDataLink.Field.IsValidChar(Key) then
begin
// MessageBeep(0);
Key := #0;
end;
case Key of
^H, ^V, ^X, #32..#255:
FDataLink.Edit;
#27:
begin
FDataLink.Reset;
SelectAll;
end;
end;
end;
procedure TCustomDBComboBox.EditingChange(Sender: TObject);
begin
SetEditReadOnly;
end;
procedure TCustomDBComboBox.SetEditReadOnly;
begin
(* if (Style in [csDropDown, csSimple]) and HandleAllocated then
SendMessage({$IFDEF WIN32} EditHandle {$ELSE} FEditHandle {$ENDIF},
EM_SETREADONLY, Ord(not FDataLink.Editing), 0); *)
end;
procedure TCustomDBComboBox.WndProc(var Message: TLMessage);
begin
if not (csDesigning in ComponentState) then
case Message.Msg of
LM_COMMAND:
if TLMCommand(Message).NotifyCode = CBN_SELCHANGE then
if not FDataLink.Edit then begin
{ if Style <> csSimple then
PostMessage(Handle, LB_SHOWDROPDOWN, 0, 0);}
Exit;
end;
{ CB_SHOWDROPDOWN:
if Message.WParam <> 0 then FDataLink.Edit
else if not FDataLink.Editing then DataChange(Self); }{Restore text}
{$IFDEF WIN32}
{ LM_CREATE,
WM_WINDOWPOSCHANGED,
CM_FONTCHANGED:
FPaintControl.DestroyHandle;}
{$ENDIF}
end;
inherited WndProc(Message);
end;
procedure TCustomDBComboBox.EditingDone;
begin
if not(FDataLink.DataSet.State in [dsinsert,dsedit]) then exit;
try
FDataLink.UpdateRecord;
except
SelectAll;
if CanFocus then SetFocus;
raise;
end;
inherited EditingDone;
end;
function TCustomDBComboBox.GetPaintText: string;
begin
if FDataLink.Field <> nil then Result := FDataLink.Field.Text
else Result := '';
end;
procedure TCustomDBComboBox.SetItems(const Value: TStrings);
begin
Items.Assign(Value);
DataChange(Self);
end;
procedure TCustomDBComboBox.SetStyle(Value: TComboBoxStyle);
begin
if (Value = csSimple) and Assigned(FDatalink) and FDatalink.DatasourceFixed then
_DBError('SNotReplicatable');
inherited SetStyle(Value);
end;
function TCustomDBComboBox.UseRightToLeftAlignment: Boolean;
begin
// Result := DBUseRightToLeftAlignment(Self, Field);
end;
function TCustomDBComboBox.ExecuteAction(AAction: TBasicAction): Boolean;
begin
{ Result := inherited ExecuteAction(AAction) or (FDataLink <> nil) and
FDataLink.ExecuteAction(AAction);}
end;
function TCustomDBComboBox.UpdateAction(AAction: TBasicAction): Boolean;
begin
{ Result := inherited UpdateAction(AAction) or (FDataLink <> nil) and
FDataLink.UpdateAction(AAction);}
end;
{ TRxDBComboBox }
constructor TRxDBComboBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FValues := TStringList.Create;
TStringList(FValues).OnChange := @ValuesChanged;
EnableValues := False;
end;
destructor TRxDBComboBox.Destroy;
begin
TStringList(FValues).OnChange := nil;
FValues.Free;
inherited Destroy;
end;
procedure TRxDBComboBox.ValuesChanged(Sender: TObject);
begin
if FEnableValues then DataChange(Self);
end;
function TRxDBComboBox.GetPaintText: string;
var
I: Integer;
begin
Result := '';
if FDataLink.Field <> nil then begin
if FEnableValues then begin
I := Values.IndexOf(FDataLink.Field.Text);
if I >= 0 then Result := Items.Strings[I]
end
else Result := FDataLink.Field.Text;
end;
end;
function TRxDBComboBox.GetComboText: string;
var
I: Integer;
begin
if (Style in [csDropDown, csSimple]) and (not FEnableValues) then
Result := Text
else begin
I := ItemIndex;
if (I < 0) or (FEnableValues and (FValues.Count < I + 1)) then
Result := ''
else
if FEnableValues then Result := FValues[I]
else Result := Items[I];
end;
end;
procedure TRxDBComboBox.SetComboText(const Value: string);
var
I: Integer;
Redraw: Boolean;
begin
if Value <> ComboText then
begin
if Style <> csDropDown then
begin
Redraw := (Style <> csSimple) and HandleAllocated;
// if Redraw then SendMessage(Handle, WM_SETREDRAW, 0, 0);
try
if Value = '' then I := -1
else
if FEnableValues then I := Values.IndexOf(Value)
else I := Items.IndexOf(Value);
if I >= Items.Count then I := -1;
ItemIndex := I;
finally
if Redraw then
begin
// SendMessage(Handle, WM_SETREDRAW, 1, 0);
// Invalidate;
end;
end;
if I >= 0 then Exit;
end;
if Style in [csDropDown, csSimple] then Text := Value;
Invalidate;
end;
end;
procedure TRxDBComboBox.SetEnableValues(Value: Boolean);
begin
if FEnableValues <> Value then
begin
if Value and (Style in [csDropDown, csSimple]) then
Style := csDropDownList;
FEnableValues := Value;
DataChange(Self);
end;
end;
procedure TRxDBComboBox.SetValues(Value: TStrings);
begin
FValues.Assign(Value);
end;
procedure TRxDBComboBox.SetStyle(Value: TComboboxStyle);
begin
if (Value in [csSimple, csDropDown]) and FEnableValues then
Value := csDropDownList;
inherited SetStyle(Value);
end;
end.

965
components/rx/rxdbgrid.pas Normal file
View File

@ -0,0 +1,965 @@
unit rxdbgrid;
{$I rx.inc}
interface
uses
Classes, SysUtils, Types, LResources, LCLType, LCLIntf, Forms, Controls,
Graphics, Dialogs, Grids, DBGrids, DB, PropertyStorage, vclutils;
type
TSortMarker = (smNone, smDown, smUp);
TGetBtnParamsEvent = procedure (Sender: TObject; Field: TField;
AFont: TFont; var Background: TColor; var SortMarker: TSortMarker;
IsDown: Boolean) of object;
TGetCellPropsEvent = procedure (Sender: TObject; Field: TField;
AFont: TFont; var Background: TColor) of object;
TRxDBGridAllowedOperation = (aoInsert, aoUpdate, aoDelete, aoAppend);
TRxDBGridAllowedOperations = set of TRxDBGridAllowedOperation;
TDataSetClass = class of TDataSet;
TExDBGridSortEngine = class
private
FDataSetClass:TDataSetClass;
public
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);virtual;abstract;
end;
TExDBGridSortEngineClass = class of TExDBGridSortEngine;
{ TRxColumnTitle }
TRxColumnTitle = class(TGridColumnTitle)
private
FOrientation: TTextOrientation;
procedure SetOrientation(const AValue: TTextOrientation);
published
property Orientation:TTextOrientation read FOrientation write SetOrientation;
end;
{ TRxColumn }
TRxColumn = class(TColumn)
private
FImageList: TImageList;
FKeyList:TStrings;
FNotInKeyListIndex: Integer;
function GetKeyList: TStrings;
procedure SetImageList(const AValue: TImageList);
procedure SetKeyList(const AValue: TStrings);
procedure SetNotInKeyListIndex(const AValue: Integer);
protected
function CreateTitle: TGridColumnTitle; override;
public
constructor Create(ACollection: TCollection); override;
destructor destroy; override;
published
property KeyList: TStrings read GetKeyList write SetKeyList;
property ImageList:TImageList read FImageList write SetImageList;
property NotInKeyListIndex: Integer read FNotInKeyListIndex write SetNotInKeyListIndex default -1;
end;
{ TRxDbGridColumns }
TRxDbGridColumns = class(TDbGridColumns)
protected
function Add: TRxColumn;
end;
{ TRxDBGrid }
TRxDBGrid = class(TCustomDbGrid)
private
FAllowedOperations: TRxDBGridAllowedOperations;
FOnGetCellProps: TGetCellPropsEvent;
FTitleLines: Integer;
FAutoSort: boolean;
FMarkerUp, FMarkerDown: TBitmap;
FOnGetBtnParams: TGetBtnParamsEvent;
FTitleButtons: boolean;
//auto sort support
FSortField:TField;
FSortOrder:TSortMarker;
FSortEngine:TExDBGridSortEngine;
FPressedCol: TColumn;
FPressed: Boolean;
FSwapButtons: Boolean;
FTracking: Boolean;
//storage
FVersion: Integer;
FPropertyStorageLink:TPropertyStorageLink;
function GetColumns: TRxDbGridColumns;
function GetPropertyStorage: TCustomPropertyStorage;
function IsColumnsStored: boolean;
procedure SetAutoSort(const AValue: boolean);
procedure SetColumns(const AValue: TRxDbGridColumns);
procedure SetPropertyStorage(const AValue: TCustomPropertyStorage);
procedure SetTitleButtons(const AValue: boolean);
function GetMasterColumn(ACol, ARow: Integer): TColumn;
function DatalinkActive:boolean;
procedure TrackButton(X, Y: Integer);
procedure StopTracking;
procedure CalcTitle;
//storage
procedure OnIniSave(Sender: TObject);
procedure OnIniLoad(Sender: TObject);
protected
{$IFDEF Win32}
procedure CreateWnd; override;
{$ENDIF}
procedure DefaultDrawCellA(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState);
procedure DefaultDrawCellData(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState);
procedure DrawCell(aCol,aRow: Integer; aRect: TRect; aState:TGridDrawState); override;
procedure LinkActive(Value: Boolean); override;
procedure DoTitleClick(ACol: Longint; AField: TField); virtual;
procedure MouseMove(Shift: TShiftState; X, Y: Integer);override;
procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
function CreateColumns: TGridColumns; override;
procedure DrawCellBitmap(RxColumn:TRxColumn; aRect: TRect; aState: TGridDrawState; AImageIndex:integer); virtual;
procedure SetEditText(ACol, ARow: Longint; const Value: string); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure LayoutChanged; override;
published
property OnGetBtnParams: TGetBtnParamsEvent read FOnGetBtnParams write FOnGetBtnParams;
property TitleButtons: boolean read FTitleButtons write SetTitleButtons;
property AutoSort:boolean read FAutoSort write SetAutoSort;
property OnGetCellProps: TGetCellPropsEvent read FOnGetCellProps
write FOnGetCellProps;
property Columns: TRxDbGridColumns read GetColumns write SetColumns stored IsColumnsStored;
//storage
property PropertyStorage:TCustomPropertyStorage read GetPropertyStorage write SetPropertyStorage;
property Version: Integer read FVersion write FVersion default 0;
property AllowedOperations:TRxDBGridAllowedOperations read FAllowedOperations
write FAllowedOperations default [aoInsert, aoUpdate, aoDelete, aoAppend];
//from DBGrid
property Align;
property AlternateColor;
property Anchors;
property AutoAdvance default aaRightDown;
property AutoFillColumns;
//property BiDiMode;
property BorderSpacing;
property BorderStyle;
property Color;
property Constraints;
property DataSource;
property DefaultDrawing;
property DefaultRowHeight default 18;
//property DragCursor;
//property DragKind;
//property DragMode;
property Enabled;
property FixedColor;
property Flat;
property Font;
//property ImeMode;
//property ImeName;
property Options;
property OptionsExtra;
//property ParentBiDiMode;
property ParentColor;
//property ParentCtl3D;
property ParentFont;
//property ParentShowHint;
property PopupMenu;
property ReadOnly;
property Scrollbars;
property ShowHint;
property TabOrder;
property TabStop;
property TitleFont;
property TitleStyle;
property Visible;
property OnCellClick;
property OnColEnter;
property OnColExit;
property OnColumnMoved;
property OnDrawColumnCell;
property OnDblClick;
//property OnDragDrop;
//property OnDragOver;
property OnEditButtonClick;
//property OnEndDock;
//property OnEndDrag;
property OnEnter;
property OnExit;
property OnFieldEditMask;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnPrepareCanvas;
//property OnStartDock;
//property OnStartDrag;
property OnTitleClick;
property OnUserCheckboxBitmap;
end;
type
PCharArray1 = Array[0..12] of PChar;
const
IMGMarkerUp : PCharArray1 =
(
'10 9 3 1',
'. c None',
'# c #808080',
'a c #ffffff',
'..........',
'....#a....',
'...#..a...',
'...#..a...',
'..#....a..',
'..#....a..',
'.#......a.',
'.aaaaaaaa.',
'..........'
);
IMGMarkerDown : PCharArray1 =
(
'10 9 3 1',
'. c None',
'# c #808080',
'a c #ffffff',
'..........',
'.#######a.',
'.#......a.',
'..#....a..',
'..#....a..',
'...#..a...',
'...#..a...',
'....#a....',
'..........')
;
procedure RegisterExDBGridSortEngine(ExDBGridSortEngineClass:TExDBGridSortEngineClass; DataSetClass:TDataSetClass);
implementation
uses Math, rxdconst, rxstrutils;
var
ExDBGridSortEngineList:TStringList;
procedure RegisterExDBGridSortEngine(ExDBGridSortEngineClass:TExDBGridSortEngineClass; DataSetClass:TDataSetClass);
var
Pos:integer;
ExDBGridSortEngine:TExDBGridSortEngine;
begin
if not ExDBGridSortEngineList.Find(DataSetClass.ClassName, Pos) then
begin
ExDBGridSortEngine:=ExDBGridSortEngineClass.Create;
ExDBGridSortEngine.FDataSetClass:=DataSetClass;
ExDBGridSortEngineList.AddObject(DataSetClass.ClassName, ExDBGridSortEngine);
end
end;
procedure GridInvalidateRow(Grid: TRxDBGrid; Row: Longint);
var
I: Longint;
begin
for I := 0 to Grid.ColCount - 1 do Grid.InvalidateCell(I, Row);
end;
{ TRxDBGrid }
const
ALIGN_FLAGS: array[TAlignment] of Integer =
(DT_LEFT or DT_SINGLELINE {or DT_EXPANDTABS} or DT_NOPREFIX,
DT_RIGHT or DT_SINGLELINE {or DT_EXPANDTABS} or DT_NOPREFIX,
DT_CENTER or DT_SINGLELINE {or DT_EXPANDTABS} or DT_NOPREFIX);
const
ALIGN_FLAGS_HEADER: array[TAlignment] of Integer =
(DT_LEFT or {DT_EXPANDTABS or} DT_NOPREFIX,
DT_RIGHT or {DT_EXPANDTABS or }DT_NOPREFIX,
DT_CENTER or {DT_EXPANDTABS or }DT_NOPREFIX);
TITLE_SUBHEADER = 2;
TITLE_DEFAULT = 1;
const
EdgeFlag: array[Boolean] of UINT = (BDR_RAISEDINNER, BDR_SUNKENINNER);
procedure WriteTextHeader(ACanvas: TCanvas; ARect: TRect; const Text: string;
Alignment: TAlignment);
var
DrawRect: TRect;
W, CnvW:integer;
begin
DrawRect := Rect(ARect.Left + 1, ARect.Top + 1, ARect.Right, ARect.Bottom);
CnvW:=DrawRect.Right - DrawRect.Left;
W:=(ACanvas.TextWidth(Text) div CnvW) + 1;
DrawRect.Top:=((ARect.Top + ARect.Bottom) div 2) - W * ACanvas.TextHeight('W') div 2;
if DrawRect.Top < ARect.Top + 1 then
DrawRect.Top := ARect.Top + 1;
DrawText(ACanvas.Handle, PChar(Text), Length(Text), DrawRect,
// DT_VCENTER or DT_WORDBREAK or DT_CENTER
ALIGN_FLAGS_HEADER[Alignment] {or DT_VCENTER or DT_END_ELLIPSIS }or DT_WORDBREAK
);
end;
procedure TRxDBGrid.SetTitleButtons(const AValue: boolean);
begin
if FTitleButtons=AValue then exit;
FTitleButtons:=AValue;
end;
procedure TRxDBGrid.SetAutoSort(const AValue: boolean);
var
S:string;
Pos:integer;
begin
if FAutoSort=AValue then exit;
FAutoSort:=AValue;
if Assigned(DataSource) and Assigned(DataSource.DataSet) and DataSource.DataSet.Active then
begin
S:=DataSource.DataSet.ClassName;
if ExDBGridSortEngineList.Find(S, Pos) then
FSortEngine:=ExDBGridSortEngineList.Objects[Pos] as TExDBGridSortEngine
else
FSortEngine:=nil;
FSortField:=nil;
FSortOrder:=smNone;
end
end;
function TRxDBGrid.GetColumns: TRxDbGridColumns;
begin
result := TRxDbGridColumns(TCustomGrid(Self).Columns);
end;
function TRxDBGrid.GetPropertyStorage: TCustomPropertyStorage;
begin
Result:=FPropertyStorageLink.Storage;
end;
function TRxDBGrid.IsColumnsStored: boolean;
begin
result := TRxDbGridColumns(TCustomGrid(Self).Columns).Enabled;
end;
procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns);
begin
TRxDbGridColumns(TCustomGrid(Self).Columns).Assign(Avalue);
end;
procedure TRxDBGrid.SetPropertyStorage(const AValue: TCustomPropertyStorage);
begin
FPropertyStorageLink.Storage:=AValue;
end;
function TRxDBGrid.GetMasterColumn(ACol, ARow: Integer): TColumn;
begin
if (dgIndicator in Options) then Dec(ACol, 1);//IndicatorOffset);
if DatalinkActive and (ACol >= 0) and
(ACol < Columns.Count) then
begin
Result := Columns[ACol] as TColumn;
// Result := ColumnAtDepth(Result, ARow);
end
else Result := nil;
end;
function TRxDBGrid.DatalinkActive: boolean;
begin
Result:=Assigned(DataSource) and Assigned(DataSource.DataSet) and DataSource.DataSet.Active;
end;
procedure TRxDBGrid.TrackButton(X, Y: Integer);
var
Cell: TGridCoord;
NewPressed: Boolean;
I, Offset: Integer;
begin
Cell := MouseCoord(X, Y);
Offset := RowCount;//[0];
NewPressed := PtInRect(Rect(0, 0, ClientWidth, ClientHeight), Point(X, Y)) and
(FPressedCol = GetMasterColumn(Cell.X, Cell.Y) { Cell.X }) and (Cell.Y < Offset);
if FPressed <> NewPressed then
begin
FPressed := NewPressed;
for I := 0 to Offset - 1 do
GridInvalidateRow(Self, I);
end;
end;
procedure TRxDBGrid.StopTracking;
begin
if FTracking then
begin
TrackButton(-1, -1);
FTracking := False;
MouseCapture := False;
end;
end;
procedure TRxDBGrid.CalcTitle;
var
i:integer;
H:integer;
begin
H:=0;
for i:=0 to Columns.Count-1 do
begin
if TRxColumnTitle(Columns[i].Title).Orientation in [toVertical270, toVertical90] then
H:=Max((Canvas.TextWidth(Columns[i].Title.Caption)+ Canvas.TextWidth('W')) div 19, H)
else
H:=Max((Canvas.TextWidth(Columns[i].Title.Caption)) div Max(Columns[i].Width-2, 1), H);
end;
RowHeights[0] := 19 * (FTitleLines+H);
end;
procedure TRxDBGrid.OnIniSave(Sender: TObject);
var
i:integer;
S, S1:string;
C:TRxColumn;
begin
S:=Owner.Name+'.'+Name;
FPropertyStorageLink.Storage.WriteInteger(S+sVersion, FVersion);
FPropertyStorageLink.Storage.WriteInteger(S+sCount, Columns.Count);
S:=S+sItem;
for i:=0 to Columns.Count-1 do
begin
S1:=S+IntToStr(i);
C:=TRxColumn(Columns[i]);
FPropertyStorageLink.Storage.WriteString(S1+sCaption, StrToHexText(C.Title.Caption));
FPropertyStorageLink.Storage.WriteInteger(S1+sWidth, C.Width);
end;
end;
procedure TRxDBGrid.OnIniLoad(Sender: TObject);
function GetColByCaption(Cap:string):TRxColumn;
var
i:integer;
begin
Result:=nil;
for i:=0 to Columns.Count - 1 do
if Cap = Columns[i].Title.Caption then
begin
Result:=TRxColumn(Columns[i]);
exit;
end;
end;
var
i, ACount:integer;
S, S1, ColumName, S2:string;
C:TRxColumn;
begin
S:=Owner.Name+'.'+Name;
ACount:=FPropertyStorageLink.Storage.ReadInteger(S+sVersion, FVersion); //Check cfg version
if ACount = FVersion then
begin
ACount:=FPropertyStorageLink.Storage.ReadInteger(S+sCount, 0);
S:=S+sItem;
for i:=0 to ACount-1 do
begin
S1:=S+IntToStr(i);
ColumName:=HexTextToStr(FPropertyStorageLink.Storage.ReadString(S1+sCaption, ''));
if ColumName<>'' then
begin
C:=GetColByCaption(ColumName);
if Assigned(C) then
C.Width:=FPropertyStorageLink.Storage.ReadInteger(S1+sWidth, C.Width);
end;
end;
end;
end;
{$IFDEF Win32}
procedure TRxDBGrid.CreateWnd;
begin
BeginUpdate;
try
inherited CreateWnd;
CalcTitle;
finally
EndUpdate;
end;
end;
{$ENDIF}
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: Integer; aRect: TRect;
aState: TGridDrawState);
procedure FixRectangle;
begin
case Canvas.TextStyle.Alignment of
Classes.taLeftJustify: Inc(aRect.Left, 3);
Classes.taRightJustify: Dec(aRect.Right, 3);
end;
case Canvas.TextStyle.Layout of
tlTop: Inc(aRect.Top, 3);
tlBottom: Dec(aRect.Bottom, 3);
end;
end;
var
ASortMarker: TSortMarker;
Background: TColor;
X1,Y1, dW:integer;
Down:boolean;
aRect1: TRect;
FTit:TRxColumnTitle;
FCap:string;
begin
Down := FPressed and FTitleButtons and (FPressedCol = GetMasterColumn( aCol , 0));
PrepareCanvas(aCol, aRow, aState);
ASortMarker := smNone;
if (FSortField = GetFieldFromGridColumn(aCol)) then ASortMarker := FSortOrder;
if Assigned(FOnGetBtnParams) and Assigned(GetFieldFromGridColumn(aCol)) then
begin
Background:=Canvas.Brush.Color;
FOnGetBtnParams(Self, GetFieldFromGridColumn(aCol), Canvas.Font,
Background, ASortMarker, Down);
Canvas.Brush.Color:=Background;
end;
Canvas.FillRect(aRect);
DrawCellGrid(aCol,aRow,aRect,aState);
if (gdFixed in aState) and (aRow=0)and(ACol>=FixedCols) then
begin
aRect1:=aRect;
FixRectangle;
FTit:=TRxColumnTitle(ColumnFromGridColumn(aCol).Title);
if not Assigned(FTit) then
FCap:=GetDefaultColumnTitle(aCol)
else
FCap:=FTit.Caption;
if FTit.Orientation = toHorizontal then
WriteTextHeader(Canvas, ARect, FCap, GetColumnAlignment(aCol, true))
else
begin
if FTit.Orientation in [toVertical90, toVertical270] then
dW:=((aRect.Bottom - aRect.Top) - Canvas.TextWidth(FCap)) div 2
else
dw:=0;
OutTextXY90(Canvas, ARect.Left, ARect.Top+dw, FCap, FTit.Orientation);
end;
if FTitleButtons then
begin
if ASortMarker = smDown then
begin
X1:=aRect.Right - FMarkerDown.Width - 6;
Y1:=Trunc((aRect.Top+aRect.Bottom-FMarkerDown.Height)/2);
Canvas.Draw(X1, Y1, FMarkerDown);
end
else
if ASortMarker = smUp then
begin
X1:=aRect.Right - FMarkerUp.Width - 6;
Y1:=Trunc((aRect.Top+aRect.Bottom-FMarkerUp.Height)/2);
Canvas.Draw(X1, Y1, FMarkerUp);
end;
end;
if (FTitleButtons or ([dgRowLines, dgColLines] * Options =
[dgRowLines, dgColLines])) and Down then
begin
DrawEdge(Canvas.Handle, ARect1, EdgeFlag[Down], BF_BOTTOMRIGHT);
DrawEdge(Canvas.Handle, ARect1, EdgeFlag[Down], BF_TOPLEFT);
end
end
else
DefaultDrawCell(aCol, aRow, aRect, aState);
end;
procedure TRxDBGrid.DefaultDrawCellData(aCol, aRow: Integer; aRect: TRect;
aState: TGridDrawState);
var
S: string;
F: TField;
C:TRxColumn;
j:integer;
begin
F := GetFieldFromGridColumn(aCol);
C := ColumnFromGridColumn(aCol) as TRxColumn;
case ColumnEditorStyle(aCol, F) of
cbsCheckBoxColumn : DrawCheckBoxBitmaps(aCol, aRect, F);
else
if F<>nil then
begin
if F.dataType <> ftBlob then
begin
S := F.DisplayText;
if Assigned(C) and (C.KeyList.Count > 0) and (C.PickList.Count>0) then
begin
J:=C.KeyList.IndexOf(S);
if (J>=0) and (J<C.PickList.Count) then
S:=C.PickList[j];
end;
end
else
S := '(blob)';
end
else
S := '';
DrawCellText(aCol,aRow,aRect,aState,S);
end;
end;
procedure TRxDBGrid.DrawCell(aCol, aRow: Integer; aRect: TRect;
aState: TGridDrawState);
var
RxColumn:TRxColumn;
AImageIndex:integer;
FBackground: TColor;
begin
if {FTitleButtons and }(gdFixed in aState) and (aRow=0)and(ACol>=FixedCols) then
DefaultDrawCellA(aCol, aRow, aRect, aState)
else
if not ((gdFixed in aState) or (aCol=0) or (aRow=0)) then
begin
PrepareCanvas(aCol, aRow, aState);
if Assigned(FOnGetCellProps) then
begin
FBackground:=Canvas.Brush.Color;
FOnGetCellProps(Self, GetFieldFromGridColumn(aCol), Canvas.Font, FBackground);
Canvas.Brush.Color:=FBackground;
end;
Canvas.FillRect(aRect);
DrawCellGrid(aCol,aRow, aRect, aState);
RxColumn:=TRxColumn(ColumnFromGridColumn(aCol));
if Assigned(RxColumn) and Assigned(RxColumn.Field) and Assigned(RxColumn.ImageList) then
begin
AImageIndex:=StrToIntDef(RxColumn.KeyList.Values[RxColumn.Field.AsString], RxColumn.FNotInKeyListIndex);
if (AImageIndex > -1) and (AImageIndex < RxColumn.ImageList.Count) then
DrawCellBitmap(RxColumn, aRect, aState, AImageIndex);
end
else
DefaultDrawCellData(aCol, aRow, aRect, aState);
// inherited DrawCell(aCol, aRow, aRect, aState);
end
else
inherited DrawCell(aCol, aRow, aRect, aState);
end;
procedure TRxDBGrid.LinkActive(Value: Boolean);
var
S:string;
Pos:integer;
begin
inherited LinkActive(Value);
if Value then
begin
S:=DataSource.DataSet.ClassName;
if ExDBGridSortEngineList.Find(S, Pos) then
FSortEngine:=ExDBGridSortEngineList.Objects[Pos] as TExDBGridSortEngine
else
FSortEngine:=nil;
end
else
FSortEngine:=nil;
FSortField:=nil;
FSortOrder:=smNone;
end;
procedure TRxDBGrid.DoTitleClick(ACol: Longint; AField: TField);
begin
if FAutoSort and (FSortEngine<>nil) then
begin
if AField=FSortField then
begin
if FSortOrder=smUp then
FSortOrder:=smDown
else
FSortOrder:=smUp;
end
else
begin
FSortField:=AField;
FSortOrder:=smUp;
end;
FSortEngine.Sort(FSortField, DataSource.DataSet, FSortOrder=smUp);
end;
// if Assigned(FOnTitleBtnClick) then FOnTitleBtnClick(Self, ACol, AField);
end;
procedure TRxDBGrid.MouseMove(Shift: TShiftState; X, Y: Integer);
begin
if FTracking then TrackButton(X, Y);
inherited MouseMove(Shift, X, Y);
if (MouseToGridZone(X,Y) = gzFixedCols) then
CalcTitle;
end;
procedure TRxDBGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
var
Cell: TGridCoord;
begin
if FAutoSort then
begin
Cell := MouseCoord(X, Y);
if (Cell.Y=0) and (Cell.X >= ord(dgIndicator in Options)) then
begin
if (dgColumnResize in Options) and (Button = mbRight) then
begin
Button := mbLeft;
FSwapButtons := True;
MouseCapture := True;
Shift:=Shift + [ssLeft];
inherited MouseDown(Button, Shift, X, Y);
end
else
if Button = mbLeft then
begin
if (MouseToGridZone(X,Y) = gzFixedCols) and (dgColumnResize in Options) and (Cursor=crHSplit) then
begin
inherited MouseDown(Button, Shift, X, Y);
end
else
begin
MouseCapture := True;
FTracking := True;
FPressedCol := GetMasterColumn(Cell.X, Cell.Y);
TrackButton(X, Y);
end
end
end
else
inherited MouseDown(Button, Shift, X, Y);
end
else
inherited MouseDown(Button, Shift, X, Y);
end;
procedure TRxDBGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
var
Cell: TGridCoord;
ACol: Longint;
DoClick: Boolean;
begin
if FTitleButtons and FTracking and (FPressedCol <> nil) then
begin
Cell := MouseCoord(X, Y);
DoClick := PtInRect(Rect(0, 0, ClientWidth, ClientHeight), Point(X, Y))
and (Cell.Y < RowHeights[0]) and
(FPressedCol = GetMasterColumn(Cell.X, Cell.Y));
StopTracking;
if DoClick then
begin
ACol := Cell.X;
if (dgIndicator in Options) then Dec(ACol);
if DataLinkActive and (ACol >= 0) and (ACol < Columns.Count ) then
begin
DoTitleClick(FPressedCol.Index, FPressedCol.Field);
end;
end;
end
else
if FSwapButtons then begin
FSwapButtons := False;
MouseCapture := False;
if Button = mbRight then Button := mbLeft;
end;
inherited MouseUp(Button, Shift, X, Y);
end;
procedure TRxDBGrid.KeyDown(var Key: Word; Shift: TShiftState);
var
FTmpReadOnly:boolean;
begin
case Key of
VK_DELETE:if not (aoDelete in FAllowedOperations) then exit;
VK_INSERT:if not (aoInsert in FAllowedOperations) then exit;
VK_DOWN:if not (aoAppend in FAllowedOperations) then
begin
FTmpReadOnly:=ReadOnly;
ReadOnly:=true;
inherited KeyDown(Key, Shift);
ReadOnly:=FTmpReadOnly;
exit;
end;
end;
inherited KeyDown(Key, Shift);
end;
function TRxDBGrid.CreateColumns: TGridColumns;
begin
Result := TRxDbGridColumns.Create(Self, TRxColumn);
end;
procedure TRxDBGrid.DrawCellBitmap(RxColumn: TRxColumn; aRect: TRect;
aState: TGridDrawState; AImageIndex: integer);
var
ClientSize: TSize;
IBitmap, Stub:TBitmap;
ImageRect: TRect;
begin
InflateRect(aRect, -1, -1);
RxColumn.ImageList.GetInternalImage(AImageIndex, IBitmap, Stub, ImageRect);
ClientSize.cx:= Min(aRect.Right - aRect.Left, IBitmap.Width);
ClientSize.cy:= Min(aRect.Bottom - aRect.Top, IBitmap.Height);
if ClientSize.cx = IBitmap.Width then
begin
aRect.Left:= (aRect.Left + aRect.Right - IBitmap.Width) div 2;
aRect.Right:=aRect.Left + IBitmap.Width;
end;
if ClientSize.cy = IBitmap.Height then
begin
aRect.Top:= (aRect.Top + aRect.Bottom - IBitmap.Height) div 2;
aRect.Bottom:=aRect.Top + IBitmap.Height;
end;
Canvas.StretchDraw(aRect, IBitmap);
end;
procedure TRxDBGrid.SetEditText(ACol, ARow: Longint; const Value: string);
var
C:TRxColumn;
j:integer;
S:string;
begin
C := ColumnFromGridColumn(aCol) as TRxColumn;
S:=Value;
if Assigned(C) and (C.KeyList.Count>0) and (C.PickList.Count>0) then
begin
J:=C.PickList.IndexOf(S);
if (J>=0) and (J<C.KeyList.Count) then
S:=C.KeyList[j];
end;
inherited SetEditText(ACol, ARow, S);
end;
constructor TRxDBGrid.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FMarkerUp := TBitmap.Create;
FMarkerUp.Handle := CreatePixmapIndirect(@IMGMarkerUp[0],
GetSysColor(COLOR_BTNFACE));
FMarkerDown := TBitmap.Create;
FMarkerDown.Handle := CreatePixmapIndirect(@IMGMarkerDown[0],
GetSysColor(COLOR_BTNFACE));
FPropertyStorageLink:=TPropertyStorageLink.Create;
FPropertyStorageLink.OnSave:=@OnIniSave;
FPropertyStorageLink.OnLoad:=@OnIniLoad;
FTitleLines := TITLE_DEFAULT;
FAllowedOperations:=[aoInsert, aoUpdate, aoDelete, aoAppend];
end;
destructor TRxDBGrid.Destroy;
begin
FreeAndNil(FMarkerDown);
FreeAndNil(FMarkerUp);
FreeAndNil(FPropertyStorageLink);
inherited Destroy;
end;
procedure TRxDBGrid.LayoutChanged;
begin
inherited LayoutChanged;
// CalcTitle;
end;
{ TRxDbGridColumns }
function TRxDbGridColumns.Add: TRxColumn;
begin
result := TRxColumn( inherited Add);
end;
{ TRxColumn }
function TRxColumn.GetKeyList: TStrings;
begin
if FKeyList=nil then
FKeyList := TStringList.Create;
Result := FKeyList;
end;
procedure TRxColumn.SetImageList(const AValue: TImageList);
begin
if FImageList=AValue then exit;
FImageList:=AValue;
if Grid <> nil then
Grid.Invalidate;
end;
procedure TRxColumn.SetKeyList(const AValue: TStrings);
begin
if AValue=nil then
begin
if FKeyList<>nil then
FKeyList.Clear
end
else
KeyList.Assign(AValue);
end;
procedure TRxColumn.SetNotInKeyListIndex(const AValue: Integer);
begin
if FNotInKeyListIndex=AValue then exit;
FNotInKeyListIndex:=AValue;
if Grid <> nil then
Grid.Invalidate;
end;
function TRxColumn.CreateTitle: TGridColumnTitle;
begin
Result:=TRxColumnTitle.Create(Self);
end;
constructor TRxColumn.Create(ACollection: TCollection);
begin
inherited Create(ACollection);
FNotInKeyListIndex:=-1;
end;
destructor TRxColumn.destroy;
begin
if FKeyList<>nil then
begin
FKeyList.Free;
FKeyList:=nil;
end;
inherited destroy;
end;
{ TRxColumnTitle }
procedure TRxColumnTitle.SetOrientation(const AValue: TTextOrientation);
begin
if FOrientation=AValue then exit;
FOrientation:=AValue;
TRxDBGrid(TRxColumn(Column).Grid).CalcTitle;
TRxColumn(Column).ColumnChanged;
end;
initialization
ExDBGridSortEngineList:=TStringList.Create;
ExDBGridSortEngineList.Sorted:=true;
finalization
ExDBGridSortEngineList.Clear;
ExDBGridSortEngineList.Free;
end.

185
components/rx/rxdconst.pas Normal file
View File

@ -0,0 +1,185 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995, 1996 AO ROSNO }
{ Copyright (c) 1997 Master-Bank }
{ }
{*******************************************************}
unit rxdconst;
{ RX Data aware controls constants }
{
Reserved range
from MaxExtStrID - 86
to MaxExtStrID - 134
}
interface
const
{ The minimal VCL's used string ID is 61440. The custom IDs must be
less that above. }
MaxExtStrID = 61300;
const
(*
{ DBLists }
SLocalDatabase = MaxExtStrID - 86;
{ DBUtils }
SRetryLogin = MaxExtStrID - 87;
{ DBFilter }
SExprNotBoolean = MaxExtStrID - 88;
SExprBadNullTest = MaxExtStrID - 89;
SExprBadField = MaxExtStrID - 90;
SCaptureFilter = MaxExtStrID - 91;
SNotCaptureFilter = MaxExtStrID - 92;
{ RxDBCtrl }
SInactiveData = MaxExtStrID - 93;
SBrowseData = MaxExtStrID - 94;
SEditData = MaxExtStrID - 95;
SInsertData = MaxExtStrID - 96;
SSetKeyData = MaxExtStrID - 97;
SCalcFieldsData = MaxExtStrID - 98;
{ LoginDlg }
SRegistration = MaxExtStrID - 99;
SAppTitleLabel = MaxExtStrID - 100;
SHintLabel = MaxExtStrID - 101;
SUserNameLabel = MaxExtStrID - 102;
SPasswordLabel = MaxExtStrID - 103;
SInvalidUserName = MaxExtStrID - 104;
{ ChPswDlg }
SChangePassword = MaxExtStrID - 105;
SOldPasswordLabel = MaxExtStrID - 106;
SNewPasswordLabel = MaxExtStrID - 107;
SConfirmPasswordLabel = MaxExtStrID - 108;
SPasswordChanged = MaxExtStrID - 109;
SPasswordNotChanged = MaxExtStrID - 110;
SPasswordsMismatch = MaxExtStrID - 111;
{ DBExcpt }
SDBExceptCaption = MaxExtStrID - 112;
SBDEErrorLabel = MaxExtStrID - 113;
SServerErrorLabel = MaxExtStrID - 114;
SErrorMsgLabel = MaxExtStrID - 115;
SNextButton = MaxExtStrID - 116;
SPrevButton = MaxExtStrID - 117;
{ DBFilter expression parser }
SExprIncorrect = MaxExtStrID - 118;
SExprTermination = MaxExtStrID - 119;
SExprNameError = MaxExtStrID - 120;
SExprStringError = MaxExtStrID - 121;
SExprInvalidChar = MaxExtStrID - 122;
SExprNoRParen = MaxExtStrID - 123;
SExprExpected = MaxExtStrID - 124;
SExprBadCompare = MaxExtStrID - 125;
{ DBUtils }
SConfirmSave = MaxExtStrID - 126;
SDatabaseName = MaxExtStrID - 127;
{ LoginDlg }
SUnlockCaption = MaxExtStrID - 128;
SUnlockHint = MaxExtStrID - 129;
{ RxDBCtrl }
SDeleteMultipleRecords = MaxExtStrID - 130;*)
SLocalDatabase = '���������� ���������� ��� �������� � ��������� ����� ������';
SRetryLogin = '�� ������ ��������� ������� ���������� � ����� ������?';
SExprNotBoolean = '���� ''%s'' �� �������� ����� ����������� ����';
SExprBadNullTest = 'NULL-�������� ��������� ������ � ��������� ''='' � ''<>''';
SExprBadField = '���� ''%s'' �� ����� ���� ������������ � ��������� �������';
SCaptureFilter = '�������� ���������� ��������� ��������';
SNotCaptureFilter = '�������� ���������� ������ ���� ��������� ��������';
SInactiveData = '���������';
SBrowseData = '��������';
SEditData = '��������������';
SInsertData = '����������';
SSetKeyData = '�����';
SCalcFieldsData = '�������';
SRegistration = '�����������';
SAppTitleLabel = '��������� "%s"';
SHintLabel = '������� ���� ���������������� ��� � ������';
SUserNameLabel = '&��� ������������:';
SPasswordLabel = '&������:';
SInvalidUserName = '�������� ��� ������������ ��� ������';
SChangePassword = '����� ������';
SOldPasswordLabel = '&������ ������:';
SNewPasswordLabel = '&����� ������:';
SConfirmPasswordLabel = '&�������������:';
SPasswordChanged = '������ ������';
SPasswordNotChanged = '������ �� ������';
SPasswordsMismatch = '����� ������ � ������������� �� ���������';
SDBExceptCaption = '������ ���������� ��';
SBDEErrorLabel = '������ BDE';
SServerErrorLabel = '������ �������';
SErrorMsgLabel = '��������� �� ������';
SNextButton = '&������';
SPrevButton = '&�����';
SExprIncorrect = '����������� �������������� ��������� �������';
SExprTermination = '�������� ���������� ��������� �������';
SExprNameError = '���������� ���������� ���������� ����� ����';
SExprStringError = '���������� ���������� ���������� ��������� ���������';
SExprInvalidChar = '�������� ������ � ��������� �������: ''%s''';
SExprNoRParen = '��������� '')'', � ���������: %s';
SExprExpected = '��������� ���������, � ��������� %s';
SExprBadCompare = '�������� ��������� ������� ������� ���� � ���������';
SConfirmSave = '������ ���� ��������. ���������?';
SDatabaseName = '���� ������: %s';
SUnlockCaption = '���������������';
SUnlockHint = '������� ��� ������';
SDeleteMultipleRecords = '������� ��� ��������� ������?';
SPropDefByLookup = 'PropDefByLookup';
SDataSourceFixed = 'SDataSourceFixed';
SCircularDataLink = 'SCircularDataLink';
SDeleteRecordQuestion = 'Delete record?';
SFieldTypeMismatch = 'Type mismatch for field ''%s'', expecting: %s actual: %s';
SInvalidDate = 'Invalid Date';
SFieldRequired = 'Field ''%s'' must have a value';
SNotEditing = 'Dataset not in edit or insert mode';
SUnknownFieldType = 'SUnknownFieldType %s';
SFieldReadOnly = 'SFieldReadOnly %s';
const
{ The following strings should not be localized }
sAction = '.Action';
sCount = '.Count';
sVisible = '.Visible';
sItem = '.Item';
sWidth = '.Width';
sTop = '.Top';
sVersion = '.Version';
sLeft = '.Left';
sShowHint = '.ShowHint';
sShowCaption = '.ShowCaption';
sToolBarStyle = '.ToolBarStyle';
sOptions = '.Options';
sCaption = '.Caption';
implementation
end.

431
components/rx/rxdice.inc Normal file
View File

@ -0,0 +1,431 @@
type
TRxDiceBitmap = array [0..68] of PChar;
const
DICE1 : TRxDiceBitmap = (
'64 64 4 1',
'. c None',
'# c #000000',
'b c #c0c0c0',
'a c #ffffff',
'................................................................',
'.............................######.............................',
'...........................##########...........................',
'.........................####aaaaaa####.........................',
'.......................####aaaaaaaaaa####.......................',
'.....................####aaaaaaaaaaaaaa####.....................',
'...................####aaaaaaaaaaaaaaaaaa####...................',
'.................####aaaaaaaaaaaaaaaaaaaaaa####.................',
'...............####aaaaaaaaaaaaaaaaaaaaaaaaaa####...............',
'.............####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.............',
'...........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####...........',
'.........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........',
'.......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......',
'.....####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####.....',
'...####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####...',
'.####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa####.',
'#####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa#####',
'##b####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####a##',
'##bbb####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####aaa##',
'##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##',
'##bbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaaaa##',
'##bbbbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaa###aaaa##',
'##bbbbbbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaa####aaaa######aaa##',
'##bbbbbbbbbbbbbbb####aaaaaaaaaaaaaaaaaaaaaa####aaaaaa######aaa##',
'##bbbbbbbbbbbbbbbbb####aaaaaaaaaaaaaaaaaa####aaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbb####aaaaaaaaaaaaaa####aaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaa###aaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbb###bbbb#######bbb##aaa#######aaaa###aaaaaaaaaaaa##',
'##bbbbbbbbbbb######bbb######bbb##aaa######aaa######aaaaaaaaaaa##',
'##bbbbbbbbbbb######bbbb####bbbb##aaaa####aaaa######aaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbbb###bbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaa###aaaa##',
'##bbb######bbb######bbbbbbbbbbb##aaaaaaaaaaa######aaa######aaa##',
'##bbb######bbbb####bbbbbbbbbbbb##aaaaaaaaaaaa####aaaa######aaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##',
'##bbbb######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa######aaaa##',
'###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaa###',
'.####bbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.',
'...####bbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaa####...',
'.....####bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa####.....',
'.......####bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa####.......',
'.........####bbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaa####.........',
'...........####bbbbbbbbbbbbbbbb##aaa#######aaaaaa####...........',
'.............####bbbbbbbbbbbbbb##aaa######aaaaa####.............',
'...............####bbbbbbbbbbbb##aaaa####aaaa####...............',
'.................####bbbbbbbbbb##aaaaaaaaaa####.................',
'...................####bbbbbbbb##aaaaaaaa####...................',
'.....................####bbbbbb##aaaaaa####.....................',
'.......................####bbbb##aaaa####.......................',
'.........................####bb##aa####.........................',
'...........................##########...........................',
'..............................####..............................',
'................................................................');
DICE2 : TRxDiceBitmap = (
'64 64 4 1',
'. c None',
'# c #000000',
'b c #c0c0c0',
'a c #ffffff',
'................................................................',
'.............................######.............................',
'...........................##########...........................',
'.........................####aaaaaa####.........................',
'.......................####aaaaaaaaaa####.......................',
'.....................####aaaaa####aaaaa####.....................',
'...................####aaaaa########aaaaa####...................',
'.................####aaaaaa##########aaaaaa####.................',
'...............####aaaaaaaa##########aaaaaaaa####...............',
'.............####aaaaaaaaaaa########aaaaaaaaaaa####.............',
'...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........',
'.........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........',
'.......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......',
'.....####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.....',
'...####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####...',
'.####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.',
'#####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#####',
'##b####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####a##',
'##bbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaa##',
'##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##',
'##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##',
'##bbbbbbbbbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##',
'##bbbbbbbbbbbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##',
'##bbbbbbbbbbbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##',
'##bbbbbbbbbbbbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbb######aaaa###aaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbb###bbbbbbbbbbbbbb##aaa#######aaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbb######bbbbbbbbbbbb##aaa######aaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbb######bbbbbbbbbbbb##aaaa####aaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaa###aaaa##',
'##bbbbbbbbbbbb######bbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa######aaa##',
'##bbbbbbbbbbbbb####bbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaa######aaaa##',
'###bbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaa###',
'.####bbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.',
'...####bbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaa####...',
'.....####bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa####.....',
'.......####bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa####.......',
'.........####bbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaa####.........',
'...........####bbbbbbbbbbbbbbbb##aaa#######aaaaaa####...........',
'.............####bbbbbbbbbbbbbb##aaa######aaaaa####.............',
'...............####bbbbbbbbbbbb##aaaa####aaaa####...............',
'.................####bbbbbbbbbb##aaaaaaaaaa####.................',
'...................####bbbbbbbb##aaaaaaaa####...................',
'.....................####bbbbbb##aaaaaa####.....................',
'.......................####bbbb##aaaa####.......................',
'.........................####bb##aa####.........................',
'...........................##########...........................',
'..............................####..............................',
'................................................................');
DICE3 : TRxDiceBitmap = (
'64 64 4 1',
'. c None',
'# c #000000',
'b c #c0c0c0',
'a c #ffffff',
'................................................................',
'.............................######.............................',
'...........................##########...........................',
'.........................####aaaaaa####.........................',
'.......................####aaaaaaaaaa####.......................',
'.....................####aaaaa####aaaaa####.....................',
'...................####aaaaa########aaaaa####...................',
'.................####aaaaaa##########aaaaaa####.................',
'...............####aaaaaaaa##########aaaaaaaa####...............',
'.............####aaaaaaaaaaa########aaaaaaaaaaa####.............',
'...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........',
'.........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........',
'.......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......',
'.....####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####.....',
'...####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####...',
'.####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa####.',
'#####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaa#####',
'##b####aaaaaaaaaaaaaaaaaaaaa########aaaaaaaaaaaaaaaaaaaaa####a##',
'##bbb####aaaaaaaaaaaaaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa####aaa##',
'##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##',
'##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##',
'##bbbbbbbbbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##',
'##bbbbbbbbbbbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##',
'##bbbbbbbbbbbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##',
'##bbbbbbbbbbbbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaa###aaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa###aaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaa######aaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa######aaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaa#######aaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbb######bbb##aaa######aaaaaaaaaa#######aaa##',
'##bbbbbbbbbbbbbbbbbbbbb####bbbb##aaaa####aaaaaaaaaaa######aaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaaaaa##',
'##bbbb###bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa###aaaa##',
'##bbb######bbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaa######aaa##',
'##bbb######bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa######aaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaa#######aaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaa#######aaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaa######aaaaaaaaaa#######aaa##',
'##bbbb######bbbbbbbbbbbbbbbbbbb##aaaa####aaaaaaaaaaa######aaaa##',
'###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaa####aaaa###',
'.####bbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.',
'...####bbbbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaaaa####...',
'.....####bbbbbbbbbbbbbbbbbbbbbb##aaaa######aaaaaaaaaaaa####.....',
'.......####bbbbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaaaa####.......',
'.........####bbbbbbbbbbbbbbbbbb##aaa#######aaaaaaaa####.........',
'...........####bbbbbbbbbbbbbbbb##aaa#######aaaaaa####...........',
'.............####bbbbbbbbbbbbbb##aaa######aaaaa####.............',
'...............####bbbbbbbbbbbb##aaaa####aaaa####...............',
'.................####bbbbbbbbbb##aaaaaaaaaa####.................',
'...................####bbbbbbbb##aaaaaaaa####...................',
'.....................####bbbbbb##aaaaaa####.....................',
'.......................####bbbb##aaaa####.......................',
'.........................####bb##aa####.........................',
'...........................##########...........................',
'..............................####..............................',
'................................................................');
DICE4 : TRxDiceBitmap = (
'64 64 4 1',
'. c None',
'# c #000000',
'b c #c0c0c0',
'a c #ffffff',
'................................................................',
'.............................######.............................',
'...........................##########...........................',
'.........................####aaaaaa####.........................',
'.......................####aaaaaaaaaa####.......................',
'.....................####aaaaa####aaaaa####.....................',
'...................####aaaaa########aaaaa####...................',
'.................####aaaaaa##########aaaaaa####.................',
'...............####aaaaaaaa##########aaaaaaaa####...............',
'.............####aaaaaaaaaaa########aaaaaaaaaaa####.............',
'...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........',
'.........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........',
'.......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......',
'.....####aaaaa####aaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa####.....',
'...####aaaaa########aaaaaaaaaaaaaaaaaaaaaaaa########aaaaa####...',
'.####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.',
'#####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa#####',
'##b####aaaaa########aaaaaaaaaaaaaaaaaaaaaaaa########aaaaa####a##',
'##bbb####aaaaa####aaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa####aaa##',
'##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##',
'##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##',
'##bbbb###bbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##',
'##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##',
'##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##',
'##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##',
'##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##',
'##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##',
'##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##',
'##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbb###bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb######bbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb######bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbb######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbb######bbbbbbbbbbb####bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbb###bbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbb###bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb######bbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb######bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbb######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbb######bbbbbbbbbbb####bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###',
'.####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.',
'...####bbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaa####...',
'.....####bbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa####.....',
'.......####bbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa####.......',
'.........####bbbbbbbb#######bbb##aaa#######aaaaaaaa####.........',
'...........####bbbbbb#######bbb##aaa#######aaaaaa####...........',
'.............####bbbbb######bbb##aaa######aaaaa####.............',
'...............####bbbb####bbbb##aaaa####aaaa####...............',
'.................####bbbbbbbbbb##aaaaaaaaaa####.................',
'...................####bbbbbbbb##aaaaaaaa####...................',
'.....................####bbbbbb##aaaaaa####.....................',
'.......................####bbbb##aaaa####.......................',
'.........................####bb##aa####.........................',
'...........................##########...........................',
'..............................####..............................',
'................................................................');
DICE5 : TRxDiceBitmap = (
'64 64 4 1',
'. c None',
'# c #000000',
'b c #c0c0c0',
'a c #ffffff',
'................................................................',
'.............................######.............................',
'...........................##########...........................',
'.........................####aaaaaa####.........................',
'.......................####aaaaaaaaaa####.......................',
'.....................####aaaaa####aaaaa####.....................',
'...................####aaaaa########aaaaa####...................',
'.................####aaaaaa##########aaaaaa####.................',
'...............####aaaaaaaa##########aaaaaaaa####...............',
'.............####aaaaaaaaaaa########aaaaaaaaaaa####.............',
'...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........',
'.........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........',
'.......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......',
'.....####aaaaa####aaaaaaaaaaaa####aaaaaaaaaaaa####aaaaa####.....',
'...####aaaaa########aaaaaaaa########aaaaaaaa########aaaaa####...',
'.####aaaaaa##########aaaaaa##########aaaaaa##########aaaaaa####.',
'#####aaaaaa##########aaaaaa##########aaaaaa##########aaaaaa#####',
'##b####aaaaa########aaaaaaaa########aaaaaaaa########aaaaa####a##',
'##bbb####aaaaa####aaaaaaaaaaaa####aaaaaaaaaaaa####aaaaa####aaa##',
'##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##',
'##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##',
'##bbbb###bbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaaaaaaaaa##',
'##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaaaaaaaaaaa##',
'##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaaaaaaaaaaaa##',
'##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaa###aaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbb######bbb##aaaaaaaaaaaa######aaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbb####bbbb##aaaaaaaaaaaa######aaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbbb###bbbbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbb######bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaa######aaaaaaaaaaaa##',
'##bbb######bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaa####aaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbb######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###',
'.####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaa####.',
'...####bbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaa####...',
'.....####bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaa####.....',
'.......####bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaa####.......',
'.........####bbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaa####.........',
'...........####bbbbbb#######bbb##aaaaaaaaaaaaaaaa####...........',
'.............####bbbbb######bbb##aaaaaaaaaaaaaa####.............',
'...............####bbbb####bbbb##aaaaaaaaaaaa####...............',
'.................####bbbbbbbbbb##aaaaaaaaaa####.................',
'...................####bbbbbbbb##aaaaaaaa####...................',
'.....................####bbbbbb##aaaaaa####.....................',
'.......................####bbbb##aaaa####.......................',
'.........................####bb##aa####.........................',
'...........................##########...........................',
'..............................####..............................',
'................................................................');
DICE6 : TRxDiceBitmap = (
'64 64 4 1',
'. c None',
'# c #000000',
'b c #c0c0c0',
'a c #ffffff',
'................................................................',
'.............................######.............................',
'...........................##########...........................',
'.........................####aaaaaa####.........................',
'.......................####aaaaaaaaaa####.......................',
'.....................####aaaaa####aaaaa####.....................',
'...................####aaaaa########aaaaa####...................',
'.................####aaaaaa##########aaaaaa####.................',
'...............####aaaaaaaa##########aaaaaaaa####...............',
'.............####aaaaaaaaaaa########aa####aaaaa####.............',
'...........####aaaaaaaaaaaaaaa####aa########aaaaa####...........',
'.........####aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.........',
'.......####aaaaaaaaaaaaaaaaaaaaaaaa##########aaaaaaaa####.......',
'.....####aaaaa####aaaaaaaaaaaaaaaaaa########aa####aaaaa####.....',
'...####aaaaa########aaaaaaaaaaaaaaaaaa####aa########aaaaa####...',
'.####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.',
'#####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa#####',
'##b####aaaaa########aa####aaaaaaaaaaaaaaaaaa########aaaaa####a##',
'##bbb####aaaaa####aa########aaaaaaaaaaaaaaaaaa####aaaaa####aaa##',
'##bbbbb####aaaaaaaa##########aaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbb####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##',
'##bbbbbbbbb####aaaaa########aa####aaaaaaaaaaaaaaa####aaaaaaaaa##',
'##bbbb###bbbb####aaaaa####aa########aaaaaaaaaaa####aaaa###aaaa##',
'##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##',
'##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##',
'##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##',
'##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##',
'##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##',
'##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##',
'##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##',
'##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbbbbbbbbbb###bbbb#######bbb##aaaaaaaaaaaaaa###aaaaaaaaaaaa##',
'##bbbbbbbbbbb######bbb######bbb##aaaaaaaaaaaa######aaaaaaaaaaa##',
'##bbbbbbbbbbb######bbbb####bbbb##aaaaaaaaaaaa######aaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbbbbbbbbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbbb###bbbb#######bbbbbbbbbbb##aaaaaaaaaaa#######aaaaaaaaaaa##',
'##bbb######bbb######bbbbbbbbbbb##aaaaaaaaaaa######aaaaaaaaaaaa##',
'##bbb######bbbb####bbbbbbbbbbbb##aaaaaaaaaaaa####aaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbb#######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'##bbbb######bbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##',
'###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###',
'.####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.',
'...####bbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaa####...',
'.....####bbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa####.....',
'.......####bbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa####.......',
'.........####bbbbbbbb#######bbb##aaa#######aaaaaaaa####.........',
'...........####bbbbbb#######bbb##aaa#######aaaaaa####...........',
'.............####bbbbb######bbb##aaa######aaaaa####.............',
'...............####bbbb####bbbb##aaaa####aaaa####...............',
'.................####bbbbbbbbbb##aaaaaaaaaa####.................',
'...................####bbbbbbbb##aaaaaaaa####...................',
'.....................####bbbbbb##aaaaaa####.....................',
'.......................####bbbb##aaaa####.......................',
'.........................####bb##aa####.........................',
'...........................##########...........................',
'..............................####..............................',
'................................................................');

362
components/rx/rxdice.pas Normal file
View File

@ -0,0 +1,362 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995 AO ROSNO }
{ Copyright (c) 1997, 1998 Master-Bank }
{ }
{*******************************************************}
unit rxdice;
interface
{$I rx.inc}
uses SysUtils, LCLType, LCLProc, LCLIntf, LMessages, Classes, Graphics,
Controls, Forms, StdCtrls, ExtCtrls, Menus, VCLUtils;
type
TRxDiceValue = 1..6;
{ TRxDice }
TRxDice = class(TCustomControl)
private
{ Private declarations }
FActive: Boolean;
FAutoSize: Boolean;
FBitmap: TBitmap;
FInterval: Cardinal;
FAutoStopInterval: Cardinal;
FOnChange: TNotifyEvent;
FRotate: Boolean;
FShowFocus: Boolean;
FTimer: TTimer;
FTickCount: Longint;
FValue: TRxDiceValue;
FOnStart: TNotifyEvent;
FOnStop: TNotifyEvent;
procedure CMFocusChanged(var Message: TLMessage); message CM_FOCUSCHANGED;
procedure WMSize(var Message: TLMSize); message LM_SIZE;
procedure CreateBitmap;
procedure SetAutoSize(aValue: Boolean);
procedure SetInterval(aValue: Cardinal);
procedure SetRotate(AValue: Boolean);
procedure SetShowFocus(AValue: Boolean);
procedure SetValue(aValue: TRxDiceValue);
procedure TimerExpired(Sender: TObject);
protected
{ Protected declarations }
function GetPalette: HPALETTE; override;
procedure AdjustSize; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure Paint; override;
procedure Change; dynamic;
procedure DoStart; dynamic;
procedure DoStop; dynamic;
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure RandomValue;
published
{ Published declarations }
property Align;
property AutoSize: Boolean read FAutoSize write SetAutoSize default True;
property AutoStopInterval: Cardinal read FAutoStopInterval write FAutoStopInterval default 0;
property Color;
property Cursor;
property DragMode;
property DragCursor;
property Enabled;
property Interval: Cardinal read FInterval write SetInterval default 60;
property ParentColor;
property ParentShowHint;
property PopupMenu;
property Rotate: Boolean read FRotate write SetRotate;
property ShowFocus: Boolean read FShowFocus write SetShowFocus;
property ShowHint;
property Anchors;
property Constraints;
property DragKind;
property TabOrder;
property TabStop;
property Value: TRxDiceValue read FValue write SetValue default 1;
property Visible;
property OnClick;
property OnDblClick;
property OnEnter;
property OnExit;
property OnMouseMove;
property OnMouseDown;
property OnMouseUp;
property OnKeyDown;
property OnKeyUp;
property OnKeyPress;
property OnDragOver;
property OnDragDrop;
property OnEndDrag;
property OnStartDrag;
property OnContextPopup;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnStart: TNotifyEvent read FOnStart write FOnStart;
property OnStop: TNotifyEvent read FOnStop write FOnStop;
property OnEndDock;
property OnStartDock;
end;
{$I RXDICE.INC}
implementation
{ TRxDice }
constructor TRxDice.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Randomize;
ControlStyle := [csClickEvents, csSetCaption, csCaptureMouse,
csOpaque, csDoubleClicks];
FValue := 1;
FInterval := 60;
CreateBitmap;
FAutoSize := True;
Width := FBitmap.Width + 2;
Height := FBitmap.Height + 2;
end;
destructor TRxDice.Destroy;
begin
FOnChange := nil;
if FBitmap <> nil then FBitmap.Free;
inherited Destroy;
end;
function TRxDice.GetPalette: HPALETTE;
begin
if FBitmap <> nil then Result := FBitmap.Palette
else Result := 0;
end;
procedure TRxDice.RandomValue;
var
Val: Byte;
begin
Val := Random(6) + 1;
if Val = Byte(FValue) then
begin
if Val = 1 then Inc(Val)
else Dec(Val);
end;
SetValue(TRxDiceValue(Val));
end;
procedure TRxDice.DoStart;
begin
if Assigned(FOnStart) then FOnStart(Self);
end;
procedure TRxDice.DoStop;
begin
if Assigned(FOnStop) then FOnStop(Self);
end;
procedure TRxDice.CMFocusChanged(var Message: TLMessage);
var
Active: Boolean;
begin
{ with Message do Active := (Sender = Self);
if Active <> FActive then begin
FActive := Active;
if FShowFocus then Invalidate;
end;}
inherited;
end;
procedure TRxDice.WMSize(var Message: TLMSize);
begin
inherited;
AdjustSize;
end;
procedure TRxDice.CreateBitmap;
begin
if FBitmap = nil then FBitmap := TBitmap.Create;
case FValue of
1:FBitmap.Handle := CreatePixmapIndirect(@DICE1[0], GetSysColor(COLOR_BTNFACE));
2:FBitmap.Handle := CreatePixmapIndirect(@DICE2[0], GetSysColor(COLOR_BTNFACE));
3:FBitmap.Handle := CreatePixmapIndirect(@DICE3[0], GetSysColor(COLOR_BTNFACE));
4:FBitmap.Handle := CreatePixmapIndirect(@DICE4[0], GetSysColor(COLOR_BTNFACE));
5:FBitmap.Handle := CreatePixmapIndirect(@DICE5[0], GetSysColor(COLOR_BTNFACE));
6:FBitmap.Handle := CreatePixmapIndirect(@DICE6[0], GetSysColor(COLOR_BTNFACE));
end;
end;
procedure TRxDice.AdjustSize;
var
MinSide: Integer;
begin
if not (csReading in ComponentState) then
begin
if AutoSize and Assigned(FBitmap) and (FBitmap.Width > 0) and
(FBitmap.Height > 0) then
SetBounds(Left, Top, FBitmap.Width + 2, FBitmap.Height + 2)
else
begin
{ Adjust aspect ratio if control size changed }
MinSide := Width;
if Height < Width then MinSide := Height;
SetBounds(Left, Top, MinSide, MinSide);
end;
end;
end;
procedure TRxDice.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (Button = mbLeft) and TabStop and CanFocus then SetFocus;
inherited MouseDown(Button, Shift, X, Y);
end;
procedure TRxDice.Paint;
var
ARect: TRect;
procedure DrawBitmap;
var
TmpImage: TBitmap;
IWidth, IHeight: Integer;
IRect: TRect;
begin
IWidth := FBitmap.Width;
IHeight := FBitmap.Height;
IRect := Rect(0, 0, IWidth, IHeight);
TmpImage := TBitmap.Create;
try
TmpImage.Width := IWidth;
TmpImage.Height := IHeight;
TmpImage.Canvas.Brush.Color := Self.Brush.Color;
// Changes by MJW. Start ++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Replacing BrushCopy() by CopyRect. As BrushCopy is not defined in FPC/Laz
TmpImage.Canvas.CopyRect(IRect, FBitmap.Canvas, IRect);
// TmpImage.Canvas.BrushCopy(IRect, FBitmap, IRect, FBitmap.TransparentColor);
// Changes by MJW. Eind +++++++++++++++++++++++++++++++++++++++++++++++++++++++
InflateRect(ARect, -1, -1);
// Canvas.StretchDraw(ARect, TmpImage);
Canvas.StretchDraw(ARect, FBitmap);
finally
TmpImage.Free;
end;
end;
begin
ARect := ClientRect;
if FBitmap <> nil then DrawBitmap;
{ if Focused and FShowFocus and TabStop and not (csDesigning in ComponentState) then
begin
Canvas.DrawFocusRect(ARect);
end;}
end;
procedure TRxDice.TimerExpired(Sender: TObject);
var
ParentForm: TCustomForm;
Now: Longint;
begin
RandomValue;
if not FRotate then
begin
FTimer.Free;
FTimer := nil;
if (csDesigning in ComponentState) then
begin
ParentForm := GetParentForm(Self);
if ParentForm <> nil then ParentForm.Designer.Modified;
end;
DoStop;
end
else
if AutoStopInterval > 0 then
begin
Now := GetTickCount;
if (Now - FTickCount >= AutoStopInterval) or (Now < FTickCount) then
Rotate := False;
end;
end;
procedure TRxDice.Change;
begin
if Assigned(FOnChange) then FOnChange(Self);
end;
procedure TRxDice.SetValue(aValue: TRxDiceValue);
begin
if FValue <> aValue then
begin
FValue := aValue;
CreateBitmap;
Invalidate;
Change;
end;
end;
procedure TRxDice.SetAutoSize(aValue: Boolean);
begin
if aValue <> FAutoSize then
begin
FAutoSize := aValue;
AdjustSize;
Invalidate;
end;
end;
procedure TRxDice.SetInterval(aValue: Cardinal);
begin
if FInterval <> aValue then
begin
FInterval := aValue;
if FTimer <> nil then FTimer.Interval := FInterval;
end;
end;
procedure TRxDice.SetRotate(AValue: Boolean);
begin
if FRotate <> AValue then
begin
if AValue then
begin
if FTimer = nil then FTimer := TTimer.Create(Self);
try
with FTimer do
begin
OnTimer := @TimerExpired;
Interval := FInterval;
Enabled := True;
end;
FRotate := AValue;
FTickCount := GetTickCount;
DoStart;
except
FTimer.Free;
FTimer := nil;
raise;
end;
end
else
FRotate := AValue;
end;
end;
procedure TRxDice.SetShowFocus(AValue: Boolean);
begin
if FShowFocus <> AValue then
begin
FShowFocus := AValue;
if not (csDesigning in ComponentState) then Invalidate;
end;
end;
end.

172
components/rx/rxlogin.lfm Normal file
View File

@ -0,0 +1,172 @@
object RxLoginForm: TRxLoginForm
BorderIcons = []
BorderStyle = bsDialog
Caption = 'RxLoginForm'
ClientHeight = 159
ClientWidth = 442
Font.Height = -11
Font.Name = 'MS Sans Serif'
FormStyle = fsStayOnTop
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 13
HorzScrollBar.Page = 441
VertScrollBar.Page = 158
Cursor = crArrow
Left = 213
Height = 159
Top = 102
Width = 442
object AppIcon: TImage
AutoSize = True
BorderSpacing.OnChange = nil
Transparent = True
Left = 14
Height = 32
Top = 12
Width = 32
end
object KeyImage: TImage
AutoSize = True
BorderSpacing.OnChange = nil
Picture.Data = {
055449636F6EFE0200000000010001002020100000000000E802000016000000
2800000020000000400000000100040000000000800200000000000000000000
0000000000000000000000000000800000800000008080008000000080008000
80800000C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00
FFFF0000FFFFFF00000000000000000000000000000000008FFFFFFFFFFFFFFF
FF000000000000008FFFFFFFFFFFFFFFFF000000000000008FFFFFFFFFF00F00
FF000000000000008FF800FFFFF00F00FF000000000000008F80800FFFF00F00
FF000000000000008F00FF00000000000F000000000000008F00FF0000000000
0F000000000000008F80800FFFFFFFFFFF000000000000008FF800FFFFFFFFFF
FF000000000000008FFFFFFFFFFFFFFFFF000000000000008888888888888888
8800000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000001FFF00001FFF00001FFF00001FFF00001FFF00001FFF
00001FFF00001FFF00001FFF00001FFF00001FFF00001FFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF
}
Transparent = True
Left = 10
Height = 32
Top = 15
Width = 32
end
object HintLabel: TLabel
AutoSize = False
BorderSpacing.OnChange = nil
Color = clNone
ShowAccelChar = False
Left = 64
Height = 13
Top = 31
Width = 285
end
object UserNameLabel: TLabel
AutoSize = False
BorderSpacing.OnChange = nil
Color = clNone
FocusControl = UserNameEdit
Left = 64
Height = 13
Top = 64
Width = 105
end
object PasswordLabel: TLabel
AutoSize = False
BorderSpacing.OnChange = nil
Color = clNone
FocusControl = PasswordEdit
Left = 64
Height = 13
Top = 96
Width = 105
end
object AppTitleLabel: TLabel
AutoSize = False
BorderSpacing.OnChange = nil
Color = clNone
ShowAccelChar = False
Left = 64
Height = 13
Top = 12
Width = 285
end
object CustomLabel: TLabel
AutoSize = False
BorderSpacing.OnChange = nil
Color = clNone
FocusControl = CustomCombo
Left = 64
Height = 13
Top = 128
Width = 105
end
object UserNameEdit: TEdit
BorderSpacing.OnChange = nil
TabOrder = 0
Cursor = crIBeam
Left = 172
Height = 21
Top = 60
Width = 169
end
object PasswordEdit: TEdit
BorderSpacing.OnChange = nil
PasswordChar = '*'
TabOrder = 1
Cursor = crIBeam
Left = 172
Height = 21
Top = 92
Width = 169
end
object OkBtn: TButton
BorderSpacing.OnChange = nil
BorderSpacing.InnerBorder = 2
Caption = 'OK'
Default = True
OnClick = OkBtnClick
TabOrder = 3
Left = 356
Height = 25
Top = 12
Width = 77
end
object CancelBtn: TButton
BorderSpacing.OnChange = nil
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 4
Left = 356
Height = 25
Top = 44
Width = 77
end
object CustomCombo: TComboBox
BorderSpacing.OnChange = nil
ItemHeight = 13
MaxLength = 0
Sorted = True
Style = csDropDownList
TabOrder = 2
Left = 172
Height = 21
Top = 124
Width = 169
end
end

67
components/rx/rxlogin.lrs Normal file
View File

@ -0,0 +1,67 @@
{ ��� - ���� ��������, ������������� ��������� lazarus }
LazarusResources.Add('TRxLoginForm','FORMDATA',[
'TPF0'#12'TRxLoginForm'#11'RxLoginForm'#11'BorderIcons'#11#0#11'BorderStyle'#7
+#8'bsDialog'#7'Caption'#6#11'RxLoginForm'#12'ClientHeight'#3#159#0#11'Client'
+'Width'#3#186#1#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#9'For'
+'mStyle'#7#11'fsStayOnTop'#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormSh'
+'ow'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'#10'TextHeight'#2
+#13#18'HorzScrollBar.Page'#3#185#1#18'VertScrollBar.Page'#3#158#0#6'Cursor'#7
+#7'crArrow'#4'Left'#3#213#0#6'Height'#3#159#0#3'Top'#2'f'#5'Width'#3#186#1#0
+#6'TImage'#7'AppIcon'#8'AutoSize'#9#22'BorderSpacing.OnChange'#13#11'Transpa'
+'rent'#9#4'Left'#2#14#6'Height'#2' '#3'Top'#2#12#5'Width'#2' '#0#0#6'TImage'
+#8'KeyImage'#8'AutoSize'#9#22'BorderSpacing.OnChange'#13#12'Picture.Data'#10
+#8#3#0#0#5'TIcon'#254#2#0#0#0#0#1#0#1#0' '#16#0#0#0#0#0#232#2#0#0#22#0#0#0
+'('#0#0#0' '#0#0#0'@'#0#0#0#1#0#4#0#0#0#0#0#128#2#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128
+#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0
+#0#255#0#255#0#255#255#0#0#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#143
+#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#143#255#255#255#255#255#255
+#255#255#0#0#0#0#0#0#0#143#255#255#255#255#240#15#0#255#0#0#0#0#0#0#0#143#248
+#0#255#255#240#15#0#255#0#0#0#0#0#0#0#143#128#128#15#255#240#15#0#255#0#0#0#0
+#0#0#0#143#0#255#0#0#0#0#0#15#0#0#0#0#0#0#0#143#0#255#0#0#0#0#0#15#0#0#0#0#0
+#0#0#143#128#128#15#255#255#255#255#255#0#0#0#0#0#0#0#143#248#0#255#255#255
+#255#255#255#0#0#0#0#0#0#0#143#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0
+#136#136#136#136#136#136#136#136#136#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0
+#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#0#0#31#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#11'Transparent'#9#4'Left'#2#10#6'Height'#2' '#3'Top'#2#15#5'Width'#2' '
+#0#0#6'TLabel'#9'HintLabel'#8'AutoSize'#8#22'BorderSpacing.OnChange'#13#5'Co'
+'lor'#7#6'clNone'#13'ShowAccelChar'#8#4'Left'#2'@'#6'Height'#2#13#3'Top'#2#31
+#5'Width'#3#29#1#0#0#6'TLabel'#13'UserNameLabel'#8'AutoSize'#8#22'BorderSpac'
+'ing.OnChange'#13#5'Color'#7#6'clNone'#12'FocusControl'#7#12'UserNameEdit'#4
+'Left'#2'@'#6'Height'#2#13#3'Top'#2'@'#5'Width'#2'i'#0#0#6'TLabel'#13'Passwo'
+'rdLabel'#8'AutoSize'#8#22'BorderSpacing.OnChange'#13#5'Color'#7#6'clNone'#12
+'FocusControl'#7#12'PasswordEdit'#4'Left'#2'@'#6'Height'#2#13#3'Top'#2'`'#5
+'Width'#2'i'#0#0#6'TLabel'#13'AppTitleLabel'#8'AutoSize'#8#22'BorderSpacing.'
+'OnChange'#13#5'Color'#7#6'clNone'#13'ShowAccelChar'#8#4'Left'#2'@'#6'Height'
+#2#13#3'Top'#2#12#5'Width'#3#29#1#0#0#6'TLabel'#11'CustomLabel'#8'AutoSize'#8
+#22'BorderSpacing.OnChange'#13#5'Color'#7#6'clNone'#12'FocusControl'#7#11'Cu'
+'stomCombo'#4'Left'#2'@'#6'Height'#2#13#3'Top'#3#128#0#5'Width'#2'i'#0#0#5'T'
+'Edit'#12'UserNameEdit'#22'BorderSpacing.OnChange'#13#8'TabOrder'#2#0#6'Curs'
+'or'#7#7'crIBeam'#4'Left'#3#172#0#6'Height'#2#21#3'Top'#2'<'#5'Width'#3#169#0
+#0#0#5'TEdit'#12'PasswordEdit'#22'BorderSpacing.OnChange'#13#12'PasswordChar'
+#6#1'*'#8'TabOrder'#2#1#6'Cursor'#7#7'crIBeam'#4'Left'#3#172#0#6'Height'#2#21
+#3'Top'#2'\'#5'Width'#3#169#0#0#0#7'TButton'#5'OkBtn'#22'BorderSpacing.OnCha'
+'nge'#13#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'OK'#7'Default'#9#7
+'OnClick'#7#10'OkBtnClick'#8'TabOrder'#2#3#4'Left'#3'd'#1#6'Height'#2#25#3'T'
+'op'#2#12#5'Width'#2'M'#0#0#7'TButton'#9'CancelBtn'#22'BorderSpacing.OnChang'
+'e'#13#25'BorderSpacing.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel'
+#11'ModalResult'#2#2#8'TabOrder'#2#4#4'Left'#3'd'#1#6'Height'#2#25#3'Top'#2
+','#5'Width'#2'M'#0#0#9'TComboBox'#11'CustomCombo'#22'BorderSpacing.OnChange'
+#13#10'ItemHeight'#2#13#9'MaxLength'#2#0#6'Sorted'#9#5'Style'#7#14'csDropDow'
+'nList'#8'TabOrder'#2#2#4'Left'#3#172#0#6'Height'#2#21#3'Top'#2'|'#5'Width'#3
+#169#0#0#0#0
]);

616
components/rx/rxlogin.pas Normal file
View File

@ -0,0 +1,616 @@
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995, 1996 AO ROSNO }
{ Copyright (c) 1997, 1998 Master-Bank }
{ }
{*******************************************************}
unit RxLogin;
{$I RX.INC}
interface
uses LResources, LCLType, LCLIntf, SysUtils, LMessages, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Buttons;
type
TUpdateCaption = (ucNoChange, ucAppTitle, ucFormCaption);
TRxLoginEvent = procedure(Sender: TObject; const UserName, Password: string;
var AllowLogin: Boolean) of object;
TCheckUnlockEvent = function(const Password: string): Boolean of object;
TUnlockAppEvent = procedure(Sender: TObject; const UserName,
Password: string; var AllowUnlock: Boolean) of object;
TRxLoginForm = class;
{ TRxCustomLogin }
TRxCustomLogin = class(TComponent)
private
FActive: Boolean;
FAttemptNumber: Integer;
FLoggedUser: {$IFDEF RX_D3}String{$ELSE}PString{$ENDIF};
FMaxPasswordLen: Integer;
FAllowEmpty: Boolean;
FUpdateCaption: TUpdateCaption;
FIniFileName: {$IFDEF RX_D3}String{$ELSE}PString{$ENDIF};
FUseRegistry: Boolean;
FLocked: Boolean;
FUnlockDlgShowing: Boolean;
FSaveOnRestore: TNotifyEvent;
FAfterLogin: TNotifyEvent;
FBeforeLogin: TNotifyEvent;
FOnUnlock: TCheckUnlockEvent;
FOnUnlockApp: TUnlockAppEvent;
FOnIconDblClick: TNotifyEvent;
{$IFNDEF RX_D3}
function GetLoggedUser: string;
procedure SetIniFileName(const Value: string);
{$ENDIF}
function GetIniFileName: string;
function UnlockHook(var Message: TLMessage): Boolean;
protected
function CheckUnlock(const UserName, Password: string): Boolean; dynamic;
function CreateLoginForm(UnlockMode: Boolean): TRxLoginForm; virtual;
procedure DoAfterLogin; dynamic;
procedure DoBeforeLogin; dynamic;
procedure DoIconDblCLick(Sender: TObject); dynamic;
function DoLogin(var UserName: string): Boolean; virtual; abstract;
function DoUnlockDialog: Boolean; virtual;
procedure SetLoggedUser(const Value: string);
procedure DoUpdateCaption;
procedure UnlockOkClick(Sender: TObject);
property Active: Boolean read FActive write FActive default True;
property AllowEmptyPassword: Boolean read FAllowEmpty write FAllowEmpty default True;
property AttemptNumber: Integer read FAttemptNumber write FAttemptNumber default 3;
property IniFileName: string read GetIniFileName write {$IFDEF RX_D3}FIniFileName{$ELSE}SetIniFileName{$ENDIF};
property MaxPasswordLen: Integer read FMaxPasswordLen write FMaxPasswordLen default 0;
property UpdateCaption: TUpdateCaption read FUpdateCaption write FUpdateCaption default ucNoChange;
property UseRegistry: Boolean read FUseRegistry write FUseRegistry default False;
property AfterLogin: TNotifyEvent read FAfterLogin write FAfterLogin;
property BeforeLogin: TNotifyEvent read FBeforeLogin write FBeforeLogin;
property OnUnlock: TCheckUnlockEvent read FOnUnlock write FOnUnlock; { obsolete }
property OnUnlockApp: TUnlockAppEvent read FOnUnlockApp write FOnUnlockApp;
property OnIconDblClick: TNotifyEvent read FOnIconDblClick write FOnIconDblClick;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function Login: Boolean; virtual;
procedure TerminateApplication;
procedure Lock;
property LoggedUser: string read {$IFDEF RX_D3}FLoggedUser{$ELSE}GetLoggedUser{$ENDIF};
end;
{ TRxLoginDialog }
TRxLoginDialog = class(TRxCustomLogin)
private
FOnCheckUser: TRxLoginEvent;
procedure OkButtonClick(Sender: TObject);
procedure WriteUserName(const UserName: string);
function ReadUserName(const UserName: string): string;
protected
function DoCheckUser(const UserName, Password: string): Boolean; dynamic;
function DoLogin(var UserName: string): Boolean; override;
procedure Loaded; override;
published
property Active;
property AttemptNumber;
property IniFileName;
property MaxPasswordLen;
property UpdateCaption;
property UseRegistry;
property OnCheckUser: TRxLoginEvent read FOnCheckUser write FOnCheckUser;
property AfterLogin;
property BeforeLogin;
property OnUnlockApp;
property OnIconDblClick;
end;
{ TRxLoginForm }
TRxLoginForm = class(TForm)
AppIcon: TImage;
KeyImage: TImage;
HintLabel: TLabel;
UserNameLabel: TLabel;
PasswordLabel: TLabel;
UserNameEdit: TEdit;
PasswordEdit: TEdit;
AppTitleLabel: TLabel;
OkBtn: TButton;
CancelBtn: TButton;
CustomLabel: TLabel;
CustomCombo: TComboBox;
procedure FormCreate(Sender: TObject);
procedure OkBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
FSelectDatabase: Boolean;
FUnlockMode: Boolean;
FAttempt: Integer;
FOnFormShow: TNotifyEvent;
FOnOkClick: TNotifyEvent;
public
{ Public declarations }
AttemptNumber: Integer;
property Attempt: Integer read FAttempt;
property SelectDatabase: Boolean read FSelectDatabase write FSelectDatabase;
property OnFormShow: TNotifyEvent read FOnFormShow write FOnFormShow;
property OnOkClick: TNotifyEvent read FOnOkClick write FOnOkClick;
end;
function CreateLoginDialog(UnlockMode, ASelectDatabase: Boolean;
FormShowEvent, OkClickEvent: TNotifyEvent): TRxLoginForm;
implementation
uses {$IFDEF WIN32} Registry, {$ENDIF} IniFiles, RxAppUtils, RxDConst,
VclUtils, RxConst;
const
keyLoginSection = 'Login Dialog';
keyLastLoginUserName = 'Last Logged User';
function CreateLoginDialog(UnlockMode, ASelectDatabase: Boolean;
FormShowEvent, OkClickEvent: TNotifyEvent): TRxLoginForm;
begin
Result := TRxLoginForm.Create(Application);
with Result do begin
FSelectDatabase := ASelectDatabase;
FUnlockMode := UnlockMode;
if FUnlockMode then begin
FormStyle := fsNormal;
FSelectDatabase := False;
end
else begin
FormStyle := fsStayOnTop;
end;
OnFormShow := FormShowEvent;
OnOkClick := OkClickEvent;
end;
end;
{ TRxCustomLogin }
constructor TRxCustomLogin.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFNDEF RX_D3}
FIniFileName := NullStr;
FLoggedUser := NullStr;
{$ENDIF}
FActive := True;
FAttemptNumber := 3;
FAllowEmpty := True;
FUseRegistry := False;
end;
destructor TRxCustomLogin.Destroy;
begin
if FLocked then
begin
// Application.UnhookMainWindow(UnlockHook);
FLocked := False;
end;
{$IFNDEF RX_D3}
DisposeStr(FLoggedUser);
DisposeStr(FIniFileName);
{$ENDIF}
inherited Destroy;
end;
function TRxCustomLogin.GetIniFileName: string;
begin
Result := FIniFileName{$IFNDEF RX_D3}^{$ENDIF};
if (Result = '') and not (csDesigning in ComponentState) then begin
{$IFDEF WIN32}
if UseRegistry then Result := GetDefaultIniRegKey
else Result := GetDefaultIniName;
{$ELSE}
Result := GetDefaultIniName;
{$ENDIF}
end;
end;
{$IFNDEF RX_D3}
procedure TRxCustomLogin.SetIniFileName(const Value: string);
begin
AssignStr(FIniFileName, Value);
end;
function TRxCustomLogin.GetLoggedUser: string;
begin
Result := FLoggedUser^;
end;
{$ENDIF}
procedure TRxCustomLogin.SetLoggedUser(const Value: string);
begin
{$IFDEF RX_D3}
FLoggedUser := Value;
{$ELSE}
AssignStr(FLoggedUser, Value);
{$ENDIF}
end;
procedure TRxCustomLogin.DoAfterLogin;
begin
if Assigned(FAfterLogin) then FAfterLogin(Self);
end;
procedure TRxCustomLogin.DoBeforeLogin;
begin
if Assigned(FBeforeLogin) then FBeforeLogin(Self);
end;
procedure TRxCustomLogin.DoIconDblCLick(Sender: TObject);
begin
if Assigned(FOnIconDblClick) then FOnIconDblClick(Self);
end;
procedure TRxCustomLogin.DoUpdateCaption;
var
F: TForm;
begin
F := Application.MainForm;
if (F = nil) and (Owner is TForm) then F := Owner as TForm;
if (F <> nil) and (LoggedUser <> '') then
case UpdateCaption of
ucAppTitle:
F.Caption := Format('%s (%s)', [Application.Title, LoggedUser]);
ucFormCaption:
begin
F.Caption := Format('%s (%s)', [F.Caption, LoggedUser]);
UpdateCaption := ucNoChange;
end;
end;
end;
function TRxCustomLogin.Login: Boolean;
var
LoginName: string;
begin
LoginName := EmptyStr;
DoBeforeLogin;
Result := DoLogin(LoginName);
if Result then begin
SetLoggedUser(LoginName);
DoUpdateCaption;
DoAfterLogin;
end;
end;
procedure TRxCustomLogin.Lock;
begin
// FSaveOnRestore := Application.OnRestore;
Application.Minimize;
// Application.HookMainWindow(UnlockHook);
FLocked := True;
end;
procedure TRxCustomLogin.TerminateApplication;
begin
with Application do
begin
ShowMainForm := False;
{ if Application.Handle <> 0 then
ShowOwnedPopups(Handle, False);}
Terminate;
end;
CallTerminateProcs;
Halt(10);
end;
procedure TRxCustomLogin.UnlockOkClick(Sender: TObject);
var
Ok: Boolean;
begin
with TRxLoginForm(Sender) do begin
Ok := False;
try
Ok := CheckUnlock(UserNameEdit.Text, PasswordEdit.Text);
except
Application.HandleException(Self);
end;
if Ok then ModalResult := mrOk
else ModalResult := mrCancel;
end;
end;
function TRxCustomLogin.CheckUnlock(const UserName, Password: string): Boolean;
begin
Result := True;
if Assigned(FOnUnlockApp) then
FOnUnlockApp(Self, UserName, Password, Result)
else if Assigned(FOnUnlock) then
Result := FOnUnlock(Password);
end;
function TRxCustomLogin.CreateLoginForm(UnlockMode: Boolean): TRxLoginForm;
begin
Result := TRxLoginForm.Create(Application);
with Result do begin
FUnlockMode := UnlockMode;
if FUnlockMode then begin
FormStyle := fsNormal;
FSelectDatabase := False;
end
else FormStyle := fsStayOnTop;
if Assigned(Self.FOnIconDblClick) then begin
with AppIcon do
begin
OnDblClick := @DoIconDblClick;
Cursor := crHand;
end;
with KeyImage do
begin
OnDblClick := @DoIconDblClick;
Cursor := crHand;
end;
end;
PasswordEdit.MaxLength := FMaxPasswordLen;
AttemptNumber := Self.AttemptNumber;
end;
end;
function TRxCustomLogin.DoUnlockDialog: Boolean;
begin
with CreateLoginForm(True) do
try
OnFormShow := nil;
OnOkClick := @UnlockOkClick;
with UserNameEdit do
begin
Text := LoggedUser;
ReadOnly := True;
Font.Color := clGrayText;
end;
Result := ShowModal = mrOk;
finally
Free;
end;
end;
function TRxCustomLogin.UnlockHook(var Message: TLMessage): Boolean;
function DoUnlock: Boolean;
var
Popup: HWnd;
begin
(* with Application do
if IsWindowVisible(Application.Handle) and IsWindowEnabled(Handle) then
{$IFDEF WIN32}
SetForegroundWindow(Handle);
{$ELSE}
BringWindowToTop(Handle);
{$ENDIF}
if FUnlockDlgShowing then begin
Popup := GetLastActivePopup(Application.Handle);
if (Popup <> 0) and IsWindowVisible(Popup) and
(WindowClassName(Popup) = TRxLoginForm.ClassName) then
begin
{$IFDEF WIN32}
SetForegroundWindow(Popup);
{$ELSE}
BringWindowToTop(Popup);
{$ENDIF}
end; *)
Result := False;
(* Exit;
end;
FUnlockDlgShowing := True;
try
Result := DoUnlockDialog;
finally
FUnlockDlgShowing := False;
end;
if Result then begin
Application.UnhookMainWindow(UnlockHook);
FLocked := False;
end;*)
end;
begin
Result := False;
if not FLocked then Exit;
with Message do begin
case Msg of
{ LM_QUERYOPEN:
begin
UnlockHook := not DoUnlock;
end;}
LM_SHOWWINDOW:
if Bool(WParam) then begin
UnlockHook := not DoUnlock;
end;
LM_SYSCOMMAND:
if (WParam and $FFF0 = SC_RESTORE) {or
(WParam and $FFF0 = SC_ZOOM) }then
begin
UnlockHook := not DoUnlock;
end;
end;
end;
end;
{ TRxLoginDialog }
procedure TRxLoginDialog.Loaded;
var
Loading: Boolean;
begin
Loading := csLoading in ComponentState;
inherited Loaded;
if not (csDesigning in ComponentState) and Loading then begin
if Active and not Login then
TerminateApplication;
end;
end;
procedure TRxLoginDialog.OkButtonClick(Sender: TObject);
var
SetCursor: Boolean;
begin
with TRxLoginForm(Sender) do begin
{$IFDEF WIN32}
SetCursor := GetCurrentThreadID = MainThreadID;
{$ELSE}
SetCursor := True;
{$ENDIF}
try
if SetCursor then Screen.Cursor := crHourGlass;
try
if DoCheckUser(UserNameEdit.Text, PasswordEdit.Text) then
ModalResult := mrOk
else ModalResult := mrNone;
finally
if SetCursor then Screen.Cursor := crDefault;
end;
except
Application.HandleException(Self);
end;
end;
end;
function TRxLoginDialog.DoCheckUser(const UserName, Password: string): Boolean;
begin
Result := True;
if Assigned(FOnCheckUser) then
FOnCheckUser(Self, UserName, Password, Result);
end;
procedure TRxLoginDialog.WriteUserName(const UserName: string);
var
Ini: TObject;
begin
try
{$IFDEF WIN32}
if UseRegistry then Ini := TRegIniFile.Create(IniFileName)
else Ini := TIniFile.Create(IniFileName);
{$ELSE}
Ini := TIniFile.Create(IniFileName);
{$ENDIF}
try
IniWriteString(Ini, keyLoginSection, keyLastLoginUserName, UserName);
finally
Ini.Free;
end;
except
end;
end;
function TRxLoginDialog.ReadUserName(const UserName: string): string;
var
Ini: TObject;
begin
try
{$IFDEF WIN32}
if UseRegistry then begin
Ini := TRegIniFile.Create(IniFileName);
{$IFDEF RX_D5}
TRegIniFile(Ini).Access := KEY_READ;
{$ENDIF}
end
else
Ini := TIniFile.Create(IniFileName);
{$ELSE}
Ini := TIniFile.Create(IniFileName);
{$ENDIF}
try
{ Result := IniReadString(Ini, keyLoginSection, keyLastLoginUserName,
UserName);}
finally
Ini.Free;
end;
except
Result := UserName;
end;
end;
function TRxLoginDialog.DoLogin(var UserName: string): Boolean;
begin
try
{ with CreateLoginForm(False) do
try
OnOkClick := Self.OkButtonClick;
UserName := ReadUserName(UserName);
UserNameEdit.Text := UserName;
Result := (ShowModal = mrOk);
if Result then begin
UserName := UserNameEdit.Text;
WriteUserName(UserName);
end;
finally
Free;
end;}
except
Application.HandleException(Self);
Result := False;
end;
end;
{ TRxLoginForm }
procedure TRxLoginForm.FormCreate(Sender: TObject);
begin
{ Icon := Application.Icon;
if Icon.Empty then Icon.Handle := LoadIcon(0, IDI_APPLICATION);
AppIcon.Picture.Assign(Icon);
AppTitleLabel.Caption := FmtLoadStr(SAppTitleLabel, [Application.Title]);
PasswordLabel.Caption := LoadStr(SPasswordLabel);
UserNameLabel.Caption := LoadStr(SUserNameLabel);
OkBtn.Caption := ResStr(SOKButton);
CancelBtn.Caption := ResStr(SCancelButton);}
end;
procedure TRxLoginForm.OkBtnClick(Sender: TObject);
begin
Inc(FAttempt);
if Assigned(FOnOkClick) then FOnOkClick(Self)
else ModalResult := mrOk;
if (ModalResult <> mrOk) and (FAttempt >= AttemptNumber) then
ModalResult := mrCancel;
end;
procedure TRxLoginForm.FormShow(Sender: TObject);
var
I: Integer;
S: string;
begin
{ if FSelectDatabase then
begin
ClientHeight := CustomCombo.Top + PasswordEdit.Top - UserNameEdit.Top;
S := LoadStr(SDatabaseName);
I := Pos(':', S);
if I = 0 then I := Length(S);
CustomLabel.Caption := '&' + Copy(S, 1, I);
end
else begin
ClientHeight := PasswordEdit.Top + PasswordEdit.Top - UserNameEdit.Top;
CustomLabel.Visible := False;
CustomCombo.Visible := False;
end;
if not FUnlockMode then begin
HintLabel.Caption := LoadStr(SHintLabel);
Caption := LoadStr(SRegistration);
end
else begin
HintLabel.Caption := LoadStr(SUnlockHint);
Caption := LoadStr(SUnlockCaption);
end;
if (UserNameEdit.Text = EmptyStr) and not FUnlockMode then
ActiveControl := UserNameEdit
else
ActiveControl := PasswordEdit;
if Assigned(FOnFormShow) then FOnFormShow(Self);
FAttempt := 0;}
end;
initialization
{$I rxlogin.lrs}
end.

1383
components/rx/rxlookup.pas Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More