calculator/src/Calculator/Controls/CalculatorButton.h
Will 1113ff4b86 Updating comments per the C++ core guidelines and removing trailing whitespace (#194)
Fixed comments that were inconsistent with the style guidelines described in C++ core guidelines and the modern C++/WinRT language projections and removed trailing whitespace.

Inserted a space after the beginning of the comment so the text wasn't touching the // on all occurrences.

Removed all occurrences of trailing whitespace
2019-03-14 23:30:07 -07:00

39 lines
1.4 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "CalcViewModel/Common/Utils.h"
#include "CalcViewModel/Common/CalculatorButtonUser.h"
namespace CalculatorApp
{
namespace Controls
{
public ref class CalculatorButton sealed: Windows::UI::Xaml::Controls::Button
{
public:
CalculatorButton();
DEPENDENCY_PROPERTY_OWNER(CalculatorButton);
DEPENDENCY_PROPERTY_WITH_CALLBACK(NumbersAndOperatorsEnum, ButtonId);
DEPENDENCY_PROPERTY_WITH_CALLBACK(Platform::String^, AuditoryFeedback);
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Media::Brush^, HoverBackground);
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Media::Brush^, HoverForeground);
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Media::Brush^, PressBackground);
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Media::Brush^, PressForeground);
protected:
virtual void OnKeyDown(Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) override;
virtual void OnKeyUp(Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) override;
private:
void OnButtonIdPropertyChanged(NumbersAndOperatorsEnum oldValue, NumbersAndOperatorsEnum newValue);
void OnAuditoryFeedbackPropertyChanged(Platform::String^ oldValue, Platform::String^ newValue);
};
}
}