mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Some enhancements to the interfaces
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1642 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
dbc77613f2
commit
5242a70121
2 changed files with 31 additions and 4 deletions
|
@ -42,7 +42,6 @@ namespace Greenshot.Drawing {
|
||||||
public delegate void SurfaceDrawingModeEventHandler(object source, DrawingModes drawingMode);
|
public delegate void SurfaceDrawingModeEventHandler(object source, DrawingModes drawingMode);
|
||||||
|
|
||||||
public enum DrawingModes { None, Rect, Ellipse, Text, Line, Arrow, Crop, Highlight, Obfuscate, Bitmap, Path }
|
public enum DrawingModes { None, Rect, Ellipse, Text, Line, Arrow, Crop, Highlight, Obfuscate, Bitmap, Path }
|
||||||
public enum Effects { Shadow, TornEdge }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of Surface.
|
/// Description of Surface.
|
||||||
|
@ -77,7 +76,26 @@ namespace Greenshot.Drawing {
|
||||||
private DrawableContainer drawingElement = null;
|
private DrawableContainer drawingElement = null;
|
||||||
private DrawableContainer undrawnElement = null;
|
private DrawableContainer undrawnElement = null;
|
||||||
private DrawableContainer cropContainer = null;
|
private DrawableContainer cropContainer = null;
|
||||||
|
private IDrawableContainer cursorContainer = null;
|
||||||
private TextureBrush transparencyBackgroundBrush;
|
private TextureBrush transparencyBackgroundBrush;
|
||||||
|
|
||||||
|
public IDrawableContainer CursorContainer {
|
||||||
|
get {
|
||||||
|
return cursorContainer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool HasCursor {
|
||||||
|
get {
|
||||||
|
return cursorContainer != null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveCursor() {
|
||||||
|
RemoveElement(cursorContainer, true);
|
||||||
|
cursorContainer = null;
|
||||||
|
}
|
||||||
|
|
||||||
public TextureBrush TransparencyBackgroundBrush {
|
public TextureBrush TransparencyBackgroundBrush {
|
||||||
get {
|
get {
|
||||||
return transparencyBackgroundBrush;
|
return transparencyBackgroundBrush;
|
||||||
|
@ -167,7 +185,8 @@ namespace Greenshot.Drawing {
|
||||||
((Capture)capture).NullImage();
|
((Capture)capture).NullImage();
|
||||||
|
|
||||||
if (capture.Cursor != null && capture.CursorVisible) {
|
if (capture.Cursor != null && capture.CursorVisible) {
|
||||||
SelectElement(AddIconContainer(capture.Cursor, capture.CursorLocation.X, capture.CursorLocation.Y));
|
cursorContainer = AddIconContainer(capture.Cursor, capture.CursorLocation.X, capture.CursorLocation.Y);
|
||||||
|
SelectElement(cursorContainer);
|
||||||
}
|
}
|
||||||
captureDetails = capture.CaptureDetails;
|
captureDetails = capture.CaptureDetails;
|
||||||
}
|
}
|
||||||
|
@ -869,7 +888,8 @@ namespace Greenshot.Drawing {
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveElement(DrawableContainer element, bool makeUndoable) {
|
public void RemoveElement(IDrawableContainer elementToRemove, bool makeUndoable) {
|
||||||
|
DrawableContainer element = elementToRemove as DrawableContainer;
|
||||||
DeselectElement(element);
|
DeselectElement(element);
|
||||||
elements.Remove(element);
|
elements.Remove(element);
|
||||||
element.FieldChanged -= element_FieldChanged;
|
element.FieldChanged -= element_FieldChanged;
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace Greenshot.Plugin {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//public enum HorizontalAlignment {LEFT, CENTER, RIGHT};
|
//public enum HorizontalAlignment {LEFT, CENTER, RIGHT};
|
||||||
public enum VerticalAlignment {TOP, CENTER, BOTTOM};
|
public enum VerticalAlignment {TOP, CENTER, BOTTOM};
|
||||||
|
public enum Effects { Shadow, TornEdge };
|
||||||
|
|
||||||
public enum SurfaceMessageTyp {
|
public enum SurfaceMessageTyp {
|
||||||
FileSaved,
|
FileSaved,
|
||||||
|
@ -129,6 +130,12 @@ namespace Greenshot.Plugin {
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
void RemoveElement(IDrawableContainer elementToRemove, bool makeUndoable);
|
||||||
void SendMessageEvent(object source, SurfaceMessageTyp messageType, string message);
|
void SendMessageEvent(object source, SurfaceMessageTyp messageType, string message);
|
||||||
|
void ApplyBitmapEffect(Effects effect);
|
||||||
|
void RemoveCursor();
|
||||||
|
bool HasCursor {
|
||||||
|
get;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue