ICursor

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ApplicationCore

Header

/Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/ICursor.h

Include

#include "GenericPlatform/ICursor.h"

Syntax

class ICursor

Functions

Name Description

Public function Virtual

void *

 

CreateCursorFromFile

(
    const FString& InPathToCursorWitho...,
    FVector2D HotSpot
)

Creates a hardware cursor from file. Can return nullptr when not available.

Public function Virtual

void *

 

CreateCursorFromRGBABuffer

(
    const FColor* Pixels,
    int32 Width,
    int32 Height,
    FVector2D InHotSpot
)

Creates a hardware cursor from bitmap data. Can return nullptr when not available.

Public function Const

FVector2D

 

GetPosition()

The position of the cursor

Public function Const

void

 

GetSize

(
    int32& Width,
    int32& Height
)

Gets the size of the cursor

Public function Const

EMouseCursor...

 

GetType()

Gets the current type of the cursor

Public function Virtual Const

bool

 

IsCreateCursorFromRGBABufferSupported()

Is CreateCursorFromRGBABuffer() supported by this cursor?

Public function

void

 

Lock

(
    const RECT*const Bounds
)

Locks the cursor to the passed in bounds

Public function

void

 

SetPosition

(
    const int32 X,
    const int32 Y
)

Sets the position of the cursor

Public function

void

 

SetType

(
    const EMouseCursor::Type InNewCurso...
)

Sets the cursor

Public function

void

 

SetTypeShape

(
    EMouseCursor::Type InCursorType,
    void* CursorHandle
)

Allows overriding the shape of a particular cursor.

Public function

void

 

Show

(
    bool bShow
)

Shows or hides the cursor

Deprecated Functions

Name Description

Public function

void

 

SetCustomShape

(
    void* CursorHandle
)

Use SetTypeShape instead.