summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-10 22:23:26 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-10 22:23:26 +0000
commit3920a40d796da321010cc456fc864e552b97e398 (patch)
treebd664f387a80e7d256713e459468a9714342d973
parent2152494033a86434aa9e03bf34d5510d5f2ff78e (diff)
downloadfpGUI-3920a40d796da321010cc456fc864e552b97e398.tar.xz
* Fixed a minor variable type bug in imagelist unit.
* Added images for use in GUI Test Runner.
-rw-r--r--examples/apps/fpcunit/fpg_guitestrunner.pas49
-rw-r--r--examples/apps/fpcunit/guitestrunner_fpgui.lpk8
-rw-r--r--examples/apps/fpcunit/images/bug.bmpbin0 -> 822 bytes
-rw-r--r--examples/apps/fpcunit/images/circle_green.bmpbin0 -> 822 bytes
-rw-r--r--examples/apps/fpcunit/images/circle_grey.bmpbin0 -> 822 bytes
-rw-r--r--examples/apps/fpcunit/images/circle_red.bmpbin0 -> 822 bytes
-rw-r--r--examples/apps/fpcunit/images/information.bmpbin0 -> 822 bytes
-rw-r--r--examples/apps/fpcunit/images/treeimages.inc260
-rw-r--r--src/corelib/gfx_imagelist.pas34
9 files changed, 331 insertions, 20 deletions
diff --git a/examples/apps/fpcunit/fpg_guitestrunner.pas b/examples/apps/fpcunit/fpg_guitestrunner.pas
index 9fc8fe79..2f52ba38 100644
--- a/examples/apps/fpcunit/fpg_guitestrunner.pas
+++ b/examples/apps/fpcunit/fpg_guitestrunner.pas
@@ -11,7 +11,7 @@ uses
gui_listbox, gui_memo, gui_combobox, gui_basegrid, gui_grid,
gui_dialogs, gui_checkbox, gui_tree, gui_trackbar, gui_progressbar,
gui_radiobutton, gui_tab, gui_menu, gui_panel, gui_popupcalendar,
- gui_gauge, gui_splitter,
+ gui_gauge, gui_splitter, gfx_imagelist,
// FPCUnit support
fpcunit, testregistry, testdecorator;
@@ -26,6 +26,12 @@ type
testSuite: TTest;
temptest: TTest;
barColor: TfpgColor;
+ FImagelist: TfpgImageList;
+ img0: TfpgImage;
+ img1: TfpgImage;
+ img2: TfpgImage;
+ img3: TfpgImage;
+ img4: TfpgImage;
// ITestListener
procedure AddFailure(ATest: TTest; AFailure: TTestFailure);
procedure AddError(ATest: TTest; AError: TTestFailure);
@@ -44,6 +50,7 @@ type
procedure FindByData(ANode: TfpgTreeNode; var AFound: boolean);
function FindNode(ATest: TTest): TfpgTreeNode;
procedure ResetNodeColors(ANode: TfpgTreeNode; var AFound: boolean);
+ procedure PopulateImageList;
public
{@VFD_HEAD_BEGIN: GUITestRunnerForm}
bvlTree: TfpgBevel;
@@ -64,6 +71,7 @@ type
btnQuit: TfpgButton;
{@VFD_HEAD_END: GUITestRunnerForm}
constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
procedure AfterCreate; override;
end;
@@ -71,8 +79,13 @@ type
implementation
+uses
+ gfx_imgfmt_bmp;
+
{@VFD_NEWFORM_IMPL}
+{$I treeimages.inc}
+
procedure TGUITestRunnerForm.AddFailure(ATest: TTest; AFailure: TTestFailure);
var
FailureNode, node: TfpgTreeNode;
@@ -219,12 +232,13 @@ begin
begin
node := ARootNode.AppendText(ASuite.Test[i].TestName);
node.Data := ASuite.Test[i];
+ node.ImageIndex := 0;
if ASuite.Test[i] is TTestSuite then
BuildTree(node, TTestSuite(ASuite.Test[i]))
else
if TObject(ASuite.Test[i]).InheritsFrom(TTestDecorator) then
BuildTree(node, TTestSuite(TTestDecorator(ASuite.Test[i]).Test));
-// node.ImageIndex := 12;
+
// node.SelectedIndex := 12;
// node.StateIndex := ord(tsChecked);
end;
@@ -306,10 +320,39 @@ begin
ANode.TextColor := clUnset;
end;
+procedure TGUITestRunnerForm.PopulateImageList;
+begin
+ img0 := CreateImage_BMP(@fpcunit_circle_grey, sizeof(fpcunit_circle_grey) );
+ FImagelist.AddImage(img0, 0);
+
+ img1 := CreateImage_BMP(@fpcunit_circle_green, sizeof(fpcunit_circle_green) );
+ FImagelist.AddImage(img1, 1);
+
+ img2 := CreateImage_BMP(@fpcunit_circle_red, sizeof(fpcunit_circle_red) );
+ FImagelist.AddImage(img2, 2);
+
+ img3 := CreateImage_BMP(@fpcunit_information, sizeof(fpcunit_information) );
+ FImagelist.AddImage(img3, 3);
+
+ img4 := CreateImage_BMP(@fpcunit_bug, sizeof(fpcunit_bug) );
+ FImagelist.AddImage(img4, 4);
+end;
+
constructor TGUITestRunnerForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
OnCreate := @FormCreate;
+
+ // create and populate the imagelist
+ FImagelist := TfpgImageList.Create;
+ PopulateImageList;
+end;
+
+destructor TGUITestRunnerForm.Destroy;
+begin
+ tvTests.ImageList := nil;
+ FImagelist.Free;
+ inherited Destroy;
end;
procedure TGUITestRunnerForm.AfterCreate;
@@ -439,6 +482,8 @@ begin
Anchors := [anLeft,anRight,anTop,anBottom];
FontDesc := '#Label1';
TabOrder := 3;
+// ImageList := FImagelist;
+// ShowImages := True;
end;
memName1 := TfpgMemo.Create(bvlResults);
diff --git a/examples/apps/fpcunit/guitestrunner_fpgui.lpk b/examples/apps/fpcunit/guitestrunner_fpgui.lpk
index a1093a82..0973a798 100644
--- a/examples/apps/fpcunit/guitestrunner_fpgui.lpk
+++ b/examples/apps/fpcunit/guitestrunner_fpgui.lpk
@@ -6,6 +6,7 @@
<CompilerOptions>
<Version Value="5"/>
<SearchPaths>
+ <IncludeFiles Value="images/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
@@ -18,10 +19,15 @@
<Description Value="FPCUnit GUI Test Runner application built with fpGUI"/>
<License Value="Modified LGPL"/>
<Version Minor="1"/>
- <Files Count="1">
+ <Files Count="2">
<Item1>
<Filename Value="fpg_guitestrunner.pas"/>
+ <UnitName Value="fpg_GuiTestRunner"/>
</Item1>
+ <Item2>
+ <Filename Value="images/treeimages.inc"/>
+ <Type Value="Include"/>
+ </Item2>
</Files>
<RequiredPkgs Count="1">
<Item1>
diff --git a/examples/apps/fpcunit/images/bug.bmp b/examples/apps/fpcunit/images/bug.bmp
new file mode 100644
index 00000000..8e037647
--- /dev/null
+++ b/examples/apps/fpcunit/images/bug.bmp
Binary files differ
diff --git a/examples/apps/fpcunit/images/circle_green.bmp b/examples/apps/fpcunit/images/circle_green.bmp
new file mode 100644
index 00000000..2d776127
--- /dev/null
+++ b/examples/apps/fpcunit/images/circle_green.bmp
Binary files differ
diff --git a/examples/apps/fpcunit/images/circle_grey.bmp b/examples/apps/fpcunit/images/circle_grey.bmp
new file mode 100644
index 00000000..134b19da
--- /dev/null
+++ b/examples/apps/fpcunit/images/circle_grey.bmp
Binary files differ
diff --git a/examples/apps/fpcunit/images/circle_red.bmp b/examples/apps/fpcunit/images/circle_red.bmp
new file mode 100644
index 00000000..017e8b95
--- /dev/null
+++ b/examples/apps/fpcunit/images/circle_red.bmp
Binary files differ
diff --git a/examples/apps/fpcunit/images/information.bmp b/examples/apps/fpcunit/images/information.bmp
new file mode 100644
index 00000000..da338b9f
--- /dev/null
+++ b/examples/apps/fpcunit/images/information.bmp
Binary files differ
diff --git a/examples/apps/fpcunit/images/treeimages.inc b/examples/apps/fpcunit/images/treeimages.inc
new file mode 100644
index 00000000..f42f1b55
--- /dev/null
+++ b/examples/apps/fpcunit/images/treeimages.inc
@@ -0,0 +1,260 @@
+
+Const
+ fpcunit_circle_green : Array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,229,240,231,160,200,
+ 166, 86,156, 94, 63,143, 73, 60,141, 69, 76,149, 83,152,193,155,225,
+ 237,227,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,196,222,201, 87,160,100, 65,153, 80,125,194,
+ 143,150,208,166,150,207,166,120,190,137, 54,141, 66, 65,141, 72,185,
+ 213,188,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 198,224,204, 85,160,100,100,180,120,168,219,181,135,204,152,102,188,
+ 125,100,186,124,134,203,152,165,217,180, 88,170,107, 53,134, 61,185,
+ 213,188,255,255,255,255,255,255,255,255,255,233,243,235,103,172,118,
+ 106,185,125,168,219,178, 96,188,119, 92,186,115, 89,184,112, 89,181,
+ 111, 88,181,111, 91,183,116,165,217,179, 90,170,108, 66,143, 73,226,
+ 238,227,255,255,255,255,255,255,175,213,184, 83,171,104,170,221,180,
+ 100,193,121, 95,190,113, 96,188,119, 89,184,112, 89,184,112, 89,184,
+ 112, 88,181,110, 92,183,116,166,218,180, 56,143, 67,151,193,155,255,
+ 255,255,255,255,255,119,184,136,138,204,152,137,211,150,107,198,122,
+ 99,193,112, 89,184,112, 89,184,112, 89,184,112, 89,184,112, 89,184,
+ 112, 91,185,114,133,204,151,123,190,141, 77,150, 85,255,255,255,255,
+ 255,255,106,178,127,169,221,179,125,207,138,117,204,129, 89,184,112,
+ 89,184,112, 89,184,112, 89,184,112, 89,184,112, 89,184,112, 89,184,
+ 112,103,190,125,156,212,171, 59,140, 68,255,255,255,255,255,255,110,
+ 181,131,182,226,190,139,213,151,122,201,134, 89,184,112, 89,184,112,
+ 89,184,112, 89,184,112, 89,184,112, 89,184,112, 89,184,112,105,193,
+ 126,157,212,170, 63,143, 73,255,255,255,255,255,255,130,191,149,172,
+ 221,182,166,223,175,129,203,140,124,201,134,110,189,121, 89,184,112,
+ 89,184,112, 91,172,106, 96,188,119, 92,186,115,139,209,153,128,197,
+ 146, 88,158, 97,255,255,255,255,255,255,184,220,196,133,199,151,210,
+ 238,215,149,217,160,138,211,148,127,200,137, 89,184,112, 89,184,112,
+ 121,205,133,107,195,124,111,199,126,172,223,181, 69,158, 87,161,201,
+ 167,255,255,255,255,255,255,236,246,239,127,191,147,170,218,183,216,
+ 241,220,146,216,157,136,205,147,132,204,142,139,212,150,138,212,149,
+ 131,210,142,175,224,183,107,185,125, 91,163,103,230,241,232,255,255,
+ 255,255,255,255,255,255,255,209,233,217,118,187,140,175,220,187,220,
+ 242,224,182,228,189,155,219,165,150,217,160,165,223,175,192,232,197,
+ 121,194,138, 88,162,102,197,222,202,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,209,233,217,127,191,147,148,206,164,195,
+ 230,203,207,235,212,201,233,206,175,221,184,109,185,127,104,174,120,
+ 199,224,205,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,236,246,239,185,221,197,130,192,149,113,
+ 183,134,110,181,130,121,185,138,177,214,186,233,243,235,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255);
+
+Const
+ fpcunit_circle_grey : Array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,234,234,234,180,180,
+ 180,121,121,121,103,103,103,100,100,100,112,112,112,172,172,172,231,
+ 231,231,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,209,209,209,123,123,123,109,109,109,159,159,
+ 159,179,179,179,178,178,178,155,155,155, 97, 97, 97,103,103,103,199,
+ 199,199,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 211,211,211,122,122,122,140,140,140,193,193,193,169,169,169,145,145,
+ 145,143,143,143,168,168,168,191,191,191,129,129,129, 93, 93, 93,199,
+ 199,199,255,255,255,255,255,255,255,255,255,238,238,238,137,137,137,
+ 145,145,145,193,193,193,142,142,142,139,139,139,136,136,136,135,135,
+ 135,134,134,134,137,137,137,191,191,191,130,130,130,104,104,104,232,
+ 232,232,255,255,255,255,255,255,194,194,194,127,127,127,195,195,195,
+ 146,146,146,142,142,142,142,142,142,136,136,136,136,136,136,136,136,
+ 136,134,134,134,137,137,137,192,192,192, 99, 99, 99,172,172,172,255,
+ 255,255,255,255,255,151,151,151,171,171,171,174,174,174,152,152,152,
+ 146,146,146,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
+ 136,138,138,138,168,168,168,156,156,156,113,113,113,255,255,255,255,
+ 255,255,142,142,142,195,195,195,166,166,166,160,160,160,136,136,136,
+ 136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
+ 136,146,146,146,184,184,184, 99, 99, 99,255,255,255,255,255,255,145,
+ 145,145,204,204,204,176,176,176,161,161,161,136,136,136,136,136,136,
+ 136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,149,149,
+ 149,184,184,184,103,103,103,255,255,255,255,255,255,160,160,160,196,
+ 196,196,194,194,194,166,166,166,162,162,162,149,149,149,136,136,136,
+ 136,136,136,131,131,131,142,142,142,139,139,139,174,174,174,162,162,
+ 162,123,123,123,255,255,255,255,255,255,202,202,202,166,166,166,224,
+ 224,224,183,183,183,174,174,174,163,163,163,136,136,136,136,136,136,
+ 163,163,163,151,151,151,155,155,155,197,197,197,113,113,113,181,181,
+ 181,255,255,255,255,255,255,241,241,241,159,159,159,194,194,194,228,
+ 228,228,181,181,181,170,170,170,168,168,168,175,175,175,175,175,175,
+ 170,170,170,199,199,199,146,146,146,127,127,127,235,235,235,255,255,
+ 255,255,255,255,255,255,255,221,221,221,152,152,152,197,197,197,231,
+ 231,231,205,205,205,187,187,187,183,183,183,194,194,194,212,212,212,
+ 157,157,157,125,125,125,209,209,209,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,221,221,221,159,159,159,177,177,177,212,
+ 212,212,221,221,221,217,217,217,198,198,198,147,147,147,139,139,139,
+ 211,211,211,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,241,241,241,203,203,203,161,161,161,148,
+ 148,148,145,145,145,153,153,153,195,195,195,238,238,238,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255);
+
+Const
+ fpcunit_circle_red : Array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,229,232,247,158,169,
+ 225, 84,107,199, 63, 89,192, 58, 83,191, 76,103,194,151,167,220,225,
+ 230,245,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,195,201,237, 85,102,204, 60, 82,204,117,122,
+ 232,143,146,238,143,146,238,113,120,228, 51, 77,193, 64, 92,190,185,
+ 196,231,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 197,201,239, 81, 96,205, 92,101,224,161,166,245,126,134,239, 91, 99,
+ 233, 89, 93,231,125,132,238,158,160,244, 81, 93,215, 52, 82,186,185,
+ 196,231,255,255,255,255,255,255,255,255,255,232,234,249,101,113,212,
+ 97,107,227,161,172,245, 84, 95,236, 80, 92,234, 77, 89,233, 78, 89,
+ 230, 76, 86,230, 80, 86,230,158,162,244, 84, 96,214, 64, 92,191,226,
+ 231,245,255,255,255,255,255,255,172,176,234, 75, 86,219,162,171,246,
+ 86,100,240, 82,102,238, 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,
+ 233, 76, 88,230, 82, 90,230,159,163,245, 52, 80,196,150,166,220,255,
+ 255,255,255,255,255,115,120,221,129,140,238,126,145,247, 93,115,243,
+ 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,
+ 233, 79, 91,233,123,131,240,117,123,226, 76,100,196,255,255,255,255,
+ 255,255,101,105,219,161,171,247,112,134,248,104,130,246, 77, 89,233,
+ 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,
+ 233, 92,102,234,150,156,241, 57, 86,190,255,255,255,255,255,255,105,
+ 110,220,175,185,249,127,147,250,112,133,240, 84, 95,236, 84, 95,236,
+ 84, 95,236, 77, 89,233, 77, 89,233, 77, 89,233, 77, 89,233, 94,106,
+ 238,150,157,241, 61, 85,192,255,255,255,255,255,255,124,127,227,165,
+ 175,245,157,171,250,119,140,240, 84, 95,236, 84, 95,236, 84, 95,236,
+ 84, 95,236, 84, 95,236, 84, 95,236, 99,119,242,129,142,244,120,127,
+ 233, 86,107,201,255,255,255,255,255,255,181,181,240,125,131,234,205,
+ 212,252,139,157,250,126,147,247,117,138,238,108,132,246,108,132,246,
+ 108,132,246,108,132,246, 99,121,243,164,175,248, 62, 79,208,160,171,
+ 225,255,255,255,255,255,255,235,235,251,121,120,227,163,167,243,212,
+ 219,253,135,154,250,127,145,240,122,142,241,127,148,248,126,146,249,
+ 118,140,248,168,182,248, 99,110,227, 88,104,205,230,232,247,255,255,
+ 255,255,255,255,255,255,255,207,207,246,112,111,225,170,173,242,216,
+ 220,253,174,186,250,145,163,250,139,157,250,156,169,251,186,199,252,
+ 112,123,233, 84, 98,206,195,201,238,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,207,207,246,121,121,226,142,147,237,190,
+ 195,248,204,211,249,196,203,249,170,180,244,102,112,226,100,110,214,
+ 198,202,239,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,235,235,251,182,182,240,125,127,226,106,
+ 107,222,104,107,220,116,121,222,175,179,235,232,233,249,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255);
+
+Const
+ fpcunit_information : Array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,241,232,227,203,171,
+ 155,161,106, 81,144, 88, 62,142, 87, 62,154,105, 82,197,169,156,238,
+ 231,227,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,224,200,189,163,102, 72,178,128, 87,213,183,
+ 147,219,195,166,218,195,166,210,180,144,171,122, 82,146, 96, 72,216,
+ 198,189,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 226,204,189,163, 92, 60,203,167,125,216,187,159,195,156,119,182,138,
+ 98,180,134, 96,190,150,114,209,179,151,197,163,119,137, 87, 62,217,
+ 198,189,255,255,255,255,255,255,255,255,255,244,236,228,180,120, 74,
+ 207,170,129,218,188,162,190,145,102,186,140, 98,183,137, 95,179,132,
+ 94,177,131, 93,176,131, 92,205,170,141,198,165,121,149, 98, 73,239,
+ 232,228,255,255,255,255,255,255,220,188,155,191,145, 94,224,194,168,
+ 197,150,108,194,145,105,225,203,184,254,253,252,255,255,254,234,220,
+ 208,180,133, 94,179,133, 94,212,181,153,174,123, 86,200,169,155,255,
+ 255,255,255,255,255,197,144, 82,219,188,156,213,173,137,199,152,108,
+ 195,149,105,193,147,103,237,223,211,250,247,244,187,139, 99,185,138,
+ 99,184,138, 98,197,157,120,210,184,147,160,106, 82,255,255,255,255,
+ 255,255,193,131, 60,227,199,175,208,162,118,197,153,107,196,151,106,
+ 196,150,105,238,224,212,251,247,244,191,144,102,190,143,101,190,143,
+ 100,190,146,105,223,198,170,150, 86, 59,255,255,255,255,255,255,199,
+ 137, 66,228,201,176,208,163,122,204,157,113,199,154,108,197,152,107,
+ 255,255,255,255,255,254,195,150,105,193,148,104,194,148,104,195,152,
+ 109,223,197,171,153, 89, 59,255,255,255,255,255,255,210,158, 92,224,
+ 188,159,219,179,147,207,160,117,205,158,114,203,156,113,221,191,163,
+ 221,191,162,197,153,107,197,153,107,196,152,107,209,171,133,216,186,
+ 151,172,110, 82,255,255,255,255,255,255,231,201,164,205,156,104,231,
+ 203,180,212,165,122,208,160,119,207,158,116,251,248,245,251,248,245,
+ 203,158,113,203,157,113,205,161,119,223,192,165,185,138, 91,210,174,
+ 155,255,255,255,255,255,255,249,241,231,211,154, 90,217,178,140,230,
+ 202,179,214,169,125,209,165,121,226,196,168,225,195,168,208,162,118,
+ 209,164,119,221,189,162,208,172,133,180,118, 74,244,234,228,255,255,
+ 255,255,255,255,255,255,255,241,221,197,209,146, 79,217,178,140,230,
+ 205,184,224,186,157,215,171,133,214,169,130,217,179,145,225,194,171,
+ 212,174,134,180,113, 62,230,208,189,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,242,221,198,214,156, 91,208,160,106,224,
+ 191,160,227,197,174,227,197,174,223,188,159,200,151, 98,195,138, 73,
+ 233,213,189,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,250,241,231,234,204,168,216,161,101,207,
+ 145, 78,205,144, 74,209,155, 91,228,198,161,247,239,228,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255);
+
+Const
+ fpcunit_bug : Array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255, 32, 92, 35, 40,
+ 96, 42,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255, 80,132, 83, 30, 94, 33,224,232,224,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,118,167,121, 37,111,
+ 42, 33,105, 36, 32,102, 35, 82,134, 84,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255, 94,155, 97, 42,121, 46,104,161,111,107,162,
+ 115, 42,113, 46, 33,104, 36,168,195,170,198,215,199, 43,104, 46, 29,
+ 92, 32,224,232,224,255,255,255,255,255,255,255,255,255,255,255,255,
+ 98,164,101, 32,116, 35,148,192,157,108,175,130, 77,158,103,112,176,
+ 132,117,166,122, 34,107, 37, 33,104, 36, 38,105, 41,153,184,154,255,
+ 255,255,255,255,255,255,255,255,255,255,255,148,197,151, 45,140, 50,
+ 119,181,130, 77,158, 84,121,179,140, 77,161,106, 70,154, 96,113,176,
+ 132, 54,125, 57, 35,110, 38,169,197,170,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255, 58,153, 63, 98,173,104,119,190,145,
+ 68,160, 93, 75,159, 83,120,180,140, 78,162,106, 71,156, 98,113,177,
+ 133,106,160,111, 36,113, 39,239,245,240,255,255,255,147,181,148,255,
+ 255,255,255,255,255, 57,159, 61, 82,169, 89,109,188,140, 77,170,112,
+ 66,159, 92, 76,162, 84,131,191,150, 81,163,109, 71,157, 99,137,190,
+ 153, 38,119, 42, 37,116, 41, 35,112, 39, 34,108, 38,255,255,255, 97,
+ 184,100, 51,161, 56, 51,158, 56,148,207,172, 92,180,126, 78,172,114,
+ 65,161, 93, 78,166, 87,133,193,152, 87,168,115,134,190,153, 42,126,
+ 45, 47,127, 51,162,196,164,255,255,255, 59,175, 64, 54,170, 59,127,
+ 199,130, 72,172, 78, 80,173, 86,141,204,165, 94,181,128, 79,173,115,
+ 66,163, 93, 81,170, 89,154,203,169,142,191,149, 41,131, 46,105,141,
+ 120,255,255,255,255,255,255, 67,181, 73,228,244,228,255,255,255,255,
+ 255,255, 53,166, 59, 57,165, 63,144,206,168, 98,185,132, 88,178,123,
+ 96,178,118, 56,151, 62, 41,137, 45, 87,164, 98, 69,105, 94,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,204,234,206, 54,
+ 171, 60, 68,174, 73, 69,172, 75,158,212,173,164,215,184,133,195,142,
+ 40,143, 45, 79,183, 95,151,200,170, 44,141, 49, 43,137, 48, 42,133,
+ 46,255,255,255,255,255,255,255,255,255, 68,183, 73, 61,179, 66,255,
+ 255,255, 67,177, 72, 53,168, 58, 52,165, 57, 52,161, 57,114,194,126,
+ 175,227,194, 95,140,120,161,184,173,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255, 58,183, 64,165,221,168,255,255,255,255,
+ 255,255, 60,175, 65, 68,176, 73,135,172,156, 64,138, 85, 52,157, 59,
+ 150,179,165,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,228,246,229,255,255,255,255,255,255,255,255,255, 56,
+ 178, 62,115,199,120,231,240,235,175,221,177, 62,171, 68,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255, 58,183, 63,205,
+ 236,206,255,255,255,191,229,193, 60,175, 66,255,255,255,255,255,255,
+ 255,255,255,255,255,255);
diff --git a/src/corelib/gfx_imagelist.pas b/src/corelib/gfx_imagelist.pas
index 74260eef..044f951e 100644
--- a/src/corelib/gfx_imagelist.pas
+++ b/src/corelib/gfx_imagelist.pas
@@ -40,17 +40,17 @@ type
TfpgImageItem = class(TObject)
private
FImage: TfpgImage;
- FIndex: word;
+ FIndex: integer;
FImageList: TfpgImageList;
procedure SetImageList(AImageList: TfpgImageList);
- procedure SetIndex(AIndex: word);
+ procedure SetIndex(AIndex: integer);
procedure SetImage(AImage: TfpgImage);
public
constructor Create; overload;
- constructor Create(AImageList: TfpgImageList; AIndex: word; AImage: TfpgImage); overload;
- constructor Create(AFileName: string; AIndex: word); overload;
+ constructor Create(AImageList: TfpgImageList; AIndex: integer; AImage: TfpgImage); overload;
+ constructor Create(AFileName: string; AIndex: integer); overload;
destructor Destroy; override;
- property Index: word read FIndex write SetIndex;
+ property Index: integer read FIndex write SetIndex;
property Image: TfpgImage read FImage write SetImage;
property ImageList: TfpgImageList read FImageList write SetImageList;
procedure LoadFromFile(AFileName: String);
@@ -66,10 +66,10 @@ type
public
constructor Create;
destructor Destroy; override;
- procedure AddItemFromFile(AFileName: String; AIndex: word = -1);
- procedure AddImage(AImage: TfpgImage; AIndex: word = -1);
+ procedure AddItemFromFile(AFileName: String; AIndex: integer = -1);
+ procedure AddImage(AImage: TfpgImage; AIndex: integer = -1);
procedure RemoveIndex(AIndex: integer);
- function GetMaxItem: word;
+ function GetMaxItem: integer;
property Item[AIndex: integer]: TfpgImageItem read GetItem write SetItem;
end;
@@ -131,15 +131,15 @@ end;
destructor TfpgImageList.Destroy;
var
- ACounter: integer;
+ i: integer;
begin
- for ACounter := 0 to FList.Count - 1 do
- TfpgImageItem(FList[ACounter]).Destroy; // frees images
+ for i := 0 to FList.Count - 1 do
+ TfpgImageItem(FList[i]).Destroy; // frees images
FList.Destroy;
inherited Destroy
end;
-procedure TfpgImageList.AddItemFromFile(AFileName: String; AIndex: word);
+procedure TfpgImageList.AddItemFromFile(AFileName: String; AIndex: integer);
var
AImageItem: TfpgImageItem;
begin
@@ -161,7 +161,7 @@ begin
end;
end;
-procedure TfpgImageList.AddImage(AImage: TfpgImage; AIndex: word);
+procedure TfpgImageList.AddImage(AImage: TfpgImage; AIndex: integer);
var
AImageItem: TfpgImageItem;
begin
@@ -189,7 +189,7 @@ begin
end;
end;
-function TfpgImageList.GetMaxItem: word;
+function TfpgImageList.GetMaxItem: integer;
var
ACounter: integer;
begin
@@ -216,7 +216,7 @@ begin
end;
end;
-procedure TfpgImageItem.SetIndex(AIndex: word);
+procedure TfpgImageItem.SetIndex(AIndex: integer);
begin
{$IFDEF DEBUG}
writeln('TfpgImageItem.SetIndex');
@@ -248,7 +248,7 @@ begin
FImage := nil;
end;
-constructor TfpgImageItem.Create(AImageList: TfpgImageList; AIndex: word;
+constructor TfpgImageItem.Create(AImageList: TfpgImageList; AIndex: integer;
AImage: TfpgImage);
begin
if AImageList = nil then
@@ -259,7 +259,7 @@ begin
ImageList := AImageList;
end;
-constructor TfpgImageItem.Create(AFileName: string; AIndex: word);
+constructor TfpgImageItem.Create(AFileName: string; AIndex: integer);
begin
{$IFDEF DEBUG}
writeln('TfpgImageItem.Create(', AFileName, ',', AIndex, ')');