2004-09-02 10:36:24 +00:00
|
|
|
{
|
|
|
|
:: Contains the dialog presented for the Container's Graphics property
|
|
|
|
::
|
|
|
|
:: Last changed: $Date$
|
|
|
|
:: Revision: $Rev$
|
|
|
|
:: Author: $Author$
|
|
|
|
}
|
|
|
|
unit X2CLGraphicsEditor;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
|
|
|
ActnList,
|
|
|
|
Classes,
|
|
|
|
ComCtrls,
|
|
|
|
Controls,
|
2007-01-04 19:47:47 +00:00
|
|
|
DesignIntf,
|
2004-09-02 10:36:24 +00:00
|
|
|
Dialogs,
|
|
|
|
ExtCtrls,
|
|
|
|
ExtDlgs,
|
|
|
|
Forms,
|
|
|
|
ImgList,
|
|
|
|
StdCtrls,
|
|
|
|
ToolWin,
|
|
|
|
|
|
|
|
X2CLGraphicList;
|
|
|
|
|
|
|
|
type
|
2007-01-31 09:41:11 +00:00
|
|
|
TGraphicsEditorForm = class(TForm)
|
2004-09-02 10:36:24 +00:00
|
|
|
actAdd: TAction;
|
|
|
|
actClear: TAction;
|
|
|
|
actDelete: TAction;
|
|
|
|
actDown: TAction;
|
|
|
|
actOpen: TAction;
|
|
|
|
actSave: TAction;
|
|
|
|
actUp: TAction;
|
|
|
|
alGraphics: TActionList;
|
|
|
|
dlgOpen: TOpenPictureDialog;
|
|
|
|
dlgSave: TSavePictureDialog;
|
|
|
|
ilsIcons: TImageList;
|
|
|
|
imgPreview: TImage;
|
|
|
|
lblName: TLabel;
|
|
|
|
lstGraphics: TListBox;
|
|
|
|
pnlGraphics: TPanel;
|
|
|
|
pnlImage: TPanel;
|
|
|
|
pnlProperties: TPanel;
|
|
|
|
sbImage: TScrollBox;
|
|
|
|
spltGraphics: TSplitter;
|
|
|
|
tbClear: TToolButton;
|
|
|
|
tbDelete: TToolButton;
|
|
|
|
tbDown: TToolButton;
|
|
|
|
tbGraphics: TToolBar;
|
|
|
|
tbImage: TToolBar;
|
|
|
|
tbNew: TToolButton;
|
|
|
|
tbOpen: TToolButton;
|
|
|
|
tbSave: TToolButton;
|
|
|
|
tbSep1: TToolButton;
|
|
|
|
tbUp: TToolButton;
|
|
|
|
txtName: TEdit;
|
|
|
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
procedure lstGraphicsClick(Sender: TObject);
|
|
|
|
procedure txtNameChange(Sender: TObject);
|
|
|
|
procedure actAddExecute(Sender: TObject);
|
|
|
|
procedure actDeleteExecute(Sender: TObject);
|
|
|
|
procedure actUpExecute(Sender: TObject);
|
|
|
|
procedure actDownExecute(Sender: TObject);
|
|
|
|
procedure actOpenExecute(Sender: TObject);
|
|
|
|
procedure actSaveExecute(Sender: TObject);
|
|
|
|
procedure actClearExecute(Sender: TObject);
|
|
|
|
private
|
2007-01-31 09:41:11 +00:00
|
|
|
FComponent: TX2GraphicContainer;
|
|
|
|
FComponentDesigner: IDesigner;
|
|
|
|
FUpdating: Boolean;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-01-04 19:47:47 +00:00
|
|
|
procedure InternalExecute(const AComponent: TComponent; const ADesigner: IDesigner);
|
2007-04-02 14:45:31 +00:00
|
|
|
|
|
|
|
procedure LoadGraphic(AIndex: Integer; AGraphic: TX2GraphicContainerItem; const AFileName: string);
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure ItemChanged(AUpdatePreview: Boolean = True);
|
|
|
|
procedure UpdateUI();
|
2004-09-02 10:36:24 +00:00
|
|
|
procedure UpdatePreview();
|
|
|
|
|
2007-01-04 19:47:47 +00:00
|
|
|
function Active(out AIndex: Integer; out AGraphic: TX2GraphicContainerItem): Boolean;
|
|
|
|
protected
|
|
|
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
2004-09-02 10:36:24 +00:00
|
|
|
public
|
2007-01-04 19:47:47 +00:00
|
|
|
class procedure Execute(const AComponent: TComponent; const ADesigner: IDesigner);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
uses
|
|
|
|
Graphics,
|
|
|
|
SysUtils;
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
EditorInstance: TGraphicsEditorForm;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
{ TGraphicsEditorForm }
|
|
|
|
class procedure TGraphicsEditorForm.Execute(const AComponent: TComponent; const ADesigner: IDesigner);
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if not Assigned(EditorInstance) then
|
|
|
|
EditorInstance := TGraphicsEditorForm.Create(Application);
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
EditorInstance.InternalExecute(AComponent, ADesigner);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.InternalExecute(const AComponent: TComponent; const ADesigner: IDesigner);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
graphicIndex: Integer;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-04 19:47:47 +00:00
|
|
|
FComponent := TX2GraphicContainer(AComponent);
|
|
|
|
FComponent.FreeNotification(Self);
|
2007-01-31 09:41:11 +00:00
|
|
|
|
2007-01-04 19:47:47 +00:00
|
|
|
FComponentDesigner := ADesigner;
|
|
|
|
Caption := Format('%s Graphics', [FComponent.Name]);
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
// Fill graphics list
|
|
|
|
with lstGraphics.Items do
|
|
|
|
begin
|
|
|
|
BeginUpdate();
|
|
|
|
try
|
|
|
|
Clear();
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
for graphicIndex := 0 to FComponent.GraphicCount - 1 do
|
|
|
|
AddObject(FComponent.Graphics[graphicIndex].PictureName,
|
|
|
|
FComponent.Graphics[graphicIndex]);
|
2004-09-02 10:36:24 +00:00
|
|
|
finally
|
|
|
|
EndUpdate();
|
|
|
|
end;
|
|
|
|
|
|
|
|
lstGraphics.ItemIndex := 0;
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
UpdateUI();
|
|
|
|
UpdatePreview();
|
2004-09-02 10:36:24 +00:00
|
|
|
Show();
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.FormClose(Sender: TObject; var Action: TCloseAction);
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
|
|
|
Action := caFree;
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
if Self = EditorInstance then
|
|
|
|
EditorInstance := nil;
|
2007-01-04 19:47:47 +00:00
|
|
|
|
|
|
|
if Assigned(FComponent) then
|
|
|
|
FComponent.RemoveFreeNotification(Self);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
2007-04-02 14:45:31 +00:00
|
|
|
procedure TGraphicsEditorForm.LoadGraphic(AIndex: Integer; AGraphic: TX2GraphicContainerItem; const AFileName: string);
|
|
|
|
begin
|
|
|
|
AGraphic.Picture.LoadFromFile(AFileName);
|
|
|
|
if Length(AGraphic.PictureName) = 0 then
|
|
|
|
begin
|
|
|
|
AGraphic.PictureName := ChangeFileExt(ExtractFileName(AFileName), '');
|
|
|
|
lstGraphics.Items[AIndex] := AGraphic.PictureName;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.ItemChanged(AUpdatePreview: Boolean);
|
|
|
|
begin
|
|
|
|
if Assigned(FComponentDesigner) then
|
|
|
|
FComponentDesigner.Modified();
|
|
|
|
|
|
|
|
UpdateUI();
|
|
|
|
|
|
|
|
if AUpdatePreview then
|
|
|
|
UpdatePreview();
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.UpdateUI();
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
enabled: Boolean;
|
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
enabled := Active(index, graphic);
|
|
|
|
actDelete.Enabled := enabled;
|
|
|
|
actOpen.Enabled := enabled;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
if enabled then
|
|
|
|
enabled := Assigned(graphic.Picture.Graphic)
|
2004-09-02 10:36:24 +00:00
|
|
|
else
|
2007-01-31 09:41:11 +00:00
|
|
|
enabled := False;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
actSave.Enabled := enabled;
|
|
|
|
actClear.Enabled := enabled;
|
|
|
|
|
|
|
|
actUp.Enabled := enabled and (index > 0);
|
|
|
|
actDown.Enabled := enabled and (index < Pred(lstGraphics.Items.Count));
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.UpdatePreview();
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
FUpdating := True;
|
|
|
|
try
|
|
|
|
if Active(index, graphic) then
|
|
|
|
begin
|
|
|
|
imgPreview.Picture.Assign(graphic.Picture);
|
2007-04-02 14:45:31 +00:00
|
|
|
txtName.Text := graphic.PictureName;
|
|
|
|
lstGraphics.Items[index] := graphic.PictureName;
|
|
|
|
end else
|
|
|
|
begin
|
|
|
|
imgPreview.Picture.Assign(nil);
|
|
|
|
txtName.Text := '';
|
2007-01-31 09:41:11 +00:00
|
|
|
end;
|
|
|
|
finally
|
|
|
|
FUpdating := False;
|
|
|
|
end;
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
function TGraphicsEditorForm.Active(out AIndex: Integer; out AGraphic: TX2GraphicContainerItem): Boolean;
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
|
|
|
Result := False;
|
|
|
|
AIndex := lstGraphics.ItemIndex;
|
|
|
|
if AIndex = -1 then
|
|
|
|
exit;
|
|
|
|
|
2007-01-04 19:47:47 +00:00
|
|
|
AGraphic := TX2GraphicContainerItem(lstGraphics.Items.Objects[AIndex]);
|
2004-09-02 10:36:24 +00:00
|
|
|
Result := Assigned(AGraphic);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.lstGraphicsClick(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
UpdateUI();
|
2004-09-02 10:36:24 +00:00
|
|
|
UpdatePreview();
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.txtNameChange(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if FUpdating then
|
|
|
|
Exit;
|
|
|
|
|
|
|
|
if Active(index, graphic) then
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
graphic.PictureName := txtName.Text;
|
|
|
|
lstGraphics.Items[index] := graphic.PictureName;
|
|
|
|
|
|
|
|
ItemChanged(False);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.actAddExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2007-04-02 14:45:31 +00:00
|
|
|
fileIndex: Integer;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-04 19:47:47 +00:00
|
|
|
if Assigned(FComponentDesigner) then
|
|
|
|
begin
|
2007-04-02 14:45:31 +00:00
|
|
|
dlgOpen.Filter := GraphicFilter(TGraphic);
|
|
|
|
dlgOpen.Options := dlgOpen.Options + [ofAllowMultiSelect];
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-04-02 14:45:31 +00:00
|
|
|
if dlgOpen.Execute() then
|
2007-01-04 19:47:47 +00:00
|
|
|
begin
|
2007-04-02 14:45:31 +00:00
|
|
|
for fileIndex := 0 to Pred(dlgOpen.Files.Count) do
|
|
|
|
begin
|
|
|
|
graphic := TX2GraphicContainerItem(FComponentDesigner.CreateComponent(TX2GraphicContainerItem, nil, 0, 0, 0, 0));
|
|
|
|
|
|
|
|
if Assigned(graphic) then
|
|
|
|
begin
|
|
|
|
graphic.Container := FComponent;
|
|
|
|
index := lstGraphics.Items.AddObject('', graphic);
|
|
|
|
lstGraphics.ItemIndex := index;
|
|
|
|
|
|
|
|
LoadGraphic(index, graphic, dlgOpen.Files[fileIndex]);
|
|
|
|
end else
|
|
|
|
raise Exception.Create('Failed to create TX2GraphicContainerItem!');
|
|
|
|
end;
|
2007-01-04 19:47:47 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
ItemChanged();
|
2007-04-02 14:45:31 +00:00
|
|
|
end;
|
2007-01-04 19:47:47 +00:00
|
|
|
end else
|
|
|
|
raise Exception.Create('Designer not found!');
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.actDeleteExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if Active(index, graphic) then
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-04 19:47:47 +00:00
|
|
|
{ First attempt to remove the component; this will raise an exception
|
|
|
|
if it's not allowed, for example due to it being introduced in
|
|
|
|
an ancestor. }
|
2007-01-31 09:41:11 +00:00
|
|
|
graphic.Free();
|
|
|
|
lstGraphics.Items.Delete(index);
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
if index > Pred(lstGraphics.Items.Count) then
|
|
|
|
index := Pred(lstGraphics.Items.Count);
|
2004-09-02 10:36:24 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
lstGraphics.ItemIndex := index;
|
|
|
|
|
|
|
|
ItemChanged();
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.actUpExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if Active(index, graphic) then
|
|
|
|
if index > 0 then
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
lstGraphics.Items.Move(index, Pred(index));
|
|
|
|
graphic.Index := Pred(index);
|
|
|
|
lstGraphics.ItemIndex := Pred(index);
|
|
|
|
|
|
|
|
ItemChanged(False);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
|
|
|
|
procedure TGraphicsEditorForm.actDownExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if Active(index, graphic) then
|
|
|
|
if index < Pred(lstGraphics.Items.Count) then
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
lstGraphics.Items.Move(index, index + 1);
|
|
|
|
graphic.Index := Succ(index);
|
|
|
|
lstGraphics.ItemIndex := Succ(index);
|
|
|
|
|
|
|
|
ItemChanged(False);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.actOpenExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if Active(index, graphic) then
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
|
|
|
dlgOpen.Filter := GraphicFilter(TGraphic);
|
2007-04-02 14:45:31 +00:00
|
|
|
dlgOpen.Options := dlgOpen.Options - [ofAllowMultiSelect];
|
|
|
|
|
2004-09-02 10:36:24 +00:00
|
|
|
if dlgOpen.Execute() then
|
|
|
|
begin
|
2007-04-02 14:45:31 +00:00
|
|
|
LoadGraphic(index, graphic, dlgOpen.FileName);
|
2007-01-31 09:41:11 +00:00
|
|
|
ItemChanged();
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.actSaveExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
|
|
|
graphicClass: TGraphicClass;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if Active(index, graphic) then
|
|
|
|
if Assigned(graphic.Picture.Graphic) then begin
|
|
|
|
graphicClass := TGraphicClass(graphic.Picture.Graphic.ClassType);
|
|
|
|
dlgSave.Filter := GraphicFilter(graphicClass);
|
|
|
|
dlgSave.FileName := ChangeFileExt(graphic.PictureName, '.' + GraphicExtension(graphicClass));
|
|
|
|
|
2004-09-02 10:36:24 +00:00
|
|
|
if dlgSave.Execute() then
|
2007-01-31 09:41:11 +00:00
|
|
|
graphic.Picture.SaveToFile(dlgSave.FileName);
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.actClearExecute(Sender: TObject);
|
2004-09-02 10:36:24 +00:00
|
|
|
var
|
2007-01-31 09:41:11 +00:00
|
|
|
index: Integer;
|
|
|
|
graphic: TX2GraphicContainerItem;
|
2004-09-02 10:36:24 +00:00
|
|
|
|
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
if Active(index, graphic) then
|
2004-09-02 10:36:24 +00:00
|
|
|
begin
|
2007-01-31 09:41:11 +00:00
|
|
|
graphic.Picture.Assign(nil);
|
|
|
|
ItemChanged();
|
2004-09-02 10:36:24 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2007-01-04 19:47:47 +00:00
|
|
|
|
2007-01-31 09:41:11 +00:00
|
|
|
procedure TGraphicsEditorForm.Notification(AComponent: TComponent; Operation: TOperation);
|
2007-01-04 19:47:47 +00:00
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
if (Operation = opRemove) and (AComponent = FComponent) then
|
|
|
|
begin
|
|
|
|
FComponent := nil;
|
|
|
|
Close();
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2004-09-02 10:36:24 +00:00
|
|
|
end.
|