summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/gfx/imgtest/imgtest.lpi5
-rw-r--r--examples/gfx/imgtest/imgtest.pas15
-rw-r--r--gfx/emulayer/gelimage.pas11
-rw-r--r--gfx/fpgfx.pas72
-rw-r--r--gfx/gdi/gfx_gdi.pas184
-rw-r--r--gfx/gfxbase.pas46
-rw-r--r--gfx/x11/gfx_x11.pas155
-rw-r--r--prototypes/multihandle/gui2Base.pas3
-rw-r--r--prototypes/multihandle/test.lpi5
9 files changed, 223 insertions, 273 deletions
diff --git a/examples/gfx/imgtest/imgtest.lpi b/examples/gfx/imgtest/imgtest.lpi
index fefabc63..c507609d 100644
--- a/examples/gfx/imgtest/imgtest.lpi
+++ b/examples/gfx/imgtest/imgtest.lpi
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="\"/>
+ <PathDelim Value="/"/>
<Version Value="5"/>
<General>
<Flags>
@@ -20,7 +20,7 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
@@ -39,7 +39,6 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
- <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
diff --git a/examples/gfx/imgtest/imgtest.pas b/examples/gfx/imgtest/imgtest.pas
index 33fad0fb..ad6d4f5f 100644
--- a/examples/gfx/imgtest/imgtest.pas
+++ b/examples/gfx/imgtest/imgtest.pas
@@ -23,11 +23,11 @@ uses
type
TMainWindow = class(TFWindow)
- procedure Paint(Sender: TObject; const Rect: TRect);
private
Bitmap: TFBitmap;
+ procedure Paint(Sender: TObject; const Rect: TRect);
public
- constructor Create;
+ constructor Create; overload;
destructor Destroy; override;
end;
@@ -39,6 +39,8 @@ var
i, j: Integer;
begin
inherited Create(nil, [woWindow]);
+ Data := nil;
+ Stride := 0;
Title := 'fpGFX Bitmap Test';
OnPaint := @Paint;
@@ -56,20 +58,13 @@ end;
destructor TMainWindow.Destroy;
begin
Bitmap.Free;
-
inherited Destroy;
end;
procedure TMainWindow.Paint(Sender: TObject; const Rect: TRect);
-var
- r: TRect;
begin
Canvas.SetColor(colBlue);
- r.Left := 0;
- r.Top := 0;
- r.Right := Width;
- r.Bottom := Height;
- Canvas.FillRect(r);
+ Canvas.FillRect(Rect);
Canvas.DrawImage(Bitmap, Point(0, 0));
end;
diff --git a/gfx/emulayer/gelimage.pas b/gfx/emulayer/gelimage.pas
index a73e77a3..f58449f9 100644
--- a/gfx/emulayer/gelimage.pas
+++ b/gfx/emulayer/gelimage.pas
@@ -64,7 +64,6 @@ type
procedure ConvertMonoToInternal(Params: TConvertParams; Data: Pointer;
StartX, EndX: Integer; Dest: Pointer);
var
- b: Byte;
Mask: Byte;
begin
Inc(Data, StartX shr 3);
@@ -251,6 +250,7 @@ procedure ConvertImage(
var
i: Integer;
begin
+ Assert(MaxIndex = MaxIndex); // removes compiler warning
if Assigned(ASourcePal) then
begin
Result := ASourcePal.EntryCount - 1;
@@ -273,6 +273,12 @@ var
Scanline: Pointer;
i, max, w, y: Integer;
begin
+ Assert(ADestX = ADestX); // removes compiler warning
+ Assert(ADestY = AdestY);
+ Scanline := nil;
+ ParamsI2D.BlueShiftL := 0;
+ ParamsS2I.BlueShiftL := 0;
+
case ASourceFormat.FormatType of
ftMono:
begin
@@ -359,6 +365,9 @@ const
var
StartByte, EndByte, x, y: Integer;
begin
+ Assert(ADestX = ADestX); // removes compiler warning
+ Assert(ADestY = AdestY);
+
StartByte := ASourceRect.Left shr 3;
EndByte := (ASourceRect.Right + 7) shr 3;
Inc(ASourceData, StartByte);
diff --git a/gfx/fpgfx.pas b/gfx/fpgfx.pas
index 5e9d51dd..f5befce6 100644
--- a/gfx/fpgfx.pas
+++ b/gfx/fpgfx.pas
@@ -16,14 +16,14 @@
unit fpgfx;
{$ifdef fpc}
- {$mode delphi}{$H+}
+ {$mode objfpc}{$H+}
{$endif}
interface
uses
Classes, SysUtils,
- gfxinterface, gfxbase;
+ gfxinterface;
type
@@ -55,16 +55,8 @@ type
{ TFApplication }
TFApplication = class(TDefApplication)
- private
- FDisplayName: String;
- protected
- FTitle: String;
- procedure SetTitle(const ATitle: String);
public
- constructor Create; override;
- destructor Destroy; override;
// procedure CreateForm(InstanceClass: TComponentClass; var Reference);
- property Title: String read FTitle write SetTitle;
end;
{ Using the singleton pattern to hide instance variables and
@@ -96,70 +88,10 @@ begin
end;
-
-{ TFApplication }
-
-constructor TFApplication.Create;
-begin
- inherited Create;
-
-end;
-
-
-destructor TFApplication.Destroy;
-begin
-
- inherited Destroy;
-end;
-
-{procedure TFApplication.CreateForm(AForm: TCustomForm);
-var
- form: PForm;
- Filename: String;
- TextStream, BinStream: TStream;
-begin
- form := @Reference;
- form^ := TCustomForm(InstanceClass.Create(Self));
-
- Filename := LowerCase(Copy(InstanceClass.ClassName, 2, 255)) + '.frm';
-
- TextStream := TFileStream.Create(Filename, fmOpenRead);
- BinStream := TMemoryStream.Create;
- ObjectTextToBinary(TextStream, BinStream);
- TextStream.Free;
-
- BinStream.Position := 0;
- BinStream.ReadComponent(Form^);
- BinStream.Free;
-
- Form^.Show;
-end;}
-
-
-procedure TFApplication.SetTitle(const ATitle: String);
-begin
- if ATitle <> FTitle then FTitle := ATitle;
-end;
-
-{*******************************************************************
-* Initialization section
-*
-* DESCRIPTION: Upon startup FApplication and FScreen objects are created
-* and memory for them allocated.
-*
-*******************************************************************}
-
initialization
uScreen := nil;
uApplication := nil;
-{*******************************************************************
-* Finalization section
-*
-* DESCRIPTION: Free memory allocated on the initialization section
-*
-*******************************************************************}
-
finalization
uApplication.Free;
uScreen.Free;
diff --git a/gfx/gdi/gfx_gdi.pas b/gfx/gdi/gfx_gdi.pas
index a98b9388..ac5753d6 100644
--- a/gfx/gdi/gfx_gdi.pas
+++ b/gfx/gdi/gfx_gdi.pas
@@ -1474,122 +1474,122 @@ var
begin
case AEvent.EventType of
etCreate:
- begin
- if Assigned(OnCreate) then OnCreate(Self)
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnCreate) then OnCreate(Self)
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etCanClose:
- begin
- end;
+ begin
+ end;
etClose:
- begin
- end;
+ begin
+ end;
etFocusIn:
- begin
- FHasFocus := True;
- if Assigned(OnFocusIn) then OnFocusIn(Self);
- end;
+ begin
+ FHasFocus := True;
+ if Assigned(OnFocusIn) then OnFocusIn(Self);
+ end;
etFocusOut:
- begin
- FHasFocus := False;
- if Assigned(OnFocusOut) then OnFocusOut(Self);
- end;
+ begin
+ FHasFocus := False;
+ if Assigned(OnFocusOut) then OnFocusOut(Self);
+ end;
etHide:
- begin
- if Assigned(OnHide) then OnHide(Self);
- end;
+ begin
+ if Assigned(OnHide) then OnHide(Self);
+ end;
etKeyPressed:
- begin
- if Assigned(OnKeyPressed) then OnKeyPressed(Self, VirtKeyToKeycode(AEvent.wParam), GetKeyboardShiftState)
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
-
- if (AEvent.wParam = $2e {VK_DELETE}) then
begin
- if Assigned(OnKeyChar) then OnKeyChar(Self, #127)
+ if Assigned(OnKeyPressed) then OnKeyPressed(Self, VirtKeyToKeycode(AEvent.wParam), GetKeyboardShiftState)
else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+
+ if (AEvent.wParam = $2e {VK_DELETE}) then
+ begin
+ if Assigned(OnKeyChar) then OnKeyChar(Self, #127)
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
end;
- end;
etKeyReleased:
- begin
- if Assigned(OnKeyReleased) then OnKeyReleased(Self, VirtKeyToKeycode(AEvent.wParam), GetKeyboardShiftState)
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnKeyReleased) then OnKeyReleased(Self, VirtKeyToKeycode(AEvent.wParam), GetKeyboardShiftState)
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etKeyChar:
- begin
- if Assigned(OnKeyChar) then OnKeyChar(Self, Chr(AEvent.wParam))
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnKeyChar) then OnKeyChar(Self, Chr(AEvent.wParam))
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMouseEnter:
- begin
- if Assigned(OnMouseEnter) then
- OnMouseEnter(Self, GetKeyboardShiftState, Point(LoWord(AEvent.lParam), HiWord(AEvent.lParam)))
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnMouseEnter) then
+ OnMouseEnter(Self, GetKeyboardShiftState, Point(LoWord(AEvent.lParam), HiWord(AEvent.lParam)))
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMouseLeave:
- begin
- if Assigned(OnMouseLeave) then OnMouseLeave(Self)
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnMouseLeave) then OnMouseLeave(Self)
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMousePressed:
- begin
- if Assigned(OnMousePressed) then
- OnMousePressed(Self, AEvent.MouseButton, GetKeyboardShiftState, Point(LoWord(AEvent.lparam), HiWord(AEvent.lParam)))
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnMousePressed) then
+ OnMousePressed(Self, AEvent.MouseButton, GetKeyboardShiftState, Point(LoWord(AEvent.lparam), HiWord(AEvent.lParam)))
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMouseReleased:
- begin
- if Assigned(OnMouseReleased) then
- OnMouseReleased(Self, AEvent.MouseButton, GetKeyboardShiftState, Point(LoWord(AEvent.lparam), HiWord(AEvent.lParam)))
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnMouseReleased) then
+ OnMouseReleased(Self, AEvent.MouseButton, GetKeyboardShiftState, Point(LoWord(AEvent.lparam), HiWord(AEvent.lParam)))
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMouseMove:
- begin
- if Assigned(OnMouseMove) then
- OnMouseMove(Self, GetKeyboardShiftState, Point(LoWord(AEvent.lparam), HiWord(AEvent.lParam)))
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnMouseMove) then
+ OnMouseMove(Self, GetKeyboardShiftState, Point(LoWord(AEvent.lparam), HiWord(AEvent.lParam)))
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMouseWheel:
- begin
- if Assigned(OnMouseWheel) then
begin
- pt.x := LoWord(AEvent.lparam);
- pt.y := HiWord(AEvent.lparam);
- Windows.ScreenToClient(Handle, pt);
- OnMouseWheel(Self, GetKeyboardShiftState, SmallInt(HiWord(AEvent.wParam)) / -120.0,
- Point(pt.x, pt.y));
- end
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ if Assigned(OnMouseWheel) then
+ begin
+ pt.x := LoWord(AEvent.lparam);
+ pt.y := HiWord(AEvent.lparam);
+ Windows.ScreenToClient(Handle, pt);
+ OnMouseWheel(Self, GetKeyboardShiftState, SmallInt(HiWord(AEvent.wParam)) / -120.0,
+ Point(pt.x, pt.y));
+ end
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etPaint:
- begin
- Windows.BeginPaint(Handle, @PaintStruct);
- if Assigned(OnPaint) then
begin
- r.Left := PaintStruct.rcPaint.Left;
- r.Top := PaintStruct.rcPaint.Top;
- r.Right := PaintStruct.rcPaint.Right;
- r.Bottom := PaintStruct.rcPaint.Bottom;
-
- OldCanvas := Canvas;
- FCanvas := TGDICanvas.Create(PaintStruct.hdc);
- OnPaint(Self, r);
- Canvas.Free;
- FCanvas := OldCanvas;
+ Windows.BeginPaint(Handle, @PaintStruct);
+ if Assigned(OnPaint) then
+ begin
+ r.Left := PaintStruct.rcPaint.Left;
+ r.Top := PaintStruct.rcPaint.Top;
+ r.Right := PaintStruct.rcPaint.Right;
+ r.Bottom := PaintStruct.rcPaint.Bottom;
+
+ OldCanvas := Canvas;
+ FCanvas := TGDICanvas.Create(PaintStruct.hdc);
+ OnPaint(Self, r);
+ Canvas.Free;
+ FCanvas := OldCanvas;
+ end;
+ Windows.EndPaint(Handle, @PaintStruct);
end;
- Windows.EndPaint(Handle, @PaintStruct);
- end;
etMove:
- begin
- if Assigned(OnMove) then OnMove(Self);
- end;
+ begin
+ if Assigned(OnMove) then OnMove(Self);
+ end;
etResize:
- begin
- if Assigned(OnResize) then OnResize(Self);
- end;
+ begin
+ if Assigned(OnResize) then OnResize(Self);
+ end;
etShow:
- begin
- if Assigned(OnShow) then OnShow(Self);
- end;
+ begin
+ if Assigned(OnShow) then OnShow(Self);
+ end;
end;
end;
diff --git a/gfx/gfxbase.pas b/gfx/gfxbase.pas
index aa7d1afb..124d6dd7 100644
--- a/gfx/gfxbase.pas
+++ b/gfx/gfxbase.pas
@@ -407,11 +407,14 @@ type
private
FOnIdle: TNotifyEvent;
FQuitWhenLastWindowCloses: Boolean;
+ FDisplayName: String;
+ protected
+ FTitle: String;
+ procedure SetTitle(const ATitle: String);
public
Forms: TList;
- public
{ Default methods }
- constructor Create; virtual;
+ constructor Create; virtual; overload;
destructor Destroy; override;
procedure AddWindow(AWindow: TFCustomWindow); virtual; abstract;
procedure Initialize(ADisplayName: String = ''); virtual; abstract;
@@ -420,6 +423,7 @@ type
{ Properties }
property OnIdle: TNotifyEvent read FOnIdle write FOnIdle;
property QuitWhenLastWindowCloses: Boolean read FQuitWhenLastWindowCloses write FQuitWhenLastWindowCloses;
+ property Title: String read FTitle write SetTitle;
end;
@@ -565,8 +569,8 @@ function KeycodeToText(Key: Word; ShiftState: TShiftState): String;
implementation
-uses
- GFXInterface; { Just to get FPC to compile the TGfxCanvas descendants }
+//uses
+// GFXInterface; { Just to get FPC to compile the TGfxCanvas descendants }
{ Exceptions }
@@ -854,7 +858,7 @@ begin
if (SourceRect.Right > SourceRect.Left) and
(SourceRect.Bottom > SourceRect.Top) then
- DoDrawImageRect(AImage, ASourceRect, Transform(ADestPos));
+ DoDrawImageRect(AImage, SourceRect, Transform(ADestPos));
end;
{ TFCustomBitmap }
@@ -1294,21 +1298,47 @@ end;
{ TFCustomApplication }
+procedure TFCustomApplication.SetTitle(const ATitle: String);
+begin
+ if ATitle <> FTitle then FTitle := ATitle;
+end;
+
constructor TFCustomApplication.Create;
begin
inherited Create(nil);
-
+ FDisplayName := '';
Forms := TList.Create;
-
FQuitWhenLastWindowCloses := True;
end;
destructor TFCustomApplication.Destroy;
begin
Forms.Free;
-
inherited Destroy;
end;
+{procedure TFCustomApplication.CreateForm(AForm: TCustomForm);
+var
+ form: PForm;
+ Filename: String;
+ TextStream, BinStream: TStream;
+begin
+ form := @Reference;
+ form^ := TCustomForm(InstanceClass.Create(Self));
+
+ Filename := LowerCase(Copy(InstanceClass.ClassName, 2, 255)) + '.frm';
+
+ TextStream := TFileStream.Create(Filename, fmOpenRead);
+ BinStream := TMemoryStream.Create;
+ ObjectTextToBinary(TextStream, BinStream);
+ TextStream.Free;
+
+ BinStream.Position := 0;
+ BinStream.ReadComponent(Form^);
+ BinStream.Free;
+
+ Form^.Show;
+end;}
+
end.
diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas
index 28a2ea72..26a68e63 100644
--- a/gfx/x11/gfx_x11.pas
+++ b/gfx/x11/gfx_x11.pas
@@ -610,11 +610,8 @@ end;
procedure TX11Canvas.DoTextOut(const APosition: TPoint; const AText: String);
-var
- WideText: PWideChar;
- AnsiText: string;
- Size: Integer;
{$IFDEF XftSupport}
+var
fnt: PXftFont;
fntColor: TXftColor;
s: String16;
@@ -646,16 +643,6 @@ begin
{$ELSE}
XDrawString(GFApplication.Handle, Handle, GC, APosition.x,
APosition.y + FFontStruct^.ascent, PChar(AText), Length(AText));
-
-{ Size := Utf8ToUnicode(nil, PChar(AText), 0);
- WideText := GetMem(Size * 2);
- Utf8ToUnicode(WideText, PChar(AText), Size);
-
- XwcDrawText(gApplication.Handle, Handle, GC, APosition.x,
- APosition.y + FFontStruct^.ascent, PXwcTextItem(WideText), Length(WideText));
-
- FreeMem(WideText);
-}
{$ENDIF}
end;
@@ -663,7 +650,6 @@ end;
procedure TX11Canvas.DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect;
const ADestPos: TPoint);
var
- DestPos: TPoint;
RealHeight: Integer;
begin
if not ASource.InheritsFrom(TX11Canvas) then
@@ -674,7 +660,7 @@ begin
begin
// !!!: This case will probably be removed completely very soon
RealHeight := ASourceRect.Bottom - ASourceRect.Top;
- if DestPos.y + RealHeight > Height then
+ if ADestPos.y + RealHeight > Height then
RealHeight := Height - ADestPos.y;
XSetClipMask(GFApplication.Handle, GC, TX11Canvas(ASource).Handle);
XSetClipOrigin(GFApplication.Handle, GC, ADestPos.x, ADestPos.y);
@@ -792,7 +778,6 @@ begin
TX11Bitmap(AImage).Data, TX11Bitmap(AImage).Stride,
0, 0, ConvertFormat, Image^.data, Image^.bytes_per_line);
end;
-
XPutImage(GFApplication.Handle, Handle, GC,
Image, 0, 0, ADestPos.x, ADestPos.y, AImage.Width, AImage.Height);
@@ -969,8 +954,6 @@ var
XEvent: TXEvent;
WindowEntry: TFCustomWindow;
Event: TFEvent;
- Sum: Integer;
- NewEvent: TXEvent;
begin
DoBreakRun := False;
@@ -1011,21 +994,23 @@ begin
case XEvent._type of
X.DestroyNotify:
- begin
- Forms.Remove(WindowEntry);
- end;
-{ X.KeyPress:
- begin
- Event.EventType := etKeyPressed;
- Event.State := XEvent.xkey.state;
- WindowEntry.ProcessEvent(Event);
- end;
+ begin
+ Forms.Remove(WindowEntry);
+ end;
+{
+ X.KeyPress:
+ begin
+ Event.EventType := etKeyPressed;
+ Event.State := XEvent.xkey.state;
+ WindowEntry.ProcessEvent(Event);
+ end;
X.KeyRelease:
- begin
- Event.EventType := etKeyReleased;
- Event.State := XEvent.xkey.state;
- WindowEntry.ProcessEvent(Event);
- end;}
+ begin
+ Event.EventType := etKeyReleased;
+ Event.State := XEvent.xkey.state;
+ WindowEntry.ProcessEvent(Event);
+ end;
+}
else
WindowEntry.Dispatch(XEvent);
end;
@@ -1408,88 +1393,88 @@ begin
end;
procedure TX11Window.ProcessEvent(AEvent: TFEvent);
-var
- KeySym: TKeySym;
+{var
+ KeySym: TKeySym;}
begin
case AEvent.EventType of
etCreate:
- begin
- if Assigned(OnCreate) then OnCreate(Self)
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnCreate) then OnCreate(Self)
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etCanClose:
- begin
-
- end;
+ begin
+
+ end;
etClose:
- begin
-
- end;
+ begin
+
+ end;
etFocusIn:
- begin
- if Assigned(OnFocusIn) then OnFocusIn(Self);
- end;
+ begin
+ if Assigned(OnFocusIn) then OnFocusIn(Self);
+ end;
etFocusOut:
- begin
- if Assigned(OnFocusOut) then OnFocusOut(Self);
- end;
+ begin
+ if Assigned(OnFocusOut) then OnFocusOut(Self);
+ end;
etHide:
- begin
- if Assigned(OnHide) then OnHide(Self);
- end;
+ begin
+ if Assigned(OnHide) then OnHide(Self);
+ end;
etKeyPressed:
- begin
+ begin
- end;
+ end;
etKeyReleased:
- begin
+ begin
- end;
+ end;
etKeyChar:
- begin
- if Assigned(OnKeyChar) then OnKeyChar(Self, Chr(AEvent.wParam))
- else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
- end;
+ begin
+ if Assigned(OnKeyChar) then OnKeyChar(Self, Chr(AEvent.wParam))
+ else if Assigned(Parent) then Parent.ProcessEvent(AEvent);
+ end;
etMouseEnter:
- begin
+ begin
- end;
+ end;
etMouseLeave:
- begin
+ begin
- end;
+ end;
etMousePressed:
- begin
+ begin
- end;
+ end;
etMouseReleased:
- begin
+ begin
- end;
+ end;
etMouseMove:
- begin
+ begin
- end;
+ end;
etMouseWheel:
- begin
+ begin
- end;
+ end;
etPaint:
- begin
+ begin
- end;
+ end;
etMove:
- begin
- if Assigned(OnMove) then OnMove(Self);
- end;
+ begin
+ if Assigned(OnMove) then OnMove(Self);
+ end;
etResize:
- begin
- if Assigned(OnResize) then OnResize(Self);
- end;
+ begin
+ if Assigned(OnResize) then OnResize(Self);
+ end;
etShow:
- begin
- if Assigned(OnShow) then OnShow(Self);
- end;
+ begin
+ if Assigned(OnShow) then OnShow(Self);
+ end;
end;
end;
diff --git a/prototypes/multihandle/gui2Base.pas b/prototypes/multihandle/gui2Base.pas
index 3af4326c..bdb604b8 100644
--- a/prototypes/multihandle/gui2Base.pas
+++ b/prototypes/multihandle/gui2Base.pas
@@ -254,7 +254,7 @@ end;
constructor TForm.Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions);
begin
inherited Create(AParent, AWindowOptions);
- FColor := colWhite;
+ FColor := colLtGray;
OnPaint := @EvOnPaint;
end;
@@ -383,6 +383,7 @@ end;
constructor TCustomEdit.Create(AParent: TFCustomWindow; APosition: TPoint);
begin
inherited Create(AParent);
+// OnMouseEntered := @EvMouseEntered
SetPosition(APosition);
SetClientSize(Size(100, 25));
end;
diff --git a/prototypes/multihandle/test.lpi b/prototypes/multihandle/test.lpi
index 7422b477..af9f5e1e 100644
--- a/prototypes/multihandle/test.lpi
+++ b/prototypes/multihandle/test.lpi
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="\"/>
+ <PathDelim Value="/"/>
<Version Value="5"/>
<General>
<Flags>
@@ -23,7 +23,7 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
@@ -41,7 +41,6 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
- <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>