
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9607 8e941d3f-bd1b-0410-a28a-d453659cc2b4
57 lines
1007 B
ObjectPascal
57 lines
1007 B
ObjectPascal
unit Main;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
|
mvMapViewer, mvPluginCommon, uDragColoredItemPlugin;
|
|
|
|
type
|
|
|
|
{ TForm1 }
|
|
|
|
TForm1 = class(TForm)
|
|
MapView1: TMapView;
|
|
MvPluginManager1: TMvPluginManager;
|
|
Panel1: TPanel;
|
|
procedure FormCreate(Sender: TObject);
|
|
private
|
|
|
|
public
|
|
|
|
end;
|
|
|
|
var
|
|
Form1: TForm1;
|
|
|
|
implementation
|
|
|
|
{$R *.lfm}
|
|
|
|
{ TForm1 }
|
|
const
|
|
PluginColors : array[0..8] of TColor = (
|
|
clFuchsia, clRed, $ff8c00, clYellow, clLime, clGreen, clNavy, clBlue, clAqua
|
|
);
|
|
|
|
procedure TForm1.FormCreate(Sender: TObject);
|
|
var
|
|
lDragColoredItemPlugin : TDragColoredItemPlugin;
|
|
i: Integer;
|
|
begin
|
|
MapView1.Active := true;
|
|
|
|
for i := 0 to High(PluginColors) do
|
|
begin
|
|
lDragColoredItemPlugin := TDragColoredItemPlugin.Create(Self);
|
|
lDragColoredItemPlugin.Color := PluginColors[i];
|
|
lDragColoredItemPlugin.MapView := MapView1;
|
|
MvPluginManager1.AddPlugin(lDragColoredItemPlugin);
|
|
end;
|
|
end;
|
|
|
|
end.
|
|
|