* We had to move to the final API: * Items -> TabItems * Items.VectorChanged -> TabItemsChanged * TabClose -> TabCloseRequested * TabViewItem.Icon -> TabViewItem.IconSource * TabRowControl has been converted to a ContentPresenter, which simplifies its logic a little bit. * TerminalPage now differentiates MUX and WUX a little better * Because of the change from Icon to IconSource in TabViewItem, Utils::GetColoredIcon needed to be augmented to support MUX IconSources. It was still necessary to use for WUX, so it's been templatized. * I moved us from WUX SplitButton to MUX SplitButton and brought the style in line with the one typically provided by TabView. * Some of our local controls have had their backgrounds removed so they're more amenable to being placed on other surfaces. * I'm suppressing the TabView's padding. * I removed a number of apparently dead methods from App. * I've simplified the dragbar's sizing logic and eventing. * The winmd harvester needed to be taught to not try to copy winmds for framework packages. * We now only initialize the terminal once we know the size Closes #1896. Closes #444. Closes #857. Closes #771. Closes #760.
44 lines
1.6 KiB
C++
44 lines
1.6 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
//
|
|
// Declaration of the MainUserControl class.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "winrt/Windows.UI.Xaml.h"
|
|
#include "winrt/Windows.UI.Xaml.Markup.h"
|
|
#include "winrt/Windows.UI.Xaml.Interop.h"
|
|
#include "TitlebarControl.g.h"
|
|
|
|
namespace winrt::TerminalApp::implementation
|
|
{
|
|
struct TitlebarControl : TitlebarControlT<TitlebarControl>
|
|
{
|
|
TitlebarControl(uint64_t handle);
|
|
|
|
IInspectable Content();
|
|
void Content(IInspectable content);
|
|
|
|
void SetWindowVisualState(WindowVisualState visualState);
|
|
|
|
void Root_SizeChanged(const IInspectable& sender, Windows::UI::Xaml::SizeChangedEventArgs const& e);
|
|
|
|
void Minimize_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
|
|
void Maximize_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
|
|
void Close_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
|
|
void DragBar_DoubleTapped(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Input::DoubleTappedRoutedEventArgs const& e);
|
|
|
|
private:
|
|
void _OnMaximizeOrRestore(byte flag);
|
|
HWND _window{ nullptr }; // non-owning handle; should not be freed in the dtor.
|
|
};
|
|
}
|
|
|
|
namespace winrt::TerminalApp::factory_implementation
|
|
{
|
|
struct TitlebarControl : TitlebarControlT<TitlebarControl, implementation::TitlebarControl>
|
|
{
|
|
};
|
|
}
|