Fixed some interface usage, also cleanup of the surface & editor code. This should theoretically allow usage of home made IDrawableContainer objects, which plug-ins supply.

Also made it possible to reuse the editor, currently only available editors which have a non modified surface can be reused. And only than if the configuration is set to do so.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2100 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-26 16:57:16 +00:00
commit f9abcac063
13 changed files with 233 additions and 154 deletions

View file

@ -25,6 +25,7 @@ using System.Windows.Forms;
using Greenshot.Plugin.Drawing;
using System.IO;
using System.Collections.Generic;
namespace Greenshot.Plugin {
/// <summary>
@ -58,13 +59,18 @@ namespace Greenshot.Plugin {
public delegate void SurfaceSizeChangeEventHandler(object source);
public delegate void SurfaceMessageEventHandler(object source, SurfaceMessageEventArgs eventArgs);
public delegate void SurfaceElementEventHandler(object source, IList<IDrawableContainer> element);
public delegate void SurfaceDrawingModeEventHandler(object source, DrawingModes drawingMode);
public enum DrawingModes { None, Rect, Ellipse, Text, Line, Arrow, Crop, Highlight, Obfuscate, Bitmap, Path }
/// <summary>
/// The interface to the Surface object, so Plugins can use it.
/// </summary>
public interface ISurface : IDisposable {
event SurfaceSizeChangeEventHandler SurfaceSizeChanged;
event SurfaceMessageEventHandler SurfaceMessage;
event SurfaceMessageEventHandler SurfaceMessage;
event SurfaceDrawingModeEventHandler DrawingModeChanged;
event SurfaceElementEventHandler MovingElementChanged;
/// <summary>
/// Get/Set the image to the Surface