本文整理汇总了C++中TSharedRef::Construct方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::Construct方法的具体用法?C++ TSharedRef::Construct怎么用?C++ TSharedRef::Construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedRef
的用法示例。
在下文中一共展示了TSharedRef::Construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeShareable
TSharedRef<FUICommandDragDropOp> FUICommandDragDropOp::New( TSharedRef<const FUICommandInfo> InCommandInfo, FName InOriginMultiBox, TSharedPtr<SWidget> CustomDectorator, FVector2D DecoratorOffset )
{
TSharedRef<FUICommandDragDropOp> Operation = MakeShareable(new FUICommandDragDropOp(InCommandInfo, InOriginMultiBox, CustomDectorator, DecoratorOffset));
Operation->Construct();
return Operation;
}
示例2: New
static TSharedRef<FSampleDragDropOp> New()
{
TSharedRef<FSampleDragDropOp> Operation = MakeShareable(new FSampleDragDropOp);
FSlateApplication::GetDragDropReflector().RegisterOperation<FSampleDragDropOp>(Operation);
Operation->Construct();
return Operation;
}
示例3: MakeShareable
TSharedRef<FDragConnection> FDragConnection::New(const TSharedRef<SGraphPanel>& InGraphPanel, const TArray< TSharedRef<SGraphPin> >& InStartingPins, bool bInShiftOperation)
{
TSharedRef<FDragConnection> Operation = MakeShareable(new FDragConnection(InGraphPanel, InStartingPins, bInShiftOperation));
Operation->Construct();
return Operation;
}
示例4: New
static TSharedRef<FAmbivalentDirectionDragConnection> New(UK2Node_Knot* InKnot, const TSharedRef<SGraphPanel>& InGraphPanel, const TArray< TSharedRef<SGraphPin> >& InStartingPins, bool bInShiftOperation)
{
TSharedRef<FAmbivalentDirectionDragConnection> Operation = MakeShareable(new FAmbivalentDirectionDragConnection(InKnot, InGraphPanel, InStartingPins, bInShiftOperation));
Operation->Construct();
return Operation;
}
示例5: MakeShareable
TSharedRef<FAbilityDragDrop> FAbilityDragDrop::New(TSharedPtr<FActionSlotInfo> PickedItemIn, TSharedPtr<SARActionItemWidget> LastAbilitySlotIn)
{
TSharedRef<FAbilityDragDrop> Operation = MakeShareable(new FAbilityDragDrop);
Operation->ActionData = nullptr;
Operation->PickedAbility = PickedItemIn;
Operation->LastAbilitySlot = LastAbilitySlotIn;
Operation->Construct();
return Operation;
}
示例6: MakeShareable
TSharedRef<FWidgetTemplateDragDropOp> FWidgetTemplateDragDropOp::New(const TSharedPtr<FWidgetTemplate>& InTemplate)
{
TSharedRef<FWidgetTemplateDragDropOp> Operation = MakeShareable(new FWidgetTemplateDragDropOp());
Operation->Template = InTemplate;
Operation->DefaultHoverText = InTemplate->Name;
Operation->CurrentHoverText = InTemplate->Name;
Operation->Construct();
return Operation;
}
示例7: MakeShareable
TSharedRef<FTrackNodeDragDropOp> FTrackNodeDragDropOp::New(TSharedRef<STrackNode> TrackNode, const FVector2D &CursorPosition, const FVector2D &ScreenPositionOfNode)
{
TSharedRef<FTrackNodeDragDropOp> Operation = MakeShareable(new FTrackNodeDragDropOp);
Operation->OriginalTrackNode = TrackNode;
Operation->Offset = ScreenPositionOfNode - CursorPosition;
Operation->StartingScreenPos = ScreenPositionOfNode;
Operation->Construct();
return Operation;
}
示例8: MakeShareable
TSharedRef<FTrackNodeDragDropOp> FTrackNodeDragDropOp::New(TSharedRef<STrackNode> TrackNode, const FVector2D &CursorPosition, const FVector2D &ScreenPositionOfNode)
{
TSharedRef<FTrackNodeDragDropOp> Operation = MakeShareable(new FTrackNodeDragDropOp);
FSlateApplication::GetDragDropReflector().RegisterOperation<FTrackNodeDragDropOp>(Operation);
Operation->OriginalTrackNode = TrackNode;
Operation->Offset = ScreenPositionOfNode - CursorPosition;
Operation->StartingScreenPos = ScreenPositionOfNode;
Operation->Construct();
return Operation;
}
示例9: MakeShareable
TSharedPtr<IMeshPaintGeometryAdapter> FMeshPaintSpriteAdapterFactory::Construct(class UMeshComponent* InComponent, int32 InPaintingMeshLODIndex, int32 InUVChannelIndex) const
{
if (UPaperSpriteComponent* SpriteComponent = Cast<UPaperSpriteComponent>(InComponent))
{
if (SpriteComponent->GetSprite() != nullptr)
{
TSharedRef<FMeshPaintSpriteAdapter> Result = MakeShareable(new FMeshPaintSpriteAdapter());
if (Result->Construct(InComponent, InPaintingMeshLODIndex, InUVChannelIndex))
{
return Result;
}
}
}
return nullptr;
}
示例10: MakeShareable
TSharedRef<FAssetDragDropOp> FAssetDragDropOp::New(const TArray<FAssetData>& InAssetData, UActorFactory* ActorFactory /*= NULL*/)
{
TSharedRef<FAssetDragDropOp> Operation = MakeShareable(new FAssetDragDropOp);
Operation->MouseCursor = EMouseCursor::GrabHandClosed;
Operation->ThumbnailSize = 64;
Operation->AssetData = InAssetData;
Operation->ActorFactory = ActorFactory;
Operation->Init();
Operation->Construct();
return Operation;
}
示例11: FWwiseEventDragDropOp
TSharedRef<FWwiseEventDragDropOp> FWwiseEventDragDropOp::New(const TArray<TSharedPtr<FWwiseTreeItem>>& InAssets)
{
FWwiseEventDragDropOp* RawPointer = new FWwiseEventDragDropOp();
TSharedRef<FWwiseEventDragDropOp> Operation = MakeShareable(RawPointer);
Operation->MouseCursor = EMouseCursor::GrabHandClosed;
Operation->Assets = InAssets;
Operation->SetCanDrop(false);
EWwiseTreeItemType::Type ItemType = InAssets[0]->ItemType;
int32 i = 1;
for (; i < InAssets.Num(); i++)
{
if (InAssets[i]->ItemType != ItemType)
{
break;
}
}
if (i == InAssets.Num())
{
switch (ItemType)
{
case EWwiseTreeItemType::Event:
Operation->Icon = SWwisePicker::EventIcon;
break;
case EWwiseTreeItemType::AuxBus:
Operation->Icon = SWwisePicker::AuxBusIcon;
break;
}
}
Operation->Construct();
FAssetViewDragAndDropExtender::FOnDropDelegate DropDelegate = FAssetViewDragAndDropExtender::FOnDropDelegate::CreateRaw(RawPointer, &FWwiseEventDragDropOp::OnAssetViewDrop);
FAssetViewDragAndDropExtender::FOnDragOverDelegate DragOverDelegate = FAssetViewDragAndDropExtender::FOnDragOverDelegate::CreateRaw(RawPointer, &FWwiseEventDragDropOp::OnAssetViewDragOver);
FAssetViewDragAndDropExtender::FOnDragLeaveDelegate DragLeaveDelegate = FAssetViewDragAndDropExtender::FOnDragLeaveDelegate::CreateRaw(RawPointer, &FWwiseEventDragDropOp::OnAssetViewDragLeave);
Operation->pExtender = new FAssetViewDragAndDropExtender(DropDelegate, DragOverDelegate, DragLeaveDelegate);
FContentBrowserModule& ContentBrowserModule = FModuleManager::GetModuleChecked<FContentBrowserModule>("ContentBrowser");
TArray<FAssetViewDragAndDropExtender>& AssetViewDragAndDropExtenders = ContentBrowserModule.GetAssetViewDragAndDropExtenders();
AssetViewDragAndDropExtenders.Add(*(Operation->pExtender));
return Operation;
}
示例12: MakeShareable
TSharedRef<FInventoryDragDrop> FInventoryDragDrop::New(TSharedPtr<FARDragDropInfo> PickedItemIn, TSharedPtr<SARInventoryItemWidget> LastItemSlotIn)
{
TSharedRef<FInventoryDragDrop> Operation = MakeShareable(new FInventoryDragDrop);
Operation->ItemInThisSlot = nullptr;
Operation->PickedItem = PickedItemIn;
Operation->LastItemSlot = LastItemSlotIn;
if (TestItems && TestItems->EditEntries.Num() > 0 && PickedItemIn->ItemIndex >= 0)
{
if (PickedItemIn->ItemSlot == EItemSlot::Item_Chest)
{
Operation->ItemInThisSlot = ChestItems->GetItemDataFromArrayPtr(PickedItemIn->ItemIndex);
}
else
Operation->ItemInThisSlot = TestItems->GetItemDataFromArrayPtr(PickedItemIn->ItemIndex);
}
Operation->Construct();
return Operation;
}
示例13: EditLock
TSharedRef<FFlipbookKeyFrameDragDropOp> FFlipbookKeyFrameDragDropOp::New(int32 InWidth, UPaperFlipbook* InFlipbook, int32 InFrameIndex)
{
// Create the drag-drop op containing the key
TSharedRef<FFlipbookKeyFrameDragDropOp> Operation = MakeShareable(new FFlipbookKeyFrameDragDropOp);
Operation->KeyFrameData = InFlipbook->GetKeyFrameChecked(InFrameIndex);
Operation->SourceFrameIndex = InFrameIndex;
Operation->SourceFlipbook = InFlipbook;
Operation->WidgetWidth = InWidth;
Operation->Construct();
// Remove the key from the flipbook
{
InFlipbook->Modify();
FScopedFlipbookMutator EditLock(InFlipbook);
EditLock.KeyFrames.RemoveAt(InFrameIndex);
}
return Operation;
}
示例14: MakeShareable
//------------------------------------------------------------------------------
TSharedRef<FKismetMacroDragDropAction> FKismetMacroDragDropAction::New(
FName InMacroName,
UBlueprint* InBlueprint,
UEdGraph* InMacro,
FNodeCreationAnalytic AnalyticCallback)
{
TSharedRef<FKismetMacroDragDropAction> Operation = MakeShareable(new FKismetMacroDragDropAction);
Operation->MacroName = InMacroName;
Operation->Macro = InMacro;
Operation->Blueprint = InBlueprint;
Operation->AnalyticCallback = AnalyticCallback;
// Check to see if the macro has any latent functions in it, some graph types do not allow for latent functions
bool bIsLatentMacro = FBlueprintEditorUtils::CheckIfGraphHasLatentFunctions(Operation->Macro);
Operation->CanBeDroppedDelegate = FCanBeDroppedDelegate::CreateStatic(&CanMacroBeDropped, InMacro, bIsLatentMacro);
Operation->Construct();
return Operation;
}
示例15: FCanBeDroppedDelegate
//------------------------------------------------------------------------------
TSharedRef<FKismetFunctionDragDropAction> FKismetFunctionDragDropAction::New(
TSharedPtr<FEdGraphSchemaAction> InActionNode,
FName InFunctionName,
UClass* InOwningClass,
FMemberReference const& InCallOnMember,
FNodeCreationAnalytic AnalyticCallback,
FCanBeDroppedDelegate CanBeDroppedDelegate /* = FCanBeDroppedDelegate() */)
{
TSharedRef<FKismetFunctionDragDropAction> Operation = MakeShareable(new FKismetFunctionDragDropAction);
Operation->FunctionName = InFunctionName;
Operation->OwningClass = InOwningClass;
Operation->CallOnMember = InCallOnMember;
Operation->AnalyticCallback = AnalyticCallback;
Operation->CanBeDroppedDelegate = CanBeDroppedDelegate;
Operation->ActionNode = InActionNode;
if (!CanBeDroppedDelegate.IsBound())
{
Operation->CanBeDroppedDelegate = FCanBeDroppedDelegate::CreateStatic(&CanFunctionBeDropped, Operation->GetFunctionProperty());
}
Operation->Construct();
return Operation;
}