Update Icons Implement the Graph View Button (#1149)

* Update icon file

* function analysis and negate button icons updated

* Replace zoom reset button with graph view button

* Fixed issue where the window settings did not update after panning/zooming

* Updated icon styling and added logic for updating the graph view button state when user manipulates the graph and when all equations are removed

* updated LogGraphButton clicked to have an enum for the button value instead of a string

* Updated the logic for how to set the IsManualAdjustment, ensured graphsettings now update IsManualAdjustment when changed
This commit is contained in:
Stephanie Anderl
2020-04-14 12:37:23 -07:00
committed by GitHub
parent 7612b69949
commit 3a8fcaa18a
15 changed files with 220 additions and 60 deletions

View File

@@ -25,6 +25,12 @@ public
public
delegate void PointerValueChangedEventHandler(Windows::Foundation::Point value);
public enum class GraphViewChangedReason
{
Manipulation,
Reset
};
[Windows::UI::Xaml::Markup::ContentPropertyAttribute(Name = L"Equations")] public ref class Grapher sealed
: public Windows::UI::Xaml::Controls::Control,
public Windows::UI::Xaml::Data::INotifyPropertyChanged
@@ -33,7 +39,7 @@ public
event TracingValueChangedEventHandler ^ TracingValueChangedEvent;
event PointerValueChangedEventHandler ^ PointerValueChangedEvent;
event TracingChangedEventHandler ^ TracingChangedEvent;
event Windows::UI::Xaml::RoutedEventHandler ^ GraphViewChangedEvent;
event Windows::Foundation::EventHandler<GraphViewChangedReason> ^ GraphViewChangedEvent;
event Windows::UI::Xaml::RoutedEventHandler ^ GraphPlottedEvent;
virtual event Windows::UI::Xaml::Data::PropertyChangedEventHandler ^ PropertyChanged;
@@ -51,8 +57,9 @@ public
DEPENDENCY_PROPERTY_WITH_DEFAULT_AND_CALLBACK(Windows::UI::Color, AxesColor, Windows::UI::Colors::Transparent);
DEPENDENCY_PROPERTY_WITH_DEFAULT_AND_CALLBACK(Windows::UI::Color, GraphBackground, Windows::UI::Colors::Transparent);
DEPENDENCY_PROPERTY_WITH_DEFAULT_AND_CALLBACK(Windows::UI::Color, GridLinesColor, Windows::UI::Colors::Transparent);
DEPENDENCY_PROPERTY_WITH_DEFAULT_AND_CALLBACK(double, LineWidth, 2.0);
DEPENDENCY_PROPERTY_WITH_DEFAULT(bool, IsKeepCurrentView, false);
// Pass active tracing turned on or off down to the renderer
property bool ActiveTracing
{
@@ -249,6 +256,7 @@ public
if (m_renderMain)
{
m_renderMain->RunRenderPass();
GraphViewChangedEvent(this, GraphViewChangedReason::Manipulation);
}
}
}
@@ -304,6 +312,7 @@ public
void SetEquationErrors();
std::optional<std::vector<std::shared_ptr<Graphing::IEquation>>> TryInitializeGraph(bool keepCurrentView, _In_ const Graphing::IExpression* graphingExp = nullptr);
private:
DX::RenderMain ^ m_renderMain = nullptr;