summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-21 16:37:07 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-28 10:57:21 +0200
commitd0c9a38672f9eeb25c57a6a0a10a72266ce9b033 (patch)
tree7d27efeca51d8fd2c30f3e215284a7d0edb4ab03
parent14b833869c02a78c83abeb23ddac3cde95f67df0 (diff)
downloadfpGUI-d0c9a38672f9eeb25c57a6a0a10a72266ce9b033.tar.xz
GDI: implemented a helper function for DropAction conversion
-rw-r--r--src/corelib/gdi/fpg_gdi.pas14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 356c7cb1..68284f42 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -526,6 +526,20 @@ begin
Result := Result or DROPEFFECT_MOVE;
end;
+function TranslateToWinDragEffect(const AAction: TfpgDropAction): DWORD;
+begin
+ if AAction = daIgnore then
+ Result := DROPEFFECT_NONE
+ else if daLink = AAction then
+ Result := DROPEFFECT_LINK
+ else if daCopy = AAction then
+ Result := DROPEFFECT_COPY
+ else if daMove = AAction then
+ Result := DROPEFFECT_MOVE
+ else
+ Result := DROPEFFECT_NONE; { fallback, but should never be reached }
+end;
+
{$IFDEF wince}
procedure WinCESetDibBits(BMP: HBITMAP; awidth, aheight: Integer; aimgdata: Pointer; var bi: TBitmapInfo);