mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 13:50:00 +00:00
LibGfx: Add a stringifier for StandardCursor
This commit is contained in:
parent
dcf8463886
commit
612558144b
Notes:
github-actions[bot]
2025-12-03 11:25:08 +00:00
Author: https://github.com/trflynn89
Commit: 612558144b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6999
1 changed files with 49 additions and 0 deletions
|
|
@ -47,6 +47,55 @@ struct ImageCursor {
|
|||
|
||||
using Cursor = Variant<StandardCursor, ImageCursor>;
|
||||
|
||||
constexpr StringView standard_cursor_to_string(StandardCursor cursor)
|
||||
{
|
||||
switch (cursor) {
|
||||
case StandardCursor::None:
|
||||
return "None"sv;
|
||||
case StandardCursor::Hidden:
|
||||
return "Hidden"sv;
|
||||
case StandardCursor::Arrow:
|
||||
return "Arrow"sv;
|
||||
case StandardCursor::Crosshair:
|
||||
return "Crosshair"sv;
|
||||
case StandardCursor::IBeam:
|
||||
return "IBeam"sv;
|
||||
case StandardCursor::ResizeHorizontal:
|
||||
return "ResizeHorizontal"sv;
|
||||
case StandardCursor::ResizeVertical:
|
||||
return "ResizeVertical"sv;
|
||||
case StandardCursor::ResizeDiagonalTLBR:
|
||||
return "ResizeDiagonalTLBR"sv;
|
||||
case StandardCursor::ResizeDiagonalBLTR:
|
||||
return "ResizeDiagonalBLTR"sv;
|
||||
case StandardCursor::ResizeColumn:
|
||||
return "ResizeColumn"sv;
|
||||
case StandardCursor::ResizeRow:
|
||||
return "ResizeRow"sv;
|
||||
case StandardCursor::Hand:
|
||||
return "Hand"sv;
|
||||
case StandardCursor::Help:
|
||||
return "Help"sv;
|
||||
case StandardCursor::OpenHand:
|
||||
return "OpenHand"sv;
|
||||
case StandardCursor::Drag:
|
||||
return "Drag"sv;
|
||||
case StandardCursor::DragCopy:
|
||||
return "DragCopy"sv;
|
||||
case StandardCursor::Move:
|
||||
return "Move"sv;
|
||||
case StandardCursor::Wait:
|
||||
return "Wait"sv;
|
||||
case StandardCursor::Disallowed:
|
||||
return "Disallowed"sv;
|
||||
case StandardCursor::Eyedropper:
|
||||
return "Eyedropper"sv;
|
||||
case StandardCursor::Zoom:
|
||||
return "Zoom"sv;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace IPC {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue