mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 12:39:39 +02:00
MG: broke graphics.pp <-> clipbrd.pp circle
git-svn-id: trunk@3549 -
This commit is contained in:
parent
dbe9e4a855
commit
d8abfdaf6a
@ -135,61 +135,6 @@ type
|
||||
FormatID: TClipboardFormat;
|
||||
Stream: TMemoryStream;
|
||||
end;
|
||||
|
||||
type
|
||||
TPredefinedClipboardFormat = (
|
||||
pcfText,
|
||||
pcfBitmap,
|
||||
pcfPixmap,
|
||||
pcfIcon,
|
||||
pcfPicture,
|
||||
pcfObject,
|
||||
pcfComponent,
|
||||
pcfCustomData,
|
||||
|
||||
// Delphi definitions (only for compatibility)
|
||||
pcfDelphiText,
|
||||
pcfDelphiBitmap,
|
||||
pcfDelphiPicture,
|
||||
pcfDelphiMetaFilePict,
|
||||
pcfDelphiObject,
|
||||
pcfDelphiComponent,
|
||||
|
||||
// Kylix definitions (only for compatibility)
|
||||
pcfKylixPicture,
|
||||
pcfKylixBitmap,
|
||||
pcfKylixDrawing,
|
||||
pcfKylixComponent
|
||||
);
|
||||
|
||||
const
|
||||
PredefinedClipboardMimeTypes : array[TPredefinedClipboardFormat] of string = (
|
||||
'text/plain',
|
||||
'image/lcl.bitmap',
|
||||
'image/lcl.pixmap',
|
||||
'image/lcl.icon',
|
||||
'image/lcl.picture',
|
||||
'application/lcl.object',
|
||||
'application/lcl.component',
|
||||
'application/lcl.customdata',
|
||||
|
||||
// Delphi definitions (only for compatibility)
|
||||
'text/plain',
|
||||
'image/delphi.bitmap',
|
||||
'Delphi Picture',
|
||||
'image/delphi.metafilepict',
|
||||
'application/delphi.object',
|
||||
'Delphi Component',
|
||||
|
||||
// Kylix definitons (only for compatibility)
|
||||
'image/delphi.picture',
|
||||
'image/delphi.bitmap',
|
||||
'image/delphi.drawing',
|
||||
'application/delphi.component'
|
||||
);
|
||||
|
||||
function PredefinedClipboardFormat(
|
||||
AFormat: TPredefinedClipboardFormat): TClipboardFormat;
|
||||
|
||||
|
||||
{ for delphi compatibility:
|
||||
@ -291,8 +236,6 @@ implementation
|
||||
|
||||
var
|
||||
FClipboards: array[TClipboardType] of TClipboard;
|
||||
FPredefinedClipboardFormats:
|
||||
array[TPredefinedClipboardFormat] of TClipboardFormat;
|
||||
|
||||
|
||||
{$I clipbrd.inc}
|
||||
@ -341,15 +284,6 @@ begin
|
||||
Result := FClipboards[ClipboardType];
|
||||
end;
|
||||
|
||||
function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat
|
||||
): TClipboardFormat;
|
||||
begin
|
||||
if FPredefinedClipboardFormats[AFormat]=0 then
|
||||
FPredefinedClipboardFormats[AFormat]:=
|
||||
ClipboardRegisterFormat(PredefinedClipboardMimeTypes[AFormat]);
|
||||
Result:=FPredefinedClipboardFormats[AFormat];
|
||||
end;
|
||||
|
||||
function CF_Text: TClipboardFormat;
|
||||
begin
|
||||
Result:=PredefinedClipboardFormat(pcfDelphiText);
|
||||
@ -392,13 +326,9 @@ end;
|
||||
procedure InternalInit;
|
||||
var
|
||||
AClipboardType: TClipboardType;
|
||||
AClipboardFormat: TPredefinedClipboardFormat;
|
||||
begin
|
||||
for AClipboardType:=Low(TClipboardType) to High(TClipboardType) do
|
||||
FClipboards[AClipboardType]:=nil;
|
||||
for AClipboardFormat:=Low(TPredefinedClipboardFormat) to
|
||||
High(TPredefinedClipboardFormat) do
|
||||
FPredefinedClipboardFormats[AClipboardFormat]:=0;
|
||||
end;
|
||||
|
||||
procedure InternalFinal;
|
||||
@ -416,6 +346,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2002/10/24 10:05:50 lazarus
|
||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||
|
||||
Revision 1.9 2002/05/10 06:05:48 lazarus
|
||||
MG: changed license to LGPL
|
||||
|
||||
|
@ -36,7 +36,8 @@ unit Dialogs;
|
||||
|
||||
interface
|
||||
|
||||
uses Classes, Forms, Controls, VCLGlobals, LMessages, GraphType, Graphics;
|
||||
uses
|
||||
Classes, Forms, Controls, VCLGlobals, LMessages, GraphType, Graphics;
|
||||
|
||||
//type
|
||||
// TDialogButtons = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry,
|
||||
@ -294,6 +295,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.21 2002/10/24 10:05:51 lazarus
|
||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||
|
||||
Revision 1.20 2002/10/11 16:00:39 lazarus
|
||||
AJ: made InputQuery Interface Dependant
|
||||
|
||||
|
@ -447,7 +447,7 @@ begin
|
||||
try
|
||||
for f:=Low(TPredefinedClipboardFormat) to High(TPredefinedClipboardFormat) do
|
||||
begin
|
||||
Result:=FPredefinedClipboardFormats[f];
|
||||
Result:=PredefinedClipboardFormat(f);
|
||||
if (f in PicFormats) and (Result<>0) then begin
|
||||
if not FAllocated then begin
|
||||
for i:=0 to cnt-1 do
|
||||
@ -488,8 +488,8 @@ begin
|
||||
end;
|
||||
if not Result then begin
|
||||
Result:=
|
||||
((FPredefinedClipboardFormats[pcfPicture]=FormatID)
|
||||
or (FPredefinedClipboardFormats[pcfDelphiPicture]=FormatID))
|
||||
((PredefinedClipboardFormat(pcfPicture)=FormatID)
|
||||
or (PredefinedClipboardFormat(pcfDelphiPicture)=FormatID))
|
||||
and (HasPictureFormat);
|
||||
end;
|
||||
end else
|
||||
@ -610,6 +610,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2002/10/24 10:05:51 lazarus
|
||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||
|
||||
Revision 1.9 2002/05/10 06:05:51 lazarus
|
||||
MG: changed license to LGPL
|
||||
|
||||
|
@ -54,12 +54,19 @@ uses Classes, LCLType, VCLGlobals, GraphType;
|
||||
function MakeLong(A,B : Word) : LongInt;
|
||||
function MakeWord(A,B : Byte) : Word;
|
||||
|
||||
function PredefinedClipboardFormat(
|
||||
AFormat: TPredefinedClipboardFormat): TClipboardFormat;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
|
||||
SysUtils, Interfaces, Strings, Math;
|
||||
|
||||
var
|
||||
FPredefinedClipboardFormats:
|
||||
array[TPredefinedClipboardFormat] of TClipboardFormat;
|
||||
|
||||
function MakeLong(A,B : Word) : LongInt;
|
||||
begin
|
||||
Result := A or B shl 16;
|
||||
@ -70,12 +77,37 @@ Begin
|
||||
Result := A or B shl 8;
|
||||
end;
|
||||
|
||||
function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat
|
||||
): TClipboardFormat;
|
||||
begin
|
||||
if FPredefinedClipboardFormats[AFormat]=0 then
|
||||
FPredefinedClipboardFormats[AFormat]:=
|
||||
ClipboardRegisterFormat(PredefinedClipboardMimeTypes[AFormat]);
|
||||
Result:=FPredefinedClipboardFormats[AFormat];
|
||||
end;
|
||||
|
||||
|
||||
{$I winapi.inc}
|
||||
|
||||
procedure InternalInit;
|
||||
var
|
||||
AClipboardFormat: TPredefinedClipboardFormat;
|
||||
begin
|
||||
for AClipboardFormat:=Low(TPredefinedClipboardFormat) to
|
||||
High(TPredefinedClipboardFormat) do
|
||||
FPredefinedClipboardFormats[AClipboardFormat]:=0;
|
||||
end;
|
||||
|
||||
initialization
|
||||
InternalInit;
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.20 2002/10/24 10:05:51 lazarus
|
||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||
|
||||
Revision 1.19 2002/06/04 15:17:21 lazarus
|
||||
MG: improved TFont for XLFD font names
|
||||
|
||||
|
@ -1560,10 +1560,14 @@ type
|
||||
_MSG = tagMSG;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// prototype for timer callback
|
||||
TFNTimerProc = procedure(Handle: HWND; Message : cardinal; IDEvent: Integer; Time: Cardinal);
|
||||
type
|
||||
TFNTimerProc = procedure(Handle: HWND; Message : cardinal; IDEvent: Integer;
|
||||
Time: Cardinal);
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// clipboard
|
||||
type
|
||||
TClipboardFormat = cardinal;
|
||||
@ -1579,10 +1583,62 @@ const
|
||||
'primary selection', 'secondary selection', 'clipboard'
|
||||
);
|
||||
|
||||
type
|
||||
TPredefinedClipboardFormat = (
|
||||
pcfText,
|
||||
pcfBitmap,
|
||||
pcfPixmap,
|
||||
pcfIcon,
|
||||
pcfPicture,
|
||||
pcfObject,
|
||||
pcfComponent,
|
||||
pcfCustomData,
|
||||
|
||||
// Delphi definitions (only for compatibility)
|
||||
pcfDelphiText,
|
||||
pcfDelphiBitmap,
|
||||
pcfDelphiPicture,
|
||||
pcfDelphiMetaFilePict,
|
||||
pcfDelphiObject,
|
||||
pcfDelphiComponent,
|
||||
|
||||
// Kylix definitions (only for compatibility)
|
||||
pcfKylixPicture,
|
||||
pcfKylixBitmap,
|
||||
pcfKylixDrawing,
|
||||
pcfKylixComponent
|
||||
);
|
||||
|
||||
const
|
||||
PredefinedClipboardMimeTypes : array[TPredefinedClipboardFormat] of string = (
|
||||
'text/plain',
|
||||
'image/lcl.bitmap',
|
||||
'image/lcl.pixmap',
|
||||
'image/lcl.icon',
|
||||
'image/lcl.picture',
|
||||
'application/lcl.object',
|
||||
'application/lcl.component',
|
||||
'application/lcl.customdata',
|
||||
|
||||
// Delphi definitions (only for compatibility)
|
||||
'text/plain',
|
||||
'image/delphi.bitmap',
|
||||
'Delphi Picture',
|
||||
'image/delphi.metafilepict',
|
||||
'application/delphi.object',
|
||||
'Delphi Component',
|
||||
|
||||
// Kylix definitons (only for compatibility)
|
||||
'image/delphi.picture',
|
||||
'image/delphi.bitmap',
|
||||
'image/delphi.drawing',
|
||||
'application/delphi.component'
|
||||
);
|
||||
|
||||
|
||||
function MapIrregularVirtualKey(vk: word): word;
|
||||
// key mapping
|
||||
Function Char2VK(C : Char) : Word;
|
||||
function MapIrregularVirtualKey(vk: word): word;
|
||||
|
||||
|
||||
implementation
|
||||
@ -1618,10 +1674,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.23 2002/10/24 10:05:51 lazarus
|
||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||
|
||||
Revision 1.22 2002/10/15 17:09:53 lazarus
|
||||
AJ: fixed GTK DrawText to use WordWrap, and add DT_EditControl
|
||||
|
||||
|
@ -38,7 +38,7 @@ interface
|
||||
|
||||
uses
|
||||
VCLGlobals, Classes, SysUtils, LCLType, Graphics, GraphType, LMessages,
|
||||
Controls, Forms, ExtendedStrings;
|
||||
Controls, Forms, ExtendedStrings, LCLLinux, GraphicsMath;
|
||||
|
||||
|
||||
type
|
||||
@ -880,7 +880,8 @@ Function DeleteAmpersands(var Str : String) : Longint;
|
||||
|
||||
implementation
|
||||
|
||||
uses LCLLinux, Interfaces, Math, GraphicsMath;
|
||||
uses
|
||||
Interfaces, Math;
|
||||
|
||||
|
||||
type
|
||||
@ -1405,6 +1406,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.60 2002/10/24 10:05:51 lazarus
|
||||
MG: broke graphics.pp <-> clipbrd.pp circle
|
||||
|
||||
Revision 1.59 2002/10/23 20:47:26 lazarus
|
||||
AJ: Started Form Scrolling
|
||||
Started StaticText FocusControl
|
||||
|
Loading…
Reference in New Issue
Block a user