{
this.render.RightToLeft = this.Document.RightToLeft;
};
+ this.Document.ShowFullSpaceChanged += (s, e) =>
+ {
+ this.render.ShowFullSpace = this.Document.ShowFullSpace;
+ this._LayoutLines.ClearLayoutCache();
+ };
+ this.Document.ShowHalfSpaceChanged += (s, e) =>
+ {
+ this.render.ShowHalfSpace = this.Document.ShowHalfSpace;
+ this._LayoutLines.ClearLayoutCache();
+ };
+ this.Document.ShowTabChanged += (s, e) =>
+ {
+ this.render.ShowTab = this.Document.ShowTab;
+ this._LayoutLines.ClearLayoutCache();
+ };
+ this.Document.ShowLineBreakChanged += (s, e) =>
+ {
+ this.render.ShowLineBreak = this.Document.ShowLineBreak;
+ this._LayoutLines.ClearLayoutCache();
+ };
}
protected LineToIndexTable _LayoutLines
public event EventHandler PageBoundChanged;
/// <summary>
- /// マーカーパターンセット
- /// </summary>
- public MarkerPatternSet MarkerPatternSet
- {
- get { return this.Document.MarkerPatternSet; }
- }
-
- /// <summary>
- /// URLをハイパーリンクとして表示するなら真。そうでないなら偽
- /// </summary>
- public bool UrlMark
- {
- get { return this.Document.UrlMark; }
- set
- {
- this.Document.UrlMark = value;
- }
- }
-
- /// <summary>
/// テキストレンダラ―
/// </summary>
public ITextRender render
get { return this._LongestWidth; }
}
- /// <summary>
- /// 桁折り処理の方法を指定する
- /// </summary>
- /// <remarks>
- /// 変更した場合、呼び出し側で再描写とレイアウトの再構築を行う必要があります
- /// </remarks>
- public LineBreakMethod LineBreak
- {
- get
- {
- return this.Document.LineBreak;
- }
- set
- {
- this.Document.LineBreak = value;
- }
- }
-
- /// <summary>
- /// 折り返し行う文字数。実際に折り返しが行われる幅はem単位×この値となります
- /// </summary>
- public int LineBreakCharCount
- {
- get
- {
- return this.Document.LineBreakCharCount;
- }
- set
- {
- this.Document.LineBreakCharCount = value;
- }
- }
-
public double LineNumberMargin
{
get
}
/// <summary>
- /// タブの幅
- /// </summary>
- /// <remarks>変更した場合、呼び出し側で再描写する必要があります</remarks>
- public int TabStops
- {
- get { return this.Document.TabStops; }
- set { this.Document.TabStops = value; }
- }
-
- /// <summary>
/// すべてのレイアウト行を破棄し、再度レイアウトをやり直す
/// </summary>
public virtual void PerfomLayouts()
set { this._Src = value; }
}
- /// <summary>
- /// 行番号を表示するかどうか
- /// </summary>
- public bool DrawLineNumber
- {
- get { return this.Document.DrawLineNumber; }
- set
- {
- this.Document.DrawLineNumber = value;
- }
- }
-
public virtual void Draw(Rectangle updateRect)
{
}
IList<LineToIndexTableData> LayoutLines_SpilitStringByPixelbase(object sender, SpilitStringEventArgs e)
{
double WrapWidth;
- if (this.LineBreak == LineBreakMethod.PageBound)
+ if (this.Document.LineBreak == LineBreakMethod.PageBound)
WrapWidth = this.render.TextArea.Width - LineBreakingMarginWidth; //余白を残さないと欠ける
else
- WrapWidth = this.render.emSize.Width * this.LineBreakCharCount;
+ WrapWidth = this.render.emSize.Width * this.Document.LineBreakCharCount;
- if (WrapWidth < 0 && this.LineBreak != LineBreakMethod.None)
+ if (WrapWidth < 0 && this.Document.LineBreak != LineBreakMethod.None)
throw new InvalidOperationException();
int startIndex = e.index;