calculator/src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml.h
Stephanie Anderl a33c1a4494
Equation button updates: Enable/Disable on click, button content f1, f2, f3..., visibility icon on hover (#804)
* Added enable/disable line functionality

* Update EquationTextBox to change the opacity of functions have are not visible. Update the function label for the EquationTextBox to increment the label to show f1, f2, f3, etc

* rebase key-graph-features and fix issue where removing an equation box and adding a new one repopulates the previous equation

* Added visibility icon for the equation button hover

* updated EquationButton to be a toggle button to better handle the LineHidden state and other PR comment fixes.

* Updated EquationButton style to use a toggle button and to have placeholder icons for the show/hide states

* Updated equation button after pulling the refactor work into the branch. Fixed the Equation Button in KGF UI

* Fixed Pepe's bugs

* Uncomment temporary.pfx in calculator.vcxproj
2019-11-21 15:07:45 -08:00

52 lines
2.5 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "Views/GraphingCalculator/EquationInputArea.g.h"
#include "CalcViewModel/Common/Utils.h"
#include "CalcViewModel/GraphingCalculator/EquationViewModel.h"
#include "EquationStylePanelControl.xaml.h"
#include "CalcViewModel/Common/KeyboardShortcutManager.h"
#include "Controls/EquationTextBox.h"
#include "Converters/BooleanNegationConverter.h"
#include "Controls/MathRichEditBox.h"
namespace CalculatorApp
{
public ref class EquationInputArea sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
{
public:
EquationInputArea();
OBSERVABLE_OBJECT_CALLBACK(OnPropertyChanged);
OBSERVABLE_PROPERTY_RW(Windows::Foundation::Collections::IObservableVector< ViewModel::EquationViewModel^ >^, Equations);
OBSERVABLE_PROPERTY_RW_ALWAYS_NOTIFY(ViewModel::EquationViewModel ^, EquationVM);
OBSERVABLE_PROPERTY_RW(Windows::Foundation::Collections::IObservableVector<Windows::UI::Xaml::Media::SolidColorBrush ^> ^, AvailableColors);
event Windows::UI::Xaml::RoutedEventHandler ^ KeyGraphFeaturesRequested;
private:
void OnPropertyChanged(Platform::String^ propertyName);
void OnEquationsPropertyChanged();
void AddEquationButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void AddNewEquation();
void InputTextBox_GotFocus(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void InputTextBox_LostFocus(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void InputTextBox_Submitted(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
void OnHighContrastChanged(Windows::UI::ViewManagement::AccessibilitySettings ^ sender, Platform::Object ^ args);
void ReloadAvailableColors(bool isHighContrast);
private:
Windows::UI::ViewManagement::AccessibilitySettings ^ m_accessibilitySettings;
int m_lastLineColorIndex;
int m_lastFunctionLabelIndex;
void EquationTextBox_RemoveButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void EquationTextBox_KeyGraphFeaturesButtonClicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
void EquationTextBox_EquationButtonClicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
void EquationTextBoxLoaded(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
};
}