SlateApplication::MakeWindowC++
TSharedRef& lt; FGenericWindow& gt; FSlateApplication::MakeWindow(TSharedRef InSlateWindow, const bool bShowImmediately)
{
TSharedPtr NativeParent = nullptr;
TSharedPtr ParentWindow = InSlateWindow - > GetParentWindow();
if (ParentWindow.IsValid())
{
NativeParent = ParentWindow - > GetNativeWindow();
}
TSharedRef & lt; FGenericWindow& gt; FSlateApplication::MakeWindow(TSharedRef InSlateWindow, const bool bShowImmediately)
{
TSharedPtr NativeParent = nullptr;
TSharedPtr ParentWindow = InSlateWindow - > GetParentWindow();
if (ParentWindow.IsValid())
{
NativeParent = ParentWindow - > GetNativeWindow();
}
TSharedRef< FGenericWindowDefinition > Definition = MakeShareable(new FGenericWindowDefinition());
~~中略~~
Definition->HasCloseButton = InSlateWindow->HasCloseBox();
Definition->SupportsMinimize = InSlateWindow->HasMinimizeBox(); // ここで最大化可能かどうかを指定
Definition->SupportsMaximize = InSlateWindow->HasMaximizeBox();
Definition->IsModalWindow = InSlateWindow->IsModalWindow();
Definition->IsRegularWindow = InSlateWindow->IsRegularWindow();
Definition->HasSizingFrame = InSlateWindow->HasSizingFrame(); // ここでサイズが可変かどうかを指定
Definition->SizeWillChangeOften = InSlateWindow->SizeWillChangeOften();
Definition->ExpectedMaxWidth = InSlateWindow->GetExpectedMaxWidth();
Definition->ExpectedMaxHeight = InSlateWindow->GetExpectedMaxHeight();
~~中略~~
TSharedRef< FGenericWindow > NewWindow = PlatformApplication->MakeWindow(); // ウィンドウ作成
InSlateWindow->SetNativeWindow(NewWindow);
InSlateWindow->SetCachedScreenPosition(Position);
InSlateWindow->SetCachedSize(Size);
PlatformApplication->InitializeWindow(NewWindow, Definition, NativeParent, bShowImmediately); // ウィンドウ初期化
~~中略~~
return NewWindow;
}