Files
UnrealEngineUWP/Engine/Source/Editor/LevelEditor/Private/LevelViewportLayoutOnePane.h
Chris Wood 59cfc2f249 #ttp 323891 - EDITOR: Viewport Layouts: Please add a 1x1 viewport preset layout option
#branch UE4
#proj Editor.LevelEditor
#summary Added 1x1 viewport layout and tidied the margins in the layout menu

#add Added FLevelViewportLayout::bIsMaximizeSupported and public getter IsMaximizeSupported(). This is set on the new one-pane layout to block the maximize command/button.
#add LevelViewportConfigurationNames::OnePane - new named layout config.
#add FLevelViewportCommands::ViewportConfig_OnePane - new layout command.
#change FLevelViewportLayout::InitCommonLayoutFromString() - will never start a layout maximised if bIsMaximizeSupported is false.
#change FLevelViewportLayout::SaveCommonLayoutString() - will never save a layout maximised if bIsMaximizeSupported is false.
#change FLevelViewportLayout::MaximizeViewport() - checks that bIsMaximizeSupported is true as it should never be called on a layout that doesn't support it.
#add SlateEditorStyle - added brushes for one pane option in the viewport layout menu.
#add SLevelViewportToolBar::GenerateViewportConfigsMenu() - new section for one pane layouts with the one pane button in it.
#change  SLevelViewportToolBar::GenerateViewportConfigsMenu() - fixed the layout margins by setting the label visibility to collapsed instead of passing an empty string as the label.
#add Binding new ViewportConfig_OnePane command SLevelViewport::BindViewCommands to OnSetViewportConfiguration().
#change SLevelViewport::GetMaximizeToggleVisibility() & OnToggleMaximize - check IsMaximizeSupported() on the parent layout and always collapses the maximize button when it isn't supported.
#add FLevelViewportTabContent::ConstructViewportLayoutByTypeName() - added LevelViewportConfigurationNames::OnePane.
#add New icon image for one pane button in the menu - ViewportLayout_OnePane.png
#add New layout class FLevelViewportLayoutOnePane - based on other layouts but simpler because it only contains one pane and therefore no splitters.

reviewedby Thomas.Sarkanen, Max.Preussner

[CL 2048729 by Chris Wood in Main branch]
2014-04-23 19:20:45 -04:00

34 lines
928 B
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#ifndef __LevelViewportLayoutOnePane_h__
#define __LevelViewportLayoutOnePane_h__
#pragma once
#include "LevelViewportLayout.h"
class FLevelViewportLayoutOnePane : public FLevelViewportLayout
{
public:
/**
* Saves viewport layout information between editor sessions
*/
virtual void SaveLayoutString(const FString& LayoutString) const OVERRIDE;
virtual const FName& GetLayoutTypeName() const OVERRIDE{ return LevelViewportConfigurationNames::OnePane; }
protected:
/**
* Creates the viewport for the single pane
*/
virtual TSharedRef<SWidget> MakeViewportLayout(const FString& LayoutString) OVERRIDE;
/** Overridden from FLevelViewportLayout */
virtual void ReplaceWidget(TSharedRef< SWidget > Source, TSharedRef< SWidget > Replacement) OVERRIDE;
protected:
/** The viewport widget parent box */
TSharedPtr< SHorizontalBox > ViewportBox;
};
#endif