summaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-08 23:56:32 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-08 23:56:32 +0000
commit7c683a4453a56e2b27a9d9a450e5078cb3d243c8 (patch)
tree545b9bbabe396367caedb03ed70f3140fe5bcf08 /prototypes
parentd1b3f4809d58376b3180afd8b25533e743ff9dcf (diff)
downloadfpGUI-7c683a4453a56e2b27a9d9a450e5078cb3d243c8.tar.xz
* Mouse Cursor support has been added (GDI is untested).
* TfpgEdit and TfpgMemo now change the mouse cursor correctly. * The prototypes/fpgui2/tests/edittest project show the mouse cursor in action. A GUI example project will be created soon to show all available cursors.
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/fpgui2/tests/edittest.dpr26
1 files changed, 5 insertions, 21 deletions
diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr
index 2313dd70..6bc1fb51 100644
--- a/prototypes/fpgui2/tests/edittest.dpr
+++ b/prototypes/fpgui2/tests/edittest.dpr
@@ -111,9 +111,8 @@ begin
InflateRect(r, -1, -1);
// Canvas.DrawControlFrame(2, 2, Width-4, Height-4);
- writeln('000000');
Canvas.DrawControlFrame(r);
- writeln('111111');
+
{
Canvas.SetColor(clGreen);
Canvas.FillRectangle(r);
@@ -305,26 +304,11 @@ begin
end;
procedure TMainForm.btnDisplayBMP(Sender: TObject);
-var
- bmp: TfpgImage;
begin
- exit;
- bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/button.bmp'));
- bmp.CreateMaskFromSample(0, 0);
- bmp.UpdateImage;
-
- Canvas.BeginDraw;
- Canvas.ClearClipRect;
- // For some reason, under Windows if I don't call this
- // the forms background goes black.
- Canvas.Clear(clWindowBackground);
-
- Canvas.DrawImage(10, 200, bmp);
- Canvas.DrawImagePart(10, 240, bmp, 0, 0, 32, 21);
- Canvas.DrawImagePart(50, 240, bmp, 32, 0, 32, 21);
-
- Canvas.EndDraw;
- bmp.Free;
+ if MouseCursor = mcDefault then
+ MouseCursor := mcHourGlass
+ else
+ MouseCursor := mcDefault;
end;
procedure TMainForm.btn3Click(Sender: TObject);