1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-28 12:02:15 -05:00

Testing purposes only

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@295 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2009-12-19 22:55:50 +00:00
parent 1879c42602
commit 3e2a64cc7e
3 changed files with 378 additions and 342 deletions

View File

@ -9,6 +9,7 @@ object ColourHistoryForm: TColourHistoryForm
ClientWidth = 490
Constraints.MinHeight = 200
Constraints.MinWidth = 490
OnCreate = FormCreate
OnHide = UnSetCHShowMenu
OnShow = SetCHShowMenu
LCLVersion = '0.9.29'
@ -18,9 +19,21 @@ object ColourHistoryForm: TColourHistoryForm
Top = 16
Width = 329
Anchors = [akTop, akLeft, akRight, akBottom]
Columns = <>
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
@ -35,7 +48,7 @@ object ColourHistoryForm: TColourHistoryForm
end
object SelectionName: TEdit
Left = 361
Height = 27
Height = 21
Top = 16
Width = 112
Anchors = [akTop, akRight]
@ -55,7 +68,7 @@ object ColourHistoryForm: TColourHistoryForm
end
object ColourValue: TEdit
Left = 361
Height = 27
Height = 21
Top = 56
Width = 112
Anchors = [akTop, akRight]
@ -65,7 +78,7 @@ object ColourHistoryForm: TColourHistoryForm
end
object CoordValue: TLabel
Left = 361
Height = 18
Height = 14
Top = 96
Width = 112
Anchors = [akTop, akRight]
@ -92,7 +105,7 @@ object ColourHistoryForm: TColourHistoryForm
end
object CH_RGB_Label: TLabel
Left = 361
Height = 18
Height = 14
Top = 128
Width = 112
Anchors = [akTop, akRight]

View File

@ -5,29 +5,32 @@ LazarusResources.Add('TColourHistoryForm','FORMDATA',[
+#3#250#0#3'Top'#3'>'#1#5'Width'#3#234#1#13'ActiveControl'#7#13'SelectionName'
+#7'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#250#0#11'ClientWi'
+'dth'#3#234#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3
+#234#1#6'OnHide'#7#15'UnSetCHShowMenu'#6'OnShow'#7#13'SetCHShowMenu'#10'LCLV'
+'ersion'#6#6'0.9.29'#0#9'TListView'#10'ColourList'#4'Left'#2#16#6'Height'#3
+#176#0#3'Top'#2#16#5'Width'#3'I'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRigh'
+'t'#8'akBottom'#0#7'Columns'#14#0#9'ItemIndex'#2#255#8'TabOrder'#2#0#12'OnSe'
+'lectItem'#7#14'ChangeViewData'#0#0#7'TButton'#12'DeleteButton'#4'Left'#2#16
+#6'Height'#2#25#3'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#6'akLeft'#8'ak'
+'Bottom'#0#7'Caption'#6#6'Delete'#7'OnClick'#7#14'DeleteSelected'#8'TabOrder'
+#2#1#0#0#5'TEdit'#13'SelectionName'#4'Left'#3'i'#1#6'Height'#2#27#3'Top'#2#16
+#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'OnChange'#7#10'ChangeNa'
+'me'#10'OnKeyPress'#7#21'SelectionNameKeyPress'#8'TabOrder'#2#2#4'Text'#6#4
+'Name'#0#0#7'TButton'#19'PickNewColourButton'#4'Left'#3#217#0#6'Height'#2#25
+#3'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Ca'
+'ption'#6#15'Pick New Colour'#8'TabOrder'#2#3#0#0#5'TEdit'#11'ColourValue'#4
+'Left'#3'i'#1#6'Height'#2#27#3'Top'#2'8'#5'Width'#2'p'#7'Anchors'#11#5'akTop'
+#7'akRight'#0#8'ReadOnly'#9#8'TabOrder'#2#4#4'Text'#6#11'ColourValue'#0#0#6
+'TLabel'#10'CoordValue'#4'Left'#3'i'#1#6'Height'#2#18#3'Top'#2'`'#5'Width'#2
+'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#10'CoordValue'#20'Const'
+'raints.MinWidth'#2'p'#11'ParentColor'#8#0#0#6'TImage'#11'ColourImage'#4'Lef'
+'t'#3#152#0#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'9'#7'Anchors'#11#6'akLe'
+'ft'#7'akRight'#8'akBottom'#0#0#0#7'TButton'#8'OkButton'#4'Left'#3#137#1#6'H'
+'eight'#2#24#3'Top'#3#209#0#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8'akBotto'
+'m'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#5#0#0#6
+'TLabel'#12'CH_RGB_Label'#4'Left'#3'i'#1#6'Height'#2#18#3'Top'#3#128#0#5'Wid'
+'th'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#9'RGBValues'#20'C'
+'onstraints.MinWidth'#2'p'#11'ParentColor'#8#0#0#0
+#234#1#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#15'UnSetCHShowMenu'#6'OnShow'
+#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#9'TListView'#10'ColourList'
+#4'Left'#2#16#6'Height'#3#176#0#3'Top'#2#16#5'Width'#3'I'#1#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Columns'#14#1#7'Caption'#6#6'Co'
+'lour'#8'MaxWidth'#2'2'#8'MinWidth'#2'2'#5'Width'#2#10#0#1#7'Caption'#6#4'Wo'
+'ot'#5'Width'#2#10#0#0#9'ItemIndex'#2#255#8'TabOrder'#2#0#9'ViewStyle'#7#8'v'
+'sReport'#27'OnAdvancedCustomDrawSubItem'#7'#ColourListAdvancedCustomDrawSub'
+'Item'#12'OnSelectItem'#7#14'ChangeViewData'#0#0#7'TButton'#12'DeleteButton'
+#4'Left'#2#16#6'Height'#2#25#3'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#6
+'akLeft'#8'akBottom'#0#7'Caption'#6#6'Delete'#7'OnClick'#7#14'DeleteSelected'
+#8'TabOrder'#2#1#0#0#5'TEdit'#13'SelectionName'#4'Left'#3'i'#1#6'Height'#2#21
+#3'Top'#2#16#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'OnChange'#7
+#10'ChangeName'#10'OnKeyPress'#7#21'SelectionNameKeyPress'#8'TabOrder'#2#2#4
+'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColourButton'#4'Left'#3#217#0#6'He'
+'ight'#2#25#3'Top'#3#208#0#5'Width'#3#128#0#7'Anchors'#11#7'akRight'#8'akBot'
+'tom'#0#7'Caption'#6#15'Pick New Colour'#8'TabOrder'#2#3#0#0#5'TEdit'#11'Col'
+'ourValue'#4'Left'#3'i'#1#6'Height'#2#21#3'Top'#2'8'#5'Width'#2'p'#7'Anchors'
+#11#5'akTop'#7'akRight'#0#8'ReadOnly'#9#8'TabOrder'#2#4#4'Text'#6#11'ColourV'
+'alue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'i'#1#6'Height'#2#14#3'Top'#2'`'
+#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#10'CoordValu'
+'e'#20'Constraints.MinWidth'#2'p'#11'ParentColor'#8#0#0#6'TImage'#11'ColourI'
+'mage'#4'Left'#3#152#0#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'9'#7'Anchors'
+#11#6'akLeft'#7'akRight'#8'akBottom'#0#0#0#7'TButton'#8'OkButton'#4'Left'#3
+#137#1#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8
+'akBottom'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2
+#5#0#0#6'TLabel'#12'CH_RGB_Label'#4'Left'#3'i'#1#6'Height'#2#14#3'Top'#3#128
+#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

@ -34,11 +34,15 @@ type
procedure ChangeName(Sender: TObject);
procedure ChangeViewData(Sender: TObject; Item: TListItem; Selected: Boolean
);
procedure ColourListAdvancedCustomDrawSubItem(Sender: TCustomListView;
Item: TListItem; SubItem: Integer; State: TCustomDrawState;
Stage: TCustomDrawStage; var DefaultDraw: Boolean);
procedure DeleteSelected(Sender: TObject);
procedure AddColObj(c: TColourPickerObject; autoName: Boolean);
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure FormCreate(Sender: TObject);
procedure OkButtonClick(Sender: TObject);
procedure SelectionNameKeyPress(Sender: TObject; var Key: char);
procedure SetCHShowMenu(Sender: TObject);
@ -147,6 +151,16 @@ begin
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);
begin
if not Assigned(ColourList.Selected) then
@ -174,6 +188,12 @@ begin
inherited Destroy;
end;
procedure TColourHistoryForm.FormCreate(Sender: TObject);
begin
ColourList.Column[0].Width:= 100;
ColourList.Column[1].Width:= 500;
end;
procedure TColourHistoryForm.OkButtonClick(Sender: TObject);
begin
Self.close;