MG: activated the clientrect bugfixes

git-svn-id: trunk@1702 -
This commit is contained in:
lazarus 2002-05-20 14:19:03 +00:00
parent cc5ebf63af
commit d9b4ed05d3
14 changed files with 308 additions and 225 deletions

View File

@ -64,7 +64,7 @@ interface
uses
{$IFDEF SYN_LAZARUS}
{ $DEFINE ClientRectBugFix}
{$DEFINE ClientRectBugFix}
LCLLinux,
LCLType, GraphType,
{$ELSE}

View File

@ -43,7 +43,7 @@ uses
LCLLinux, LMessages, Controls, ComCtrls, ExtCtrls, PropEdits, TypInfo,
Messages, LResources, XMLCfg, Menus, Dialogs;
{ $DEFINE ClientRectBugFix}
{$DEFINE ClientRectBugFix}
type
EObjectInspectorException = class(Exception);
@ -771,6 +771,7 @@ begin
if CurRow<>nil then begin
ItemIndex:=CurRow.Index;
end;
FTopY:=0;
UpdateScrollBar;
Invalidate;
end;
@ -1192,7 +1193,7 @@ begin
end;
// draw unused space below rows
SpaceRect:=Rect(BorderWidth,BorderWidth,
ClientWidth-BorderWidth,ClientHeight-BorderWidth);
ClientWidth-BorderWidth+1,ClientHeight-BorderWidth+1);
if FRows.Count>0 then
SpaceRect.Top:=Rows[FRows.Count-1].Bottom-FTopY+BorderWidth;
// TWinControl(Parent).InvalidateRect(Self,SpaceRect,true);

View File

@ -18,7 +18,7 @@ LazarusResources.Add('TAboutForm','FORMDATA',
+'T'#2#17#3'TOP'#2#6#5'WIDTH'#3#200#0#0#0#0
);
LazarusResources.Add('TAbout_frm','FORMDATA',
LazarusResources.Add('TAbout_frm','FORMDATA',[
'TPF0'#10'TAboutForm'#9'About_frm'#7'CAPTION'#6#13'About Lazarus'#5'COLOR'#4
+#15#0#0#128#12'CLIENTHEIGHT'#3#245#0#11'CLIENTWIDTH'#3'A'#2#8'POSITION'#7#14
+'poscreencenter'#4'LEFT'#3'_'#1#6'HEIGHT'#3#245#0#3'TOP'#3#133#1#5'WIDTH'#3
@ -36,4 +36,4 @@ LazarusResources.Add('TAbout_frm','FORMDATA',
+'TOP'#3#184#0#5'WIDTH'#2'K'#0#0#6'TLABEL'#6'Label1'#9'ALIGNMENT'#7#8'tacente'
+'r'#7'CAPTION'#6#10'Version #:'#10'FONT.COLOR'#4#8#0#0#128#4'LEFT'#2#14#6'HE'
+'IGHT'#2#17#3'TOP'#2#6#5'WIDTH'#3#200#0#0#0#0
);
]);

View File

@ -33,6 +33,7 @@ type
Memo1: TMEMO;
Button1: TBUTTON;
Label1: TLABEL;
procedure AboutFormResize(Sender: TObject);
private
{ private declarations }
FPixmap : TPixmap;
@ -55,6 +56,8 @@ begin
FPixmap := TPixmap.Create;
FPixmap.LoadFromLazarusResource('lazarus_about_logo');
Label1.Caption := 'Version #: 0.8.3a';
OnResize:=@AboutFormResize;
end;
@ -66,6 +69,15 @@ begin
inherited Destroy;
end;
procedure TAboutForm.AboutFormResize(Sender: TObject);
begin
with Memo1 do begin
Left:=225;
Top:=10;
Width:=Self.ClientWidth-Left-Top;
Height:=Self.ClientHeight-2*Top;
end;
end;
procedure TAboutForm.Paint;
begin

View File

@ -152,6 +152,8 @@ type
// misc
procedure FormResize(Sender: TObject);
procedure SelectedItemGroupBoxResize(Sender: TObject);
procedure ValueNoteBookResize(Sender: TObject);
procedure DefineTreeViewMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X,Y: integer);
procedure ProjectSpecificCheckBoxClick(Sender: TObject);
@ -160,7 +162,7 @@ type
// exit menu
procedure SaveAndExitMenuItemClick(Sender: TObject);
procedure DontSaveAndExitMenuItemClick(Sender: TObject);
// value notebook
procedure ValueNoteBookPageChanged(Sender: TObject);
procedure MoveFilePathUpBitBtnClick(Sender: TObject);
@ -378,31 +380,11 @@ begin
ModalResult:=mrCancel;
end;
procedure TCodeToolsDefinesEditor.FormResize(Sender: TObject);
var MaxX, MaxY, SelGrpBoxTop, SelItemMaxX, SelItemMaxY,
ValNoteBookMaxX, ValNoteBookMaxY: integer;
procedure TCodeToolsDefinesEditor.SelectedItemGroupBoxResize(Sender: TObject);
var SelItemMaxX, SelItemMaxY: integer;
begin
MaxX:=ClientWidth;
MaxY:=ClientHeight-25;
SelGrpBoxTop:=MaxY-310;
// define tree ---------------------------------------------------------------
with DefineTreeView do begin
Left:=3;
Top:=3;
Width:=MaxX-2*Left;
Height:=SelGrpBoxTop-2*Top;
end;
// selected item -------------------------------------------------------------
with SelectedItemGroupBox do begin
Left:=DefineTreeView.Left;
Top:=SelGrpBoxTop;
Width:=MaxX-2*Left;
Height:=MaxY-Top-Left;
end;
SelItemMaxX:=SelectedItemGroupBox.ClientWidth-6;
SelItemMaxY:=SelectedItemGroupBox.ClientHeight-27;
SelItemMaxX:=SelectedItemGroupBox.ClientWidth;
SelItemMaxY:=SelectedItemGroupBox.ClientHeight;
with TypeLabel do begin
Left:=5;
Top:=3;
@ -449,39 +431,29 @@ begin
Width:=SelItemMaxX;
Height:=SelItemMaxY-Top;
end;
ValNoteBookMaxX:=ValueNoteBook.ClientWidth-10;//ValueAsTextSynEdit.Parent.ClientWidth;
ValNoteBookMaxY:=ValueNoteBook.ClientHeight-30;//ValueAsTextSynEdit.Parent.ClientHeight;
with ValueAsTextSynEdit do begin
Left:=0;
Top:=0;
Width:=ValNoteBookMaxX;
Height:=ValNoteBookMaxY;
end;
procedure TCodeToolsDefinesEditor.FormResize(Sender: TObject);
var MaxX, MaxY, SelGrpBoxTop: integer;
begin
MaxX:=ClientWidth;
MaxY:=ClientHeight;
SelGrpBoxTop:=MaxY-310;
// define tree ---------------------------------------------------------------
with DefineTreeView do begin
Left:=3;
Top:=3;
Width:=MaxX-2*Left;
Height:=SelGrpBoxTop-2*Top;
end;
with ValueAsFilePathsSynEdit do begin
Left:=0;
Top:=0;
Width:=ValNoteBookMaxX-80;
Height:=ValNoteBookMaxY;
end;
with MoveFilePathUpBitBtn do begin
Left:=ValNoteBookMaxX-75;
Top:=1;
Width:=ValNoteBookMaxX-Left-5;
end;
with MoveFilePathDownBitBtn do begin
Left:=MoveFilePathUpBitBtn.Left;
Top:=MoveFilePathUpBitBtn.Top+MoveFilePathUpBitBtn.Height+5;
Width:=MoveFilePathUpBitBtn.Width;
end;
with DeleteFilePathBitBtn do begin
Left:=MoveFilePathUpBitBtn.Left;
Top:=MoveFilePathDownBitBtn.Top+MoveFilePathDownBitBtn.Height+5;
Width:=MoveFilePathUpBitBtn.Width;
end;
with InsertFilePathBitBtn do begin
Left:=MoveFilePathUpBitBtn.Left;
Top:=DeleteFilePathBitBtn.Top+DeleteFilePathBitBtn.Height+5;
Width:=MoveFilePathUpBitBtn.Width;
// selected item -------------------------------------------------------------
with SelectedItemGroupBox do begin
Left:=DefineTreeView.Left;
Top:=SelGrpBoxTop;
Width:=MaxX-2*Left;
Height:=MaxY-Top-Left;
end;
end;
@ -1049,6 +1021,47 @@ begin
end;
end;
procedure TCodeToolsDefinesEditor.ValueNoteBookResize(Sender: TObject);
var ValNoteBookMaxX, ValNoteBookMaxY: integer;
begin
//ValNoteBookMaxX:=ValueNoteBook.ClientWidth-10;//ValueAsTextSynEdit.Parent.ClientWidth;
//ValNoteBookMaxY:=ValueNoteBook.ClientHeight-30;//ValueAsTextSynEdit.Parent.ClientHeight;
ValNoteBookMaxX:=ValueAsTextSynEdit.Parent.ClientWidth;
ValNoteBookMaxY:=ValueAsTextSynEdit.Parent.ClientHeight;
with ValueAsTextSynEdit do begin
Left:=0;
Top:=0;
Width:=ValNoteBookMaxX;
Height:=ValNoteBookMaxY;
end;
with ValueAsFilePathsSynEdit do begin
Left:=0;
Top:=0;
Width:=ValNoteBookMaxX-80;
Height:=ValNoteBookMaxY;
end;
with MoveFilePathUpBitBtn do begin
Left:=ValNoteBookMaxX-75;
Top:=1;
Width:=ValNoteBookMaxX-Left-5;
end;
with MoveFilePathDownBitBtn do begin
Left:=MoveFilePathUpBitBtn.Left;
Top:=MoveFilePathUpBitBtn.Top+MoveFilePathUpBitBtn.Height+5;
Width:=MoveFilePathUpBitBtn.Width;
end;
with DeleteFilePathBitBtn do begin
Left:=MoveFilePathUpBitBtn.Left;
Top:=MoveFilePathDownBitBtn.Top+MoveFilePathDownBitBtn.Height+5;
Width:=MoveFilePathUpBitBtn.Width;
end;
with InsertFilePathBitBtn do begin
Left:=MoveFilePathUpBitBtn.Left;
Top:=DeleteFilePathBitBtn.Top+DeleteFilePathBitBtn.Height+5;
Width:=MoveFilePathUpBitBtn.Width;
end;
end;
procedure TCodeToolsDefinesEditor.ProjectSpecificCheckBoxClick(Sender: TObject);
var
SelTreeNode: TTreeNode;
@ -1401,6 +1414,7 @@ begin
// selected item
CreateWinControl(SelectedItemGroupBox,TGroupBox,'SelectedItemGroupBox',Self);
SelectedItemGroupBox.Caption:='Selected Node:';
SelectedItemGroupBox.OnResize:=@SelectedItemGroupBoxResize;
CreateWinControl(TypeLabel,TLabel,'TypeLabel',SelectedItemGroupBox);
@ -1433,6 +1447,7 @@ begin
Pages[0]:='Value as Text';
Pages.Add('Value as File Paths');
OnPageChanged:=@ValueNoteBookPageChanged;
OnResize:=@ValueNoteBookResize;
end;
CreateWinControl(ValueAsTextSynEdit,TSynEdit,'ValueAsTextSynEdit',
@ -1441,6 +1456,7 @@ begin
eoDragDropEditing, eoHalfPageScroll, eoScrollByOneLess, eoScrollPastEol,
eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces];
ValueAsTextSynEdit.Gutter.Visible:=false;
ValueAsTextSynEdit.Align:=alClient;
CreateWinControl(ValueAsFilePathsSynEdit,TSynEdit,'ValueAsFilePathsSynEdit',
ValueNoteBook.Page[1]);

View File

@ -967,7 +967,7 @@ begin
with SplitPreviewSynEdit do begin
Name:='SplitPreviewSynEdit';
Parent:=SplitPreviewGroupBox;
SetBounds(2,2,Parent.ClientWidth-8,Parent.ClientHeight-25);
Align:=alClient;
Visible:=true;
end;
end;
@ -1017,7 +1017,7 @@ begin
with SpacePreviewSynEdit do begin
Name:='SpacePreviewSynEdit';
Parent:=SpacePreviewGroupBox;
SetBounds(2,2,Parent.ClientWidth-8,Parent.ClientHeight-25);
Align:=alClient;
Visible:=true;
end;
end;

View File

@ -428,6 +428,7 @@ type
Button:TMouseButton; Shift:TShiftState; X,Y:integer);
procedure CodeTemplateFileNameButtonClick(Sender:TObject);
procedure CodeTemplateButtonClick(Sender:TObject);
procedure CodeTemplatesGroupBoxResize(Sender: TObject);
// buttons at bottom
procedure OkButtonClick(Sender:TObject);
@ -1963,6 +1964,83 @@ end;
// general
procedure TEditorOptionsForm.CodeTemplatesGroupBoxResize(Sender: TObject);
begin
with CodeTemplateFileNameLabel do begin
Top:=5;
Left:=7;
Width:=110;
end;
with CodeTemplateFileNameComboBox do begin
Top:=3;
Left:=CodeTemplateFileNameLabel.Left+CodeTemplateFileNameLabel.Width+2;
Width:=CodeTemplatesGroupBox.Width-12-Left-Height;
end;
with CodeTemplateFileNameButton do begin
Top:=CodeTemplateFileNameComboBox.Top+2;
Width:=CodeTemplateFileNameComboBox.Height-5;
Left:=CodeTemplatesGroupBox.Width-9-Width;
Height:=Width;
end;
with CodeTemplateAddButton do begin
Top:=CodeTemplateFileNameComboBox.Top+CodeTemplateFileNameComboBox.Height+10;
Width:=50;
Left:=CodeTemplateFileNameLabel.Left;
Height:=23;
end;
with CodeTemplateEditButton do begin
Top:=CodeTemplateAddButton.Top+CodeTemplateAddButton.Height+5;
Left:=CodeTemplateAddButton.Left;
Width:=CodeTemplateAddButton.Width;
Height:=CodeTemplateAddButton.Height;
end;
with CodeTemplateDeleteButton do begin
Top:=CodeTemplateEditButton.Top+CodeTemplateEditButton.Height+5;
Left:=CodeTemplateAddButton.Left;
Width:=CodeTemplateAddButton.Width;
Height:=CodeTemplateAddButton.Height;
end;
with CodeTemplatesLabel do begin
Top:=CodeTemplateFileNameLabel.Top+CodeTemplateFileNameLabel.Height+12;
Left:=CodeTemplateAddButton.Left+CodeTemplateAddButton.Width+5;
Width:=60;
end;
with CodeTemplateListBox do begin
Top:=CodeTemplatesLabel.Top;
Left:=CodeTemplatesLabel.Left+CodeTemplatesLabel.Width+5;
Width:=Parent.ClientWidth-8-Left;
Height:=80;
end;
with CodeTemplateCodeLabel do begin
Top:=CodeTemplateListBox.Top+CodeTemplateListBox.Height+5;
Left:=CodeTemplatesLabel.Left;
Width:=CodeTemplatesLabel.Width;
Height:=CodeTemplatesLabel.Height;
end;
with CodeTemplateCodePreview do begin
Top:=CodeTemplateCodeLabel.Top;
Left:=CodeTemplateCodeLabel.Left+CodeTemplateCodeLabel.Width+5;
Width:=CodeTemplateListBox.Width;
Height:=CodeTemplatesGroupBox.ClientHeight-Top;
end;
with CodeTemplateIndentTypeRadioGroup do begin
Left:=CodeTemplateAddButton.Left;
Top:=CodeTemplateCodeLabel.Top+CodeTemplateCodeLabel.Height+15;
Width:=CodeTemplateCodePreview.Left-Left-8;
Height:=70;
end;
end;
procedure TEditorOptionsForm.EditorOptionsFormResize(Sender: TObject);
begin
with MainNoteBook do begin
@ -4699,6 +4777,7 @@ begin
Width:=AutomaticFeaturesGroupBox.Width;
Height:=250;
Caption:='Code templates';
OnResize:=@CodeTemplatesGroupBoxResize;
Visible:=true;
end;
@ -4924,80 +5003,6 @@ begin
Width:=AutomaticFeaturesGroupBox.Width;
Height:=MaxY-Top-10;
end;
with CodeTemplateFileNameLabel do begin
Top:=5;
Left:=7;
Width:=110;
end;
with CodeTemplateFileNameComboBox do begin
Top:=3;
Left:=CodeTemplateFileNameLabel.Left+CodeTemplateFileNameLabel.Width+2;
Width:=CodeTemplatesGroupBox.Width-12-Left-Height;
end;
with CodeTemplateFileNameButton do begin
Top:=CodeTemplateFileNameComboBox.Top+2;
Width:=CodeTemplateFileNameComboBox.Height-5;
Left:=CodeTemplatesGroupBox.Width-9-Width;
Height:=Width;
end;
with CodeTemplateAddButton do begin
Top:=CodeTemplateFileNameComboBox.Top+CodeTemplateFileNameComboBox.Height+10;
Width:=50;
Left:=CodeTemplateFileNameLabel.Left;
Height:=23;
end;
with CodeTemplateEditButton do begin
Top:=CodeTemplateAddButton.Top+CodeTemplateAddButton.Height+5;
Left:=CodeTemplateAddButton.Left;
Width:=CodeTemplateAddButton.Width;
Height:=CodeTemplateAddButton.Height;
end;
with CodeTemplateDeleteButton do begin
Top:=CodeTemplateEditButton.Top+CodeTemplateEditButton.Height+5;
Left:=CodeTemplateAddButton.Left;
Width:=CodeTemplateAddButton.Width;
Height:=CodeTemplateAddButton.Height;
end;
with CodeTemplatesLabel do begin
Top:=CodeTemplateFileNameLabel.Top+CodeTemplateFileNameLabel.Height+12;
Left:=CodeTemplateAddButton.Left+CodeTemplateAddButton.Width+5;
Width:=60;
end;
with CodeTemplateListBox do begin
Top:=CodeTemplatesLabel.Top;
Left:=CodeTemplatesLabel.Left+CodeTemplatesLabel.Width+5;
Width:=Parent.ClientWidth-8-Left;
Height:=80;
end;
with CodeTemplateCodeLabel do begin
Top:=CodeTemplateListBox.Top+CodeTemplateListBox.Height+5;
Left:=CodeTemplatesLabel.Left;
Width:=CodeTemplatesLabel.Width;
Height:=CodeTemplatesLabel.Height;
end;
with CodeTemplateCodePreview do begin
Top:=CodeTemplateCodeLabel.Top;
Left:=CodeTemplateCodeLabel.Left+CodeTemplateCodeLabel.Width+5;
Width:=CodeTemplateListBox.Width;
Height:=CodeTemplatesGroupBox.ClientHeight-20-Top;
end;
with CodeTemplateIndentTypeRadioGroup do begin
Left:=CodeTemplateAddButton.Left;
Top:=CodeTemplateCodeLabel.Top+CodeTemplateCodeLabel.Height+15;
Width:=CodeTemplateCodePreview.Left-Left-8;
Height:=70;
end;
end;
procedure TEditorOptionsForm.SetupButtonBar;

View File

@ -253,10 +253,6 @@ type
{ form for environment options }
TEnvironmentOptionsDialog = class(TForm)
private
FOnLoadEnvironmentSettings: TOnLoadEnvironmentSettings;
FOnSaveEnvironmentSettings: TOnSaveEnvironmentSettings;
published
NoteBook: TNoteBook;
// auto save
@ -346,14 +342,13 @@ type
procedure CancelButtonClick(Sender: TObject);
procedure SaveDesktopSettingsToFileButtonClick(Sender: TObject);
procedure LoadDesktopSettingsFromFileButtonClick(Sender: TObject);
property OnSaveEnvironmentSettings: TOnSaveEnvironmentSettings
read FOnSaveEnvironmentSettings write FOnSaveEnvironmentSettings;
property OnLoadEnvironmentSettings: TOnLoadEnvironmentSettings
read FOnLoadEnvironmentSettings write FOnLoadEnvironmentSettings;
procedure WindowPositionsListBoxMouseUp(Sender:TObject;
Button:TMouseButton; Shift:TShiftState; X,Y:integer);
procedure EnvironmentOptionsDialogResize(Sender: TObject);
procedure WindowPositionsGroupBoxResize(Sender: TObject);
private
FOnLoadEnvironmentSettings: TOnLoadEnvironmentSettings;
FOnSaveEnvironmentSettings: TOnSaveEnvironmentSettings;
FLayouts: TIDEWindowLayoutList;
procedure SetupDesktopPage(Page: integer);
procedure SetupFormEditorPage(Page: integer);
@ -371,6 +366,11 @@ type
procedure SetComboBoxText(AComboBox:TComboBox; const AText:AnsiString;
MaxCount: integer);
procedure SetWindowPositionsItem(Index: integer);
published
property OnSaveEnvironmentSettings: TOnSaveEnvironmentSettings
read FOnSaveEnvironmentSettings write FOnSaveEnvironmentSettings;
property OnLoadEnvironmentSettings: TOnLoadEnvironmentSettings
read FOnLoadEnvironmentSettings write FOnLoadEnvironmentSettings;
public
procedure ReadSettings(AnEnvironmentOptions: TEnvironmentOptions);
procedure WriteSettings(AnEnvironmentOptions: TEnvironmentOptions);
@ -1158,6 +1158,7 @@ begin
Parent:=NoteBook.Page[Page];
Caption:='Window Positions';
SetBounds(MaxX div 2,AutoSaveGroupBox.Top,(MaxX div 2)-5,290);
OnResize:=@WindowPositionsGroupBoxResize;
Visible:=true;
end;
@ -1960,17 +1961,6 @@ begin
with WindowPositionsGroupBox do begin
SetBounds(MaxX div 2,AutoSaveGroupBox.Top,(MaxX div 2)-5,290);
end;
with WindowPositionsListBox do begin
SetBounds(5,5,Parent.ClientWidth-15,60);
end;
with WindowPositionsBox do begin
Left:=5;
Top:=WindowPositionsListBox.Top+WindowPositionsListBox.Height+5;
Width:=WindowPositionsListBox.Width;
Height:=Parent.ClientHeight-Top-20;
end;
end;
procedure TEnvironmentOptionsDialog.ResizeFormEditorPage;
@ -2354,6 +2344,21 @@ begin
end;
end;
procedure TEnvironmentOptionsDialog.WindowPositionsGroupBoxResize(
Sender: TObject);
begin
with WindowPositionsListBox do begin
SetBounds(2,2,Parent.ClientWidth-2*2,Parent.Height div 4);
end;
with WindowPositionsBox do begin
Left:=2;
Top:=WindowPositionsListBox.Top+WindowPositionsListBox.Height+5;
Width:=WindowPositionsListBox.Width;
Height:=Parent.ClientHeight-Top-2;
end;
end;
procedure TEnvironmentOptionsDialog.BakTypeRadioGroupClick(Sender: TObject);
var i: integer;
begin

View File

@ -116,6 +116,7 @@ type
CancelButton: TButton;
procedure CancelButtonClick(Sender: TObject);
procedure ExternalToolOptionDlgResize(Sender: TObject);
procedure MacrosGroupboxResize(Sender: TObject);
procedure OkButtonClick(Sender: TObject);
procedure FormKeyUp(Sender: TObject; var Key: Word; Shift:TShiftState);
procedure KeyGrabButtonClick(Sender: TObject);
@ -266,9 +267,7 @@ begin
Height:=450;
Caption:='Edit Tool';
Position:=poScreenCenter;
OnResize:=@ExternalToolOptionDlgResize;
OnKeyUp:=@FormKeyUp;
TitleLabel:=TLabel.Create(Self);
with TitleLabel do begin
Name:='TitleLabel';
@ -467,6 +466,7 @@ begin
Width:=KeyGroupBox.Width;
Height:=Self.ClientHeight-50-Top;
Caption:='Macros';
OnResize:=@MacrosGroupboxResize;
Visible:=true;
end;
@ -510,6 +510,9 @@ begin
OnClick:=@CancelButtonClick;
Visible:=true;
end;
OnResize:=@ExternalToolOptionDlgResize;
OnKeyUp:=@FormKeyUp;
end;
fOptions:=TExternalToolOptions.Create;
ExternalToolOptionDlgResize(nil);
@ -681,15 +684,6 @@ begin
Height:=Self.ClientHeight-50-Top;
end;
with MacrosListbox do begin
SetBounds(5,5,MacrosGroupbox.ClientWidth-120,
MacrosGroupbox.ClientHeight-30);
end;
with MacrosInsertButton do begin
SetBounds(MacrosGroupbox.ClientWidth-90,5,70,25);
end;
with OkButton do begin
SetBounds(270,Self.ClientHeight-40,100,25);
end;
@ -699,6 +693,18 @@ begin
end;
end;
procedure TExternalToolOptionDlg.MacrosGroupboxResize(Sender: TObject);
begin
with MacrosInsertButton do begin
SetBounds(MacrosGroupbox.ClientWidth-75,5,70,MacrosInsertButton.Height);
end;
with MacrosListbox do begin
SetBounds(2,2,MacrosInsertButton.Left-5,
MacrosGroupbox.ClientHeight-4);
end;
end;
procedure TExternalToolOptionDlg.KeyGrabButtonClick(Sender: TObject);
begin
ActivateGrabbing(1);

View File

@ -183,6 +183,7 @@ type
fOnApplyWindowPos: TOnApplyWindowPos;
fLayout: TIDEWindowLayout;
fUpdateRadioButtons: boolean;
protected
function GetLayout: TIDEWindowLayout;
procedure SetLayout(const AValue: TIDEWindowLayout);
function GetPlacementRadioButtons(APlacement: TIDEWindowPlacement
@ -190,6 +191,7 @@ type
procedure SetPlacementRadioButtons(APlacement: TIDEWindowPlacement;
const AValue: TRadioButton);
procedure LoadFrom(AnLayout: TIDEWindowLayout);
procedure BoundsChanged; override;
public
constructor Create(TheOwner: TComponent); override;
procedure Save;
@ -591,13 +593,20 @@ end;
{ TIDEWindowSetupLayoutComponent }
procedure TIDEWindowSetupLayoutComponent.BoundsChanged;
begin
inherited BoundsChanged;
LoadFrom(fLayout);
end;
procedure TIDEWindowSetupLayoutComponent.LoadFrom(AnLayout: TIDEWindowLayout);
var
CurY: integer;
APlacement: TIDEWindowPlacement;
procedure SetLabelAndEdit(var ALabel: TLabel; var AnEdit: TEdit;
const ACaption: string; x, y: integer);
procedure SetLabelAndEdit(var ALabel: TLabel;
var AnEdit: TEdit; const ACaption: string; x, y: integer);
begin
if iwpCustomPosition in AnLayout.WindowPlacementsAllowed then begin
if ALabel=nil then ALabel:=TLabel.Create(Self);
@ -619,7 +628,7 @@ var
FreeAndNil(AnEdit);
end;
end;
const
RadioBtnCaptions: array[TIDEWindowPlacement] of string = (
'Use windowmanager setting',
@ -637,7 +646,7 @@ begin
PlacementRadioButtons[APlacement]:=TRadioButton.Create(Self);
with PlacementRadioButtons[APlacement] do begin
Parent:=Self;
SetBounds(5,CurY,Self.ClientWidth-10,Height);
SetBounds(5,CurY,Self.ClientWidth-Left,Height);
inc(CurY,Height+2);
OnClick:=@RadioButtonClick;
Caption:=RadioBtnCaptions[APlacement];

View File

@ -111,7 +111,7 @@ type
CmdLineParametersEdit: TEdit;
UseLaunchingApplicationBevel: TBevel;
UseLaunchingApplicationCheckBox: TCheckBox;
UseLaunchingApplicationEdit: TEdit;
UseLaunchingApplicationComboBox: TComboBox;
WorkingDirectoryGroupBox: TGroupBox;
WorkingDirectoryEdit: TEdit;
WorkingDirectoryBtn: TBitBtn;
@ -131,6 +131,7 @@ type
procedure CancelButtonClick(Sender: TObject);
procedure HostApplicationBrowseBtnClick(Sender: TObject);
procedure RunParamsOptsDlgResize(Sender: TObject);
procedure UserOverridesGroupBoxResize(Sender: TObject);
procedure WorkingDirectoryBtnClick(Sender: TObject);
procedure UserOverridesAddButtonClick(Sender: TObject);
procedure UserOverridesEditButtonClick(Sender: TObject);
@ -148,6 +149,7 @@ type
procedure FillUserOverridesListView;
procedure SaveToOptions;
procedure SaveUserOverrides;
procedure SetComboBoxText(AComboBox:TComboBox;AText:AnsiString);
public
constructor Create(AnOwner: TComponent); override;
property Options: TRunParamsOptions read fOptions write SetOptions;
@ -420,20 +422,28 @@ begin
Name:='UseLaunchingApplicationCheckBox';
Parent:=NoteBook.Page[0];
SetBounds(15,
CmdLineParametersGroupBox.Top+CmdLineParametersGroupBox.Height+10,250,25);
CmdLineParametersGroupBox.Top+CmdLineParametersGroupBox.Height+10,245,25);
Caption:='Use launching application';
Checked:=false;
Visible:=true;
end;
UseLaunchingApplicationEdit:=TEdit.Create(Self);
with UseLaunchingApplicationEdit do begin
Name:='UseLaunchingApplicationEdit';
UseLaunchingApplicationComboBox:=TComboBox.Create(Self);
with UseLaunchingApplicationComboBox do begin
Name:='UseLaunchingApplicationComboBox';
Parent:=NoteBook.Page[0];
SetBounds(UseLaunchingApplicationCheckBox.Left,
UseLaunchingApplicationCheckBox.Top
+UseLaunchingApplicationCheckBox.Height+2,w-15,25);
Caption:='';
with Items do begin
BeginUpdate;
Items.Add(DefaultLauncherApplication);
{$IFNDEF win32}
Items.Add('/usr/bin/gnome-terminal -t ''Lazarus Run Output'''
+' -x bash -i -c ''$(TargetCmdLine)''');
{$ENDIF}
EndUpdate;
end;
Visible:=true;
end;
@ -441,8 +451,8 @@ begin
with WorkingDirectoryGroupBox do begin
Name:='WorkingDirectoryGroupBox';
Parent:=NoteBook.Page[0];
SetBounds(5,UseLaunchingApplicationEdit.Top
+UseLaunchingApplicationEdit.Height+15,w,60);
SetBounds(5,UseLaunchingApplicationComboBox.Top
+UseLaunchingApplicationComboBox.Height+15,w,60);
Caption:='Working directory';
Visible:=true;
end;
@ -504,10 +514,6 @@ begin
with SystemVariablesListView do begin
Name:='SystemVariablesListView';
Parent:=SystemVariablesGroupBox;
Left:=5;
Top:=5;
Width:=Parent.ClientWidth-17;
Height:=Parent.ClientHeight-28;
Columns.BeginUpdate;
Columns.Clear;
Columns.Add;
@ -518,6 +524,7 @@ begin
Columns.EndUpdate;
ViewStyle := vsReport;
SortType := stText;
Align:=alClient;
Visible:=true;
end;
@ -528,6 +535,7 @@ begin
SetBounds(5,SystemVariablesGroupBox.Top+SystemVariablesGroupBox.Height+10,
w,150);
Caption:='User overrides';
OnResize:=@UserOverridesGroupBoxResize;
Visible:=true;
end;
@ -645,15 +653,15 @@ begin
CmdLineParametersGroupBox.Top+CmdLineParametersGroupBox.Height+10,250,25);
end;
with UseLaunchingApplicationEdit do begin
with UseLaunchingApplicationComboBox do begin
SetBounds(UseLaunchingApplicationCheckBox.Left,
UseLaunchingApplicationCheckBox.Top
+UseLaunchingApplicationCheckBox.Height+2,w-15,25);
end;
with WorkingDirectoryGroupBox do begin
SetBounds(5,UseLaunchingApplicationEdit.Top
+UseLaunchingApplicationEdit.Height+15,w,60);
SetBounds(5,UseLaunchingApplicationComboBox.Top
+UseLaunchingApplicationComboBox.Height+15,w,60);
end;
with WorkingDirectoryEdit do begin
@ -683,43 +691,11 @@ begin
SetBounds(5,5,w,150);
end;
with SystemVariablesListView do begin
Left:=5;
Top:=5;
Width:=Parent.ClientWidth-17;
Height:=Parent.ClientHeight-28;
end;
with UserOverridesGroupBox do begin
SetBounds(5,SystemVariablesGroupBox.Top+SystemVariablesGroupBox.Height+10,
w,150);
end;
with UserOverridesListView do begin
Left:=5;
Top:=5;
Width:=Parent.ClientWidth-17;
Height:=Parent.ClientHeight-68;
end;
with UserOverridesAddButton do begin
Left:=5;
Top:=Parent.ClientHeight-Height-28;
Width:=100;
end;
with UserOverridesEditButton do begin
Left:=UserOverridesAddButton.Left+UserOverridesAddButton.Width+10;
Top:=UserOverridesAddButton.Top;
Width:=100;
end;
with UserOverridesDeleteButton do begin
Left:=UserOverridesEditButton.Left+UserOverridesEditButton.Width+10;
Top:=UserOverridesEditButton.Top;
Width:=100;
end;
with IncludeSystemVariablesCheckBox do begin
SetBounds(5,UserOverridesGroupBox.Top+UserOverridesGroupBox.Height+10,w,25);
end;
@ -769,6 +745,34 @@ begin
end;
end;
procedure TRunParamsOptsDlg.UserOverridesGroupBoxResize(Sender: TObject);
begin
with UserOverridesAddButton do begin
Left:=5;
Top:=Parent.ClientHeight-Height-5;
Width:=100;
end;
with UserOverridesEditButton do begin
Left:=UserOverridesAddButton.Left+UserOverridesAddButton.Width+10;
Top:=UserOverridesAddButton.Top;
Width:=100;
end;
with UserOverridesDeleteButton do begin
Left:=UserOverridesEditButton.Left+UserOverridesEditButton.Width+10;
Top:=UserOverridesEditButton.Top;
Width:=100;
end;
with UserOverridesListView do begin
Left:=0;
Top:=0;
Width:=Parent.ClientWidth-2*Left;
Height:=UserOverridesAddButton.Top-Top-5;
end;
end;
procedure TRunParamsOptsDlg.WorkingDirectoryBtnClick(Sender: TObject);
var OpenDialog: TOpenDialog;
begin
@ -848,7 +852,7 @@ begin
fOptions.CmdLineParams:=Trim(CmdLineParametersEdit.Text);
fOptions.UseLaunchingApplication:=UseLaunchingApplicationCheckBox.Checked;
fOptions.LaunchingApplicationPathPlusParams:=
Trim(UseLaunchingApplicationEdit.Text);
Trim(UseLaunchingApplicationComboBox.Text);
fOptions.WorkingDirectory:=Trim(WorkingDirectoryEdit.Text);
fOptions.Display:=Trim(DisplayEdit.Text);
@ -868,6 +872,19 @@ begin
end;
end;
procedure TRunParamsOptsDlg.SetComboBoxText(AComboBox: TComboBox;
AText: AnsiString);
var a:integer;
begin
a:=AComboBox.Items.IndexOf(AText);
if a>=0 then
AComboBox.ItemIndex:=a
else begin
AComboBox.Items.Add(AText);
AComboBox.ItemIndex:=AComboBox.Items.IndexOf(AText);
end;
end;
procedure TRunParamsOptsDlg.SetOptions(NewOptions: TRunParamsOptions);
begin
fOptions:=NewOptions;
@ -876,7 +893,8 @@ begin
HostApplicationEdit.Text:=fOptions.HostApplicationFilename;
CmdLineParametersEdit.Text:=fOptions.CmdLineParams;
UseLaunchingApplicationCheckBox.Checked:=fOptions.UseLaunchingApplication;
UseLaunchingApplicationEdit.Text:=fOptions.LaunchingApplicationPathPlusParams;
SetComboBoxText(UseLaunchingApplicationComboBox,
fOptions.LaunchingApplicationPathPlusParams);
WorkingDirectoryEdit.Text:=fOptions.WorkingDirectory;
DisplayEdit.Text:=fOptions.Display;

View File

@ -34,7 +34,7 @@ unit ComCtrls;
{$mode objfpc}
{$H+}
{ $DEFINE ClientRectBugFix}
{$DEFINE ClientRectBugFix}
interface
@ -1559,6 +1559,9 @@ end.
{ =============================================================================
$Log$
Revision 1.35 2002/05/20 14:19:03 lazarus
MG: activated the clientrect bugfixes
Revision 1.34 2002/05/10 06:05:48 lazarus
MG: changed license to LGPL

View File

@ -36,6 +36,7 @@ the Delphi Windows unit. This is only done for compatibiltiy.
}
unit LCLLinux;
{$mode objfpc}{$H+}
interface
@ -45,6 +46,7 @@ uses Classes, LCLType, VCLGlobals, GraphType;
{$ifdef Trace}
{$ASSERTIONS ON}
{$endif}
{$DEFINE ClientRectBugFix}
// All winapi related stuff
{$I winapih.inc}
@ -73,6 +75,9 @@ end.
{
$Log$
Revision 1.18 2002/05/20 14:19:03 lazarus
MG: activated the clientrect bugfixes
Revision 1.17 2002/05/10 06:05:50 lazarus
MG: changed license to LGPL

View File

@ -35,7 +35,7 @@ unit StdCtrls;
interface
{ $DEFINE ClientRectBugFix}
{$DEFINE ClientRectBugFix}
uses
VCLGlobals, Classes, SysUtils, Graphics, GraphType, LMessages, Controls,
@ -593,6 +593,9 @@ end.
{ =============================================================================
$Log$
Revision 1.30 2002/05/20 14:19:03 lazarus
MG: activated the clientrect bugfixes
Revision 1.29 2002/05/13 14:47:00 lazarus
MG: fixed client rectangles, TRadioGroup, RecreateWnd