1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-02-07 10:40:19 -05:00
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@296 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-12-19 23:34:38 +00:00
parent 3e2a64cc7e
commit a74bd810c0
5 changed files with 484 additions and 503 deletions

View File

@ -1,7 +1,7 @@
object ColourHistoryForm: TColourHistoryForm object ColourHistoryForm: TColourHistoryForm
Left = 420 Left = 373
Height = 250 Height = 250
Top = 318 Top = 308
Width = 490 Width = 490
ActiveControl = SelectionName ActiveControl = SelectionName
Caption = 'Colour Picker History' Caption = 'Colour Picker History'
@ -9,33 +9,9 @@ object ColourHistoryForm: TColourHistoryForm
ClientWidth = 490 ClientWidth = 490
Constraints.MinHeight = 200 Constraints.MinHeight = 200
Constraints.MinWidth = 490 Constraints.MinWidth = 490
OnCreate = FormCreate
OnHide = UnSetCHShowMenu OnHide = UnSetCHShowMenu
OnShow = SetCHShowMenu OnShow = SetCHShowMenu
LCLVersion = '0.9.29' LCLVersion = '0.9.29'
object ColourList: TListView
Left = 16
Height = 176
Top = 16
Width = 329
Anchors = [akTop, akLeft, akRight, akBottom]
Columns = <
item
Caption = 'Colour'
MaxWidth = 50
MinWidth = 50
Width = 10
end
item
Caption = 'Woot'
Width = 10
end>
ItemIndex = -1
TabOrder = 0
ViewStyle = vsReport
OnAdvancedCustomDrawSubItem = ColourListAdvancedCustomDrawSubItem
OnSelectItem = ChangeViewData
end
object DeleteButton: TButton object DeleteButton: TButton
Left = 16 Left = 16
Height = 25 Height = 25
@ -44,17 +20,17 @@ object ColourHistoryForm: TColourHistoryForm
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
Caption = 'Delete' Caption = 'Delete'
OnClick = DeleteSelected OnClick = DeleteSelected
TabOrder = 1 TabOrder = 0
end end
object SelectionName: TEdit object SelectionName: TEdit
Left = 361 Left = 361
Height = 21 Height = 27
Top = 16 Top = 16
Width = 112 Width = 112
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
OnChange = ChangeName OnChange = ChangeName
OnKeyPress = SelectionNameKeyPress OnKeyPress = SelectionNameKeyPress
TabOrder = 2 TabOrder = 1
Text = 'Name' Text = 'Name'
end end
object PickNewColourButton: TButton object PickNewColourButton: TButton
@ -64,21 +40,21 @@ object ColourHistoryForm: TColourHistoryForm
Width = 128 Width = 128
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
Caption = 'Pick New Colour' Caption = 'Pick New Colour'
TabOrder = 3 TabOrder = 2
end end
object ColourValue: TEdit object ColourValue: TEdit
Left = 361 Left = 361
Height = 21 Height = 27
Top = 56 Top = 56
Width = 112 Width = 112
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
ReadOnly = True ReadOnly = True
TabOrder = 4 TabOrder = 3
Text = 'ColourValue' Text = 'ColourValue'
end end
object CoordValue: TLabel object CoordValue: TLabel
Left = 361 Left = 361
Height = 14 Height = 18
Top = 96 Top = 96
Width = 112 Width = 112
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@ -101,11 +77,11 @@ object ColourHistoryForm: TColourHistoryForm
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
Caption = 'Ok' Caption = 'Ok'
OnClick = OkButtonClick OnClick = OkButtonClick
TabOrder = 5 TabOrder = 4
end end
object CH_RGB_Label: TLabel object CH_RGB_Label: TLabel
Left = 361 Left = 361
Height = 14 Height = 18
Top = 128 Top = 128
Width = 112 Width = 112
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@ -113,4 +89,20 @@ object ColourHistoryForm: TColourHistoryForm
Constraints.MinWidth = 112 Constraints.MinWidth = 112
ParentColor = False ParentColor = False
end end
object ColourTree: TTreeView
Left = 8
Height = 169
Top = 16
Width = 337
Anchors = [akTop, akLeft, akRight, akBottom]
DefaultItemHeight = 19
Images = CHImages
ScrollBars = ssAutoBoth
TabOrder = 5
OnChange = ColourTreeChange
end
object CHImages: TImageList
left = 360
top = 200
end
end end

View File

@ -1,36 +1,34 @@
{ This is an automatically generated lazarus resource file } { This is an automatically generated lazarus resource file }
LazarusResources.Add('TColourHistoryForm','FORMDATA',[ LazarusResources.Add('TColourHistoryForm','FORMDATA',[
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3#164#1#6'Height' 'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3'u'#1#6'Height'#3
+#3#250#0#3'Top'#3'>'#1#5'Width'#3#234#1#13'ActiveControl'#7#13'SelectionName' +#250#0#3'Top'#3'4'#1#5'Width'#3#234#1#13'ActiveControl'#7#13'SelectionName'#7
+#7'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#250#0#11'ClientWi' +'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#250#0#11'ClientWidt'
+'dth'#3#234#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3 +'h'#3#234#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3#234
+#234#1#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#15'UnSetCHShowMenu'#6'OnShow' +#1#6'OnHide'#7#15'UnSetCHShowMenu'#6'OnShow'#7#13'SetCHShowMenu'#10'LCLVersi'
+#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#9'TListView'#10'ColourList' +'on'#6#6'0.9.29'#0#7'TButton'#12'DeleteButton'#4'Left'#2#16#6'Height'#2#25#3
+#4'Left'#2#16#6'Height'#3#176#0#3'Top'#2#16#5'Width'#3'I'#1#7'Anchors'#11#5 +'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capti'
+'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Columns'#14#1#7'Caption'#6#6'Co' +'on'#6#6'Delete'#7'OnClick'#7#14'DeleteSelected'#8'TabOrder'#2#0#0#0#5'TEdit'
+'lour'#8'MaxWidth'#2'2'#8'MinWidth'#2'2'#5'Width'#2#10#0#1#7'Caption'#6#4'Wo' +#13'SelectionName'#4'Left'#3'i'#1#6'Height'#2#27#3'Top'#2#16#5'Width'#2'p'#7
+'ot'#5'Width'#2#10#0#0#9'ItemIndex'#2#255#8'TabOrder'#2#0#9'ViewStyle'#7#8'v' +'Anchors'#11#5'akTop'#7'akRight'#0#8'OnChange'#7#10'ChangeName'#10'OnKeyPres'
+'sReport'#27'OnAdvancedCustomDrawSubItem'#7'#ColourListAdvancedCustomDrawSub' +'s'#7#21'SelectionNameKeyPress'#8'TabOrder'#2#1#4'Text'#6#4'Name'#0#0#7'TBut'
+'Item'#12'OnSelectItem'#7#14'ChangeViewData'#0#0#7'TButton'#12'DeleteButton' +'ton'#19'PickNewColourButton'#4'Left'#3#217#0#6'Height'#2#25#3'Top'#3#208#0#5
+#4'Left'#2#16#6'Height'#2#25#3'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#6 +'Width'#3#128#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#15'Pick '
+'akLeft'#8'akBottom'#0#7'Caption'#6#6'Delete'#7'OnClick'#7#14'DeleteSelected' +'New Colour'#8'TabOrder'#2#2#0#0#5'TEdit'#11'ColourValue'#4'Left'#3'i'#1#6'H'
+#8'TabOrder'#2#1#0#0#5'TEdit'#13'SelectionName'#4'Left'#3'i'#1#6'Height'#2#21 +'eight'#2#27#3'Top'#2'8'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8
+#3'Top'#2#16#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'OnChange'#7 +'ReadOnly'#9#8'TabOrder'#2#3#4'Text'#6#11'ColourValue'#0#0#6'TLabel'#10'Coor'
+#10'ChangeName'#10'OnKeyPress'#7#21'SelectionNameKeyPress'#8'TabOrder'#2#2#4 +'dValue'#4'Left'#3'i'#1#6'Height'#2#18#3'Top'#2'`'#5'Width'#2'p'#7'Anchors'
+'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColourButton'#4'Left'#3#217#0#6'He' +#11#5'akTop'#7'akRight'#0#7'Caption'#6#10'CoordValue'#20'Constraints.MinWidt'
+'ight'#2#25#3'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#7'akRight'#8'akBot' +'h'#2'p'#11'ParentColor'#8#0#0#6'TImage'#11'ColourImage'#4'Left'#3#152#0#6'H'
+'tom'#0#7'Caption'#6#15'Pick New Colour'#8'TabOrder'#2#3#0#0#5'TEdit'#11'Col' +'eight'#2#24#3'Top'#3#209#0#5'Width'#2'9'#7'Anchors'#11#6'akLeft'#7'akRight'
+'ourValue'#4'Left'#3'i'#1#6'Height'#2#21#3'Top'#2'8'#5'Width'#2'p'#7'Anchors' +#8'akBottom'#0#0#0#7'TButton'#8'OkButton'#4'Left'#3#137#1#6'Height'#2#24#3'T'
+#11#5'akTop'#7'akRight'#0#8'ReadOnly'#9#8'TabOrder'#2#4#4'Text'#6#11'ColourV' +'op'#3#209#0#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'
+'alue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'i'#1#6'Height'#2#14#3'Top'#2'`' +#6#2'Ok'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#4#0#0#6'TLabel'#12'CH_'
+#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#10'CoordValu' +'RGB_Label'#4'Left'#3'i'#1#6'Height'#2#18#3'Top'#3#128#0#5'Width'#2'p'#7'Anc'
+'e'#20'Constraints.MinWidth'#2'p'#11'ParentColor'#8#0#0#6'TImage'#11'ColourI' +'hors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#9'RGBValues'#20'Constraints.Min'
+'mage'#4'Left'#3#152#0#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'9'#7'Anchors' +'Width'#2'p'#11'ParentColor'#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6
+#11#6'akLeft'#7'akRight'#8'akBottom'#0#0#0#7'TButton'#8'OkButton'#4'Left'#3 +'Height'#3#169#0#3'Top'#2#16#5'Width'#3'Q'#1#7'Anchors'#11#5'akTop'#6'akLeft'
+#137#1#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8 +#7'akRight'#8'akBottom'#0#17'DefaultItemHeight'#2#19#6'Images'#7#8'CHImages'
+'akBottom'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2 +#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#8'OnChange'#7#16'ColourTree'
+#5#0#0#6'TLabel'#12'CH_RGB_Label'#4'Left'#3'i'#1#6'Height'#2#14#3'Top'#3#128 +'Change'#0#0#10'TImageList'#8'CHImages'#4'left'#3'h'#1#3'top'#3#200#0#0#0#0
+#0#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#9'RGBValue'
+'s'#20'Constraints.MinWidth'#2'p'#11'ParentColor'#8#0#0#0
]); ]);

View File

@ -23,32 +23,27 @@ type
TColourHistoryForm = class(TForm) TColourHistoryForm = class(TForm)
CH_RGB_Label: TLabel; CH_RGB_Label: TLabel;
CHImages: TImageList;
OkButton: TButton; OkButton: TButton;
ColourValue: TEdit; ColourValue: TEdit;
CoordValue: TLabel; CoordValue: TLabel;
ColourImage: TImage; ColourImage: TImage;
PickNewColourButton: TButton; PickNewColourButton: TButton;
DeleteButton: TButton; DeleteButton: TButton;
ColourList: TListView;
SelectionName: TEdit; SelectionName: TEdit;
ColourTree: TTreeView;
procedure ChangeName(Sender: TObject); procedure ChangeName(Sender: TObject);
procedure ChangeViewData(Sender: TObject; Item: TListItem; Selected: Boolean procedure ColourTreeChange(Sender: TObject; Node: TTreeNode);
);
procedure ColourListAdvancedCustomDrawSubItem(Sender: TCustomListView;
Item: TListItem; SubItem: Integer; State: TCustomDrawState;
Stage: TCustomDrawStage; var DefaultDraw: Boolean);
procedure DeleteSelected(Sender: TObject); procedure DeleteSelected(Sender: TObject);
procedure AddColObj(c: TColourPickerObject; autoName: Boolean); procedure AddColObj(c: TColourPickerObject; autoName: Boolean);
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
procedure FormCreate(Sender: TObject);
procedure OkButtonClick(Sender: TObject); procedure OkButtonClick(Sender: TObject);
procedure SelectionNameKeyPress(Sender: TObject; var Key: char); procedure SelectionNameKeyPress(Sender: TObject; var Key: char);
procedure SetCHShowMenu(Sender: TObject); procedure SetCHShowMenu(Sender: TObject);
procedure UnSetCHShowMenu(Sender: TObject); procedure UnSetCHShowMenu(Sender: TObject);
private private
Colour_Count: Integer;
{ private declarations } { private declarations }
protected protected
procedure AddColObj(c: TColourPickerObject); procedure AddColObj(c: TColourPickerObject);
@ -86,9 +81,8 @@ procedure TColourHistoryForm.AddColObj(c: TColourPickerObject; autoName: Boolean
begin begin
if autoName then if autoName then
begin begin
Inc(Colour_Count);
// TODO: Proper name // TODO: Proper name
c.Name := IntToStr(c.Colour) + ' (' + IntToStr(Colour_Count) + ')'; c.Name := IntToStr(c.Colour);
end; end;
Self.AddColObj(c); Self.AddColObj(c);
end; end;
@ -96,50 +90,65 @@ end;
procedure TColourHistoryForm.AddColObj(c: TColourPickerObject); procedure TColourHistoryForm.AddColObj(c: TColourPickerObject);
var var
it: TListItem; it: TTreeNode;
bmp: TBitmap;
begin begin
it := ColourList.Items.Add; it := ColourTree.Items.Add(nil, c.Name);
it.Data := c; it.Data := c;
it.Caption:= c.Name; ColourTree.Selected := it;
ColourList.Selected := it;
bmp:=TBitmap.Create;
bmp.SetSize(16,16);
bmp.Canvas.Brush.Color:=c.Colour;
bmp.Canvas.Rectangle(0,0,16,16);
it.ImageIndex:= CHImages.Add(bmp,nil);
bmp.Free;
end; end;
procedure TColourHistoryForm.DeleteSelected(Sender: TObject); procedure TColourHistoryForm.DeleteSelected(Sender: TObject);
var
i:integer;
begin begin
if (Assigned(ColourList.Selected)) then if (Assigned(ColourTree.Selected)) then
begin begin
TColourPickerObject(ColourList.Selected.Data).Free; if Assigned(ColourTree.Selected.Data) then
ColourList.Selected.Delete; TColourPickerObject(ColourTree.Selected.Data).Free;
i:=ColourTree.Selected.ImageIndex;
ColourTree.Selected.ImageIndex:=0;
CHImages.Delete(i);
ColourTree.Selected.Delete;
end; end;
end; end;
procedure TColourHistoryForm.ChangeViewData(Sender: TObject; Item: TListItem; procedure TColourHistoryForm.ColourTreeChange(Sender: TObject; Node: TTreeNode);
Selected: Boolean);
var var
r,g,b:integer; r,g,b:integer;
begin begin
if not Assigned(Item) then if not Assigned(Node) then
exit; exit;
if not Item.Selected then if not Node.Selected then
exit; exit;
{ This only occurs when we have manually added an item with the Form Editor } { This only occurs when we have manually added an item with the Form Editor }
if not Assigned(Item.Data) then if not Assigned(Node.Data) then
exit; exit;
colour_conv.ColorToRGB(TColourPickerObject(Item.Data).Colour, r, g, b); colour_conv.ColorToRGB(TColourPickerObject(Node.Data).Colour, r, g, b);
{ Change Form Text / Values } { Change Form Text / Values }
ColourValue.Caption := IntToStr(TColourPickerObject(Item.Data).Colour); ColourValue.Caption := IntToStr(TColourPickerObject(Node.Data).Colour);
CoordValue.Caption := 'Coords: ' + IntToStr(TColourPickerObject(Item.Data).Pos.X) + CoordValue.Caption := 'Coords: ' + IntToStr(TColourPickerObject(Node.Data).Pos.X) +
', ' + IntToStr(TColourPickerObject(Item.Data).Pos.Y); ', ' + IntToStr(TColourPickerObject(Node.Data).Pos.Y);
SelectionName.Text := TColourPickerObject(Item.Data).Name; SelectionName.Text := TColourPickerObject(Node.Data).Name;
CH_RGB_Label.Caption:=Format('RGB:%d,%d,%d', [r,g,b]); CH_RGB_Label.Caption:=Format('RGB:%d,%d,%d', [r,g,b]);
{ Draw the Image } { Draw the Image }
ColourImage.Canvas.Brush.Color := TColourPickerObject(Item.Data).Colour; ColourImage.Canvas.Brush.Color := TColourPickerObject(Node.Data).Colour;
ColourImage.Canvas.Rectangle(0,0,ColourImage.Width, ColourImage.Height); ColourImage.Canvas.Rectangle(0,0,ColourImage.Width, ColourImage.Height);
if Self.Visible then if Self.Visible then
@ -151,52 +160,34 @@ begin
end; end;
end; end;
procedure TColourHistoryForm.ColourListAdvancedCustomDrawSubItem(
Sender: TCustomListView; Item: TListItem; SubItem: Integer;
State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
begin
if SubItem = 0 then
ColourList.Canvas.Brush.Color := clWhite
else
ColourList.Canvas.Brush.Color := TColourPickerObject(Item.Data).Colour;
end;
procedure TColourHistoryForm.ChangeName(Sender: TObject); procedure TColourHistoryForm.ChangeName(Sender: TObject);
begin begin
if not Assigned(ColourList.Selected) then if not Assigned(ColourTree.Selected) then
begin begin
WriteLn('We double clicked but have nothing Selected?'); WriteLn('We double clicked but have nothing Selected?');
exit; exit;
end; end;
ColourList.Selected.Caption := SelectionName.Text; ColourTree.Selected.Text := SelectionName.Text;
TColourPickerObject(ColourList.Selected.Data).Name := SelectionName.Text; TColourPickerObject(ColourTree.Selected.Data).Name := SelectionName.Text;
end; end;
constructor TColourHistoryForm.Create(TheOwner: TComponent); constructor TColourHistoryForm.Create(TheOwner: TComponent);
begin begin
inherited Create(TheOwner); inherited Create(TheOwner);
Colour_Count := 0;
PickNewColourButton.OnClick:= @Form1.ButtonPickClick; PickNewColourButton.OnClick:= @Form1.ButtonPickClick;
end; end;
destructor TColourHistoryForm.Destroy; destructor TColourHistoryForm.Destroy;
begin begin
PickNewColourButton.OnClick := nil; PickNewColourButton.OnClick := nil;
Colour_Count := 0;
inherited Destroy; inherited Destroy;
end; end;
procedure TColourHistoryForm.FormCreate(Sender: TObject);
begin
ColourList.Column[0].Width:= 100;
ColourList.Column[1].Width:= 500;
end;
procedure TColourHistoryForm.OkButtonClick(Sender: TObject); procedure TColourHistoryForm.OkButtonClick(Sender: TObject);
begin begin
Self.close; Self.Close;
end; end;
procedure TColourHistoryForm.SelectionNameKeyPress(Sender: TObject; procedure TColourHistoryForm.SelectionNameKeyPress(Sender: TObject;

View File

@ -10,7 +10,7 @@
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="Mufasa Stand Alone"/> <Title Value="Mufasa Stand Alone"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="10"/> <ActiveEditorIndexAtStart Value="6"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <ProjectVersion Value=""/>
@ -167,8 +167,8 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/> <UnitName Value="TestUnit"/>
<CursorPos X="1" Y="403"/> <CursorPos X="57" Y="15"/>
<TopLine Value="380"/> <TopLine Value="1"/>
<EditorIndex Value="5"/> <EditorIndex Value="5"/>
<UsageCount Value="202"/> <UsageCount Value="202"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -224,8 +224,8 @@
<Filename Value="../../Units/MMLCore/client.pas"/> <Filename Value="../../Units/MMLCore/client.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="Client"/> <UnitName Value="Client"/>
<CursorPos X="107" Y="49"/> <CursorPos X="45" Y="14"/>
<TopLine Value="34"/> <TopLine Value="1"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="201"/> <UsageCount Value="201"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -278,7 +278,7 @@
<CursorPos X="23" Y="8"/> <CursorPos X="23" Y="8"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="18"/> <EditorIndex Value="18"/>
<UsageCount Value="69"/> <UsageCount Value="71"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit31> </Unit31>
<Unit32> <Unit32>
@ -292,8 +292,8 @@
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/finder.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="finder"/> <UnitName Value="finder"/>
<CursorPos X="25" Y="820"/> <CursorPos X="58" Y="23"/>
<TopLine Value="807"/> <TopLine Value="1"/>
<EditorIndex Value="8"/> <EditorIndex Value="8"/>
<UsageCount Value="201"/> <UsageCount Value="201"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -810,7 +810,7 @@
<CursorPos X="33" Y="34"/> <CursorPos X="33" Y="34"/>
<TopLine Value="30"/> <TopLine Value="30"/>
<EditorIndex Value="17"/> <EditorIndex Value="17"/>
<UsageCount Value="28"/> <UsageCount Value="30"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit107> </Unit107>
<Unit108> <Unit108>
@ -875,7 +875,7 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ocr"/> <UnitName Value="ocr"/>
<CursorPos X="105" Y="105"/> <CursorPos X="105" Y="105"/>
<TopLine Value="74"/> <TopLine Value="252"/>
<EditorIndex Value="9"/> <EditorIndex Value="9"/>
<UsageCount Value="200"/> <UsageCount Value="200"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -1006,7 +1006,7 @@
<UnitName Value="web"/> <UnitName Value="web"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="185"/> <UsageCount Value="188"/>
</Unit136> </Unit136>
<Unit137> <Unit137>
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/> <Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
@ -1205,7 +1205,7 @@
<UnitName Value="framescript"/> <UnitName Value="framescript"/>
<CursorPos X="106" Y="190"/> <CursorPos X="106" Y="190"/>
<TopLine Value="180"/> <TopLine Value="180"/>
<UsageCount Value="178"/> <UsageCount Value="181"/>
</Unit161> </Unit161>
<Unit162> <Unit162>
<Filename Value="framesynedit.lrs"/> <Filename Value="framesynedit.lrs"/>
@ -1517,10 +1517,10 @@
<ComponentName Value="ColourHistoryForm"/> <ComponentName Value="ColourHistoryForm"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="colourhistory"/> <UnitName Value="colourhistory"/>
<CursorPos X="72" Y="21"/> <CursorPos X="73" Y="197"/>
<TopLine Value="13"/> <TopLine Value="176"/>
<EditorIndex Value="6"/> <EditorIndex Value="6"/>
<UsageCount Value="115"/> <UsageCount Value="118"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit208> </Unit208>
<Unit209> <Unit209>
@ -1771,7 +1771,7 @@
<UnitName Value="about"/> <UnitName Value="about"/>
<CursorPos X="44" Y="21"/> <CursorPos X="44" Y="21"/>
<TopLine Value="4"/> <TopLine Value="4"/>
<UsageCount Value="78"/> <UsageCount Value="81"/>
</Unit245> </Unit245>
<Unit246> <Unit246>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/file.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/file.inc"/>
@ -1785,7 +1785,7 @@
<UnitName Value="internets"/> <UnitName Value="internets"/>
<CursorPos X="87" Y="3"/> <CursorPos X="87" Y="3"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="72"/> <UsageCount Value="75"/>
</Unit247> </Unit247>
<Unit248> <Unit248>
<Filename Value="debugimageform.pas"/> <Filename Value="debugimageform.pas"/>
@ -1794,7 +1794,7 @@
<UnitName Value="debugimageform"/> <UnitName Value="debugimageform"/>
<CursorPos X="20" Y="1"/> <CursorPos X="20" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="59"/> <UsageCount Value="62"/>
</Unit248> </Unit248>
<Unit249> <Unit249>
<Filename Value="debugimage.pas"/> <Filename Value="debugimage.pas"/>
@ -1805,7 +1805,7 @@
<CursorPos X="87" Y="39"/> <CursorPos X="87" Y="39"/>
<TopLine Value="20"/> <TopLine Value="20"/>
<EditorIndex Value="7"/> <EditorIndex Value="7"/>
<UsageCount Value="58"/> <UsageCount Value="61"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit249> </Unit249>
<Unit250> <Unit250>
@ -1877,10 +1877,10 @@
<Unit260> <Unit260>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<UnitName Value="ocrutil"/> <UnitName Value="ocrutil"/>
<CursorPos X="60" Y="594"/> <CursorPos X="66" Y="17"/>
<TopLine Value="573"/> <TopLine Value="13"/>
<EditorIndex Value="10"/> <EditorIndex Value="10"/>
<UsageCount Value="16"/> <UsageCount Value="18"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit260> </Unit260>
<Unit261> <Unit261>
@ -1909,130 +1909,130 @@
<CursorPos X="37" Y="3116"/> <CursorPos X="37" Y="3116"/>
<TopLine Value="3105"/> <TopLine Value="3105"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="11"/> <UsageCount Value="13"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit264> </Unit264>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="99" Column="17" TopLine="90"/> <Caret Line="65" Column="33" TopLine="45"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="110" Column="9" TopLine="90"/> <Caret Line="27" Column="37" TopLine="1"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="97" Column="9" TopLine="91"/> <Caret Line="65" Column="33" TopLine="45"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="111" Column="24" TopLine="91"/> <Caret Line="66" Column="33" TopLine="45"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="130" Column="60" TopLine="103"/> <Caret Line="137" Column="47" TopLine="110"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="61" Column="23" TopLine="49"/>
</Position6>
<Position7>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="177" Column="3" TopLine="158"/>
</Position7>
<Position8>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="241" Column="38" TopLine="218"/>
</Position8>
<Position9>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="229" Column="60" TopLine="146"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="241" Column="41" TopLine="161"/>
</Position10>
<Position11>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="200" Column="34" TopLine="178"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="263" Column="49" TopLine="242"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="598" Column="1" TopLine="573"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="301" Column="126" TopLine="278"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="270" Column="56" TopLine="242"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="97" Column="22" TopLine="73"/>
</Position16>
<Position17>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="99" Column="30" TopLine="73"/>
</Position17>
<Position18>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="117" Column="31" TopLine="97"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="102" Column="104" TopLine="85"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="101" Column="40" TopLine="87"/>
</Position20>
<Position21>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="339" Column="73" TopLine="314"/>
</Position21>
<Position22>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="83" Column="20" TopLine="74"/>
</Position22>
<Position23>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="65" Column="33" TopLine="45"/>
</Position23>
<Position24>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="27" Column="37" TopLine="1"/>
</Position24>
<Position25>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="65" Column="33" TopLine="45"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="66" Column="33" TopLine="45"/>
</Position26>
<Position27>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="137" Column="47" TopLine="110"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="81" Column="71" TopLine="62"/> <Caret Line="81" Column="71" TopLine="62"/>
</Position28> </Position6>
<Position29> <Position7>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="65" Column="33" TopLine="41"/> <Caret Line="65" Column="33" TopLine="41"/>
</Position29> </Position7>
<Position30> <Position8>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="66" Column="33" TopLine="41"/> <Caret Line="66" Column="33" TopLine="41"/>
</Position8>
<Position9>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="101" Column="5" TopLine="97"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="30" Column="28" TopLine="25"/>
</Position10>
<Position11>
<Filename Value="testunit.pas"/>
<Caret Line="401" Column="43" TopLine="380"/>
</Position11>
<Position12>
<Filename Value="colourhistory.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position12>
<Position13>
<Filename Value="colourhistory.pas"/>
<Caret Line="106" Column="29" TopLine="73"/>
</Position13>
<Position14>
<Filename Value="colourhistory.pas"/>
<Caret Line="105" Column="5" TopLine="85"/>
</Position14>
<Position15>
<Filename Value="colourhistory.pas"/>
<Caret Line="117" Column="13" TopLine="93"/>
</Position15>
<Position16>
<Filename Value="colourhistory.pas"/>
<Caret Line="39" Column="66" TopLine="169"/>
</Position16>
<Position17>
<Filename Value="colourhistory.pas"/>
<Caret Line="170" Column="19" TopLine="149"/>
</Position17>
<Position18>
<Filename Value="colourhistory.pas"/>
<Caret Line="176" Column="33" TopLine="150"/>
</Position18>
<Position19>
<Filename Value="colourhistory.pas"/>
<Caret Line="175" Column="27" TopLine="155"/>
</Position19>
<Position20>
<Filename Value="colourhistory.pas"/>
<Caret Line="194" Column="1" TopLine="177"/>
</Position20>
<Position21>
<Filename Value="colourhistory.pas"/>
<Caret Line="120" Column="77" TopLine="100"/>
</Position21>
<Position22>
<Filename Value="colourhistory.pas"/>
<Caret Line="35" Column="29" TopLine="23"/>
</Position22>
<Position23>
<Filename Value="colourhistory.pas"/>
<Caret Line="192" Column="8" TopLine="152"/>
</Position23>
<Position24>
<Filename Value="colourhistory.pas"/>
<Caret Line="117" Column="3" TopLine="101"/>
</Position24>
<Position25>
<Filename Value="colourhistory.pas"/>
<Caret Line="35" Column="50" TopLine="27"/>
</Position25>
<Position26>
<Filename Value="colourhistory.pas"/>
<Caret Line="47" Column="36" TopLine="27"/>
</Position26>
<Position27>
<Filename Value="colourhistory.pas"/>
<Caret Line="26" Column="13" TopLine="12"/>
</Position27>
<Position28>
<Filename Value="colourhistory.pas"/>
<Caret Line="107" Column="19" TopLine="83"/>
</Position28>
<Position29>
<Filename Value="colourhistory.pas"/>
<Caret Line="46" Column="10" TopLine="13"/>
</Position29>
<Position30>
<Filename Value="colourhistory.pas"/>
<Caret Line="177" Column="1" TopLine="158"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>

View File

@ -98,8 +98,8 @@ type
implementation implementation
uses uses
colour_conv,// For RGBToColor, etc.
Client, // For the Client Casts. Client, // For the Client Casts.
colour_conv, // For RGBToColor, etc.
math, //min/max math, //min/max
dtmutil dtmutil
; ;