Match match;
StringBuffer buffer;
LineToIndexTable _LayoutLines;
- bool _EnableFireUpdateEvent = true,_UrlMark = false, _DrawLineNumber = false;
+ bool _EnableFireUpdateEvent = true,_UrlMark = false, _DrawLineNumber = false, _HideRuler = true;
SemaphoreSlim Semaphore = new SemaphoreSlim(MaxSemaphoreCount);
LineBreakMethod _LineBreak;
int _TabStops, _LineBreakCharCount = 80;
this.LineBreakChanged += (s, e) => { };
this.TabStopsChanged += (s, e) => { };
this.DrawLineNumberChanged += (s, e) => { };
+ this.Selections = new SelectCollection();
+ this.HideLineMarker = true;
+ this.HideRulerChanged += (s, e) => { };
+ this.CaretPostion = TextPoint.Null;
}
void WacthDogPattern_Updated(object sender, EventArgs e)
}
/// <summary>
+ /// ラインマーカーを描くなら偽。そうでなければ真
+ /// </summary>
+ public bool HideLineMarker
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// キャレットを描くなら偽。そうでなければ真
+ /// </summary>
+ public bool HideCaret
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// 挿入モードなら真を返し、上書きモードなら偽を返す
+ /// </summary>
+ public bool InsertMode
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// HideRulerの値が変わったときに通知します
+ /// </summary>
+ public event EventHandler HideRulerChanged;
+
+ /// <summary>
+ /// ルーラーを表示しないなら真、そうでないなら偽
+ /// </summary>
+ public bool HideRuler
+ {
+ get { return this._HideRuler; }
+ set
+ {
+ this._HideRuler = value;
+ this.LayoutLines.ClearLayoutCache();
+ this.HideRulerChanged(this, null);
+ }
+ }
+
+ /// <summary>
+ /// レイアウト行のどこにキャレットがあるかを表す
+ /// </summary>
+ public TextPoint CaretPostion
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// 選択範囲コレクション
+ /// </summary>
+ internal SelectCollection Selections
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
/// DrawLineNumberの値が変わったときに通知される
/// </summary>
public event EventHandler DrawLineNumberChanged;
this.CaretBlinkTime = 500;
this.CaretWidthOnInsertMode = 1;
this.CalculateClipRect();
- this.CaretPostion = TextPoint.Null;
this.CaretLocation = new Point(this.render.TextArea.X, this.render.TextArea.Y);
this.LayoutLines.FoldingCollection.StatusChanged += FoldingCollection_StatusChanged;
- this.HideLineMarker = true;
this.IsFocused = false;
- this.Selections = new SelectCollection();
this.SelectGrippers = new GripperRectangle(new GripperView(this.render), new GripperView(this.render));
+ this.Document.HideRulerChanged += (s, e) => {
+ CalculateClipRect();
+ CalculateLineCountOnScreen();
+ };
}
/// <summary>
/// </summary>
internal SelectCollection Selections
{
- get;
- set;
+ get { return this.Document.Selections; }
+ set { this.Document.Selections = value; }
}
/// <summary>
/// </summary>
public bool HideLineMarker
{
- get;
- set;
+ get { return this.Document.HideLineMarker; }
+ set { this.Document.HideLineMarker = value; }
}
/// <summary>
/// </summary>
public bool HideCaret
{
- get;
- set;
+ get { return this.Document.HideCaret; }
+ set { this.Document.HideCaret = value; }
}
/// <summary>
/// </summary>
public bool InsertMode
{
- get;
- set;
+ get { return this.Document.InsertMode; }
+ set { this.Document.InsertMode = value; }
}
/// <summary>
/// </summary>
public bool HideRuler
{
- get { return this._HideRuler; }
+ get { return this.Document.HideRuler; }
set
{
- this._HideRuler = value;
- this.LayoutLines.ClearLayoutCache();
- CalculateClipRect();
- CalculateLineCountOnScreen();
+ this.Document.HideRuler = value;
}
}
/// </summary>
public TextPoint CaretPostion
{
- get;
- private set;
+ get { return this.Document.CaretPostion; }
+ private set { this.Document.CaretPostion = value; }
}
/// <summary>