Feature/GraphingCalculator initial commit (#450)

Initial PR for the feature/GraphingCalculator feature branch, part of #338.

The feature incorporates a proprietary Microsoft-owned graphing engine to drive graphing experiences in the Windows Calculator app. Due to the private nature of the graphing engine, the source available in the public repo will make use of a mock graphing engine. See README.md for more details.

This PR simply serves as a base for future feature development. As such, the PR will be immediately merged. Feedback on the content of this PR, and on the feature in general, is encouraged. If there is feedback related to the content of this specific PR, please leave comments on the PR page. We will address the comments in future PRs to the feature branch.
This commit is contained in:
Daniel Belcher 2019-04-10 18:15:10 -07:00 committed by GitHub
parent 47a2741218
commit 091732aa94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 5190 additions and 109 deletions

View file

@ -0,0 +1,80 @@
#pragma once
namespace GraphControl
{
namespace EquationProperties
{
extern Platform::String^ Expression;
extern Platform::String^ LineColor;
}
ref class Equation;
delegate void PropertyChangedEventHandler(Equation^ sender, Platform::String^ propertyName);
[Windows::UI::Xaml::Data::Bindable]
public ref class Equation sealed : public Windows::UI::Xaml::FrameworkElement
{
public:
Equation() {}
static void RegisterDependencyProperties();
#pragma region Platform::String^ Expression DependencyProperty
static property Windows::UI::Xaml::DependencyProperty^ ExpressionProperty
{
Windows::UI::Xaml::DependencyProperty^ get()
{
return s_expressionProperty;
}
}
property Platform::String^ Expression
{
Platform::String^ get()
{
return static_cast<Platform::String^>(GetValue(s_expressionProperty));
}
void set(Platform::String^ value)
{
SetValue(s_expressionProperty, value);
}
}
#pragma endregion
#pragma region Windows::UI::Color LineColor DependencyProperty
static property Windows::UI::Xaml::DependencyProperty^ LineColorProperty
{
Windows::UI::Xaml::DependencyProperty^ get()
{
return s_lineColorProperty;
}
}
property Windows::UI::Color LineColor
{
Windows::UI::Color get()
{
return static_cast<Windows::UI::Color>(GetValue(s_lineColorProperty));
}
void set(Windows::UI::Color value)
{
SetValue(s_lineColorProperty, value);
}
}
#pragma endregion
internal:
event PropertyChangedEventHandler^ PropertyChanged;
std::wstring GetRequest();
private:
static void OnCustomDependencyPropertyChanged(Windows::UI::Xaml::DependencyObject^ obj, Windows::UI::Xaml::DependencyPropertyChangedEventArgs^ args);
std::wstring GetRequestHeader();
std::wstring GetExpression();
std::wstring GetLineColor();
private:
static Windows::UI::Xaml::DependencyProperty^ s_expressionProperty;
static Windows::UI::Xaml::DependencyProperty^ s_lineColorProperty;
};
}