Conversation
to facilitate experimentation related to alternate control interaction systems #3186
Previously it was confusing because panning by a mouse delta pixels needs to be done by panning the axis limits that number of pixels in the OPPOSITE direction
Create a new static class to wrap shared logic between old and new interaction controllers
Member
Author
|
I'm getting close to merging this. The new behavior is demonstrated in the "custom mouse behavior" demo app. The code shows the general style of how the new API can be used. |
Merged
swharden
added a commit
to ByteSore/ScottPlot
that referenced
this pull request
Jul 21, 2024
required by all plot controls after ScottPlot#4053
This was referenced Jul 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR explores alternative strategies for customizing user interactivity in graphical environments.
Primary Goals
Architecture
User inputs are structs that inherit
IUserInputand contain any properties that may be unique to that type of input (e.g.,LeftMouseDownhas a stores aPixelandDateTime)User input actions are classes that contain logic for when and how to respond to user inputs, including whether to refresh the plot or stop processing further actions (e.g.,
LeftClickDragPanengages only afterLeftMouseDownhappens andMouseMovemoved by more than 5 pixels, preventing other actions from being processed untilLeftMouseUpoccurs)Plot controls have a
UserInputProcessorthat they pass user inputs into, and it holds a collection of user input actions that decide if and how to respond to the events. Users can remove actions (like double-click benchmark), add custom actions (like holding theAkey while left-click-dragging will only pan diagonally), and even pass custom input types through (like three-finger-drag).Rules to Implement
Items are checked only when implemented and unit tests are in place
IPlotControlthat can simulate user inputs for testingMultiAxisLimitsto replaceMultiAxisLimitManager