ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.Testing.MockPlotControl Class Reference

A plot control that renders in-memory and has functionality useful for testing interactivity. More...

Inheritance diagram for ScottPlot.Testing.MockPlotControl:
ScottPlot.IPlotControl

Public Member Functions

 MockPlotControl ()
 
float DetectDisplayScale ()
 Determine the DPI scaling ratio of the present display. A value of 1.0 means no scaling, and 1.5 means 150% scaling. This operation may be costly so do not call it frequently.
 
void Refresh ()
 Render the plot and update the image.
 
void Reset ()
 Disposes the current Plot and creates a new one for the control.
 
void Reset (Plot plot)
 Loads the given Plot into the control.
 
void ShowContextMenu (Pixel position)
 Launch the default pop-up menu (typically in response to a right-click) at the given position in the control.
 
void ScrollWheelUp (Pixel pixel)
 
void ScrollWheelDown (Pixel pixel)
 
void PressShift ()
 
void ReleaseShift ()
 
void PressCtrl ()
 
void ReleaseCtrl ()
 
void PressAlt ()
 
void ReleaseAlt ()
 
void TapRightArrow ()
 
void TapLeftArrow ()
 
void TapUpArrow ()
 
void TapDownArrow ()
 
void PressKey (Key key)
 
void ReleaseKey (Key key)
 
void TapKey (Key key)
 
void MoveMouse (Pixel px)
 
void LeftMouseDown (Pixel px)
 
void LeftMouseUp (Pixel px)
 
void LeftClick (Pixel px)
 
void LeftClickDrag (Pixel px1, Pixel px2)
 
void RightMouseDown (Pixel px)
 
void RightMouseUp (Pixel px)
 
void RightClick (Pixel px)
 
void RightClickDrag (Pixel px1, Pixel px2)
 
void MiddleMouseDown (Pixel px)
 
void MiddleMouseUp (Pixel px)
 
void MiddleClick (Pixel px)
 
void MiddleClickDrag (Pixel px1, Pixel px2)
 

Properties

int Width = 400 [get, set]
 
int Height = 300 [get, set]
 
Pixel Center [get]
 
Plot Plot [get]
 The primary Plot displayed by this interactive control.
 
IMultiplot Multiplot [get, set]
 The multiplot managed by this interactive control.
 
GRContext? GRContext [get]
 Context for hardware-accelerated graphics (or null if not available)
 
UserInputProcessor UserInputProcessor [get]
 This object takes in UI events and contains logic for how to respond to them. This is a newer alternative to the older Interaction system.
 
IPlotMenuMenu [get, set]
 Platform-specific logic for managing the context menu.
 
float DisplayScale = 1 [get, set]
 The value of the present display scaling. Mouse positions are multiplied by this value for pixel/coordinate conversions.
 
int RefreshCount = 0 [get]
 
int ContextMenuLaunchCount = 0 [get]
 
- Properties inherited from ScottPlot.IPlotControl

Detailed Description

A plot control that renders in-memory and has functionality useful for testing interactivity.

Constructor & Destructor Documentation

◆ MockPlotControl()

ScottPlot.Testing.MockPlotControl.MockPlotControl ( )
inline

Member Function Documentation

◆ DetectDisplayScale()

float ScottPlot.Testing.MockPlotControl.DetectDisplayScale ( )

Determine the DPI scaling ratio of the present display. A value of 1.0 means no scaling, and 1.5 means 150% scaling. This operation may be costly so do not call it frequently.

Implements ScottPlot.IPlotControl.

◆ LeftClick()

void ScottPlot.Testing.MockPlotControl.LeftClick ( Pixel  px)
inline

◆ LeftClickDrag()

void ScottPlot.Testing.MockPlotControl.LeftClickDrag ( Pixel  px1,
Pixel  px2 
)
inline

◆ LeftMouseDown()

void ScottPlot.Testing.MockPlotControl.LeftMouseDown ( Pixel  px)
inline

◆ LeftMouseUp()

void ScottPlot.Testing.MockPlotControl.LeftMouseUp ( Pixel  px)
inline

◆ MiddleClick()

void ScottPlot.Testing.MockPlotControl.MiddleClick ( Pixel  px)
inline

◆ MiddleClickDrag()

void ScottPlot.Testing.MockPlotControl.MiddleClickDrag ( Pixel  px1,
Pixel  px2 
)
inline

◆ MiddleMouseDown()

void ScottPlot.Testing.MockPlotControl.MiddleMouseDown ( Pixel  px)
inline

◆ MiddleMouseUp()

void ScottPlot.Testing.MockPlotControl.MiddleMouseUp ( Pixel  px)
inline

◆ MoveMouse()

void ScottPlot.Testing.MockPlotControl.MoveMouse ( Pixel  px)
inline

◆ PressAlt()

void ScottPlot.Testing.MockPlotControl.PressAlt ( )

◆ PressCtrl()

void ScottPlot.Testing.MockPlotControl.PressCtrl ( )

◆ PressKey()

void ScottPlot.Testing.MockPlotControl.PressKey ( Key  key)
inline

◆ PressShift()

void ScottPlot.Testing.MockPlotControl.PressShift ( )

◆ Refresh()

void ScottPlot.Testing.MockPlotControl.Refresh ( )
inline

Render the plot and update the image.

Implements ScottPlot.IPlotControl.

◆ ReleaseAlt()

void ScottPlot.Testing.MockPlotControl.ReleaseAlt ( )

◆ ReleaseCtrl()

void ScottPlot.Testing.MockPlotControl.ReleaseCtrl ( )

◆ ReleaseKey()

void ScottPlot.Testing.MockPlotControl.ReleaseKey ( Key  key)
inline

◆ ReleaseShift()

void ScottPlot.Testing.MockPlotControl.ReleaseShift ( )

◆ Reset() [1/2]

void ScottPlot.Testing.MockPlotControl.Reset ( )
inline

Disposes the current Plot and creates a new one for the control.

Implements ScottPlot.IPlotControl.

◆ Reset() [2/2]

void ScottPlot.Testing.MockPlotControl.Reset ( Plot  plot)
inline

Loads the given Plot into the control.

Implements ScottPlot.IPlotControl.

◆ RightClick()

void ScottPlot.Testing.MockPlotControl.RightClick ( Pixel  px)
inline

◆ RightClickDrag()

void ScottPlot.Testing.MockPlotControl.RightClickDrag ( Pixel  px1,
Pixel  px2 
)
inline

◆ RightMouseDown()

void ScottPlot.Testing.MockPlotControl.RightMouseDown ( Pixel  px)
inline

◆ RightMouseUp()

void ScottPlot.Testing.MockPlotControl.RightMouseUp ( Pixel  px)
inline

◆ ScrollWheelDown()

void ScottPlot.Testing.MockPlotControl.ScrollWheelDown ( Pixel  pixel)
inline

◆ ScrollWheelUp()

void ScottPlot.Testing.MockPlotControl.ScrollWheelUp ( Pixel  pixel)
inline

◆ ShowContextMenu()

void ScottPlot.Testing.MockPlotControl.ShowContextMenu ( Pixel  position)

Launch the default pop-up menu (typically in response to a right-click) at the given position in the control.

Implements ScottPlot.IPlotControl.

◆ TapDownArrow()

void ScottPlot.Testing.MockPlotControl.TapDownArrow ( )

◆ TapKey()

void ScottPlot.Testing.MockPlotControl.TapKey ( Key  key)
inline

◆ TapLeftArrow()

void ScottPlot.Testing.MockPlotControl.TapLeftArrow ( )

◆ TapRightArrow()

void ScottPlot.Testing.MockPlotControl.TapRightArrow ( )

◆ TapUpArrow()

void ScottPlot.Testing.MockPlotControl.TapUpArrow ( )

Property Documentation

◆ Center

Pixel ScottPlot.Testing.MockPlotControl.Center
get

◆ ContextMenuLaunchCount

int ScottPlot.Testing.MockPlotControl.ContextMenuLaunchCount = 0
get

◆ DisplayScale

float ScottPlot.Testing.MockPlotControl.DisplayScale = 1
getset

The value of the present display scaling. Mouse positions are multiplied by this value for pixel/coordinate conversions.

Implements ScottPlot.IPlotControl.

◆ GRContext

GRContext? ScottPlot.Testing.MockPlotControl.GRContext
get

Context for hardware-accelerated graphics (or null if not available)

Implements ScottPlot.IPlotControl.

◆ Height

int ScottPlot.Testing.MockPlotControl.Height = 300
getset

◆ Menu

IPlotMenu? ScottPlot.Testing.MockPlotControl.Menu
getset

Platform-specific logic for managing the context menu.

Implements ScottPlot.IPlotControl.

◆ Multiplot

IMultiplot ScottPlot.Testing.MockPlotControl.Multiplot
getset

The multiplot managed by this interactive control.

Implements ScottPlot.IPlotControl.

◆ Plot

Plot ScottPlot.Testing.MockPlotControl.Plot
get

The primary Plot displayed by this interactive control.

Implements ScottPlot.IPlotControl.

◆ RefreshCount

int ScottPlot.Testing.MockPlotControl.RefreshCount = 0
get

◆ UserInputProcessor

UserInputProcessor ScottPlot.Testing.MockPlotControl.UserInputProcessor
get

This object takes in UI events and contains logic for how to respond to them. This is a newer alternative to the older Interaction system.

Implements ScottPlot.IPlotControl.

◆ Width

int ScottPlot.Testing.MockPlotControl.Width = 400
getset

The documentation for this class was generated from the following file: