* Controller/MoonlightController.cs: Removed TimeLine References
* Controls/TimeLine/KeyframeMarker.cs, Controls, Controls/TimeLine, Controls/TimeLine/AnimationTimeline.cs, Controls/TimeLine/AnimationTimelineWidget.cs, Controls/TimeLine/ChangeLog, Controls/TimeLine/IMarker.cs, Controls/TimeLine/KeyframeEventArgs.cs, Controls/TimeLine/PositionMarker.cs, Controls/TimeLine/TimelineMarker.cs: Removed TimeLineControl * gtk-gui/LunarEclipse.Controls.AnimationTimelineWidget.cs: Removed svn path=/trunk/lunareclipse/; revision=111686
This commit is contained in:
Родитель
158992509d
Коммит
5ae88a5143
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-08-27 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* Controls/TimeLine/KeyframeMarker.cs, Controls, Controls/TimeLine,
|
||||
Controls/TimeLine/AnimationTimeline.cs,
|
||||
Controls/TimeLine/AnimationTimelineWidget.cs,
|
||||
Controls/TimeLine/ChangeLog, Controls/TimeLine/IMarker.cs,
|
||||
Controls/TimeLine/KeyframeEventArgs.cs,
|
||||
Controls/TimeLine/PositionMarker.cs,
|
||||
Controls/TimeLine/TimelineMarker.cs: Removed TimeLineControl
|
||||
|
||||
2008-08-02 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-08-27 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* MoonlightController.cs: Removed TimeLine References
|
||||
|
||||
2008-08-09 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* MoonlightController.cs: CaptureMouse() is back
|
||||
|
|
|
@ -40,7 +40,6 @@ using System.IO;
|
|||
using LunarEclipse.Serialization;
|
||||
using LunarEclipse.View;
|
||||
using LunarEclipse.Model;
|
||||
using LunarEclipse.Controls;
|
||||
using Gtk.Moonlight;
|
||||
|
||||
namespace LunarEclipse.Controller
|
||||
|
@ -53,7 +52,6 @@ namespace LunarEclipse.Controller
|
|||
private GtkSilver moonlight;
|
||||
private PropertyManager propertyManager;
|
||||
private Serializer serializer;
|
||||
private AnimationTimeline timeline;
|
||||
private UndoEngine undo;
|
||||
private ITool current_tool;
|
||||
private ISelection selection;
|
||||
|
@ -85,11 +83,6 @@ namespace LunarEclipse.Controller
|
|||
get { return propertyManager; }
|
||||
}
|
||||
|
||||
public AnimationTimeline Timeline
|
||||
{
|
||||
get { return timeline; }
|
||||
}
|
||||
|
||||
public UndoEngine UndoEngine
|
||||
{
|
||||
get { return undo; }
|
||||
|
@ -105,12 +98,9 @@ namespace LunarEclipse.Controller
|
|||
set { current_scale = value; }
|
||||
}
|
||||
|
||||
public MoonlightController(GtkSilver moonlight, AnimationTimeline timeline)
|
||||
public MoonlightController(GtkSilver moonlight)
|
||||
{
|
||||
this.timeline = timeline;
|
||||
this.moonlight = moonlight;
|
||||
//this.properties = properties;
|
||||
|
||||
this.moonlight = moonlight;
|
||||
serializer = new Serializer();
|
||||
undo = new UndoEngine();
|
||||
Selection = new StandardSelection(this);
|
||||
|
|
|
@ -1,323 +0,0 @@
|
|||
//
|
||||
// TimeLine.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan McGovern alan.mcgovern@gmail.com
|
||||
//
|
||||
// Copyright (C) 2007 Alan McGovern
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using LunarEclipse.View;
|
||||
using Gtk.Moonlight;
|
||||
|
||||
|
||||
namespace LunarEclipse.Controls
|
||||
{
|
||||
public class AnimationTimeline : GtkSilver
|
||||
{
|
||||
public event EventHandler CurrentPositionChanged;
|
||||
public event EventHandler<KeyframeEventArgs> KeyframeMoved;
|
||||
|
||||
private const double PixelsPerDivision = 80;
|
||||
|
||||
private IMarker clickedItem; // If a [keyframe|timeline]marker is clicked on, it is stored here
|
||||
private Point location; // The location of the mouse
|
||||
private PositionMarker marker; // The marker used to denote the current location in the timeline
|
||||
private bool started; // True when the mouse is clicked, false when it is released again
|
||||
private TimeSpan startTime; // The starting time displayed on the timeline
|
||||
private Point startLocation; // The point at which the mouse originally was clicked at
|
||||
|
||||
private List<IMarker> divisionMarkers; // The markers used to indicate the second/quarter second division
|
||||
private List<TextBlock> divisionTextblocks; // The textblocks used to indicate the time at each whole division
|
||||
private List<KeyframeMarker> keyframeMarkers; // The keyframes currently recorded on the timeline
|
||||
|
||||
public TimeSpan CurrentPosition
|
||||
{
|
||||
get { return this.marker.Time; }
|
||||
}
|
||||
|
||||
public AnimationTimeline(int width, int height)
|
||||
:base (width, height)
|
||||
{
|
||||
Canvas c = new Canvas();
|
||||
c.Width = width;
|
||||
c.Height = height;
|
||||
Attach(c);
|
||||
|
||||
marker = new PositionMarker(this, TimeSpan.Zero, 0, 0);
|
||||
marker.ZIndex = 1;
|
||||
divisionMarkers = new List<IMarker>();
|
||||
divisionTextblocks = new List<TextBlock>();
|
||||
keyframeMarkers = new List<KeyframeMarker>();
|
||||
|
||||
startTime = TimeSpan.Zero;
|
||||
marker.MouseLeftButtonDown += delegate { clickedItem = marker; };
|
||||
|
||||
Canvas.MouseLeftButtonDown += MouseDown;
|
||||
Canvas.MouseMove += MouseMove;
|
||||
Canvas.MouseLeftButtonUp += MouseUp;
|
||||
|
||||
Canvas.Children.Add(marker);
|
||||
Canvas.Background = new SolidColorBrush(Colors.Black);
|
||||
|
||||
int divisions = (int)Math.Ceiling (width / PixelsPerDivision) * 4;
|
||||
for(int i=0; i <= (divisions + 1) * 4; i++)
|
||||
{
|
||||
divisionMarkers.Add(new TimelineMarker(this, 0, TimeSpan.Zero));
|
||||
Canvas.Children.Add((UIElement)divisionMarkers[i]);
|
||||
}
|
||||
|
||||
divisions /= 4;
|
||||
for(int i=0; i <= divisions + 1; i++)
|
||||
{
|
||||
divisionTextblocks.Add(new TextBlock());
|
||||
Canvas.Children.Add(divisionTextblocks[i]);
|
||||
}
|
||||
|
||||
PlaceDivisions();
|
||||
}
|
||||
|
||||
public void UpdateSize()
|
||||
{
|
||||
PlaceDivisions();
|
||||
Canvas.Width = Allocation.Width;
|
||||
Canvas.Height = Allocation.Height;
|
||||
}
|
||||
|
||||
private void PlaceDivisions()
|
||||
{
|
||||
// This is a hack so i can figure out what 'height' the textblocks are going to be
|
||||
// so i can perform my layout magic
|
||||
TextBlock b = new TextBlock(); b.Text = "3";
|
||||
double height = Allocation.Height - b.ActualHeight;
|
||||
|
||||
// Calculate the next 'division' that we need to draw. It can be either
|
||||
// at 250ms, 500ms, 750ms, or 0/1000 ms. This rounds up to the nearest 250.
|
||||
long currentTime = (((long)startTime.TotalMilliseconds + 125) / 250) * 250;
|
||||
long endTime = (long)startTime.TotalMilliseconds + (long)(Allocation.Width / PixelsPerDivision) * 1000;
|
||||
|
||||
int currentMarker = 0;
|
||||
int currentTextblock = 0;
|
||||
TextBlock block = null;
|
||||
for(long i = currentTime; i <= endTime; i += 250, block = null)
|
||||
{
|
||||
IMarker marker = this.divisionMarkers[currentMarker++];
|
||||
marker.Time = TimeSpan.FromMilliseconds(i);
|
||||
|
||||
// HACK: to prevent execption when resizing
|
||||
if (currentTextblock >= divisionTextblocks.Count)
|
||||
break;
|
||||
|
||||
switch(i % 1000)
|
||||
{
|
||||
case 0:
|
||||
marker.Height = height;
|
||||
block = divisionTextblocks[currentTextblock++];
|
||||
break;
|
||||
case 250:
|
||||
case 750:
|
||||
marker.Height = height / 4.0;
|
||||
break;
|
||||
case 500:
|
||||
marker.Height = height / 2.0;
|
||||
break;
|
||||
}
|
||||
|
||||
PlaceMarker(marker, block);
|
||||
}
|
||||
|
||||
// Push any of the unused markers or blocks outside of the visible area
|
||||
// on the canvas.
|
||||
while(currentMarker < divisionMarkers.Count)
|
||||
divisionMarkers[currentMarker++].Left = -200;
|
||||
|
||||
while(currentTextblock < divisionTextblocks.Count)
|
||||
divisionTextblocks[currentTextblock++].SetValue(System.Windows.Controls.Canvas.LeftProperty, -200);
|
||||
|
||||
// Make sure that the position marker is placed correctly on
|
||||
// the canvas
|
||||
this.marker.Height = height;
|
||||
this.marker.Width = height / 8.0;
|
||||
PlaceMarker(this.marker, null);
|
||||
|
||||
// Make sure all the keyframes are in the right place
|
||||
for(int i=0; i < keyframeMarkers.Count; i++)
|
||||
PlaceMarker(keyframeMarkers[i], null);
|
||||
}
|
||||
|
||||
private void PlaceMarker(IMarker marker, TextBlock block)
|
||||
{
|
||||
TimeSpan difference = marker.Time - startTime;
|
||||
marker.Left = difference.TotalSeconds * PixelsPerDivision - marker.Width / 2;
|
||||
if(block == null)
|
||||
return;
|
||||
|
||||
block.Text = marker.Time.ToString();
|
||||
block.Text = block.Text.Substring(block.Text.IndexOf(':') + 1);
|
||||
block.SetValue(System.Windows.Controls.Canvas.LeftProperty, marker.Left - block.ActualWidth / 2.0);
|
||||
block.SetValue(System.Windows.Controls.Canvas.TopProperty, Allocation.Height - block.ActualHeight);
|
||||
block.SetValue(TextBlock.ForegroundProperty, new SolidColorBrush(Colors.White));
|
||||
}
|
||||
|
||||
private void MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if(started)
|
||||
return;
|
||||
|
||||
started = true;
|
||||
location = e.GetPosition(Canvas);
|
||||
startLocation = location;
|
||||
//Canvas.CaptureMouse();
|
||||
}
|
||||
|
||||
private void MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
IMarker marker = clickedItem;
|
||||
|
||||
if(!started)
|
||||
return;
|
||||
|
||||
Point offset = e.GetPosition(Canvas);
|
||||
location.X -= offset.X;
|
||||
location.Y -= offset.Y;
|
||||
|
||||
TimeSpan difference = TimeSpan.FromSeconds(location.X / PixelsPerDivision);
|
||||
|
||||
// This means that we clicked and dragged directly on the timeline
|
||||
if(this.clickedItem == null)
|
||||
{
|
||||
if(startTime.TotalMilliseconds + difference.TotalMilliseconds < 0)
|
||||
startTime = TimeSpan.Zero;
|
||||
else
|
||||
startTime = startTime.Add(difference);
|
||||
}
|
||||
// This means we tried to move either a position marker, keyframe
|
||||
// marker or whatever
|
||||
else
|
||||
{
|
||||
TimeSpan oldtime = marker.Time;
|
||||
if(marker.Time.TotalMilliseconds - difference.TotalMilliseconds < 0)
|
||||
marker.Time = TimeSpan.Zero;
|
||||
else
|
||||
marker.Time = marker.Time.Subtract(difference);
|
||||
|
||||
if(marker is KeyframeMarker)
|
||||
KeyframeMoved(this, new KeyframeEventArgs((KeyframeMarker)marker, oldtime));
|
||||
else if (marker == this.marker)
|
||||
RaiseCurrentPositionChanged();
|
||||
}
|
||||
|
||||
location = offset;
|
||||
PlaceDivisions();
|
||||
}
|
||||
|
||||
public TimeSpan GetKeyframeBefore(TimeSpan span)
|
||||
{
|
||||
TimeSpan prev = TimeSpan.Zero;
|
||||
for(int i=0; i < this.keyframeMarkers.Count; i++)
|
||||
if(keyframeMarkers[i].Time >= prev && keyframeMarkers[i].Time <= span)
|
||||
prev = keyframeMarkers[i].Time;
|
||||
|
||||
Console.WriteLine("Previous one is: {0}", prev);
|
||||
return prev;
|
||||
}
|
||||
|
||||
private void MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if(!started)
|
||||
return;
|
||||
|
||||
bool moved = !startLocation.Equals(e.GetPosition(Canvas));
|
||||
if(!moved)
|
||||
{
|
||||
// If we clicked on a keyframe, we set the current position equal to the keyframes time.
|
||||
// Otherwise place the position marker at the point of clicking
|
||||
if(clickedItem is KeyframeMarker)
|
||||
marker.Time = clickedItem.Time;
|
||||
else
|
||||
marker.Time = startTime.Add(TimeSpan.FromSeconds(startLocation.X / AnimationTimeline.PixelsPerDivision));
|
||||
RaiseCurrentPositionChanged();
|
||||
|
||||
PlaceMarker(marker, null);
|
||||
}
|
||||
|
||||
started = false;
|
||||
clickedItem = null;
|
||||
//Canvas.ReleaseMouseCapture();
|
||||
}
|
||||
|
||||
public void AddKeyframe(Timeline timeline, TimeSpan time)
|
||||
{
|
||||
KeyframeMarker marker = new KeyframeMarker(this, timeline, time);
|
||||
|
||||
// If we already have a marker at the same time for the same timeline,
|
||||
// do not add another keyframe marker
|
||||
foreach(KeyframeMarker m in keyframeMarkers)
|
||||
if(m.Time.Equals(marker.Time))
|
||||
{
|
||||
Console.WriteLine("Already found: {0}", marker.Time);
|
||||
return;
|
||||
}
|
||||
Console.WriteLine("Adding to timeline: {0}", time);
|
||||
marker.Time = time;
|
||||
marker.Width = 15;
|
||||
marker.Height = 15;
|
||||
marker.SetValue(System.Windows.Controls.Canvas.TopProperty, (this.Allocation.Height - 15.0) / 2.0);
|
||||
marker.MouseLeftButtonDown += delegate (object sender, MouseButtonEventArgs e) {
|
||||
this.clickedItem = (IMarker)sender;
|
||||
};
|
||||
|
||||
keyframeMarkers.Add(marker);
|
||||
Canvas.Children.Add(marker);
|
||||
PlaceMarker(marker, null);
|
||||
}
|
||||
|
||||
public void RemoveSelectedKeyframe()
|
||||
{
|
||||
if(clickedItem is KeyframeMarker)
|
||||
{
|
||||
Canvas.Children.Remove((UIElement)clickedItem);
|
||||
keyframeMarkers.Remove((KeyframeMarker)clickedItem);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveKeyframe(KeyframeMarker marker)
|
||||
{
|
||||
Canvas.Children.Remove((UIElement)marker);
|
||||
this.keyframeMarkers.Remove(marker);
|
||||
}
|
||||
|
||||
private void RaiseCurrentPositionChanged()
|
||||
{
|
||||
if(CurrentPositionChanged != null)
|
||||
CurrentPositionChanged(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
// AnimationTimelineWidget.cs
|
||||
//
|
||||
// Author:
|
||||
// Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
//
|
||||
// Copyright (c) 2008 [copyright holders]
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace LunarEclipse.Controls {
|
||||
|
||||
[System.ComponentModel.Category("LunarEclipse")]
|
||||
[System.ComponentModel.ToolboxItem(true)]
|
||||
public partial class AnimationTimelineWidget : Gtk.Bin {
|
||||
|
||||
public AnimationTimelineWidget()
|
||||
{
|
||||
this.Build();
|
||||
|
||||
timeline = new AnimationTimeline(800, 70);
|
||||
|
||||
timeline.SizeAllocated += delegate {
|
||||
timeline.UpdateSize();
|
||||
};
|
||||
|
||||
this.Add(timeline);
|
||||
}
|
||||
|
||||
private AnimationTimeline timeline;
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* PositionMarker.cs: Temporary removed references to
|
||||
Canvas.ZIndexProperty
|
||||
|
||||
2008-08-02 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* KeyframeMarker.cs, AnimationTimeline.cs, PositionMarker.cs,
|
||||
TimelineMarker.cs, AnimationTimelineWidget.cs: Renamed Visual for
|
||||
UIElement
|
||||
|
||||
2008-07-03 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* AnimationTimeline.cs, PositionMarker.cs, TimelineMarker.cs: Adapted
|
||||
to change in Toolbox.ChangeProperty
|
||||
|
||||
2008-06-15 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* AnimationTimeline.cs: Added Hack to prevent crash. Should be fixed
|
||||
later.
|
||||
* AnimationTimelineWidget.cs: Added
|
||||
|
||||
2008-05-17 Manuel Ceron <ceronman@unicauca.edu.co>
|
||||
|
||||
* KeyframeMarker.cs, AnimationTimeline.cs, PositionMarker.cs,
|
||||
TimelineMarker.cs: Changed all refereces to SetValue<T>, now using the
|
||||
non parametrized method SetValue() because the generic version was
|
||||
removed from Moonlight. Removed References to System.Windows.Offset()
|
||||
|
||||
2008-05-15 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* AnimationTimeline.cs: Added public UpdateSize method.
|
||||
|
||||
2008-04-25 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
//
|
||||
// IMarker.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan McGovern alan.mcgovern@gmail.com
|
||||
//
|
||||
// Copyright (C) 2007 Alan McGovern
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
namespace LunarEclipse.Controls
|
||||
{
|
||||
public interface IMarker
|
||||
{
|
||||
TimeSpan Time { get; set; }
|
||||
double Left { get; set; }
|
||||
double Height { get; set; }
|
||||
double Width { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
//
|
||||
// KeyframeEventArgs.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan McGovern alan.mcgovern@gmail.com
|
||||
//
|
||||
// Copyright (C) 2007 Alan McGovern
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
namespace LunarEclipse.Controls
|
||||
{
|
||||
public class KeyframeEventArgs : EventArgs
|
||||
{
|
||||
private TimeSpan oldTime;
|
||||
private KeyframeMarker marker;
|
||||
|
||||
public KeyframeMarker Marker
|
||||
{
|
||||
get { return marker; }
|
||||
}
|
||||
|
||||
public TimeSpan OldTime
|
||||
{
|
||||
get { return oldTime; }
|
||||
}
|
||||
public KeyframeEventArgs(KeyframeMarker marker, TimeSpan oldTime)
|
||||
{
|
||||
this.oldTime = oldTime;
|
||||
this.marker = marker;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
//
|
||||
// KeyframeMarker.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan McGovern alan.mcgovern@gmail.com
|
||||
//
|
||||
// Copyright (C) 2007 Alan McGovern
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using Gtk.Moonlight;
|
||||
|
||||
namespace LunarEclipse.Controls
|
||||
{
|
||||
#warning FIXME
|
||||
public class KeyframeMarker : Control, IMarker
|
||||
{
|
||||
private Ellipse ellipse;
|
||||
private TimeSpan time;
|
||||
private Timeline timeline;
|
||||
|
||||
public double Left
|
||||
{
|
||||
get { return (double)GetValue(Canvas.LeftProperty); }
|
||||
set { SetValue(Canvas.LeftProperty, value); }
|
||||
}
|
||||
|
||||
public TimeSpan Time
|
||||
{
|
||||
get { return time; }
|
||||
set { time = value; }
|
||||
}
|
||||
|
||||
public Timeline Timeline
|
||||
{
|
||||
get { return timeline; }
|
||||
}
|
||||
|
||||
public KeyframeMarker(GtkSilver parent, Timeline timeline, TimeSpan time)
|
||||
: base()
|
||||
{
|
||||
ellipse = (Ellipse) parent.InitializeFromXaml("<Ellipse Name=\"Ellipse\"/>", this);
|
||||
ellipse.SetValue(Ellipse.FillProperty, new SolidColorBrush(Colors.Green));
|
||||
this.time = time;
|
||||
this.timeline = timeline;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
//
|
||||
// PositionMarker.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan McGovern alan.mcgovern@gmail.com
|
||||
//
|
||||
// Copyright (C) 2007 Alan McGovern
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
using Gtk.Moonlight;
|
||||
|
||||
namespace LunarEclipse.Controls
|
||||
{
|
||||
public class PositionMarker : Control, IMarker
|
||||
{
|
||||
private Rectangle ellipse;
|
||||
private TimeSpan time;
|
||||
|
||||
public int ZIndex
|
||||
{
|
||||
get { return 0; } //(int)GetValue(Canvas.ZIndexProperty); }
|
||||
set { /*SetValue(Canvas.ZIndexProperty, value);*/ }
|
||||
}
|
||||
|
||||
public TimeSpan Time
|
||||
{
|
||||
get { return time; }
|
||||
set { time = value; }
|
||||
}
|
||||
|
||||
public double Left
|
||||
{
|
||||
get { return (double)GetValue(Canvas.LeftProperty); }
|
||||
set { SetValue(Canvas.LeftProperty, value);}
|
||||
}
|
||||
|
||||
public PositionMarker(GtkSilver parent, TimeSpan time, double width, double height)
|
||||
: base()
|
||||
{
|
||||
ellipse = (Rectangle)parent.InitializeFromXaml("<Rectangle Name=\"PositionRect\" />", this);
|
||||
this.time = time;
|
||||
Height = height;
|
||||
Width = width;
|
||||
ellipse.SetValue(Shape.FillProperty, new SolidColorBrush(Colors.Yellow));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
//
|
||||
// TimelineMarker.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan McGovern alan.mcgovern@gmail.com
|
||||
//
|
||||
// Copyright (C) 2007 Alan McGovern
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
using Gtk.Moonlight;
|
||||
|
||||
namespace LunarEclipse.Controls
|
||||
{
|
||||
public class TimelineMarker : Control, IMarker
|
||||
{
|
||||
public const double MarkerWidth = 2;
|
||||
|
||||
private Rectangle rectangle;
|
||||
private TimeSpan time;
|
||||
|
||||
public TimeSpan Time
|
||||
{
|
||||
get { return time; }
|
||||
set { time = value; }
|
||||
}
|
||||
|
||||
public double Left
|
||||
{
|
||||
get { return (double)GetValue(Canvas.LeftProperty); }
|
||||
set { SetValue(Canvas.LeftProperty, value);}
|
||||
}
|
||||
|
||||
public TimelineMarker(GtkSilver parent, double height, TimeSpan time) : base()
|
||||
{
|
||||
rectangle = (Rectangle) parent.InitializeFromXaml("<Rectangle Name=\"Rect\" />", this);
|
||||
this.time = time;
|
||||
Height = height;
|
||||
Width = TimelineMarker.MarkerWidth;
|
||||
|
||||
rectangle.SetValue(Shape.StrokeProperty, new SolidColorBrush(Colors.Yellow));
|
||||
rectangle.SetValue(Shape.FillProperty, new SolidColorBrush(Colors.Transparent));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,12 +22,6 @@
|
|||
<File name="Properties/PropertyInfo.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Properties/PropertyManager.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Properties/PropertyType.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/AnimationTimeline.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/IMarker.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/KeyframeEventArgs.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/KeyframeMarker.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/PositionMarker.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/TimelineMarker.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Model/ISelection.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Model/NameGenerator.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Model/PropertyChangedEventArgs.cs" subtype="Code" buildaction="Compile" />
|
||||
|
@ -82,8 +76,6 @@
|
|||
<File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" resource_id="objects.xml" />
|
||||
<File name="gtk-gui/LunarEclipse.View.MoonlightWidget.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="gtk-gui/LunarEclipse.View.MainWindow.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controls/TimeLine/AnimationTimelineWidget.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="gtk-gui/LunarEclipse.Controls.AnimationTimelineWidget.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Icons/image-tool.png" subtype="Code" buildaction="EmbedAsResource" DeployService.UseProjectRelativePath="True" />
|
||||
<File name="Icons/polyline-tool.png" subtype="Code" buildaction="EmbedAsResource" DeployService.UseProjectRelativePath="True" />
|
||||
<File name="Icons/text-tool.png" subtype="Code" buildaction="EmbedAsResource" DeployService.UseProjectRelativePath="True" />
|
||||
|
@ -127,6 +119,7 @@
|
|||
<File name="Model/Descriptors/AbstractLineDescriptor.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="View/AboutLunarEclipse.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Controller/UndoActions/UndoRemoveObject.cs" subtype="Code" buildaction="Compile" />
|
||||
<File name="Resources/ellipse.xml" subtype="Code" buildaction="Nothing" />
|
||||
</Contents>
|
||||
<References>
|
||||
<ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
|
@ -142,6 +135,6 @@
|
|||
<ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<ProjectReference type="Gac" localcopy="True" refto="Mono.Moonlight, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
|
||||
</References>
|
||||
<GtkDesignInfo gtkVersion="2.12.2" />
|
||||
<GtkDesignInfo />
|
||||
<MonoDevelop.ChangeLogAddIn.ChangeLogInfo policy="OneChangeLogInEachDirectory" />
|
||||
</Project>
|
|
@ -35,7 +35,7 @@ using LunarEclipse.Controller;
|
|||
|
||||
namespace LunarEclipse.Model {
|
||||
|
||||
public abstract class AbstractHandle: Control, IHandle {
|
||||
public abstract class AbstractHandle: UserControl, IHandle {
|
||||
|
||||
public const double DefaultRadius = 5.0;
|
||||
|
||||
|
@ -44,21 +44,23 @@ namespace LunarEclipse.Model {
|
|||
{
|
||||
Group = group;
|
||||
|
||||
inner = controller.GtkSilver.InitializeFromXaml(GetXaml(), this);
|
||||
//inner = controller.GtkSilver.InitializeFromXaml(GetXaml(), this);
|
||||
//Application.LoadComponent(this, new Uri("ellipse.xml", UriKind.Relative));
|
||||
Content = CreateContent();
|
||||
|
||||
MouseLeftButtonDown += MouseStart;
|
||||
MouseLeftButtonUp += MouseEnd;
|
||||
MouseMove += MouseStep;
|
||||
Content.MouseLeftButtonDown += MouseStart;
|
||||
Content.MouseLeftButtonUp += MouseEnd;
|
||||
Content.MouseMove += MouseStep;
|
||||
|
||||
highlight_fill = new SolidColorBrush(Colors.Red);
|
||||
normal_fill = (Brush) inner.GetValue(Shape.FillProperty);
|
||||
normal_fill = (Brush) Content.GetValue(Shape.FillProperty);
|
||||
|
||||
MouseEnter += delegate {
|
||||
inner.SetValue(Shape.FillProperty, highlight_fill);
|
||||
Content.MouseEnter += delegate {
|
||||
Content.SetValue(Shape.FillProperty, highlight_fill);
|
||||
};
|
||||
|
||||
MouseLeave += delegate {
|
||||
inner.SetValue(Shape.FillProperty, normal_fill);
|
||||
Content.MouseLeave += delegate {
|
||||
Content.SetValue(Shape.FillProperty, normal_fill);
|
||||
};
|
||||
|
||||
SetValue(Canvas.ZIndexProperty, int.MaxValue);
|
||||
|
@ -66,8 +68,8 @@ namespace LunarEclipse.Model {
|
|||
transforms = new TransformGroup();
|
||||
scaleTransform = new ScaleTransform();
|
||||
transforms.Children.Add(scaleTransform);
|
||||
Inner.SetValue(UIElement.RenderTransformOriginProperty, new Point(0.5, 0.5));
|
||||
Inner.SetValue(UIElement.RenderTransformProperty, transforms);
|
||||
Content.SetValue(UIElement.RenderTransformOriginProperty, new Point(0.5, 0.5));
|
||||
Content.SetValue(UIElement.RenderTransformProperty, transforms);
|
||||
|
||||
undo_group = new UndoGroup();
|
||||
|
||||
|
@ -104,7 +106,7 @@ namespace LunarEclipse.Model {
|
|||
public virtual void MouseEnd(object sender, MouseEventArgs args)
|
||||
{
|
||||
ReleaseMouseCapture();
|
||||
inner.SetValue(Shape.FillProperty, normal_fill);
|
||||
Content.SetValue(Shape.FillProperty, normal_fill);
|
||||
Dragging = false;
|
||||
PushUndo();
|
||||
}
|
||||
|
@ -134,14 +136,17 @@ namespace LunarEclipse.Model {
|
|||
set {
|
||||
IDescriptor descriptor = StandardDescriptor.CreateDescriptor(this);
|
||||
descriptor.SetBounds(value);
|
||||
descriptor = StandardDescriptor.CreateDescriptor(inner);
|
||||
descriptor = StandardDescriptor.CreateDescriptor(Content);
|
||||
descriptor.SetBounds(0, 0, value.Width, value.Height);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual string GetXaml()
|
||||
protected virtual UIElement CreateContent()
|
||||
{
|
||||
return "<Rectangle Fill=\"#00FFFFFF\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
|
||||
protected UIElement Element {
|
||||
|
@ -162,11 +167,6 @@ namespace LunarEclipse.Model {
|
|||
set { dragging = value; }
|
||||
}
|
||||
|
||||
protected FrameworkElement Inner {
|
||||
get { return inner; }
|
||||
set { inner = value; }
|
||||
}
|
||||
|
||||
protected UndoGroup UndoGroup {
|
||||
get { return undo_group; }
|
||||
}
|
||||
|
@ -208,7 +208,6 @@ namespace LunarEclipse.Model {
|
|||
}
|
||||
|
||||
private IHandleGroup group;
|
||||
private FrameworkElement inner;
|
||||
private Point last_click;
|
||||
private bool dragging = false;
|
||||
private Brush normal_fill;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
namespace LunarEclipse.Model {
|
||||
|
@ -60,9 +61,12 @@ namespace LunarEclipse.Model {
|
|||
ChangeProperty(segment, pointProperty, point);
|
||||
}
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Rectangle Fill=\"#55FF00FF\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
|
||||
BezierSegment segment;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-08-27 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
||||
2008-08-12 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* PolyLineHandle.cs: using PointCollection instead of Point[]
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
namespace LunarEclipse.Model {
|
||||
|
@ -39,9 +40,12 @@ namespace LunarEclipse.Model {
|
|||
{
|
||||
}
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Rectangle Fill=\"#55FF00FF\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
|
@ -55,9 +56,12 @@ namespace LunarEclipse.Model {
|
|||
}
|
||||
}
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Ellipse Fill=\"#99FF00FF\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
|
||||
private DependencyProperty point_property;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
|
@ -58,9 +59,12 @@ namespace LunarEclipse.Model {
|
|||
Update();
|
||||
}
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Rectangle Fill=\"#99FFFF00\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ using System.Windows;
|
|||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Shapes;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
namespace LunarEclipse.Model {
|
||||
|
@ -71,9 +72,12 @@ namespace LunarEclipse.Model {
|
|||
|
||||
protected abstract Rect CalculateNewBounds(Rect oldBounds, Point offset, double cosAngle, double sinAngle);
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Rectangle Fill=\"#99FFFF00\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
|
||||
private Point TransformOffset(Point offset, double angle)
|
||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
|||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Shapes;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
namespace LunarEclipse.Model
|
||||
|
@ -63,9 +64,12 @@ namespace LunarEclipse.Model
|
|||
LastClick = position;
|
||||
}
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Ellipse Fill=\"#99FFFF00\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
namespace LunarEclipse.Model {
|
||||
|
@ -50,9 +51,12 @@ namespace LunarEclipse.Model {
|
|||
}
|
||||
}
|
||||
|
||||
protected override string GetXaml ()
|
||||
protected override UIElement CreateContent ()
|
||||
{
|
||||
return "<Rectangle Fill=\"#995555FF\" Stroke=\"#FF000000\"/>";
|
||||
Rectangle rect = new Rectangle();
|
||||
rect.Fill = new SolidColorBrush(Colors.Yellow);
|
||||
rect.Stroke = new SolidColorBrush(Colors.Black);
|
||||
return rect;
|
||||
}
|
||||
|
||||
private PathFigure path_figure;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Controls;
|
||||
using LunarEclipse.Controller;
|
||||
|
||||
namespace LunarEclipse.Model {
|
||||
|
@ -66,6 +67,7 @@ namespace LunarEclipse.Model {
|
|||
rotation.Angle = ElementRotation.Angle;
|
||||
|
||||
ZoomCorrection();
|
||||
System.Console.WriteLine("-- {0}, {1}", GetValue(Canvas.LeftProperty), GetValue(Canvas.TopProperty));
|
||||
}
|
||||
|
||||
protected Point ElementTransformOrigin {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
2008-08-27 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
<Ellipse Name="Ellipse" Fill="Green"/>
|
|
@ -1,3 +1,7 @@
|
|||
2008-08-27 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
||||
2008-08-09 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using LunarEclipse.Controller;
|
||||
using LunarEclipse.Controls;
|
||||
using LunarEclipse.Model;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
@ -46,7 +45,7 @@ namespace LunarEclipse.View
|
|||
{
|
||||
this.Build();
|
||||
|
||||
controller = new MoonlightController(moonlightwidget.Silver, null);
|
||||
controller = new MoonlightController(moonlightwidget.Silver);
|
||||
|
||||
propertypanel.Controller = controller;
|
||||
SetupUndoButtons(controller.UndoEngine);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-08-27 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
* LunarEclipse.Controls.AnimationTimelineWidget.cs: Removed
|
||||
|
||||
2008-08-11 Manuel Cerón <ceronman@unicauca.edu.co>
|
||||
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 2.0.50727.1433
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace LunarEclipse.Controls {
|
||||
|
||||
|
||||
public partial class AnimationTimelineWidget {
|
||||
|
||||
protected virtual void Build() {
|
||||
Stetic.Gui.Initialize(this);
|
||||
// Widget LunarEclipse.Controls.AnimationTimelineWidget
|
||||
Stetic.BinContainer.Attach(this);
|
||||
this.WidthRequest = 800;
|
||||
this.HeightRequest = 70;
|
||||
this.Name = "LunarEclipse.Controls.AnimationTimelineWidget";
|
||||
if ((this.Child != null)) {
|
||||
this.Child.ShowAll();
|
||||
}
|
||||
this.Hide();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -219,27 +219,27 @@ namespace LunarEclipse.View {
|
|||
this.RectangleToolAction.ShortLabel = Mono.Unix.Catalog.GetString("_Rectangle Tool");
|
||||
w1.Add(this.RectangleToolAction, null);
|
||||
this.SquareToolAction = new Gtk.RadioAction("SquareToolAction", Mono.Unix.Catalog.GetString("S_quare Tool"), null, "square-tool", 0);
|
||||
this.SquareToolAction.Group = this.SelectionToolAction.Group;
|
||||
this.SquareToolAction.Group = this.RectangleToolAction.Group;
|
||||
this.SquareToolAction.ShortLabel = Mono.Unix.Catalog.GetString("S_quare Tool");
|
||||
w1.Add(this.SquareToolAction, null);
|
||||
this.EllipseToolAction = new Gtk.RadioAction("EllipseToolAction", Mono.Unix.Catalog.GetString("_Ellipse Tool"), null, "ellipse-tool", 0);
|
||||
this.EllipseToolAction.Group = this.SquareToolAction.Group;
|
||||
this.EllipseToolAction.Group = this.RectangleToolAction.Group;
|
||||
this.EllipseToolAction.ShortLabel = Mono.Unix.Catalog.GetString("_Ellipse Tool");
|
||||
w1.Add(this.EllipseToolAction, null);
|
||||
this.CircleToolAction = new Gtk.RadioAction("CircleToolAction", Mono.Unix.Catalog.GetString("_Circle Tool"), null, "circle-tool", 0);
|
||||
this.CircleToolAction.Group = this.SquareToolAction.Group;
|
||||
this.CircleToolAction.Group = this.EllipseToolAction.Group;
|
||||
this.CircleToolAction.ShortLabel = Mono.Unix.Catalog.GetString("_Circle Tool");
|
||||
w1.Add(this.CircleToolAction, null);
|
||||
this.PathToolAction = new Gtk.RadioAction("PathToolAction", Mono.Unix.Catalog.GetString("_Path Tool"), null, "path-tool", 0);
|
||||
this.PathToolAction.Group = this.SquareToolAction.Group;
|
||||
this.PathToolAction.Group = this.CircleToolAction.Group;
|
||||
this.PathToolAction.ShortLabel = Mono.Unix.Catalog.GetString("_Path Tool");
|
||||
w1.Add(this.PathToolAction, null);
|
||||
this.TextToolAction = new Gtk.RadioAction("TextToolAction", Mono.Unix.Catalog.GetString("_Text Tool"), null, "text-tool", 0);
|
||||
this.TextToolAction.Group = this.SquareToolAction.Group;
|
||||
this.TextToolAction.Group = this.CircleToolAction.Group;
|
||||
this.TextToolAction.ShortLabel = Mono.Unix.Catalog.GetString("_Text Tool");
|
||||
w1.Add(this.TextToolAction, null);
|
||||
this.ImageToolAction = new Gtk.RadioAction("ImageToolAction", Mono.Unix.Catalog.GetString("Image Tool"), null, "image-tool", 0);
|
||||
this.ImageToolAction.Group = this.TextToolAction.Group;
|
||||
this.ImageToolAction.Group = this.CircleToolAction.Group;
|
||||
this.ImageToolAction.ShortLabel = Mono.Unix.Catalog.GetString("Image Tool");
|
||||
w1.Add(this.ImageToolAction, null);
|
||||
this.AnimationAction = new Gtk.Action("AnimationAction", Mono.Unix.Catalog.GetString("_Animation"), null, null);
|
||||
|
@ -255,7 +255,7 @@ namespace LunarEclipse.View {
|
|||
this.StopAction.ShortLabel = Mono.Unix.Catalog.GetString("_Detener");
|
||||
w1.Add(this.StopAction, null);
|
||||
this.LineToolAction = new Gtk.RadioAction("LineToolAction", Mono.Unix.Catalog.GetString("_Line Tool"), null, "line-tool", 0);
|
||||
this.LineToolAction.Group = this.TextToolAction.Group;
|
||||
this.LineToolAction.Group = this.CircleToolAction.Group;
|
||||
this.LineToolAction.ShortLabel = Mono.Unix.Catalog.GetString("_Line Tool");
|
||||
w1.Add(this.LineToolAction, null);
|
||||
this.DrawingAction = new Gtk.Action("DrawingAction", Mono.Unix.Catalog.GetString("Drawing"), null, null);
|
||||
|
@ -265,11 +265,11 @@ namespace LunarEclipse.View {
|
|||
this.CleanAction.ShortLabel = Mono.Unix.Catalog.GetString("_Limpiar");
|
||||
w1.Add(this.CleanAction, null);
|
||||
this.PolylineToolAction = new Gtk.RadioAction("PolylineToolAction", Mono.Unix.Catalog.GetString("Polyline Tool"), null, "polyline-tool", 0);
|
||||
this.PolylineToolAction.Group = this.TextToolAction.Group;
|
||||
this.PolylineToolAction.Group = this.CircleToolAction.Group;
|
||||
this.PolylineToolAction.ShortLabel = Mono.Unix.Catalog.GetString("Polyline Tool");
|
||||
w1.Add(this.PolylineToolAction, null);
|
||||
this.PenToolAction = new Gtk.RadioAction("PenToolAction", Mono.Unix.Catalog.GetString("P_en Tool"), null, "pen-tool", 0);
|
||||
this.PenToolAction.Group = this.PolylineToolAction.Group;
|
||||
this.PenToolAction.Group = this.CircleToolAction.Group;
|
||||
this.PenToolAction.ShortLabel = Mono.Unix.Catalog.GetString("P_en Tool");
|
||||
w1.Add(this.PenToolAction, null);
|
||||
this.debug1 = new Gtk.Action("debug1", null, Mono.Unix.Catalog.GetString("Debug"), "gtk-dialog-warning");
|
||||
|
@ -388,7 +388,7 @@ namespace LunarEclipse.View {
|
|||
this.hpaned1 = new Gtk.HPaned();
|
||||
this.hpaned1.CanFocus = true;
|
||||
this.hpaned1.Name = "hpaned1";
|
||||
this.hpaned1.Position = 699;
|
||||
this.hpaned1.Position = 842;
|
||||
// Container child hpaned1.Gtk.Paned+PanedChild
|
||||
this.vbox3 = new Gtk.VBox();
|
||||
this.vbox3.Name = "vbox3";
|
||||
|
|
|
@ -767,15 +767,6 @@
|
|||
<placeholder />
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="Gtk.Bin" id="LunarEclipse.Controls.AnimationTimelineWidget" design-size="800 152">
|
||||
<property name="MemberName" />
|
||||
<property name="WidthRequest">800</property>
|
||||
<property name="HeightRequest">70</property>
|
||||
<property name="Visible">False</property>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="Gtk.Bin" id="LunarEclipse.View.PropertyPanel" design-size="300 300">
|
||||
<property name="MemberName" />
|
||||
<property name="Visible">False</property>
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<objects attr-sync="on">
|
||||
<object type="LunarEclipse.Controls.AnimationTimelineWidget" palette-category="LunarEclipse" allow-children="false" base-type="Gtk.Bin">
|
||||
<itemgroups />
|
||||
<signals />
|
||||
</object>
|
||||
<object type="LunarEclipse.View.MoonlightWidget" palette-category="LunarEclipse" allow-children="false" base-type="Gtk.Bin">
|
||||
<itemgroups>
|
||||
<itemgroup label="MoonlightWidget Properties">
|
||||
|
|
Загрузка…
Ссылка в новой задаче