mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:58:12 +02:00
IDE: added lfm/lrs
git-svn-id: trunk@16106 -
This commit is contained in:
parent
70e7f10204
commit
6dea91d8ee
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -3658,6 +3658,8 @@ packager/globallinks/weblaz-0.lpl svneol=native#text/plain
|
||||
packager/installpkgsetdlg.lfm svneol=native#text/plain
|
||||
packager/installpkgsetdlg.lrs svneol=native#text/pascal
|
||||
packager/installpkgsetdlg.pas svneol=native#text/pascal
|
||||
packager/openinstalledpkgdlg.lfm svneol=native#text/plain
|
||||
packager/openinstalledpkgdlg.lrs svneol=native#text/plain
|
||||
packager/openinstalledpkgdlg.pas svneol=native#text/pascal
|
||||
packager/packagedefs.pas svneol=native#text/pascal
|
||||
packager/packageeditor.pas svneol=native#text/pascal
|
||||
|
70
packager/openinstalledpkgdlg.lfm
Normal file
70
packager/openinstalledpkgdlg.lfm
Normal file
@ -0,0 +1,70 @@
|
||||
object OpenInstalledPackagesDlg: TOpenInstalledPackagesDlg
|
||||
Left = 559
|
||||
Height = 370
|
||||
Top = 303
|
||||
Width = 453
|
||||
Caption = 'OpenInstalledPackagesDlg'
|
||||
ClientHeight = 370
|
||||
ClientWidth = 453
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.25'
|
||||
object BtnPanel: TPanel
|
||||
Height = 41
|
||||
Top = 329
|
||||
Width = 453
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 41
|
||||
ClientWidth = 453
|
||||
TabOrder = 0
|
||||
object CancelButton: TButton
|
||||
Left = 349
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 98
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Cancel = True
|
||||
Caption = 'CancelButton'
|
||||
ModalResult = 2
|
||||
TabOrder = 0
|
||||
end
|
||||
object OpenButton: TButton
|
||||
Left = 254
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 89
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'OpenButton'
|
||||
Default = True
|
||||
OnClick = OpenButtonClick
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object HintMemo: TMemo
|
||||
Height = 90
|
||||
Top = 239
|
||||
Width = 453
|
||||
Align = alBottom
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
object PkgListView: TListView
|
||||
Height = 239
|
||||
Width = 453
|
||||
Align = alClient
|
||||
Columns = <>
|
||||
TabOrder = 2
|
||||
OnDblClick = PkgListViewDblClick
|
||||
OnSelectItem = PkgListViewSelectItem
|
||||
end
|
||||
end
|
23
packager/openinstalledpkgdlg.lrs
Normal file
23
packager/openinstalledpkgdlg.lrs
Normal file
@ -0,0 +1,23 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TOpenInstalledPackagesDlg','FORMDATA',[
|
||||
'TPF0'#25'TOpenInstalledPackagesDlg'#24'OpenInstalledPackagesDlg'#4'Left'#3'/'
|
||||
+#2#6'Height'#3'r'#1#3'Top'#3'/'#1#5'Width'#3#197#1#7'Caption'#6#24'OpenInsta'
|
||||
+'lledPackagesDlg'#12'ClientHeight'#3'r'#1#11'ClientWidth'#3#197#1#8'OnCreate'
|
||||
+#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.25'
|
||||
+#0#6'TPanel'#8'BtnPanel'#6'Height'#2')'#3'Top'#3'I'#1#5'Width'#3#197#1#5'Ali'
|
||||
+'gn'#7#8'alBottom'#8'AutoSize'#9#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'
|
||||
+#2')'#11'ClientWidth'#3#197#1#8'TabOrder'#2#0#0#7'TButton'#12'CancelButton'#4
|
||||
+'Left'#3']'#1#6'Height'#2#29#3'Top'#2#6#5'Width'#2'b'#5'Align'#7#7'alRight'#8
|
||||
+'AutoSize'#9#20'BorderSpacing.Around'#2#6#6'Cancel'#9#7'Caption'#6#12'Cancel'
|
||||
+'Button'#11'ModalResult'#2#2#8'TabOrder'#2#0#0#0#7'TButton'#10'OpenButton'#4
|
||||
+'Left'#3#254#0#6'Height'#2#29#3'Top'#2#6#5'Width'#2'Y'#5'Align'#7#7'alRight'
|
||||
+#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#10'OpenButton'#7'De'
|
||||
+'fault'#9#7'OnClick'#7#15'OpenButtonClick'#8'TabOrder'#2#1#0#0#0#5'TMemo'#8
|
||||
+'HintMemo'#6'Height'#2'Z'#3'Top'#3#239#0#5'Width'#3#197#1#5'Align'#7#8'alBot'
|
||||
+'tom'#13'Lines.Strings'#1#6#5'Memo1'#0#8'ReadOnly'#9#10'ScrollBars'#7#10'ssA'
|
||||
+'utoBoth'#8'TabOrder'#2#1#0#0#9'TListView'#11'PkgListView'#6'Height'#3#239#0
|
||||
+#5'Width'#3#197#1#5'Align'#7#8'alClient'#7'Columns'#14#0#8'TabOrder'#2#2#10
|
||||
+'OnDblClick'#7#19'PkgListViewDblClick'#12'OnSelectItem'#7#21'PkgListViewSele'
|
||||
+'ctItem'#0#0#0
|
||||
]);
|
@ -41,28 +41,26 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Buttons, ComCtrls, StdCtrls,
|
||||
FileCtrl, LResources, Dialogs, LCLProc,
|
||||
PackageDefs, LazarusIDEStrConsts, IDEWindowIntf, PackageSystem;
|
||||
PackageDefs, LazarusIDEStrConsts, IDEWindowIntf, PackageSystem, ExtCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TOpenInstalledPackagesDlg }
|
||||
|
||||
TOpenInstalledPackagesDlg = class(TCustomForm)
|
||||
TOpenInstalledPackagesDlg = class(TForm)
|
||||
BtnPanel: TPanel;
|
||||
PkgListView: TListView;
|
||||
HintMemo: TMemo;
|
||||
OpenButton: TButton;
|
||||
CancelButton: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure OpenButtonClick(Sender: TObject);
|
||||
procedure OpenInstalledPackagesDlgResize(Sender: TObject);
|
||||
procedure PkgListViewDblClick(Sender: TObject);
|
||||
procedure PkgListViewSelectItem(Sender: TObject; Item: TListItem;
|
||||
Selected: Boolean);
|
||||
private
|
||||
procedure SetupComponents;
|
||||
function PkgStateToString(APackage: TLazPackage): string;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure UpdateSelection;
|
||||
procedure UpdatePackageList;
|
||||
function GetSelectedPackage: TLazPackage;
|
||||
@ -86,30 +84,6 @@ end;
|
||||
|
||||
{ TOpenInstalledPackagesDlg }
|
||||
|
||||
procedure TOpenInstalledPackagesDlg.OpenInstalledPackagesDlgResize(
|
||||
Sender: TObject);
|
||||
var
|
||||
x: Integer;
|
||||
y: Integer;
|
||||
w: Integer;
|
||||
begin
|
||||
x:=5;
|
||||
y:=5;
|
||||
w:=ClientWidth-2*x;
|
||||
with PkgListView do
|
||||
SetBounds(x,y,w,Parent.ClientHeight-130);
|
||||
inc(y,PkgListView.Height+5);
|
||||
|
||||
with HintMemo do
|
||||
SetBounds(x,y,w,Parent.ClientHeight-y-40);
|
||||
|
||||
with OpenButton do
|
||||
SetBounds(Parent.ClientWidth-180,Parent.ClientHeight-Height-5,80,Height);
|
||||
|
||||
with CancelButton do
|
||||
SetBounds(Parent.ClientWidth-90,Parent.ClientHeight-Height-5,80,Height);
|
||||
end;
|
||||
|
||||
procedure TOpenInstalledPackagesDlg.PkgListViewDblClick(Sender: TObject);
|
||||
begin
|
||||
OpenButtonClick(Sender);
|
||||
@ -157,14 +131,14 @@ begin
|
||||
ModalResult:=mrOk;
|
||||
end;
|
||||
|
||||
procedure TOpenInstalledPackagesDlg.SetupComponents;
|
||||
procedure TOpenInstalledPackagesDlg.FormCreate(Sender: TObject);
|
||||
var
|
||||
NewColumn: TListColumn;
|
||||
begin
|
||||
PkgListView:=TListView.Create(Self);
|
||||
Caption:=lisOIPOpenLoadedPackage;
|
||||
IDEDialogLayoutList.ApplyLayout(Self,500,350);
|
||||
|
||||
with PkgListView do begin
|
||||
Name:='PkgListView';
|
||||
Parent:=Self;
|
||||
ViewStyle:=vsReport;
|
||||
NewColumn:=Columns.Add;
|
||||
NewColumn.Caption:=lisOIPPackageName;
|
||||
@ -175,36 +149,10 @@ begin
|
||||
NewColumn:=Columns.Add;
|
||||
NewColumn.Caption:=lisOIPState;
|
||||
NewColumn.Width:=300;
|
||||
OnSelectItem:=@PkgListViewSelectItem;
|
||||
OnDblClick:=@PkgListViewDblClick;
|
||||
end;
|
||||
|
||||
HintMemo:=TMemo.Create(Self);
|
||||
with HintMemo do begin
|
||||
Name:='HintMemo';
|
||||
Parent:=Self;
|
||||
WordWrap:=true;
|
||||
ReadOnly:=true;
|
||||
ScrollBars:=ssAutoBoth;
|
||||
end;
|
||||
|
||||
OpenButton:=TButton.Create(Self);
|
||||
with OpenButton do begin
|
||||
Name:='OpenButton';
|
||||
Parent:=Self;
|
||||
Caption:=lisMenuOpen;
|
||||
OnClick:=@OpenButtonClick;
|
||||
Default:=true;
|
||||
end;
|
||||
|
||||
CancelButton:=TButton.Create(Self);
|
||||
with CancelButton do begin
|
||||
Name:='CancelButton';
|
||||
Parent:=Self;
|
||||
Caption:=dlgCancel;
|
||||
ModalResult:=mrCancel;
|
||||
Cancel:=true;
|
||||
end;
|
||||
|
||||
OpenButton.Caption:=lisMenuOpen;
|
||||
CancelButton.Caption:=dlgCancel;
|
||||
end;
|
||||
|
||||
function TOpenInstalledPackagesDlg.PkgStateToString(APackage: TLazPackage
|
||||
@ -233,23 +181,6 @@ begin
|
||||
if APackage.ReadOnly then AddState(lisOIPreadonly);
|
||||
end;
|
||||
|
||||
constructor TOpenInstalledPackagesDlg.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
Name:='OpenInstalledPackagesDlg';
|
||||
Caption:=lisOIPOpenLoadedPackage;
|
||||
SetupComponents;
|
||||
OnResize:=@OpenInstalledPackagesDlgResize;
|
||||
Position:=poScreenCenter;
|
||||
IDEDialogLayoutList.ApplyLayout(Self,500,350);
|
||||
OnResize(Self);
|
||||
end;
|
||||
|
||||
destructor TOpenInstalledPackagesDlg.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TOpenInstalledPackagesDlg.UpdatePackageList;
|
||||
var
|
||||
Cnt: Integer;
|
||||
@ -287,5 +218,8 @@ begin
|
||||
Result:=TLazPackage(LI.Data);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I openinstalledpkgdlg.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user