mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-31 12:00:01 -07:00
Add Pan/Zoom support for the graph surface (#458)
Description of the changes: Add Pan/Zoom support for the graph surface. Currently only supports Mouse/Pen/Touch interactions. Keyboard support will be added separately. How changes were validated: Manual
This commit is contained in:
parent
091732aa94
commit
5ffe1bc858
4 changed files with 161 additions and 26 deletions
|
@ -107,6 +107,11 @@ namespace GraphControl
|
|||
void OnPointerEntered(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnPointerMoved(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnPointerExited(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnPointerWheelChanged(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnPointerPressed(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnPointerReleased(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnPointerCanceled(Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) override;
|
||||
void OnManipulationDelta(Windows::UI::Xaml::Input::ManipulationDeltaRoutedEventArgs^ e) override;
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
|
@ -122,6 +127,7 @@ namespace GraphControl
|
|||
void OnDataSourceChanged(GraphControl::InspectingDataSource^ sender, GraphControl::DataSourceChangedEventArgs args);
|
||||
|
||||
void OnEquationsChanged(Windows::UI::Xaml::DependencyPropertyChangedEventArgs^ args);
|
||||
void OnEquationsVectorChanged(Windows::Foundation::Collections::IObservableVector<GraphControl::Equation ^> ^sender, Windows::Foundation::Collections::IVectorChangedEventArgs ^event);
|
||||
void OnEquationChanged();
|
||||
|
||||
void UpdateGraph();
|
||||
|
@ -136,6 +142,8 @@ namespace GraphControl
|
|||
void OnItemsAdded(int index, int count);
|
||||
void OnItemsRemoved(int index, int count);
|
||||
|
||||
void ScaleRange(double centerX, double centerY, double scale);
|
||||
|
||||
private:
|
||||
DX::RenderMain^ m_renderMain = nullptr;
|
||||
|
||||
|
@ -155,6 +163,5 @@ namespace GraphControl
|
|||
|
||||
const std::unique_ptr<Graphing::IMathSolver> m_solver;
|
||||
const std::shared_ptr<Graphing::IGraph> m_graph;
|
||||
void OnEquationsVectorChanged(Windows::Foundation::Collections::IObservableVector<GraphControl::Equation ^> ^sender, Windows::Foundation::Collections::IVectorChangedEventArgs ^event);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue