ideintf, ide: add TAbstractOptionsEditorDialog.AddButton method

git-svn-id: trunk@23351 -
This commit is contained in:
paul 2010-01-03 06:31:55 +00:00
parent 90eed3dc98
commit 3653d72aa7
2 changed files with 11 additions and 2 deletions

View File

@ -31,7 +31,7 @@ interface
uses
Classes, SysUtils, Controls, Forms, LResources, ComCtrls, LCLProc, LCLType,
ButtonPanel,
Buttons, ButtonPanel,
EnvironmentOpts, LazarusIDEStrConsts, IDEWindowIntf, IDEOptionsIntf,
EditorOptions, IDECommands;
@ -67,6 +67,7 @@ type
constructor Create(AOwner: TComponent); override;
function ShowModal: Integer; override;
function AddButton: TBitBtn; override;
procedure OpenEditor(AEditor: TAbstractIDEOptionsEditorClass); override;
function FindEditor(AEditor: TAbstractIDEOptionsEditorClass): TAbstractIDEOptionsEditor; override;
procedure ReadSettings(AOptions: TAbstractIDEOptions);
@ -447,6 +448,13 @@ begin
Result := inherited ShowModal;
end;
function TIDEOptionsDialog.AddButton: TBitBtn;
begin
Result := TBitBtn.Create(Self);
Result.Align := alCustom;
Result.Parent := ButtonPanel;
end;
procedure TIDEOptionsDialog.OpenEditor(AEditor: TAbstractIDEOptionsEditorClass);
begin
FEditorToOpen := AEditor;

View File

@ -25,7 +25,7 @@ unit IDEOptionsIntf;
interface
uses
Classes, SysUtils, Forms;
Classes, SysUtils, Buttons, Forms;
const
NoParent = -1;
@ -137,6 +137,7 @@ type
TAbstractOptionsEditorDialog = class(TForm)
public
function AddButton: TBitBtn; virtual; abstract;
procedure OpenEditor(AEditor: TAbstractIDEOptionsEditorClass); virtual; abstract;
function FindEditor(AEditor: TAbstractIDEOptionsEditorClass): TAbstractIDEOptionsEditor; virtual; abstract;
end;