unit DockableFormUnit;
interface
uses
System.IniFiles, System.Classes,
Vcl.ActnList,
Vcl.ComCtrls,
Vcl.Forms,
Vcl.ImgList,
Vcl.Menus,
ToolsAPI, DesignIntf, DockForm;
type
TMyDockableForm =
class(TInterfacedPersistent, INTACustomDockableForm)
private
class var
FInstance: TMyDockableForm;
protected
procedure CustomizePopupMenu(PopupMenu: TPopupMenu);
procedure CustomizeToolBar(ToolBar: TToolBar);
function EditAction(Action: TEditAction): Boolean;
procedure FrameCreated(AFrame: TCustomFrame);
function GetCaption:
string;
function GetEditState: TEditState;
function GetFrameClass: TCustomFrameClass;
function GetIdentifier:
string;
function GetMenuActionList: TCustomActionList;
function GetMenuImageList: TCustomImageList;
function GetToolBarActionList: TCustomActionList;
function GetToolBarImageList: TCustomImageList;
procedure LoadWindowState(Desktop: TCustomIniFile;
const Section:
string);
procedure SaveWindowState(Desktop: TCustomIniFile;
const Section:
string; IsProject: Boolean);
public
class procedure CreateInstance;
class procedure DestroyInstance;
class function CreateDockableForm: TDockableForm;
end;
implementation
class procedure TMyDockableForm.CreateInstance;
begin
FInstance := TMyDockableForm.Create;
(BorlandIDEServices
as INTAServices).RegisterDockableForm(FInstance);
end;
class procedure TMyDockableForm.DestroyInstance;
begin
(BorlandIDEServices
as INTAServices).UnregisterDockableForm(FInstance);
FInstance.Free;
end;
class function TMyDockableForm.CreateDockableForm: TDockableForm;
begin
Result := (BorlandIDEServices
as INTAServices).CreateDockableForm(FInstance)
as TDockableForm;
end;
procedure TMyDockableForm.CustomizePopupMenu(PopupMenu: TPopupMenu);
begin
end;
procedure TMyDockableForm.CustomizeToolBar(ToolBar: TToolBar);
begin
end;
function TMyDockableForm.EditAction(Action: TEditAction): Boolean;
begin
Result := False;
end;
procedure TMyDockableForm.FrameCreated(AFrame: TCustomFrame);
begin
end;
function TMyDockableForm.GetCaption:
string;
begin
Result := '
My Dockable Form';
end;
function TMyDockableForm.GetEditState: TEditState;
begin
Result := [];
end;
function TMyDockableForm.GetFrameClass: TCustomFrameClass;
begin
Result := TFrame;
end;
function TMyDockableForm.GetIdentifier:
string;
begin
Result := '
MyDockableForm';
end;
function TMyDockableForm.GetMenuActionList: TCustomActionList;
begin
Result :=
nil;
end;
function TMyDockableForm.GetMenuImageList: TCustomImageList;
begin
Result :=
nil;
end;
function TMyDockableForm.GetToolBarActionList: TCustomActionList;
begin
Result :=
nil;
end;
function TMyDockableForm.GetToolBarImageList: TCustomImageList;
begin
Result :=
nil;
end;
procedure TMyDockableForm.LoadWindowState(Desktop: TCustomIniFile;
const Section:
string);
begin
end;
procedure TMyDockableForm.SaveWindowState(Desktop: TCustomIniFile;
const Section:
string; IsProject: Boolean);
begin
end;
end.