Show / Hide Table of Contents

Class SurfaceViewer

Draws a ICellSurface within an area. Optionally supports scroll bars.

Inheritance
object
ControlBase
CompositeControl
SurfaceViewer
CharacterPicker
Implements
IContainer
IList<ControlBase>
ICollection<ControlBase>
IEnumerable<ControlBase>
IEnumerable
Inherited Members
CompositeControl.MouseLastHandledByChild
CompositeControl.Controls
CompositeControl.NamedControls
CompositeControl.CreateChildControls()
CompositeControl.ProcessMouse(MouseScreenObjectState)
CompositeControl.OnMouseExit(ControlBase.ControlMouseState)
CompositeControl.AddControl(ControlBase)
CompositeControl.RemoveControl(ControlBase)
CompositeControl.Count
CompositeControl.this[int]
ControlBase.MouseState_IsMouseOver
ControlBase.MouseState_EnteredWithButtonDown
ControlBase.MouseState_IsMouseLeftDown
ControlBase.MouseState_IsMouseRightDown
ControlBase.OnUnfocused()
ControlBase.OnFocused()
ControlBase.OnIsDirtyChanged()
ControlBase.ProcessKeyboard(Keyboard)
ControlBase.LostMouse(MouseScreenObjectState)
ControlBase.OnParentChanged()
ControlBase.OnPositionChanged()
ControlBase.PlaceRelativeTo(ControlBase, Direction.Types, int)
ControlBase.DetermineState()
ControlBase.OnStateChanged(ControlStates, ControlStates)
ControlBase.FindThemeFont()
ControlBase.FindThemeColors()
ControlBase.SetThemeColors(Colors)
ControlBase.HasThemeColors()
ControlBase.Resize(int, int)
ControlBase.OnResized()
ControlBase.CreateControlSurface()
ControlBase.RefreshThemeStateColors(Colors)
ControlBase.OnMouseEnter(ControlBase.ControlMouseState)
ControlBase.OnMouseIn(ControlBase.ControlMouseState)
ControlBase.OnLeftMouseClicked(ControlBase.ControlMouseState)
ControlBase.OnRightMouseClicked(ControlBase.ControlMouseState)
ControlBase.ThemeState
ControlBase.UseKeyboard
ControlBase.UseMouse
ControlBase.CanFocus
ControlBase.CanResize
ControlBase.AlternateFont
ControlBase.Surface
ControlBase.MouseArea
ControlBase.IsMouseButtonStateClean
ControlBase.Position
ControlBase.AbsolutePosition
ControlBase.IsVisible
ControlBase.Tag
ControlBase.TabStop
ControlBase.TabIndex
ControlBase.IsDirty
ControlBase.Name
ControlBase.FocusOnMouseClick
ControlBase.Width
ControlBase.Height
ControlBase.IsFocused
ControlBase.IsEnabled
ControlBase.Bounds
ControlBase.Parent
ControlBase.State
ControlBase.IsDirtyChanged
ControlBase.Focused
ControlBase.Unfocused
ControlBase.PositionChanged
ControlBase.MouseEnter
ControlBase.MouseExit
ControlBase.MouseMove
ControlBase.MouseButtonClicked
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.dll
Syntax
[DataContract]
public class SurfaceViewer : CompositeControl, IContainer, IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerable

Constructors

SurfaceViewer(int, int, ICellSurface?)

Creates a new drawing surface control with the specified width and height.

Declaration
public SurfaceViewer(int width, int height, ICellSurface? surface = null)
Parameters
Type Name Description
int width

Width of the control.

int height

Height of the control.

ICellSurface surface

The surface to view.

Fields

HorizontalScroller

The horizontal scroll bar. This shouldn't be changed.

Declaration
public ScrollBar HorizontalScroller
Field Value
Type Description
ScrollBar

VerticalScroller

The vertical scroll bar. This shouldn't be changed.

Declaration
public ScrollBar VerticalScroller
Field Value
Type Description
ScrollBar

Properties

ScrollBarMode

Sets the visual behavior of the scroll bars for the control.

Declaration
[DataMember]
public SurfaceViewer.ScrollBarModes ScrollBarMode { get; set; }
Property Value
Type Description
SurfaceViewer.ScrollBarModes

Methods

OnSurfaceChanged(ICellSurface, ICellSurface)

Handles and dehandles the IsDirtyChanged event for the backing surface.

Declaration
protected override void OnSurfaceChanged(ICellSurface oldSurface, ICellSurface newSurface)
Parameters
Type Name Description
ICellSurface oldSurface

The previous surface instance.

ICellSurface newSurface

The new surface instance.

Overrides
ControlBase.OnSurfaceChanged(ICellSurface, ICellSurface)

ResetSurface()

Resets the control's surface to a 1x1 surface transparent surface.

Declaration
public void ResetSurface()

UpdateAndRedraw(TimeSpan)

Updates each control hosted by this control.

Declaration
public override void UpdateAndRedraw(TimeSpan time)
Parameters
Type Name Description
TimeSpan time

The game frame time delta.

Overrides
CompositeControl.UpdateAndRedraw(TimeSpan)

Implements

IContainer
IList<T>
ICollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX