mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-24 08:18:52 -05:00
Added (un)grouping support.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@298 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
f4ad150866
commit
b13691bcb3
@ -96,10 +96,13 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
Width = 337
|
Width = 337
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
DefaultItemHeight = 19
|
DefaultItemHeight = 19
|
||||||
|
DragMode = dmAutomatic
|
||||||
Images = CHImages
|
Images = CHImages
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnChange = ColourTreeChange
|
OnChange = ColourTreeChange
|
||||||
|
OnDragOver = ColourTreeDragOver
|
||||||
|
OnEndDrag = ColourTreeEndDrag
|
||||||
end
|
end
|
||||||
object CHImages: TImageList
|
object CHImages: TImageList
|
||||||
left = 360
|
left = 360
|
||||||
|
@ -28,7 +28,9 @@ LazarusResources.Add('TColourHistoryForm','FORMDATA',[
|
|||||||
+'hors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#9'RGBValues'#20'Constraints.Min'
|
+'hors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#9'RGBValues'#20'Constraints.Min'
|
||||||
+'Width'#2'p'#11'ParentColor'#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6
|
+'Width'#2'p'#11'ParentColor'#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6
|
||||||
+'Height'#3#169#0#3'Top'#2#16#5'Width'#3'Q'#1#7'Anchors'#11#5'akTop'#6'akLeft'
|
+'Height'#3#169#0#3'Top'#2#16#5'Width'#3'Q'#1#7'Anchors'#11#5'akTop'#6'akLeft'
|
||||||
+#7'akRight'#8'akBottom'#0#17'DefaultItemHeight'#2#19#6'Images'#7#8'CHImages'
|
+#7'akRight'#8'akBottom'#0#17'DefaultItemHeight'#2#19#8'DragMode'#7#11'dmAuto'
|
||||||
+#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#8'OnChange'#7#16'ColourTree'
|
+'matic'#6'Images'#7#8'CHImages'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2
|
||||||
+'Change'#0#0#10'TImageList'#8'CHImages'#4'left'#3'h'#1#3'top'#3#200#0#0#0#0
|
+#5#8'OnChange'#7#16'ColourTreeChange'#10'OnDragOver'#7#18'ColourTreeDragOver'
|
||||||
|
+#9'OnEndDrag'#7#17'ColourTreeEndDrag'#0#0#10'TImageList'#8'CHImages'#4'left'
|
||||||
|
+#3'h'#1#3'top'#3#200#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -34,6 +34,9 @@ type
|
|||||||
ColourTree: TTreeView;
|
ColourTree: TTreeView;
|
||||||
procedure ChangeName(Sender: TObject);
|
procedure ChangeName(Sender: TObject);
|
||||||
procedure ColourTreeChange(Sender: TObject; Node: TTreeNode);
|
procedure ColourTreeChange(Sender: TObject; Node: TTreeNode);
|
||||||
|
procedure ColourTreeDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||||
|
State: TDragState; var Accept: Boolean);
|
||||||
|
procedure ColourTreeEndDrag(Sender, Target: TObject; X, Y: Integer);
|
||||||
procedure DeleteSelected(Sender: TObject);
|
procedure DeleteSelected(Sender: TObject);
|
||||||
procedure AddColObj(c: TColourPickerObject; autoName: Boolean);
|
procedure AddColObj(c: TColourPickerObject; autoName: Boolean);
|
||||||
|
|
||||||
@ -163,6 +166,37 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TColourHistoryForm.ColourTreeDragOver(Sender, Source: TObject; X,
|
||||||
|
Y: Integer; State: TDragState; var Accept: Boolean);
|
||||||
|
|
||||||
|
begin
|
||||||
|
Accept:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TColourHistoryForm.ColourTreeEndDrag(Sender, Target: TObject; X,
|
||||||
|
Y: Integer);
|
||||||
|
|
||||||
|
Var
|
||||||
|
Node: TTreeNode;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Node := ColourTree.GetNodeAt(X, Y);
|
||||||
|
if not assigned(ColourTree.Selected) then
|
||||||
|
begin
|
||||||
|
writeln('No valid node is currently selected');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if not assigned(Node) then
|
||||||
|
begin
|
||||||
|
ColourTree.Selected.MoveTo(nil, naAdd);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ColourTree.Selected.MoveTo(Node, naAddChild);
|
||||||
|
writeln('Dragging from: ' + ColourTree.Selected.Text);
|
||||||
|
writeln('Dragging to: ' + Node.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TColourHistoryForm.ChangeName(Sender: TObject);
|
procedure TColourHistoryForm.ChangeName(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if not Assigned(ColourTree.Selected) then
|
if not Assigned(ColourTree.Selected) then
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user