Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::RotateCursorSet Class Reference

RAII owner for the editor's custom cursors. More...

#include "donner/editor/RotateCursorSet.h"

Public Member Functions

 RotateCursorSet (const RotateCursorSet &)=delete
RotateCursorSet & operator= (const RotateCursorSet &)=delete
 RotateCursorSet (RotateCursorSet &&)=delete
RotateCursorSet & operator= (RotateCursorSet &&)=delete
bool initialize (GLFWwindow *window, std::shared_ptr< geode::GeodeDevice > geodeDevice)
 Create all custom cursors for window.
bool setRotateCursor (SelectionTransformCorner corner)
 Set the custom rotate cursor matching corner.
bool setPanCursor (PanCursorKind kind)
 Set the custom pan cursor for kind.
bool setPenCursor ()
 Set the custom pen-tool cursor.
void clearIfActive ()
 Restore GLFW's default cursor if a custom cursor is active.
bool valid () const
 Whether all custom cursors were created successfully.

Detailed Description

RAII owner for the editor's custom cursors.

Member Function Documentation

◆ initialize()

bool donner::editor::RotateCursorSet::initialize ( GLFWwindow * window,
std::shared_ptr< geode::GeodeDevice > geodeDevice )
nodiscard

Create all custom cursors for window.

Parameters
windowGLFW window that will receive cursor changes.
geodeDeviceShared Geode device for Geode editor builds.
Returns
true if every cursor was created.

◆ setPanCursor()

bool donner::editor::RotateCursorSet::setPanCursor ( PanCursorKind kind)
nodiscard

Set the custom pan cursor for kind.

Parameters
kindPan cursor visual state to apply.
Returns
true if a custom cursor was available and applied.

◆ setPenCursor()

bool donner::editor::RotateCursorSet::setPenCursor ( )
nodiscard

Set the custom pen-tool cursor.

Returns
true if a custom cursor was available and applied.

◆ setRotateCursor()

bool donner::editor::RotateCursorSet::setRotateCursor ( SelectionTransformCorner corner)
nodiscard

Set the custom rotate cursor matching corner.

Parameters
cornerSelection corner under the pointer.
Returns
true if a custom cursor was available and applied.

The documentation for this class was generated from the following file: