Files
UnrealEngineUWP/Engine/Source/Developer/DeviceManager/Private/Widgets/SDeviceManager.h
T
Max Preussner 3aece47882 Docs: Removed file comments and added missing code documentation
Please note that file comments had no purpose in nearly all cases and just added visual clutter. The two files that had meaningful file comments had their comments moved into the corresponding classes. There are still hundreds of file comments left in other files that will be removed over time.

Also cleaned up some random stuff along the way:
- relative paths to public headers within the same module are no longer necessary (automatically discovered by UBT now)
- header guards are deprecated, use #pragma once instead (all compilers support it now)
- space between multiple template brackets is no longer required (all compilers support >> now)
- NULL to nullptr, OVERRIDE to override
- spelling errors, whitespace, line breaks

[CL 2104067 by Max Preussner in Main branch]
2014-06-12 23:22:18 -04:00

137 lines
4.1 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
/**
* Implements the device manager front-end widget.
*/
class SDeviceManager
: public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SDeviceManager) { }
SLATE_END_ARGS()
public:
/**
* Default constructor.
*/
SDeviceManager( );
public:
/**
* Constructs the widget.
*
* @param InArgs The Slate argument list.
* @param InDeviceServiceManager The target device manager to use.
* @param ConstructUnderMajorTab The major tab which will contain the session front-end.
* @param ConstructUnderWindow The window in which this widget is being constructed.
*/
void Construct( const FArguments& InArgs, const ITargetDeviceServiceManagerRef& InDeviceServiceManager, const TSharedRef<SDockTab>& ConstructUnderMajorTab, const TSharedPtr<SWindow>& ConstructUnderWindow );
protected:
/**
* Binds the device commands on our toolbar.
*/
void BindCommands( );
/**
* Fills the Window menu with menu items.
*
* @param MenuBuilder The multi-box builder that should be filled with content for this pull-down menu.
* @param RootMenuGroup The root menu group.
* @param AppMenuGroup The application menu group.
* @param TabManager A Tab Manager from which to populate tab spawner menu items.
*/
static void FillWindowMenu( FMenuBuilder& MenuBuilder, TSharedRef<FWorkspaceItem> RootMenuGroup, TSharedRef<FWorkspaceItem> AppMenuGroup, const TSharedPtr<FTabManager> TabManager );
/**
* Validates actions on the specified device.
*
* @param Device The device to perform an action on.
* @return true if actions on the device are permitted, false otherwise.
*/
bool ValidateDeviceAction( const ITargetDeviceRef& Device ) const;
private:
// Callback for determining whether the 'Claim' action can execute.
bool HandleClaimActionCanExecute( );
// Callback for executing the 'Claim' action.
void HandleClaimActionExecute( );
// Callback for determining whether the "Connect" action can execute
bool HandleConnectActionCanExecute( );
// Callback for executing the "Connect" action
void HandleConnectActionExecute( );
// Callback for determining whether the "Disconnect" action can execute
bool HandleDisconnectActionCanExecute( );
// Callback for executing the "Disconnect" action
void HandleDisconnectActionExecute( );
// Callback for determining whether the 'Power Off' action can execute.
bool HandlePowerOffActionCanExecute( );
// Callback for executing the 'Power Off' action.
void HandlePowerOffActionExecute( bool Force );
// Callback for determining whether the 'Power On' action can execute.
bool HandlePowerOnActionCanExecute( );
// Callback for executing the 'Power On' action.
void HandlePowerOnActionExecute( );
// Callback for determining whether the 'Reboot' action can execute.
bool HandleRebootActionCanExecute( );
// Callback for executing the 'Reboot' action.
void HandleRebootActionExecute( );
// Callback for determining whether the 'Release' action can execute.
bool HandleReleaseActionCanExecute( );
// Callback for executing the 'Release' action.
void HandleReleaseActionExecute( );
// Callback for determining whether the 'Remove' action can execute.
bool HandleRemoveActionCanExecute( );
// Callback for executing the 'Remove' action.
void HandleRemoveActionExecute( );
// Callback for determining whether the 'Share' action can execute.
bool HandleShareActionCanExecute( );
// Callback for executing the 'Share' action.
void HandleShareActionExecute( );
// Callback for determining the checked state of the 'Share' action.
bool HandleShareActionIsChecked( );
// Callback for spawning tabs.
TSharedRef<SDockTab> HandleTabManagerSpawnTab( const FSpawnTabArgs& Args, FName TabIdentifier );
private:
// Holds the target device service manager.
ITargetDeviceServiceManagerPtr DeviceServiceManager;
// Holds the device manager's view model.
FDeviceManagerModelRef Model;
// Holds the tab manager that manages the front-end's tabs.
TSharedPtr<FTabManager> TabManager;
// The command list for controlling the device
TSharedPtr<FUICommandList> UICommandList;
};