public DragDropActionBase(IVidgetBackend backend, ICamera camera) : this() { this.Backend = backend; this.Camera = camera; SetDragTarget(); }
public DragDropCatcher(T baseAction, IVidgetBackend backend) : base() { this.Priority = baseAction.Priority; this.backend = backend; this.baseAction = baseAction; this.Dragging = false; }
public static FrameworkElement ToWpf(this IVidgetBackend backend) { var vb = backend as IWpfBackend; if (vb != null) { return(vb.Control); } var xb = backend as Limaki.View.XwtBackend.IXwtBackend; if (xb != null && ((Xwt.Backends.IFrontend)xb.Widget).Backend is Xwt.WPFBackend.WidgetBackend) { return(((Xwt.WPFBackend.WidgetBackend)((Xwt.Backends.IFrontend)xb.Widget).Backend).Widget); } var widget = backend as Xwt.Widget; if (widget != null) { var wpfBackend = widget.GetBackend() as Xwt.WPFBackend.WidgetBackend; if (wpfBackend != null) { return(Xwt.WPFBackend.WidgetBackend.GetFrameworkElement(wpfBackend)); } } return(backend as FrameworkElement); }
public static FrameworkElement GetFrameworkElement(this IVidgetBackend vidgetBackend) { var backend = vidgetBackend as FrameworkElement; if (backend != null) { return(backend); } var widget = vidgetBackend as Xwt.Widget; if (widget != null) { var wpfBackend = widget.GetBackend() as Xwt.WPFBackend.WidgetBackend; if (wpfBackend != null) { backend = Xwt.WPFBackend.WidgetBackend.GetFrameworkElement(wpfBackend); } } else { var wpfBackend = vidgetBackend as IWpfBackend; if (wpfBackend != null) { return(wpfBackend.Control); } } return(backend); }
public static void ForewardDragOver(IMouseAction baseAction, IVidgetBackend backend, DragOverEventArgs e) { if (baseAction.Enabled) { var pt = e.Position; baseAction.OnMouseMove(new MouseActionEventArgs(MouseActionButtons.None, ModifierKeys.None, 0, pt.X, pt.Y, 0)); } }
public static Widget ToXwt(this IVidgetBackend backend) { var vb = backend as IXwtBackend; if (vb != null) { return(vb.Widget); } return(backend as Widget); }
public static SWF.Control ToSwf(this IVidgetBackend item) { var swfBackend = item as ISwfBackend; if (swfBackend != null) { return(swfBackend.Control); } return(item as SWF.Control); }
public static Widget ToGtk(this IVidgetBackend backend) { var vb = backend as IGtkBackend; if (vb != null) { return(vb.Widget); } var xb = backend as Limaki.View.XwtBackend.IXwtBackend; if (xb != null && ((Xwt.Backends.IFrontend)xb.Widget).Backend is Xwt.GtkBackend.WidgetBackend) { return(((Xwt.GtkBackend.WidgetBackend)((Xwt.Backends.IFrontend)xb.Widget).Backend).Widget); } return(backend as Widget); }
public bool IsSameApp(IVidgetBackend a, IVidgetBackend b) { var control = a as Control; var thisControl = b as Control; if (control != null) { Form form = control.FindForm(); bool sameApp = false; foreach (Form iForm in Application.OpenForms) { if (iForm == form) { sameApp = true; break; } } return(sameApp); } return(false); }
public DragDropBackendHandler(IVidgetBackend backend) { this.Backend = backend as System.Windows.Forms.Control; }
public DragDropMouseBackendHandler(IVidgetBackend widget) : base(widget) { }
public DragDropMouseBackendHandler(IVidgetBackend backend) : base(backend) { }
public virtual void SetContent(IVidget value) { Content = value.Backend; }
public VisualsDragDropAction(Func <IGraphScene <IVisual, IVisualEdge> > sceneHandler, IVidgetBackend backend, ICamera camera, IGraphSceneLayout <IVisual, IVisualEdge> layout) : base(backend, camera) { this.SceneHandler = sceneHandler; this.Layout = layout; }
public DragDropBackendHandler(IVidgetBackend backend) { this.Backend = backend; }
public DragDropBackendHandler(IVidgetBackend widget) { this.Widget = widget as Widget; }