mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 20:38:08 +02:00
MG: fixed random function results
git-svn-id: trunk@221 -
This commit is contained in:
parent
106110f999
commit
5718818c2a
@ -967,43 +967,44 @@ end;
|
||||
|
||||
Procedure DragDone(Drop : Boolean);
|
||||
var
|
||||
Accepted : Boolean;
|
||||
DragSave : TDragObject;
|
||||
DragMsg : TDragMEssage;
|
||||
TargetPos : TPoint;
|
||||
Accepted : Boolean;
|
||||
DragSave : TDragObject;
|
||||
DragMsg : TDragMEssage;
|
||||
TargetPos : TPoint;
|
||||
Begin
|
||||
Assert(False, 'Trace:*************************');
|
||||
Assert(False, 'Trace:*********DRAGDONE********');
|
||||
|
||||
if (DragObject = nil) or (DragObject.Cancelling) then Exit;
|
||||
DragSave := DragObject;
|
||||
try
|
||||
DragObject.Cancelling := True;
|
||||
DragObject.ReleaseCapture(DragCapture);
|
||||
Accepted:=false;
|
||||
if (DragObject = nil) or (DragObject.Cancelling) then Exit;
|
||||
DragSave := DragObject;
|
||||
try
|
||||
DragObject.Cancelling := True;
|
||||
DragObject.ReleaseCapture(DragCapture);
|
||||
|
||||
if DragObject.DragTarget <> nil then
|
||||
Begin
|
||||
dragMsg := dmDragDrop;
|
||||
if not Accepted then
|
||||
begin
|
||||
DragMsg := dmDragCancel;
|
||||
DragSave.FDragPos.X := 0;
|
||||
DragSave.FDragPos.Y := 0;
|
||||
TargetPos.X := 0;
|
||||
TargetPos.Y := 0;
|
||||
end;
|
||||
DragMessage(DragSave.DragHandle,DragMsg,DragSave,
|
||||
if DragObject.DragTarget <> nil then
|
||||
Begin
|
||||
dragMsg := dmDragDrop;
|
||||
if not Accepted then
|
||||
begin
|
||||
DragMsg := dmDragCancel;
|
||||
DragSave.FDragPos.X := 0;
|
||||
DragSave.FDragPos.Y := 0;
|
||||
TargetPos.X := 0;
|
||||
TargetPos.Y := 0;
|
||||
end;
|
||||
DragMessage(DragSave.DragHandle,DragMsg,DragSave,
|
||||
DragSave.DragTarget,DragSave.DragPos);
|
||||
end;
|
||||
DragSave.Cancelling := False;
|
||||
DragSave.Finished(TObject(DragSave.DragTarget),TargetPos.X,TargetPos.Y,Accepted);
|
||||
DragSave := nil;
|
||||
finally
|
||||
DragControl := nil;
|
||||
end;
|
||||
DragObject := nil;
|
||||
if DragFreeObject then DragSave.Free;
|
||||
DragFreeObject := False;
|
||||
end;
|
||||
DragSave.Cancelling := False;
|
||||
DragSave.Finished(TObject(DragSave.DragTarget),TargetPos.X,TargetPos.Y,Accepted);
|
||||
DragSave := nil;
|
||||
finally
|
||||
DragControl := nil;
|
||||
end;
|
||||
DragObject := nil;
|
||||
if DragFreeObject then DragSave.Free;
|
||||
DragFreeObject := False;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1127,6 +1128,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.14 2001/03/12 12:17:01 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.13 2001/02/20 16:53:27 lazarus
|
||||
Changes for wordcompletion and many other things from Mattias.
|
||||
Shane
|
||||
|
@ -39,8 +39,8 @@ Function TButtonGlyph.Draw(Canvas: TCanvas; const Client: TRect; const Offset: T
|
||||
var
|
||||
W,H : Integer;
|
||||
Begin
|
||||
if NumGlyphs > 1 then
|
||||
Begin
|
||||
if NumGlyphs > 1 then
|
||||
Begin
|
||||
W := TPixMap(FOriginal).Width;
|
||||
W := W div NumGlyphs;
|
||||
|
||||
@ -48,15 +48,19 @@ if NumGlyphs > 1 then
|
||||
if (State=bsDown) and (NumGlyphs < 3) then State := bsUp;
|
||||
|
||||
if State= bsDisabled then
|
||||
Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(W, 0, (2*W)-1, H-1))
|
||||
else
|
||||
if State=bsDown then
|
||||
Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(2*W, 0, (3*W)-1, H-1))
|
||||
Result:=Rect(W,0,(2*W)-1,H-1)
|
||||
//Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(W, 0, (2*W)-1, H-1))
|
||||
else if State=bsDown then
|
||||
Result:=Rect(2*W,0,(3*W)-1, H-1)
|
||||
//Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(2*W, 0, (3*W)-1, H-1))
|
||||
else
|
||||
Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(0, 0, w-1, H-1));
|
||||
end
|
||||
else
|
||||
Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(0, 0, 25, 25));
|
||||
Result:=Rect(0, 0, w-1, H-1);
|
||||
//Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(0, 0, w-1, H-1));
|
||||
end
|
||||
else
|
||||
Result:=Rect(0, 0, 25, 25);
|
||||
//Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Rect(0, 0, 25, 25));
|
||||
Canvas.Copyrect(Client, TPixmap(FOriginal).Canvas, Result);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -14,11 +14,13 @@ end;
|
||||
|
||||
function TDragObject.Capture: HWND;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
procedure TDragObject.Finished(Target: TObject; X, Y: Integer; Accepted: Boolean);
|
||||
begin
|
||||
|
||||
|
||||
end;
|
||||
|
||||
function TDragObject.GetName: string;
|
||||
@ -93,6 +95,8 @@ end;
|
||||
|
||||
function TDragObject.Instance: THandle;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
procedure TDragObject.ShowDragImage;
|
||||
|
@ -19,9 +19,10 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
Function TInterfaceBase.CallWindowProc(lpPrevWndFunc : TFarProc; Handle : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM) : Integer;
|
||||
Function TInterfaceBase.CallWindowProc(lpPrevWndFunc : TFarProc; Handle : HWND;
|
||||
Msg : UINT; wParam : longint; lParam : longint) : Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
Function TInterfaceBase.ClienttoScreen(Handle : HWND; var P : TPoint) : Boolean;
|
||||
@ -132,7 +133,7 @@ end;
|
||||
Function TInterfaceBase.GetActiveWindow : HWND;
|
||||
begin
|
||||
// Your default here
|
||||
// Result :=
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TInterfaceBase.GetCapture : HWND;
|
||||
@ -244,7 +245,7 @@ end;
|
||||
Function TInterfaceBase.InvalidateRect(aHandle : HWND; Rect : pRect; bErase : Boolean) : Boolean;
|
||||
begin
|
||||
// Your default here
|
||||
// Result :=
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
function TInterfaceBase.LineTo(DC: HDC; X, Y: Integer): Boolean;
|
||||
@ -310,7 +311,7 @@ end;
|
||||
Function TInterfaceBase.ScreenToClient(Handle : HWND; var P : TPoint) : Integer;
|
||||
begin
|
||||
// Your default here
|
||||
// Result :=
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TInterfaceBase.ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: PRect; hrgnUpdate: HRGN; prcUpdate: PRect; flags: UINT): Boolean;
|
||||
@ -341,7 +342,7 @@ end;
|
||||
Function TInterfaceBase.SetBkMode(DC: HDC; bkMode : Integer) : Integer;
|
||||
begin
|
||||
// Your default here
|
||||
// Result :=
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
Function TInterfaceBase.SetCapture(value : Longint) : Longint;
|
||||
@ -377,7 +378,7 @@ end;
|
||||
Function TInterfaceBase.SetTextCharacterExtra(_hdc : hdc; nCharExtra : Integer):Integer;
|
||||
begin
|
||||
// Your default here
|
||||
// Result :=
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TInterfaceBase.SetTextColor(DC: HDC; Color: TColorRef): TColorRef;
|
||||
@ -418,19 +419,22 @@ end;
|
||||
Function TInterfaceBase.TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean;
|
||||
begin
|
||||
// Your default here
|
||||
// Result :=
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
Function TInterfaceBase.WindowFromPoint(Point : TPoint) : HWND;
|
||||
begin
|
||||
// Your default here
|
||||
Result := 0;
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
//##apiwiz##eps## // Do not remove
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.12 2001/03/12 12:17:01 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.11 2001/02/16 19:13:30 lazarus
|
||||
Added some functions
|
||||
Shane
|
||||
|
@ -10,6 +10,8 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TListItems.GetCount : Integer;
|
||||
begin
|
||||
// ToDo:
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
@ -17,6 +19,8 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TListItems.GetItem(Index : Integer): TListItem;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
@ -38,6 +42,8 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TListItems.Add:TListItem;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
@ -52,6 +58,8 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TListItems.Insert(Index : Integer) : TListItem;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
|
@ -55,7 +55,7 @@ end;
|
||||
function TMenu.FIndItem(value : Integer; Kind : TFindItemKind): TMenuItem;
|
||||
begin
|
||||
//TODO: FINISH TMEnu:FINDITEM
|
||||
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -111,6 +111,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.3 2001/03/12 12:17:01 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.2 2000/12/22 19:55:37 lazarus
|
||||
Added the Popupmenu code to the LCL.
|
||||
Now you can right click on the editor and a PopupMenu appears.
|
||||
|
@ -1249,8 +1249,11 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function ToolMenuGetMsgHook(Code: Integer; WParam: Longint; var Msg: TMsg): Longint; stdcall;
|
||||
function ToolMenuGetMsgHook(Code: Integer; WParam: Longint;
|
||||
var Msg: TMsg): Longint; stdcall;
|
||||
Begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
procedure InitToolMenuHooks;
|
||||
@ -1262,8 +1265,11 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function ToolMenuKeyMsgHook(Code: Integer; WParam: Longint; var Msg: TMsg): Longint; stdcall;
|
||||
function ToolMenuKeyMsgHook(Code: Integer; WParam: Longint;
|
||||
var Msg: TMsg): Longint; stdcall;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
procedure InitToolMenuKeyHooks;
|
||||
@ -1462,6 +1468,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.2 2001/03/12 12:17:01 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.1 2000/07/13 10:28:28 michael
|
||||
+ Initial import
|
||||
|
||||
|
@ -705,7 +705,6 @@ Begin
|
||||
} end;
|
||||
|
||||
Inherited WndProc(Message);
|
||||
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -727,7 +726,7 @@ procedure TWinControl.SetFocus;
|
||||
var
|
||||
Form : TCustomForm;
|
||||
begin
|
||||
Writeln('[TWINCONTROL.SETFOCUS]');
|
||||
Writeln('[TWINCONTROL.SETFOCUS] ',Name,':',ClassName);
|
||||
Form := GetParentForm(self);
|
||||
if Assigned(form) then
|
||||
Writeln('Form is assigned') else Writeln('Form is NOT assigned');
|
||||
@ -801,7 +800,7 @@ var
|
||||
ShiftState: TShiftState;
|
||||
begin
|
||||
Result := True;
|
||||
Writeln('Getting focus...');
|
||||
// Writeln('Getting focus...');
|
||||
F := GetParentForm(Self);
|
||||
if (F <> nil)
|
||||
and (F <> Self)
|
||||
@ -1208,6 +1207,8 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
class function TWinControl.CreateParentedControl(ParentWindow : hwnd): TWinControl;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
@ -1239,6 +1240,7 @@ var
|
||||
n: Integer;
|
||||
Control: TControl;
|
||||
begin
|
||||
writeln('[TWinControl.Destroy] ',Name,':',ClassName);
|
||||
DestroyHandle;
|
||||
|
||||
n := ControlCount;
|
||||
@ -1932,6 +1934,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.21 2001/03/12 12:17:02 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.20 2001/02/28 13:17:33 lazarus
|
||||
Added some debug code for the top,left reporting problem.
|
||||
Shane
|
||||
|
@ -9,20 +9,20 @@ Function edit_drag_data_received(widget : pgtkWidget;
|
||||
time : Integer;
|
||||
data : pointer) : GBoolean; cdecl;
|
||||
Var
|
||||
Texts : String;
|
||||
strTemp : PChar;
|
||||
Texts : String;
|
||||
strTemp : PChar;
|
||||
Begin
|
||||
Assert(False, 'Trace:***********Drag Data Received*******************');
|
||||
if Seldata^.Length > 0 then
|
||||
Begin
|
||||
Texts := strpas(Seldata^.data);
|
||||
Assert(False, 'Trace:' + Texts);
|
||||
Assert(False, 'Trace:0');
|
||||
TEdit(Data).Caption := Texts;
|
||||
Assert(False, 'Trace:1');
|
||||
end;
|
||||
|
||||
gtk_drag_finish(Context,false,false,time);
|
||||
Result:=false;
|
||||
Assert(False, 'Trace:***********Drag Data Received*******************');
|
||||
if Seldata^.Length > 0 then
|
||||
Begin
|
||||
Texts := strpas(Seldata^.data);
|
||||
Assert(False, 'Trace:' + Texts);
|
||||
Assert(False, 'Trace:0');
|
||||
TEdit(Data).Caption := Texts;
|
||||
Assert(False, 'Trace:1');
|
||||
end;
|
||||
gtk_drag_finish(Context,false,false,time);
|
||||
end;
|
||||
|
||||
Function edit_source_drag_data_get(widget : pgtkWidget;
|
||||
@ -32,28 +32,28 @@ Function edit_source_drag_data_get(widget : pgtkWidget;
|
||||
time : Integer;
|
||||
data : pointer) : GBoolean; cdecl;
|
||||
var
|
||||
strTemp : PChar;
|
||||
Texts : String;
|
||||
strTemp : PChar;
|
||||
Texts : String;
|
||||
Begin
|
||||
if (info = TARGET_ROOTWIN) then
|
||||
Assert(False, 'Trace:I WAS DROPPED ON THE ROOTWIN')
|
||||
else
|
||||
Begin
|
||||
Assert(False, 'Trace:*********Setting Data************');
|
||||
Texts := TCustomEdit(data).Text;
|
||||
Assert(False, 'Trace:0');
|
||||
strTemp := StrAlloc(length(Texts) + 1);
|
||||
StrPCopy(strTemp, Texts);
|
||||
Assert(False, 'Trace:1');
|
||||
gtk_selection_data_set(selection_data,selection_data^.target,
|
||||
Result:=false;
|
||||
if (info = TARGET_ROOTWIN) then
|
||||
Assert(False, 'Trace:I WAS DROPPED ON THE ROOTWIN')
|
||||
else
|
||||
Begin
|
||||
Assert(False, 'Trace:*********Setting Data************');
|
||||
Texts := TCustomEdit(data).Text;
|
||||
Assert(False, 'Trace:0');
|
||||
strTemp := StrAlloc(length(Texts) + 1);
|
||||
StrPCopy(strTemp, Texts);
|
||||
Assert(False, 'Trace:1');
|
||||
gtk_selection_data_set(selection_data,selection_data^.target,
|
||||
8,
|
||||
strtemp,
|
||||
length(Texts)+1);
|
||||
Assert(False, 'Trace:2');
|
||||
Assert(False, 'Trace:2');
|
||||
strDispose(strTemp);
|
||||
Assert(False,'Trace:3');
|
||||
end;
|
||||
|
||||
Assert(False,'Trace:3');
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -61,8 +61,9 @@ Function Edit_source_drag_data_delete (widget : pGtkWidget;
|
||||
context : pGdkDragContext;
|
||||
data : gpointer): gBoolean ; cdecl;
|
||||
begin
|
||||
Assert(False, 'Trace:***************');
|
||||
Assert(False, 'Trace:DELETE THE DATA');
|
||||
Assert(False, 'Trace:***************');
|
||||
Assert(False, 'Trace:DELETE THE DATA');
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -199,8 +199,10 @@ Begin
|
||||
TWincontrol(sender).parent := nil;
|
||||
TWincontrol(sender).parent := aParent;
|
||||
|
||||
ResizeChild(Sender,TWinControl(sender).Left,TWinControl(sender).Top,TWinControl(sender).Width,TWinControl(sender).Height);
|
||||
ResizeChild(Sender,TWinControl(sender).Left,TWinControl(sender).Top,
|
||||
TWinControl(sender).Width,TWinControl(sender).Height);
|
||||
ShowHide(sender);
|
||||
Result:=0;
|
||||
End;
|
||||
|
||||
|
||||
@ -2681,6 +2683,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.31 2001/03/12 12:17:02 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.30 2001/02/20 16:53:27 lazarus
|
||||
Changes for wordcompletion and many other things from Mattias.
|
||||
Shane
|
||||
|
@ -44,41 +44,61 @@ const
|
||||
The BitBlt function copies a bitmap from a source context into a destination
|
||||
context using the specified raster operation.
|
||||
------------------------------------------------------------------------------}
|
||||
function TgtkObject.BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean;
|
||||
function TgtkObject.BitBlt(DestDC: HDC; X, Y, Width, Height: Integer;
|
||||
SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean;
|
||||
type
|
||||
TBltFunction = function: Boolean;
|
||||
|
||||
function DrawableToDrawable: Boolean;
|
||||
begin
|
||||
gdk_draw_pixmap(PDeviceContext(DestDC)^.Drawable, PDeviceContext(DestDC)^.GC, PDeviceContext(SrcDC)^.Drawable,
|
||||
XSrc, YSrc, X, Y, Width, Height);
|
||||
gdk_draw_pixmap(PDeviceContext(DestDC)^.Drawable, PDeviceContext(DestDC)^.GC,
|
||||
PDeviceContext(SrcDC)^.Drawable, XSrc, YSrc, X, Y, Width, Height);
|
||||
Result:=false
|
||||
end;
|
||||
|
||||
function PixmapToDrawable: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function ImageToImage: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function ImageToDrawable: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function ImageToBitmap: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function PixmapToImage: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function PixmapToBitmap: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function BitmapToImage: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function BitmapToPixmap: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function Unsupported: Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
//----------
|
||||
@ -1038,6 +1058,7 @@ end;
|
||||
Function TGTKObject.EmptyClipBoard : Boolean;
|
||||
begin
|
||||
// Your code here
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1047,9 +1068,11 @@ end;
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TGTKObject.EnableMenuItem(hMenu: HMENU; uIDEnableItem: Integer; bEnable: Boolean): Boolean;
|
||||
function TGTKObject.EnableMenuItem(hMenu: HMENU; uIDEnableItem: Integer;
|
||||
bEnable: Boolean): Boolean;
|
||||
begin
|
||||
// Your code here
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1077,7 +1100,8 @@ function TGTKObject.EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean;
|
||||
begin
|
||||
Assert(False, Format('Trace: [TGTKObject.EnableWindow] hWnd: 0x%x, Enable: %s', [hwnd, BOOL_TEXT[bEnable]]));
|
||||
if hWnd <> 0
|
||||
then gtk_widget_set_sensitive(pgtkwidget(hWnd), bEnable)
|
||||
then gtk_widget_set_sensitive(pgtkwidget(hWnd), bEnable);
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1128,7 +1152,8 @@ begin
|
||||
Y := Rect^.Top;
|
||||
end;
|
||||
SelectGDKTextProps(DC);
|
||||
gdk_draw_text(Drawable, CurrentFont^.GDIFontObject, GC, X, Y + 10 {TODO: query font height}, pStr, Count);
|
||||
gdk_draw_text(Drawable, CurrentFont^.GDIFontObject, GC,
|
||||
X, Y + 10 {TODO: query font height}, pStr, Count);
|
||||
finally
|
||||
StrDispose(pStr);
|
||||
end;
|
||||
@ -1187,7 +1212,9 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
Function TGTKObject.GetActiveWindow : HWND;
|
||||
begin
|
||||
// ToDo
|
||||
// Result := gdk_Window_Get_Toplevel;
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -2203,8 +2230,11 @@ end;
|
||||
The MaskBlt function copies a bitmap from a source context into a destination
|
||||
context using the specified mask and raster operation.
|
||||
------------------------------------------------------------------------------}
|
||||
function TgtkObject.MaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean;
|
||||
function TgtkObject.MaskBlt(DestDC: HDC; X, Y, Width, Height: Integer;
|
||||
SrcDC: HDC; XSrc, YSrc: Integer; Mask: HBITMAP; XMask, YMask: Integer;
|
||||
Rop: DWORD): Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -2219,7 +2249,9 @@ end;
|
||||
|
||||
function MessageButtonClicked(Widget : PGtkWidget; data: gPointer) : GBoolean; cdecl;
|
||||
begin
|
||||
if Integer(data^) = 0 then Integer(data^):= Integer(gtk_object_get_data(PGtkObject(Widget), 'modal_result'));
|
||||
if Integer(data^) = 0 then
|
||||
Integer(data^):= Integer(gtk_object_get_data(PGtkObject(Widget), 'modal_result'));
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function MessageBoxClosed(Widget : PGtkWidget; Event : PGdkEvent; data: gPointer) : GBoolean; cdecl;
|
||||
@ -2826,6 +2858,7 @@ end;
|
||||
Function TGTKObject.SetBkMode(DC: HDC; bkMode : Integer) : Integer;
|
||||
begin
|
||||
// Your code here
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -2923,21 +2956,28 @@ function TgtkObject.SetFocus(hWnd: HWND): HWND;
|
||||
var
|
||||
TopLevel: PGTKWidget;
|
||||
begin
|
||||
//writeln('TgtkObject.SetFocus A ',hWnd);
|
||||
if hwnd = 0
|
||||
then
|
||||
Result := 0
|
||||
else begin
|
||||
//writeln('TgtkObject.SetFocus B');
|
||||
Result := GetFocus;
|
||||
//writeln('TgtkObject.SetFocus C');
|
||||
TopLevel := gtk_widget_get_toplevel(PGTKWidget(hWND));
|
||||
//writeln('TgtkObject.SetFocus D');
|
||||
if gtk_type_is_a(gtk_object_type(PGTKObject(TopLevel)), gtk_window_get_type)
|
||||
then gtk_window_set_focus(PGTKWindow(TopLevel), PGTKWidget(hWND));
|
||||
end;
|
||||
|
||||
//writeln('TgtkObject.SetFocus End');
|
||||
end;
|
||||
|
||||
Function TgtkObject.SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean;
|
||||
Begin
|
||||
gtk_object_set_data(pGTKObject(handle),Str,data);
|
||||
gtk_object_set_data(pGTKObject(handle),Str,data);
|
||||
// ToDo
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3068,6 +3108,7 @@ end;
|
||||
Function TGTKObject.SetTextCharacterExtra(_hdc : hdc; nCharExtra : Integer):Integer;
|
||||
begin
|
||||
// Your code here
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3120,6 +3161,7 @@ function TgtkObject.SetWindowLong(Handle: HWND; Idx: Integer; NewLong: Longint):
|
||||
begin
|
||||
//TODO: Finish this;
|
||||
Assert(False, Format('Trace:> [TgtkObject.SETWINDOWLONG] HWND: 0x%x, idx: 0x%x(%d), Value: 0x%x(%d)', [Handle, idx, idx, newlong, newlong]));
|
||||
Result:=0;
|
||||
|
||||
case idx of
|
||||
GWL_WNDPROC :
|
||||
@ -3214,6 +3256,7 @@ const
|
||||
POLICY: array[BOOLEAN] of TGTKPolicyType = (GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
begin
|
||||
Assert(False, 'trace:[TgtkObject.ShowScrollBar]');
|
||||
Result:=false;
|
||||
{ Result := (Handle <> 0);
|
||||
if Result
|
||||
then begin
|
||||
@ -3300,8 +3343,11 @@ end;
|
||||
Sizing is done according to the stretching mode currently set in the
|
||||
destination device context.
|
||||
------------------------------------------------------------------------------}
|
||||
function TgtkObject.StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean;
|
||||
function TgtkObject.StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer;
|
||||
SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP;
|
||||
XMask, YMask: Integer; Rop: DWORD): Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3317,6 +3363,7 @@ end;
|
||||
Function TGTKObject.TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean;
|
||||
begin
|
||||
// Your code here
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3358,6 +3405,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.22 2001/03/12 12:17:02 lazarus
|
||||
MG: fixed random function results
|
||||
|
||||
Revision 1.21 2001/02/20 16:53:27 lazarus
|
||||
Changes for wordcompletion and many other things from Mattias.
|
||||
Shane
|
||||
|
Loading…
Reference in New Issue
Block a user