Beispiel #1
0
 public override Disposable<Block> CreateBlock(Theme Theme)
 {
     SystemTypeface typeface = SystemTypeface.Create("Courier New", false, false);
     SystemFont font = typeface.GetFont(0.05, Color.Black);
     TextStyle normal = new TextStyle(font, Color.White);
     TextStyle selected = new TextStyle(font, Color.Black);
     TextBlock textblock =
         new TextBlock(((TextSection)"Look, it's a list:\n\t* With\n\t* Three\n\t* Items").Style(normal, selected),
             new TextBlockStyle(new Point(0.04, 0.05), Alignment.Center, Alignment.Center, 4, 0.5, new Border(0.003, Color.Black)));
     return textblock.WithMargin(0.1).WithBackground(Theme.NodeBackground).WithBorder(Theme.NodeBorder);
 }
Beispiel #2
0
 public UniformStyledTextSection(TextSection Source, TextStyle NormalStyle, TextStyle SelectedStyle)
 {
     this.Source = Source;
     this.NormalStyle = NormalStyle;
     this.SelectedStyle = SelectedStyle;
 }
Beispiel #3
0
 /// <summary>
 /// Creates a uniformly-styled form of this text section.
 /// </summary>
 public StyledTextSection Style(TextStyle Normal, TextStyle Selected)
 {
     return new UniformStyledTextSection(this, Normal, Selected);
 }
Beispiel #4
0
 /// <summary>
 /// Gets a figure to display the given text section with the given style.
 /// </summary>
 /// <param name="Line">The index of the line where the text section begins.</param>
 /// <param name="Offset">The offset (in cells) of the beginning of the text section from the start of the line.</param>
 private static Figure _GetFigure(TextBlockStyle BlockStyle, TextStyle Style, TextSection TextSection, ref int Line, ref int Offset)
 {
     throw new NotImplementedException();
 }