public static ScreenLine FromBaseObject(BaseObject baseObj) { if (baseObj == null || baseObj.NativeObject == IntPtr.Zero) { return(null); } ScreenLine obj = baseObj as ScreenLine; if (object.Equals(obj, null)) { obj = new ScreenLine(CreatedWhenConstruct.CWC_NotToCreate); obj.BindNativeObject(baseObj.NativeObject, "CScreenLine"); obj.IncreaseCast(); } return(obj); }
/// <summary> /// Scrolls the screen/scrolling area up the specified amount of lines. /// </summary> /// <param name="lines">The amount of lines to scroll.</param> /// <param name="scrollTop">The top row of the scrolling area; null specifies the top of the screen.</param> /// <param name="scrollBottom">The bottom row of the scrolling area; null specifies the bottom of the screen.</param> /// <remarks> /// Adds rows to the scrollback buffer that get scrolled out at the top of the screen. /// </remarks> public void ScrollUp(int lines, int? scrollTop, int? scrollBottom) { ScreenLine newLine; for (int i = 0; i < lines; i++) { if (!this.screen.useAlternateBuffer && (scrollTop ?? 0) == 0) { this.screen.scrollbackBuffer.Append(this.screen.mainBuffer[0]); } this.screen.CurrentBuffer.RemoveAt(scrollTop ?? 0); newLine = new ScreenLine(this.screen.ColumnCount); this.screen.CurrentBuffer.Insert(scrollBottom ?? this.screen.CurrentBuffer.Count, newLine); this.changed = true; this.contentChanged = true; } }
public static extern void DrawLine(int windowID, ScreenLine line);
public BaseObject Create() { ScreenLine emptyInstance = new ScreenLine(CreatedWhenConstruct.CWC_NotToCreate); return(emptyInstance); }
/// <summary> /// Draws a pixel-width line to the window. /// </summary> /// <param name="line">The line to draw.</param> /// <param name="color">The color of the line.</param> public void DrawLine(ScreenLine line, Color color) { Core.Video.Queue.DrawLine(ID, color, line); }