new component

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1298 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2010-08-22 19:37:24 +00:00
parent a34c31748e
commit 80a30147ce
17 changed files with 2673 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -0,0 +1,323 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<General>
<MainUnit Value="0"/>
<Title Value="RxViewsPanel demo"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<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"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<Item1>
<PackageName Value="LazControls"/>
<MinVersion Valid="True"/>
</Item1>
<Item2>
<PackageName Value="rxnew"/>
<MinVersion Major="2" Minor="1" Release="2" Build="105" Valid="True"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="15">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="15"/>
<UsageCount Value="23"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="33"/>
<CursorPos X="29" Y="58"/>
<UsageCount Value="23"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxviewspanel.pas"/>
<UnitName Value="RxViewsPanel"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="194"/>
<CursorPos X="36" Y="201"/>
<UsageCount Value="11"/>
<Bookmarks Count="2">
<Item0 X="1" Y="295" ID="1"/>
<Item1 X="3" Y="330" ID="2"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="/usr/local/share/lazarus/components/rxnew/registerrx.pas"/>
<UnitName Value="registerrx"/>
<WindowIndex Value="0"/>
<TopLine Value="40"/>
<CursorPos X="30" Y="50"/>
<UsageCount Value="11"/>
</Unit3>
<Unit4>
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxtoolbar.pas"/>
<UnitName Value="rxtoolbar"/>
<WindowIndex Value="0"/>
<TopLine Value="1113"/>
<CursorPos X="45" Y="1143"/>
<UsageCount Value="11"/>
</Unit4>
<Unit5>
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxaboutdialog.pas"/>
<UnitName Value="RxAboutDialog"/>
<WindowIndex Value="0"/>
<TopLine Value="27"/>
<CursorPos X="3" Y="46"/>
<UsageCount Value="10"/>
</Unit5>
<Unit6>
<Filename Value="/usr/local/share/lazarus/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="253"/>
<CursorPos X="13" Y="1364"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="/usr/local/share/lazarus/lcl/buttons.pp"/>
<UnitName Value="Buttons"/>
<WindowIndex Value="0"/>
<TopLine Value="331"/>
<CursorPos X="17" Y="350"/>
<UsageCount Value="10"/>
</Unit7>
<Unit8>
<Filename Value="/usr/local/share/lazarus/lcl/stdctrls.pp"/>
<UnitName Value="StdCtrls"/>
<WindowIndex Value="0"/>
<TopLine Value="1420"/>
<CursorPos X="3" Y="1439"/>
<UsageCount Value="11"/>
</Unit8>
<Unit9>
<Filename Value="../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/>
<WindowIndex Value="0"/>
<TopLine Value="411"/>
<CursorPos X="24" Y="435"/>
<UsageCount Value="10"/>
</Unit9>
<Unit10>
<Filename Value="../../../install/fpcsrc/rtl/objpas/classes/collect.inc"/>
<WindowIndex Value="0"/>
<TopLine Value="18"/>
<CursorPos X="3" Y="21"/>
<UsageCount Value="10"/>
</Unit10>
<Unit11>
<Filename Value="/usr/local/share/lazarus/lcl/controls.pp"/>
<UnitName Value="Controls"/>
<WindowIndex Value="0"/>
<TopLine Value="1265"/>
<CursorPos X="15" Y="1280"/>
<UsageCount Value="10"/>
</Unit11>
<Unit12>
<Filename Value="/usr/local/share/lazarus/lcl/include/control.inc"/>
<WindowIndex Value="0"/>
<TopLine Value="3131"/>
<CursorPos X="1" Y="3151"/>
<UsageCount Value="10"/>
</Unit12>
<Unit13>
<Filename Value="/usr/local/share/lazarus/components/rxnew/Demos/RxViewsPanel/unit1.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<WindowIndex Value="0"/>
<TopLine Value="32"/>
<CursorPos X="1" Y="58"/>
<UsageCount Value="10"/>
</Unit13>
<Unit14>
<Filename Value="/usr/local/share/lazarus/lcl/include/untabbednotebook.inc"/>
<WindowIndex Value="0"/>
<TopLine Value="176"/>
<CursorPos X="17" Y="204"/>
<UsageCount Value="10"/>
</Unit14>
</Units>
<JumpHistory Count="26" HistoryIndex="25">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="18" Column="11" TopLine="14"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="14" Column="8" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="18" Column="29" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxviewspanel.pas"/>
<Caret Line="121" Column="98" TopLine="99"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
<Caret Line="18" Column="29" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="unit1.pas"/>
<Caret Line="40" Column="3" TopLine="15"/>
</Position6>
<Position7>
<Filename Value="unit1.pas"/>
<Caret Line="41" Column="3" TopLine="15"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
<Caret Line="42" Column="3" TopLine="15"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="43" Column="3" TopLine="15"/>
</Position9>
<Position10>
<Filename Value="unit1.pas"/>
<Caret Line="42" Column="3" TopLine="15"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="3" TopLine="7"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="42" Column="41" TopLine="17"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Line="43" Column="41" TopLine="17"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
<Caret Line="44" Column="41" TopLine="17"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
<Caret Line="45" Column="41" TopLine="17"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
<Caret Line="46" Column="41" TopLine="17"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
<Caret Line="47" Column="41" TopLine="18"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="48" Column="41" TopLine="19"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="49" Column="41" TopLine="20"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
<Caret Line="50" Column="41" TopLine="21"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="51" Column="41" TopLine="22"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="52" Column="41" TopLine="27"/>
</Position22>
<Position23>
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxviewspanel.pas"/>
<Caret Line="156" Column="25" TopLine="151"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="58" Column="29" TopLine="33"/>
</Position24>
<Position25>
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxviewspanel.pas"/>
<Caret Line="201" Column="36" TopLine="194"/>
</Position25>
<Position26>
<Filename Value="/usr/local/share/lazarus/lcl/extctrls.pp"/>
<Caret Line="1364" Column="13" TopLine="1353"/>
</Position26>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="9"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,21 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, lazcontrols, Unit1
{ you can add units after this };
{$R *.res}
begin
Application.Title:='RxViewsPanel demo';
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, StdCtrls, Grids, ComCtrls, rxtoolbar, RxViewsPanel, ExtendedNotebook;
type
{ TForm1 }
TForm1 = class(TForm)
ExtendedNotebook1: TExtendedNotebook;
ImageList2: TImageList;
Page1: TPage;
Page2: TPage;
Page3: TPage;
Page4: TPage;
PaintBox1: TPaintBox;
RxViewsPanel1: TRxViewsPanel;
Splitter1: TSplitter;
Splitter2: TSplitter;
StatusBar1: TStatusBar;
StringGrid1: TStringGrid;
StringGrid2: TStringGrid;
StringGrid3: TStringGrid;
StringGrid4: TStringGrid;
ToolPanel1: TToolPanel;
procedure FormCreate(Sender: TObject);
procedure RxViewsPanel1SelectViewEvent(ItemIndex: integer;
const Item: TRxViewsPanelItem);
private
//
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.RxViewsPanel1SelectViewEvent(ItemIndex: integer;
const Item: TRxViewsPanelItem);
begin
ExtendedNotebook1.PageIndex:=ItemIndex
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RxViewsPanel1.ItemIndex:=1;
end;
end.

View File

@ -64,6 +64,8 @@
+ При подсчёте итоговой строки не вызываются лишние просчёты по данным (если нет агрегатных функций) + При подсчёте итоговой строки не вызываются лишние просчёты по данным (если нет агрегатных функций)
+ Для RXDbGrid-а реализована система назначения функциональных клавиш на вызов функций (сортировка, фильтрация и т.д.) + Для RXDbGrid-а реализована система назначения функциональных клавиш на вызов функций (сортировка, фильтрация и т.д.)
добавлено новое свойство KeyStrokes добавлено новое свойство KeyStrokes
+ Добавлен новый компонент RxCurredit
+ Добавлен новый компонент- TRxViewsPanel
22.05.2008 - версия 2.0.0.136 (svn revision 100) 22.05.2008 - версия 2.0.0.136 (svn revision 100)
+ У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink + У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink
+ У объекта TRxCustomDBLookupCombo ускорена отрисовка данных + У объекта TRxCustomDBLookupCombo ускорена отрисовка данных

View File

@ -161,6 +161,8 @@
<link id="TRxDBGrid">RxDBGrid</link>-а.</p> <link id="TRxDBGrid">RxDBGrid</link>-а.</p>
</descr> </descr>
</element> </element>
@ -562,6 +564,8 @@
<link id="TRxDBGrid">RxDBGrid</link>-а.</p> <link id="TRxDBGrid">RxDBGrid</link>-а.</p>
</descr> </descr>
<seealso> <seealso>
@ -1144,6 +1148,8 @@ TRxDBCalcEdit является наследником TDBCalcEdit и имеет
@ -2421,6 +2427,8 @@ Description
<b>const</b> SearchDomain, FileName: <b>const</b> SearchDomain, FileName:
@ -2441,6 +2449,8 @@ Description
<b>String</b>; <b>String</b>;
@ -2461,6 +2471,8 @@ Description
<b>out</b> UserName, DomainName: <b>out</b> UserName, DomainName:
@ -2481,6 +2493,8 @@ Description
<b>String</b>); <b>String</b>);
</p> </p>
@ -2519,6 +2533,8 @@ Description
<b>const</b> DirName: <b>const</b> DirName:
@ -2533,6 +2549,8 @@ Description
<b>string</b>): <b>string</b>):
@ -2547,6 +2565,8 @@ Description
<b>string</b>;</p> <b>string</b>;</p>
<p>Функция проверяет все разделители каталогов в указанном имени файла/каталога и, если нужно, меняет их на значение константы<b>DirectorySeparator</b>.</p> <p>Функция проверяет все разделители каталогов в указанном имени файла/каталога и, если нужно, меняет их на значение константы<b>DirectorySeparator</b>.</p>
</descr> </descr>
@ -2575,6 +2595,8 @@ Description
<b>string</b>;</p> <b>string</b>;</p>
<p>Функция <b>GetUserName</b> возвращает имя оператора, залогиненго в системе</p> <p>Функция <b>GetUserName</b> возвращает имя оператора, залогиненго в системе</p>
</descr> </descr>
@ -2757,5 +2779,68 @@ Description
</module> </module>
<module name="rxdbgrid_findunit"/> <module name="rxdbgrid_findunit"/>
<module name="rxdbgrid_columsunit"/> <module name="rxdbgrid_columsunit"/>
<module name="RxViewsPanel">
<topic name="TRxViewsPanelItem"/>
<element name="TRxViewsPanelItem">
<descr>Коллекция TRxViewsPanelItems содержит в себе элементы "Кнопки" для переключателя представлений</descr>
</element>
<element name="TRxViewsPanelItem.Create"/>
<element name="TRxViewsPanelItem.Destroy"/>
<element name="TRxViewsPanelItem.Action"/>
<element name="TRxViewsPanelItem.Visible"/>
<element name="TRxViewsPanelItem.Caption"/>
<element name="TRxViewsPanelItem.Tag"/>
<element name="TRxViewsPanelItem.ImageIndex"/>
<element name="TRxViewsPanelItems">
<short>Коллекция TRxViewsPanelItems содержит в себе элементы "Кнопки" для переключателя представлений</short>
<descr>Коллекция TRxViewsPanelItems содержит в себе элементы "Кнопки" для переключателя представлений</descr>
</element>
<element name="TRxViewsPanelItems.Create"/>
<element name="TRxViewsPanelItems.Items"/>
<element name="TRxViewsPanelItems.UpdateImages"/>
<element name="TRxViewsPanel">
<short>Класс TRxViewsPanel представляет собой визуальный компонент в стиле переключателя представления из MS Project или Gnome Planer.</short>
<descr>Класс TRxViewsPanel представляет собой визуальный компонент в стиле переключателя представления из MS Project или Gnome Planer.</descr>
</element>
<short>Модуль RxViewsPanel содержит визуальный компонент для переключения представлений</short>
<descr>Модуль RxViewsPanel содержит визуальный компонент для переключения представлений</descr>
<element name="TRxViewsPanel.Create">
<short>Создаёт экземпляр</short>
</element>
<element name="TRxViewsPanel.Destroy"/>
<element name="TRxViewsPanel.ButtonHeght">
<short>Свойство определяет высоту кнопки в панели</short>
<descr>Свойство определяет высоту кнопки в панели</descr>
</element>
<element name="TRxViewsPanel.Color">
<short>Цвет фона панели</short>
<descr>Цвет фона панели</descr>
</element>
<element name="TRxViewsPanel.Items"/>
<element name="TRxViewsPanel.ImageList">
<short>Указатель на изображения для кнопок</short>
<descr>Указатель на изображения для кнопок на панели.</descr>
</element>
<element name="TRxViewsPanel.OnSelectViewEvent"/>
<element name="TRxViewsPanel.ItemIndex"/>
<element name="TSelectViewEvent">
<short>Событие возникает при нажатии на кнопку переключения вида</short>
<descr>
<p>Событие возникает при нажатии на кнопку переключения вида.
</p>
<table>
<tr>
<td>ItemIndex</td>
<td>Порядковый номер кнопку</td>
</tr>
<tr>
<td>Item</td>
<td>указатель на кнопку</td>
</tr>
</table>
</descr>
<example file="/usr/local/share/lazarus/components/rxnew/Demos/RxViewsPanel/unit1.pas"/>
</element>
</module>
</package> </package>
</fpdoc-descriptions> </fpdoc-descriptions>

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

View File

@ -1,2 +1,2 @@
del rx.lrs 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 tautopanel.xpm TRxCalendarGrid.xpm TRxDateEdit.png TRxClock.png TRxSpeedButton.png TRxSpinButton.png TRxSpinEdit.png TRXDBSpinEdit.png TRxTimeEdit.png TRxDBTimeEdit.png TRxDBProgressBar.png TRxDBTrackBar.png TRxLoginDialog.png TRxVersionInfo.png TRxAboutDialog.png TRxDBCurrEdit.png 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 tautopanel.xpm TRxCalendarGrid.xpm TRxDateEdit.png TRxClock.png TRxSpeedButton.png TRxSpinButton.png TRxSpinEdit.png TRXDBSpinEdit.png TRxTimeEdit.png TRxDBTimeEdit.png TRxDBProgressBar.png TRxDBTrackBar.png TRxLoginDialog.png TRxVersionInfo.png TRxAboutDialog.png TRxDBCurrEdit.png TRxViewsPanel.png

View File

@ -1,2 +1,2 @@
rm rx.lrs rm rx.lrs
/usr/local/share/lazarus/tools/lazres 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 tautopanel.xpm TRxCalendarGrid.xpm TRxDateEdit.png TRxClock.png TRxSpeedButton.png TRxSpinButton.png TRxSpinEdit.png TRXDBSpinEdit.png TRxTimeEdit.png TRxDBTimeEdit.png TRxDBProgressBar.png TRxDBTrackBar.png TRxLoginDialog.png TRxVersionInfo.png TRxAboutDialog.png TRxDBCurrEdit.png /usr/local/share/lazarus/tools/lazres 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 tautopanel.xpm TRxCalendarGrid.xpm TRxDateEdit.png TRxClock.png TRxSpeedButton.png TRxSpinButton.png TRxSpinEdit.png TRXDBSpinEdit.png TRxTimeEdit.png TRxDBTimeEdit.png TRxDBProgressBar.png TRxDBTrackBar.png TRxLoginDialog.png TRxVersionInfo.png TRxAboutDialog.png TRxDBCurrEdit.png TRxViewsPanel.png

View File

@ -627,3 +627,17 @@ LazarusResources.Add('TRxDBCurrEdit','PNG',[
+#144#204#175'h2F'#8' W'#17#0#182#8#0'['#4#128'-'#2#192#22#1'`'#139#0#176#149 +#144#204#175'h2F'#8' W'#17#0#182#8#0'['#4#128'-'#2#192#22#1'`'#139#0#176#149
+'='#192#19'C'#237#245'1T'#130#194#231#0#0#0#0'IEND'#174'B`'#130 +'='#192#19'C'#237#245'1T'#130#194#231#0#0#0#0'IEND'#174'B`'#130
]); ]);
LazarusResources.Add('TRxViewsPanel','PNG',[
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#23#8#6#0#0#0#17'!'#143'-'
+#0#0#0#9'pHYs'#0#0#14#196#0#0#14#196#1#149'+'#14#27#0#0#0#233'IDATH'#137#205
+#149'Q'#14#132' '#12'D'#167#27#239'Eof'#185'Y9Y'#247#3'QD\'#17'4'#217#249'Q'
+#155#240'F'#24''''#146#153#25#17'^'#145#25'@'#128#153#13#130#8#128#157'\'#211
+#253'k'#154'D'#4'"'#243#226#149#203#160#26#192#204#16#17'0'#243'm'#184#170'b'
+#138#183't8("'#2#243'~'#230#156#3#0#132#16'v'#207'I'#229'<3'#0#208#144't'#8#1
+#206#185#29'8'#135#214#230#19'n*-l'#157'/'#6#6#170'd'#240#132#178#29'\'#3#187
+'3'#144#195#219'GIa'#218#157#129#192#14'&%'#188'\'#216':_'#143#232#12'8'#170
+','#131#235#144#7'zP/Zi2'#212#3#242#180#226'~U'#174';'#131'+p'#175#214#162'A'
+#254#160'h'#221#6#173'E'#235#209#231#12#244'T/'#226#14#196#3'H?'#158'M'#241
+#135's'#31#170#170#155#193'<G'#168#247#30#170#245'O'#173'G'#137'K'#182'4'#204
+'{'#255#24'<7'#248#2'N'#186#146'B'#24#248#204#194#0#0#0#0'IEND'#174'B`'#130
]);

View File

@ -47,7 +47,7 @@ uses
Dialogs, ComponentEditors, seldsfrm, DBPropEdits, DB, rxctrls, RxLogin, Dialogs, ComponentEditors, seldsfrm, DBPropEdits, DB, rxctrls, RxLogin,
RxCustomChartPanel, AutoPanel, pickdate, rxconst, tooledit, rxclock, RxCustomChartPanel, AutoPanel, pickdate, rxconst, tooledit, rxclock,
rxceEditLookupFields, rxpopupunit, rxspin, RxTimeEdit, RxVersInfo, rxceEditLookupFields, rxpopupunit, rxspin, RxTimeEdit, RxVersInfo,
RxAboutDialog; RxAboutDialog, RxViewsPanel;
type type
@ -198,6 +198,11 @@ begin
RegisterComponents('RX',[TRxAboutDialog]); RegisterComponents('RX',[TRxAboutDialog]);
end; end;
procedure RegisterRxViewsPanel;
begin
RegisterComponents('RX',[TRxViewsPanel]);
end;
procedure Register; procedure Register;
begin begin
//RX //RX
@ -225,6 +230,7 @@ begin
RegisterUnit('RxLogin', @RegisterRxLogin); RegisterUnit('RxLogin', @RegisterRxLogin);
RegisterUnit('RxVersInfo', @RegisterRxVersInfo); RegisterUnit('RxVersInfo', @RegisterRxVersInfo);
RegisterUnit('RxAboutDialog', @RegisterRxAboutDialog); RegisterUnit('RxAboutDialog', @RegisterRxAboutDialog);
RegisterUnit('RxViewsPanel', @RegisterRxViewsPanel);
//RX DBAware //RX DBAware
RegisterUnit('dbdateedit', @RegisterUnitDBDateEdit); RegisterUnit('dbdateedit', @RegisterUnitDBDateEdit);

View File

@ -627,3 +627,17 @@ LazarusResources.Add('TRxDBCurrEdit','PNG',[
+#144#204#175'h2F'#8' W'#17#0#182#8#0'['#4#128'-'#2#192#22#1'`'#139#0#176#149 +#144#204#175'h2F'#8' W'#17#0#182#8#0'['#4#128'-'#2#192#22#1'`'#139#0#176#149
+'='#192#19'C'#237#245'1T'#130#194#231#0#0#0#0'IEND'#174'B`'#130 +'='#192#19'C'#237#245'1T'#130#194#231#0#0#0#0'IEND'#174'B`'#130
]); ]);
LazarusResources.Add('TRxViewsPanel','PNG',[
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#23#8#6#0#0#0#17'!'#143'-'
+#0#0#0#9'pHYs'#0#0#14#196#0#0#14#196#1#149'+'#14#27#0#0#0#233'IDATH'#137#205
+#149'Q'#14#132' '#12'D'#167#27#239'Eof'#185'Y9Y'#247#3'QD\'#17'4'#217#249'Q'
+#155#240'F'#24''''#146#153#25#17'^'#145#25'@'#128#153#13#130#8#128#157'\'#211
+#253'k'#154'D'#4'"'#243#226#149#203#160#26#192#204#16#17'0'#243'm'#184#170'b'
+#138#183't8("'#2#243'~'#230#156#3#0#132#16'v'#207'I'#229'<3'#0#208#144't'#8#1
+#206#185#29'8'#135#214#230#19'n*-l'#157'/'#6#6#170'd'#240#132#178#29'\'#3#187
+'3'#144#195#219'GIa'#218#157#129#192#14'&%'#188'\'#216':_'#143#232#12'8'#170
+','#131#235#144#7'zP/Zi2'#212#3#242#180#226'~U'#174';'#131'+p'#175#214#162'A'
+#254#160'h'#221#6#173'E'#235#209#231#12#244'T/'#226#14#196#3'H?'#158'M'#241
+#135's'#31#170#170#155#193'<G'#168#247#30#170#245'O'#173'G'#137'K'#182'4'#204
+'{'#255#24'<7'#248#2'N'#186#146'B'#24#248#204#194#0#0#0#0'IEND'#174'B`'#130
]);

View File

@ -27,7 +27,7 @@ translate to Lazarus by alexs in 2005 - 2009
<License Value="free ware <License Value="free ware
"/> "/>
<Version Major="2" Minor="1" Release="2" Build="105"/> <Version Major="2" Minor="1" Release="2" Build="105"/>
<Files Count="54"> <Files Count="55">
<Item1> <Item1>
<Filename Value="rxlookup.pas"/> <Filename Value="rxlookup.pas"/>
<UnitName Value="rxlookup"/> <UnitName Value="rxlookup"/>
@ -246,6 +246,10 @@ translate to Lazarus by alexs in 2005 - 2009
<Filename Value="dbcurredit.pas"/> <Filename Value="dbcurredit.pas"/>
<UnitName Value="dbcurredit"/> <UnitName Value="dbcurredit"/>
</Item54> </Item54>
<Item55>
<Filename Value="rxviewspanel.pas"/>
<UnitName Value="RxViewsPanel"/>
</Item55>
</Files> </Files>
<LazDoc Paths="docs\;\usr\local\share\lazarus\components\rxnew\docs\"/> <LazDoc Paths="docs\;\usr\local\share\lazarus\components\rxnew\docs\"/>
<i18n> <i18n>

View File

@ -2,7 +2,7 @@
This source is only used to compile and install the package. This source is only used to compile and install the package.
} }
unit rxnew ; unit rxnew;
interface interface
@ -15,16 +15,16 @@ uses
rxsortmemds, AutoPanel, pickdate, rxiconv, rxceEditLookupFields, rxclock, rxsortmemds, AutoPanel, pickdate, rxiconv, rxceEditLookupFields, rxclock,
rxspin, RxDBSpinEdit, RegisterRxDB, RxTimeEdit, RxDBTimeEdit, RxDBCtrls, rxspin, RxDBSpinEdit, RegisterRxDB, RxTimeEdit, RxDBTimeEdit, RxDBCtrls,
rxfilterby, rxconst, rxFileUtils, RxVersInfo, RxAboutDialog, rxfilterby, rxconst, rxFileUtils, RxVersInfo, RxAboutDialog,
rxAboutFormUnit, dbcurredit, LazarusPackageIntf; rxAboutFormUnit, dbcurredit, RxViewsPanel, LazarusPackageIntf;
implementation implementation
procedure Register ; procedure Register;
begin begin
RegisterUnit('registerrx', @registerrx.Register) ; RegisterUnit('registerrx', @registerrx.Register);
RegisterUnit('RegisterRxDB', @RegisterRxDB.Register) ; RegisterUnit('RegisterRxDB', @RegisterRxDB.Register);
end ; end;
initialization initialization
RegisterPackage('rxnew', @Register) ; RegisterPackage('rxnew', @Register);
end. end.

View File

@ -0,0 +1,478 @@
{ RxViewsPanel unit
Copyright (C) 2005-2010 Lagunov Aleksey alexs@hotbox.ru and Lazarus team
original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version with the following modification:
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,and
to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms
and conditions of the license of that module. An independent module is a
module which is not derived from or based on this library. If you modify
this library, you may extend this exception to your version of the library,
but you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
unit RxViewsPanel;
{$I rx.inc}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, StdCtrls;
type
TRxViewsPanel = class;
TRxViewsPanelItem = class;
TSelectViewEvent = procedure (ItemIndex:integer;const Item:TRxViewsPanelItem) of object;
{ TRxViewsPanelItem }
TRxViewsPanelItem = class(TCollectionItem)
private
FButton: TSpeedButton;
FImageIndex: integer;
FLabel:TLabel;
function GetAction: TBasicAction;
function GetCaption: string;
function GetImageIndex: integer;
function GetTag: Longint;
function GetVisible: boolean;
procedure SetAction(const AValue: TBasicAction);
procedure SetCaption(const AValue: string);
procedure SetImageIndex(const AValue: integer);
procedure SetTag(const AValue: Longint);
procedure SetVisible(const AValue: boolean);
procedure UpdatePosition;
procedure UpdateImage;
procedure DoViewButtonClick(Sender:TObject);
protected
function GetDisplayName: string; override;
public
constructor Create(ACollection: TCollection); override;
destructor Destroy; override;
published
property Action:TBasicAction read GetAction write SetAction;
property Visible:boolean read GetVisible write SetVisible;
property Caption:string read GetCaption Write SetCaption;
property Tag: Longint read GetTag write SetTag default 0;
property ImageIndex:integer read GetImageIndex write SetImageIndex;
end;
{ TRxViewsPanelItems }
TRxViewsPanelItems = class(TCollection)
private
FRxViewsPanel:TRxViewsPanel;
function GetPanelItem(Index: Integer): TRxViewsPanelItem;
procedure SetPanelItem(Index: Integer; const AValue: TRxViewsPanelItem);
protected
procedure Update(Item: TCollectionItem);override;
public
constructor Create(ARxViewsPanel: TRxViewsPanel);
property Items[Index: Integer]: TRxViewsPanelItem read GetPanelItem write SetPanelItem; default;
procedure UpdateImages;
end;
{ TRxViewsPanel }
TRxViewsPanel = class(TCustomPanel)
private
FButtonHeght: integer;
FImageList: TImageList;
FItemIndex: integer;
FItems:TRxViewsPanelItems;
FOnSelectViewEvent: TSelectViewEvent;
function GetItems: TRxViewsPanelItems;
procedure SetButtonHeght(const AValue: integer);
procedure SetImageList(const AValue: TImageList);
procedure SetItemIndex(const AValue: integer);
procedure SetItems(const AValue: TRxViewsPanelItems);
procedure InternalSelectView(Item:TRxViewsPanelItem);
protected
procedure Loaded; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property Align;
property Anchors;
property ButtonHeght:integer read FButtonHeght write SetButtonHeght;
property Color default clGrayText;
property Items:TRxViewsPanelItems read GetItems write SetItems;
property ImageList:TImageList read FImageList write SetImageList;
property OnSelectViewEvent:TSelectViewEvent read FOnSelectViewEvent write FOnSelectViewEvent;
property ItemIndex:integer read FItemIndex write SetItemIndex;
property Alignment;
property AutoSize;
property BorderSpacing;
property BevelInner;
property BevelOuter;
property BevelWidth;
property BidiMode;
property BorderWidth;
property BorderStyle;
property Caption;
property ChildSizing;
property ClientHeight;
property ClientWidth;
property Constraints;
property DockSite;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font;
property FullRepaint;
property ParentBidiMode;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property TabStop;
property UseDockManager default True;
property Visible;
property OnClick;
property OnContextPopup;
property OnDockDrop;
property OnDockOver;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnGetSiteInfo;
property OnGetDockCaption;
property OnMouseDown;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
property OnUnDock;
end;
implementation
{ TRxViewsPanel }
function TRxViewsPanel.GetItems: TRxViewsPanelItems;
begin
Result:=FItems;
end;
procedure TRxViewsPanel.SetButtonHeght(const AValue: integer);
var
I:integer;
begin
if FButtonHeght=AValue then exit;
FButtonHeght:=AValue;
for i:=0 to FItems.Count - 1 do
Items[i].FButton.Height:=AValue;
end;
procedure TRxViewsPanel.SetImageList(const AValue: TImageList);
begin
if FImageList=AValue then exit;
FImageList:=AValue;
end;
procedure TRxViewsPanel.SetItemIndex(const AValue: integer);
begin
if FItemIndex=AValue then exit;
if (AValue < 0) or (AValue > FItems.Count - 1) then exit;
FItemIndex:=AValue;
Items[AValue].FButton.Click;
Items[AValue].FButton.Down:=true;
end;
procedure TRxViewsPanel.SetItems(const AValue: TRxViewsPanelItems);
begin
FItems.Assign(AValue);
end;
procedure TRxViewsPanel.InternalSelectView(Item: TRxViewsPanelItem);
begin
if Assigned(FOnSelectViewEvent) then
FOnSelectViewEvent(Item.Index, Item);
end;
procedure TRxViewsPanel.Loaded;
begin
inherited Loaded;
FItems.Update(nil);
FItems.UpdateImages;
end;
constructor TRxViewsPanel.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
BevelOuter:=bvLowered;
Caption:='';
if Assigned(AOwner) then
Align:=alLeft;
Color:=clGrayText;
FItems:=TRxViewsPanelItems.Create(Self);
ControlStyle:=ControlStyle - [csSetCaption, csAcceptsControls];
FButtonHeght:=50;
end;
destructor TRxViewsPanel.Destroy;
begin
FreeAndNil(FItems);
inherited Destroy;
end;
{ TRxViewsPanelItem }
function TRxViewsPanelItem.GetAction: TBasicAction;
begin
Result:=FButton.Action;
end;
function TRxViewsPanelItem.GetCaption: string;
begin
Result:=FLabel.Caption;
end;
function TRxViewsPanelItem.GetImageIndex: integer;
begin
{ if Assigned(FButton.Action) then
Result:=FButton.Action.;}
Result:=FImageIndex;
// FButton.Glyph.;
end;
function TRxViewsPanelItem.GetTag: Longint;
begin
Result:=FButton.Tag;
end;
function TRxViewsPanelItem.GetVisible: boolean;
begin
Result:=FButton.Visible;
end;
procedure TRxViewsPanelItem.SetAction(const AValue: TBasicAction);
begin
FButton.Action:=AValue;
end;
procedure TRxViewsPanelItem.SetCaption(const AValue: string);
begin
FLabel.Caption:=AValue;
end;
procedure TRxViewsPanelItem.SetImageIndex(const AValue: integer);
begin
if FImageIndex=AValue then exit;
FImageIndex:=AValue;
UpdateImage;
end;
procedure TRxViewsPanelItem.SetTag(const AValue: Longint);
begin
FButton.Tag:=AValue;
end;
procedure TRxViewsPanelItem.SetVisible(const AValue: boolean);
begin
FButton.Visible:=AValue;
FLabel.Visible:=AValue;
end;
procedure TRxViewsPanelItem.UpdatePosition;
var
PP:TRxViewsPanelItem;
begin
if Index <> 0 then
begin
PP:=TRxViewsPanelItems(Collection).GetPanelItem(Index - 1);
if Assigned(PP.FLabel) then
begin
FButton.Top:=PP.FLabel.Top + PP.FLabel.Height;
end;
end;
FLabel.Top:=FButton.Top + FButton.Height;
end;
procedure TRxViewsPanelItem.UpdateImage;
var
VP:TRxViewsPanel;
begin
VP:=TRxViewsPanelItems(Collection).FRxViewsPanel;
if Assigned(VP.FImageList) then
VP.FImageList.GetBitmap(FImageIndex, FButton.Glyph);
end;
procedure TRxViewsPanelItem.DoViewButtonClick(Sender: TObject);
begin
TRxViewsPanelItems(Collection).FRxViewsPanel.InternalSelectView(Self);
end;
function TRxViewsPanelItem.GetDisplayName: string;
begin
if FLabel.Caption<> '' then
Result:=FLabel.Caption
else
Result:=inherited GetDisplayName;
end;
constructor TRxViewsPanelItem.Create(ACollection: TCollection);
var
VP:TRxViewsPanel;
begin
inherited Create(ACollection);
VP:=TRxViewsPanelItems(ACollection).FRxViewsPanel;
FImageIndex:=-1;
FButton:=TSpeedButton.Create(VP);
// FButton.Align:=alTop;
FButton.ShowCaption:=false;
FButton.Transparent:=true;
FButton.GroupIndex:=1;
FButton.Height:=VP.FButtonHeght;
FButton.Parent:=VP;
FLabel:=TLabel.Create(VP);
// FLabel.Align:=alTop;
FLabel.WordWrap:=true;
FLabel.Alignment:=taCenter;
FLabel.AutoSize:=true;
FLabel.Parent:=VP;
FButton.BorderSpacing.Around:=6;
FLabel.BorderSpacing.Around:=6;
FButton.AnchorSide[akLeft].Control:=VP;
FButton.AnchorSide[akRight].Control:=VP;
FButton.AnchorSide[akRight].Side:=asrBottom;
FButton.Anchors:=[akTop, akLeft, akRight];
FButton.OnClick:=@DoViewButtonClick;
FLabel.AnchorSide[akTop].Control:=FButton;
FLabel.AnchorSide[akLeft].Control:=VP;
FLabel.AnchorSide[akRight].Control:=VP;
FLabel.AnchorSide[akRight].Side:=asrBottom;
FLabel.Anchors:=[akTop, akLeft, akRight];
FLabel.Top:=FButton.Top + FButton.Height;
UpdatePosition;
end;
destructor TRxViewsPanelItem.Destroy;
begin
FreeAndNil(FButton);
FreeAndNil(FLabel);
inherited Destroy;
end;
{ TRxViewsPanelItems }
function TRxViewsPanelItems.GetPanelItem(Index: Integer): TRxViewsPanelItem;
begin
result := TRxViewsPanelItem( inherited Items[Index] );
end;
procedure TRxViewsPanelItems.SetPanelItem(Index: Integer;
const AValue: TRxViewsPanelItem);
begin
Items[Index].Assign( AValue );
end;
procedure TRxViewsPanelItems.Update(Item: TCollectionItem);
var
i:integer;
P, P1:TRxViewsPanelItem;
begin
inherited Update(Item);
if not Assigned(Item) then
begin
for i:=0 to Count - 1 do
begin
P:=GetPanelItem(I);
if Assigned(P.FButton) and Assigned(P.FLabel) then
begin
if i=0 then
begin
P.FButton.AnchorSide[akTop].Control:=FRxViewsPanel;
P.FButton.AnchorSide[akTop].Side:=asrTop;
P.FLabel.AnchorSide[akTop].Control:=P.FButton;
P.FLabel.AnchorSide[akTop].Side:=asrBottom;
end
else
begin
P1:=GetPanelItem(I-1);
if Assigned(P1.FButton) and Assigned(P1.FLabel) then
begin
P.FButton.AnchorSide[akTop].Control:=P1.FLabel;
P.FButton.AnchorSide[akTop].Side:=asrBottom;
P.FLabel.AnchorSide[akTop].Control:=P.FButton;
P.FLabel.AnchorSide[akTop].Side:=asrBottom;
end;
end;
P.FButton.AnchorSide[akLeft].Control:=FRxViewsPanel;
P.FButton.AnchorSide[akRight].Control:=FRxViewsPanel;
P.FButton.AnchorSide[akRight].Side:=asrBottom;
P.FLabel.AnchorSide[akTop].Control:=P.FButton;
P.FLabel.AnchorSide[akLeft].Control:=FRxViewsPanel;
P.FLabel.AnchorSide[akRight].Control:=FRxViewsPanel;
P.FLabel.AnchorSide[akRight].Side:=asrBottom;
end;
end;
end;
end;
constructor TRxViewsPanelItems.Create(ARxViewsPanel: TRxViewsPanel);
begin
inherited Create(TRxViewsPanelItem);
FRxViewsPanel:=ARxViewsPanel;
end;
procedure TRxViewsPanelItems.UpdateImages;
var
i:integer;
begin
for I:=0 to Count - 1 do
Items[i].UpdateImage;
end;
end.