Fixes #202 This PR fixes code style for the project files. The Problem Different files in the project use different code style. That is not consistent and leads to harder maintenance of the project. Description of the changes: Have investigated and determined the most used code style across the given codebase Have configured IDE and applied code style to all project files. Have crafted clang-formatter config. see https://clang.llvm.org/docs/ClangFormat.html https://clang.llvm.org/docs/ClangFormatStyleOptions.html Some cases were fixed manually How changes were validated: manual/ad-hoc testing, automated testing All tests pass as before because these are only code style changes. Additional Please review, and let me know if I have any mistake in the code style. In case of any mistake, I will change the configuration and re-apply it to the project.
44 lines
1.9 KiB
C++
44 lines
1.9 KiB
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#include "Views/TitleBar.g.h"
|
|
|
|
namespace CalculatorApp
|
|
{
|
|
/// <summary>
|
|
/// Standalone control managing the title bar of the application.
|
|
/// Display a transparent custom title bar when high-contrast is off and the native title bar when on.
|
|
/// Automatically react to color changes, tablet mode, etc...
|
|
/// </summary>
|
|
public
|
|
ref class TitleBar sealed
|
|
{
|
|
public:
|
|
TitleBar();
|
|
|
|
private:
|
|
void OnLoaded(_In_ Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
|
void OnUnloaded(_In_ Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
|
|
|
void SetTitleBarText(Platform::String ^ text);
|
|
void SetTitleBarVisibility();
|
|
void SetTitleBarPadding();
|
|
void SetTitleBarControlColors();
|
|
void SetTitleBarExtendView();
|
|
void ColorValuesChanged(_In_ Windows::UI::ViewManagement::UISettings ^ sender, _In_ Platform::Object ^ e);
|
|
void OnHighContrastChanged(Windows::UI::ViewManagement::AccessibilitySettings ^ sender, Platform::Object ^ args);
|
|
void OnWindowActivated(Platform::Object ^ sender, Windows::UI::Core::WindowActivatedEventArgs ^ e);
|
|
|
|
Platform::Agile<Windows::ApplicationModel::Core::CoreApplicationViewTitleBar ^> m_coreTitleBar;
|
|
Windows::Foundation::EventRegistrationToken m_layoutChangedToken;
|
|
Windows::Foundation::EventRegistrationToken m_visibilityChangedToken;
|
|
Windows::Foundation::EventRegistrationToken m_colorValuesChangedToken;
|
|
Windows::Foundation::EventRegistrationToken m_windowActivatedToken;
|
|
Windows::Foundation::EventRegistrationToken m_accessibilitySettingsToken;
|
|
Windows::UI::ViewManagement::UISettings ^ m_uiSettings;
|
|
Windows::UI::ViewManagement::AccessibilitySettings ^ m_accessibilitySettings;
|
|
};
|
|
}
|