public StandardSelection(MoonlightController controller) { Controller = controller; HandleGroups = new Dictionary<UIElement, IHandleGroup>(); undo = new UndoGroup(); clipboard = new List<UIElement>(); }
public StartPointHandle(MoonlightController controller, IHandleGroup group, PathFigure pathFigure) : base(controller, group) { if (pathFigure == null) throw new ArgumentNullException("PathFigure"); path_figure = pathFigure; }
public TransformHandle(MoonlightController controller, IHandleGroup group, ILocator locator) : base(controller, group) { Locator = locator; rotation = new RotateTransform(); Transforms.Children.Add(rotation); }
public LineHandleGroup(MoonlightController controller, Line child) : base(controller, child) { AddHandle(new StartLineHandle(Controller, this)); AddHandle(new EndLineHandle(Controller, this)); Update(); }
public PolyLineHandleGroup(MoonlightController controller, Polyline child) : base(controller, child) { PointCollection points = child.Points; for (int i=0; i<points.Count; i++) AddHandle(new PolyLineHandle(Controller, this, i)); Update(); }
public PathSegmentHandle(MoonlightController controller, IHandleGroup group, PathSegment seg, DependencyProperty point) : base(controller, group) { if (seg == null) throw new ArgumentNullException("seg"); if (point == null) throw new ArgumentNullException("point"); segment = seg; point_property = point; }
public MainWindow() : base(Gtk.WindowType.Toplevel) { this.Build(); controller = new MoonlightController(moonlightwidget.Silver); propertypanel.Controller = controller; SetupUndoButtons(controller.UndoEngine); SetupFiguresButtons(controller.Selection); }
public SelectionTool(MoonlightController controller) : base(controller) { SelectionRect = new Rectangle(); SelectionRect.Opacity = 0.2; SelectionRect.Fill = new SolidColorBrush(Colors.Blue); SelectionRect.Stroke = new SolidColorBrush(Colors.Black); SelectionRect.StrokeThickness = 1.0; SelectionRect.SetValue(Canvas.ZIndexProperty, int.MaxValue); undo = new UndoGroup(); }
public AbstractHandleGroup(MoonlightController controller, UIElement child) { if (child == null) throw new ArgumentNullException("child"); if (controller == null) throw new ArgumentNullException("controller"); Child = child; Controller = controller; handles = new List<IHandle>(); frames = new List<IFrame>(); }
public ResizeRotateHandleGroup(MoonlightController controller, UIElement child) : base(controller, child) { AddFrame(new RectangleFrame(Child) ); AddHandle(new RotateHandle(controller, this, new RelativeLocator(child, 0.0, 0.0))); AddHandle(new RotateHandle(controller, this, new RelativeLocator(child, 1.0, 0.0))); AddHandle(new RotateHandle(controller, this, new RelativeLocator(child, 0.0, 1.0))); AddHandle(new RotateHandle(controller, this, new RelativeLocator(child, 1.0, 1.0))); AddHandle(new LeftResizeWidthHandle(controller, this, new RelativeLocator(child, 0.0, 0.5))); AddHandle(new RightResizeWidthHandle(controller, this, new RelativeLocator(child, 1.0, 0.5))); AddHandle(new TopResizeHeightHandle(controller, this, new RelativeLocator(child, 0.5, 0.0))); AddHandle(new BottomResizeHeightHandle(controller, this, new RelativeLocator(child, 0.5, 1.0))); Update(); }
public PathHandleGroup(MoonlightController controller, Path child) : base(controller, child) { PathGeometry geometry = child.Data as PathGeometry; if (geometry == null) return; foreach (PathFigure fig in geometry.Figures) { AddHandle(new StartPointHandle(Controller, this, fig) ); foreach (PathSegment segment in fig.Segments) { if (segment is LineSegment) AddLineSegmentHandle(segment); if (segment is BezierSegment) { AddFrame(new BezierSegmentFrame(Child, fig, segment as BezierSegment)); AddBezierSegmentHandles(segment); } } } Update(); }
public AbstractHandle(MoonlightController controller, IHandleGroup group) : base() { Group = group; //inner = controller.GtkSilver.InitializeFromXaml(GetXaml(), this); //Application.LoadComponent(this, new Uri("ellipse.xml", UriKind.Relative)); Content = CreateContent(); Content.MouseLeftButtonDown += MouseStart; Content.MouseLeftButtonUp += MouseEnd; Content.MouseMove += MouseStep; highlight_fill = new SolidColorBrush(Colors.Red); normal_fill = (Brush) Content.GetValue(Shape.FillProperty); Content.MouseEnter += delegate { Content.SetValue(Shape.FillProperty, highlight_fill); }; Content.MouseLeave += delegate { Content.SetValue(Shape.FillProperty, normal_fill); }; SetValue(Canvas.ZIndexProperty, int.MaxValue); transforms = new TransformGroup(); scaleTransform = new ScaleTransform(); transforms.Children.Add(scaleTransform); Content.SetValue(UIElement.RenderTransformOriginProperty, new Point(0.5, 0.5)); Content.SetValue(UIElement.RenderTransformProperty, transforms); undo_group = new UndoGroup(); Controller.ZoomChanged += delegate { Update(); }; }
public PathCreationTool(MoonlightController controller) : base(controller) { frames = new List<BezierSegmentFrame>(); }
public PointHandle(MoonlightController controller, IHandleGroup group) : base(controller, group) { }
public BezierSegmentPoint3Handle(MoonlightController controller, IHandleGroup group, BezierSegment seg) : base(controller, group) { segment = seg; }
public LineSegmentHandle(MoonlightController controller, IHandleGroup group, PathSegment seg) : base(controller, group, seg, LineSegment.PointProperty) { }
public ImageCreationTool(MoonlightController controller) : base(controller) { }
// TODO: this should be changed with SL 2.0 custom properties public static IHandleGroup CreateHandleGroup(MoonlightController controller, UIElement element) { if (element is Line) return new LineHandleGroup(controller, element as Line); if (element is Path) return new PathHandleGroup(controller, element as Path); if (element is Polyline) return new PolyLineHandleGroup(controller, element as Polyline); return new ResizeRotateHandleGroup(controller, element); }
public ElementCreationTool(MoonlightController controller) : base(controller) { }
public SquareCreationTool(MoonlightController controller) : base(controller) { }
public ResizeHandle(MoonlightController controller, IHandleGroup group, ILocator locator) : base(controller, group, locator) { }
public EllipseCreationTool(MoonlightController controller) : base(controller) { }
public TextBlockCreationTool(MoonlightController controller) : base(controller) { }
public StartLineHandle(MoonlightController controller, IHandleGroup group) : base(controller, group) { }
public PolyLineCreationTool(MoonlightController controller) : base(controller) { }
public AbstractTool(MoonlightController controller) { Controller = controller; }
public PropertyManager(MoonlightController controller) { properties = new List<PropertyInfo>(); controller.Selection.SelectionChanged += OnSelectionChanged; }
public ProportionalShapeCreationTool(MoonlightController controller) : base(controller) { }
public PolyLineHandle(MoonlightController controller, IHandleGroup group, int i) : base(controller, group) { index = i; }
public RectangleCreationTool(MoonlightController controller) : base(controller) { }