using PaintDotNet.Annotation.Enum;
using PaintDotNet.Base.DedicatedAnalysis.Inclusions.Model;
using PaintDotNet.Base.SettingModel;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using static PaintDotNet.Base.SettingModel.LabelStyleModel;
using static System.Windows.Forms.Control;
namespace PaintDotNet.Annotation
{
///
/// 用来给标注、测量、视场以及其它工具使用的接口
///
public interface ISurfaceBox
{
///
/// 获取缩放比例
///
double ScaleRatio { get; }
///
///
///
bool Capture { get; set; }
///
/// 绘制鼠标划选的标记
///
bool DrawRectangleFlag { get; set; }
Rectangle DrawRectangle { get; set; }
///
/// 激活的工具
///
DrawToolType ActiveTool { get; set; }
DrawAnalysisModel AnalysisStyleModel { get; set; }
///
/// 鼠标形状
///
Cursor Cursor { get; set; }
RectangleF GetVisibleDocumentRectangleF();
SizeF GetDocumentSize();
///
/// 获取controls
///
ControlCollection Controls { get; }
///
/// 添加到历史记录,用于撤销
///
///
void AddCommandToHistory(Command.Command c);
///
/// 刷新界面
///
void Refresh();
///
/// 设置标记
///
void SetDirty();
///
/// 获取未缩放的坐标点
///
///
///
Point GetScalePoint(PointF location);
///
/// 获取缩放的原点
///
///
Point GetCalcOriginPoint();
Rectangle RectangleToScreen(Rectangle rectangle);
///
/// 获取未缩放的值
///
///
///
int UnscaleScalar(int deltaX);
PointF GetDocumentScrollPositionF();
void SetDocumentScrollPositionF(PointF newScrollPos);
void Update();
PointF DocumentToClient(PointF pointF);
///
/// 获取系统当前选中单位及每单位像素值
///
/// 3位字符串数组,
/// 0:系统选中单位枚举字符串
/// 1:系统选中单位名称字符串
/// 2:系统选中单位符号字符串
/// 3:系统选中单位每单位像素长度
string[] GetPxPerUnit();
///
/// 单位的文字
///
///
Dictionary GetUnitsDictionary();
///
/// 单位的缩写
///
///
Dictionary GetUnitSymbolsDictionary();
///
/// 获取当前DocumentWorkspace的视场行为
///
///
CombineMode GetCombineMode();
///
/// 设置当前鼠标的状态
///
///
void SetMouseStatus(bool status);
///
/// 获取当前鼠标的状态
///
///
bool GetMouseStatus();
#region 标注、测量
Dictionary GetTools();
///
/// 标记的连续绘制标记
///
///
bool ContinuousDrawingLabel();
void SetContinuousDrawingLabel(bool v);
///
/// 测量的连续绘制标记
///
///
bool ContinuousDrawingMeasure();
void SetContinuousDrawingMeasure(bool v);
///
/// 标注、测量、视场等的集合
///
GraphicsList GraphicsList { get; }
///
/// 重置标注、测量的管理类
///
void ResetUndoManager();
///
/// 获取标注的样式信息
///
///
LabelStyleModel GetLabelStyleModel();
///
/// 获取测量的样式信息
///
///
MeasureStyleModel GetMeasureStyleModel();
///
/// 获取水印的样式信息
///
///
WatermarkModel GetWatermarkModel();
///
/// 获取工字线的样式信息
///
///
WorkTypeStyleModel GetWorkTypeStyleModel();
///
/// 获取工字线的样式信息
///
///
RulerModel GetRulerStyleModel();
///
/// 获取测量单位对应的换算字典
///
///
Dictionary getMeasureInfo();
///
/// 获取标尺单位
///
///
MeasurementUnit GetMeasurementUnit();
///
/// 获取系统当前放大倍数
///
///
decimal GetGainMultiple();
///
/// 获取当前图片放大倍数
///
///
decimal GetMic_Rulers();
///
/// 刷新标注列表
///
void RefreshLabelListDialog();
///
/// 更新命名的延续数字
///
void UpdateContinueNum();
#endregion
#region 预处理
///
/// 预处理 交互操作的连续绘制标记
///
///
bool ContinuousBinaryAction();
///
/// 预处理 - 交互操作 -单个提取
///
///
void BinaryActionExtract(PointF point);
#region 选择
///
/// 预处理 - 交互操作 - 选择 - 单个
///
///
void BinaryActionChoise(PointF point);
///
/// 预处理 - 交互操作 - 选择 - 矩形
///
///
void BinaryActionChoiseRectangle(RectangleF rectangle);
///
/// 预处理 - 交互操作 - 选择 - 椭圆
///
///
void BinaryActionChoiseOval(RectangleF rectangle);
///
/// 预处理 - 交互操作 - 选择 - 多边形
///
///
void BinaryActionChoisePolygon(List points);
#endregion
#region 分割
///
/// 获取分割线宽
///
///
int GetSegmentationWidth();
///
/// 预处理 - 交互操作 - 分割 - 直线分割
///
///
///
void BinaryActionSplitLine(PointF start, PointF end);
///
/// 预处理 - 交互操作 - 分割 - 椭圆分割
///
///
void BinaryActionSplitOval(RectangleF rect);
#endregion
#region 连接
///
/// 获取连接线宽
///
///
int GetConnectionWidth();
///
/// 预处理 - 交互操作 - 连接 - 直线
///
///
///
void BinaryActionConnectionLine(PointF start, PointF end);
///
/// 预处理 - 交互操作 - 连接 - 椭圆
///
///
///
void BinaryConnectionOval(RectangleF rect);
#endregion
#region 删除
///
/// 预处理 - 交互操作 - 删除 - 单个删除
///
///
void BinaryActionDelete(PointF point);
///
/// 预处理 - 交互操作 - 删除 - 矩形删除
///
///
void BinaryActionDelete(RectangleF rect);
///
/// 预处理 - 交互操作 - 删除 - 多边形删除
///
///
void BinaryActionDelete(List points);
///
/// 预处理 - 交互操作 - 删除 - 椭圆删除
///
///
void BinaryActionDeleteOval(RectangleF rect);
#endregion
#region 添加
///
/// 预处理 - 交互操作 - 添加 - 椭圆
///
///
void BinaryActionAddOval(RectangleF rect);
///
/// 预处理 - 交互操作 - 添加 - 矩形
///
///
void BinaryActionAddRectangle(RectangleF rect);
///
/// 预处理 - 交互操作 - 添加 - 多边形
///
///
void BinaryActionAddPolygon(List points);
#endregion
#endregion
#region 物相提取
///
/// 物相提取 - 交互操作 - 矩形选择
///
///
void PPhaseActionRectangle(RectangleF rect);
///
/// 物相提取 - 交互操作 - 多边形选择
///
///
void PPhaseActionPolygon(List points);
///
/// 物相提取 - 交互操作 - 椭圆选择
///
///
void PPhaseActionOval(RectangleF rect);
#endregion
bool ViewMoveOnMouseLeftDoubleClickEnable { get; set; }
PointF GetRulerPointInPanel(PointF point);
PointF ScalePointToRulerPoint(PointF point);
int ToolNumber { set; }
///
/// 实际大小标记
///
///
bool ActualSize();
///
/// 合适大小标记
///
///
bool SuitableSize();
///
/// 合适宽度标记
///
///
bool SuitableWidth();
///
/// 合适高度标记
///
///
bool SuitableHeight();
///
/// 锁定扩缩
///
///
bool LockZoom();
///
/// 定倍显示
///
///
bool FixedMultiple();
///
/// 合并视场
///
///
bool MergeFieldOfView();
///
/// 删除视场
///
///
bool DeleteFieldOfView();
///
/// 删除视场
///
///
Inclusion GetInclusion();
}
}