using SmartCoalApplication.Annotation.Enum;
using SmartCoalApplication.Base.SettingModel;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using static SmartCoalApplication.Base.SettingModel.LabelStyleModel;
using static System.Windows.Forms.Control;
namespace SmartCoalApplication.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 标注、测量
///
/// 测量的连续绘制标记
///
///
bool ContinuousDrawingMeasure();
///
/// 视场的连续绘制标记
///
///
bool ContinuousDrawingView();
void SetContinuousDrawingMeasure(bool v);
///
/// 标注、测量、视场等的集合
///
GraphicsList GraphicsList { get; }
///
/// 重置标注、测量的管理类
///
void ResetUndoManager();
///
/// 获取标注的样式信息
///
///
LabelStyleModel GetLabelStyleModel();
///
/// 获取测量的样式信息
///
///
MeasureStyleModel GetMeasureStyleModel();
///
/// 获取测量单位对应的换算字典
///
///
Dictionary getMeasureInfo();
///
/// 更新命名的延续数字
///
void UpdateContinueNum();
#endregion
bool ViewMoveOnMouseLeftDoubleClickEnable { get; set; }
PointF GetRulerPointInPanel(PointF point);
PointF ScalePointToRulerPoint(PointF point);
int ToolNumber { set; }
///
/// 删除视场
///
///
bool DeleteFieldOfView();
///
/// 获取测量的样式信息
///
///
MeasureAreaModel GetMeasureAreaModel();
double getUnitNum();
string getAliasName();
int getDecimalPlaces();
}
}