summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/gui/drag_n_drop/dndexample.lpr2
-rw-r--r--src/corelib/fpg_base.pas2
-rw-r--r--src/corelib/gdi/fpg_gdi.pas4
-rw-r--r--src/corelib/x11/fpg_x11.pas6
-rw-r--r--src/gui/fpg_form.pas16
5 files changed, 16 insertions, 14 deletions
diff --git a/examples/gui/drag_n_drop/dndexample.lpr b/examples/gui/drag_n_drop/dndexample.lpr
index 706cfd42..ace8d2ea 100644
--- a/examples/gui/drag_n_drop/dndexample.lpr
+++ b/examples/gui/drag_n_drop/dndexample.lpr
@@ -154,7 +154,7 @@ begin
SetPosition(316, 186, 512, 429);
WindowTitle := 'Drop Site Demo';
Hint := '';
- EnableDrops := True;
+ DNDEnabled := True;
Bevel1 := TfpgPanel.Create(self);
with Bevel1 do
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index c08bea71..143238cf 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -445,7 +445,7 @@ type
function DoWindowToScreen(ASource: TfpgWindowBase; const AScreenPos: TPoint): TPoint; virtual; abstract;
procedure DoSetWindowTitle(const ATitle: string); virtual; abstract;
procedure DoSetMouseCursor; virtual; abstract;
- procedure DoEnableDrops(const AValue: boolean); virtual; abstract;
+ procedure DoDNDEnabled(const AValue: boolean); virtual; abstract;
procedure SetParent(const AValue: TfpgWindowBase); virtual;
function GetParent: TfpgWindowBase; virtual;
function GetCanvas: TfpgCanvasBase; virtual;
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index ef5251f7..db549a2c 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -167,7 +167,7 @@ type
//procedure MoveToScreenCenter; override;
procedure DoSetWindowTitle(const ATitle: string); override;
procedure DoSetMouseCursor; override;
- procedure DoEnableDrops(const AValue: boolean); override;
+ procedure DoDNDEnabled(const AValue: boolean); override;
property WinHandle: TfpgWinHandle read FWinHandle;
public
constructor Create(AOwner: TComponent); override;
@@ -1635,7 +1635,7 @@ begin
SetCursor(hc);
end;
-procedure TfpgGDIWindow.DoEnableDrops(const AValue: boolean);
+procedure TfpgGDIWindow.DoDNDEnabled(const AValue: boolean);
begin
// TODO: still needs to be implemented
end;
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index 9338fddf..9d689f4a 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -230,7 +230,7 @@ type
function DoWindowToScreen(ASource: TfpgWindowBase; const AScreenPos: TPoint): TPoint; override;
procedure DoUpdateWindowPosition; override;
procedure DoSetMouseCursor; override;
- procedure DoEnableDrops(const AValue: boolean); override;
+ procedure DoDNDEnabled(const AValue: boolean); override;
property WinHandle: TfpgWinHandle read FWinHandle;
public
constructor Create(AOwner: TComponent); override;
@@ -2130,7 +2130,7 @@ begin
if QueueEnabledDrops then
begin
writeln('QueueEnableDrop....');
- DoEnableDrops(True);
+ DoDNDEnabled(True);
end;
end;
@@ -2364,7 +2364,7 @@ begin
FMouseCursorIsDirty := False;
end;
-procedure TfpgX11Window.DoEnableDrops(const AValue: boolean);
+procedure TfpgX11Window.DoDNDEnabled(const AValue: boolean);
begin
// notify XDND protocol that we can handle DND
if AValue then
diff --git a/src/gui/fpg_form.pas b/src/gui/fpg_form.pas
index f465e09e..2eb6e899 100644
--- a/src/gui/fpg_form.pas
+++ b/src/gui/fpg_form.pas
@@ -51,8 +51,8 @@ type
FOnHide: TNotifyEvent;
FOnShow: TNotifyEvent;
FOnHelp: TfpgHelpEvent;
- FEnableDrops: boolean;
- procedure SetEnableDrops(const AValue: boolean);
+ FDNDEnabled: boolean;
+ procedure SetDNDEnabled(const AValue: boolean);
protected
FModalResult: TfpgModalResult;
FParentForm: TfpgBaseForm;
@@ -73,6 +73,7 @@ type
procedure DoOnClose(var CloseAction: TCloseAction); virtual;
function DoOnHelp(AHelpType: THelpType; AHelpContext: THelpContext; const AHelpKeyword: String; const AHelpFile: String; var AHandled: Boolean): Boolean; virtual;
// properties
+ property DNDEnabled: boolean read FDNDEnabled write SetDNDEnabled default False;
property Sizeable: boolean read FSizeable write FSizeable;
property ModalResult: TfpgModalResult read FModalResult write FModalResult;
property FullScreen: boolean read FFullScreen write FFullScreen default False;
@@ -102,13 +103,13 @@ type
function ShowModal: TfpgModalResult;
procedure Close;
function CloseQuery: boolean; virtual;
- property EnableDrops: boolean read FEnableDrops write SetEnableDrops;
end;
TfpgForm = class(TfpgBaseForm)
published
property BackgroundColor;
+ property DNDEnabled;
property FullScreen;
property Height;
property Hint;
@@ -188,11 +189,11 @@ end;
{ TfpgBaseForm }
-procedure TfpgBaseForm.SetEnableDrops(const AValue: boolean);
+procedure TfpgBaseForm.SetDNDEnabled(const AValue: boolean);
begin
- if FEnableDrops = AValue then exit;
- FEnableDrops := AValue;
- DoEnableDrops(AValue);
+ if FDNDEnabled = AValue then exit;
+ FDNDEnabled := AValue;
+ DoDNDEnabled(AValue);
end;
procedure TfpgBaseForm.SetWindowTitle(const ATitle: string);
@@ -295,6 +296,7 @@ begin
FModalResult := mrNone;
FFullScreen := False;
FIsContainer := True;
+ FDNDEnabled := False;
end;
destructor TfpgBaseForm.Destroy;