mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-07 21:51:08 -07:00
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:
parent
47a2741218
commit
091732aa94
65 changed files with 5190 additions and 109 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "CalcManager/CalculatorVector.h"
|
||||
#include "CalcManager/ExpressionCommandInterface.h"
|
||||
#include "DelegateCommand.h"
|
||||
#include "GraphingInterfaces/GraphingEnums.h"
|
||||
|
||||
// Utility macros to make Models easier to write
|
||||
// generates a member variable called m_<n>
|
||||
|
@ -301,6 +302,15 @@ namespace Utils
|
|||
|
||||
concurrency::task<void> WriteFileToFolder(Windows::Storage::IStorageFolder^ folder, Platform::String^ fileName, Platform::String^ contents, Windows::Storage::CreationCollisionOption collisionOption);
|
||||
concurrency::task<Platform::String^> ReadFileFromFolder(Windows::Storage::IStorageFolder^ folder, Platform::String^ fileName);
|
||||
|
||||
bool AreColorsEqual(const Windows::UI::Color& color1, const Windows::UI::Color& color2);
|
||||
|
||||
Platform::String^ Trim(Platform::String^ value);
|
||||
void Trim(std::wstring& value);
|
||||
void TrimFront(std::wstring& value);
|
||||
void TrimBack(std::wstring& value);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// This goes into the header to define the property, in the public: section of the class
|
||||
|
@ -421,3 +431,18 @@ namespace CalculatorApp
|
|||
return to;
|
||||
}
|
||||
}
|
||||
|
||||
// There's no standard definition of equality for Windows::UI::Color structs.
|
||||
// Define a template specialization for std::equal_to.
|
||||
template<>
|
||||
class std::equal_to<Windows::UI::Color>
|
||||
{
|
||||
public:
|
||||
bool operator()(const Windows::UI::Color& color1, const Windows::UI::Color& color2)
|
||||
{
|
||||
return Utils::AreColorsEqual(color1, color2);
|
||||
}
|
||||
};
|
||||
|
||||
bool operator==(const Windows::UI::Color& color1, const Windows::UI::Color& color2);
|
||||
bool operator!=(const Windows::UI::Color& color1, const Windows::UI::Color& color2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue