using FastReport.Forms;
using FastReport.Utils;
using System.Drawing;
using System.Windows.Forms;
#pragma warning disable
namespace FastReport.SVG
{
public partial class SVGObject : IHasEditor
{
#region Public Methods
///
public override ContextMenuBase GetContextMenu()
{
return new SVGObjectMenu(Report.Designer);
}
///
public override void HandleDragDrop(FRMouseEventArgs e)
{
DataColumn = (e.DragSource as SVGObject).DataColumn;
dragAccept = false;
}
///
public override void HandleDragOver(FRMouseEventArgs e)
{
if (PointInObject(new PointF(e.x, e.y)) && e.DragSource is SVGObject)
e.handled = true;
dragAccept = e.handled;
}
///
/// Invokes the object's editor.
///
/// true if object was edited succesfully.
public override bool InvokeEditor()
{
using (SVGEditorForm form = new SVGEditorForm(this))
{
bool isOk = form.ShowDialog() == DialogResult.OK;
Assign(form.SvgObject);
return isOk ? true : false;
}
}
#endregion Public Methods
}
}
#pragma warning restore