diff options
Diffstat (limited to 'src/ui/cursor.cpp')
-rw-r--r-- | src/ui/cursor.cpp | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/src/ui/cursor.cpp b/src/ui/cursor.cpp index 91b94b16..d8c362ed 100644 --- a/src/ui/cursor.cpp +++ b/src/ui/cursor.cpp @@ -2,31 +2,23 @@ #include "exception.hpp" -namespace cru::ui -{ - Cursor::Cursor(HCURSOR handle, const bool auto_release) - : handle_(handle), auto_release_(auto_release) - { +namespace cru::ui { +Cursor::Cursor(HCURSOR handle, const bool auto_release) + : handle_(handle), auto_release_(auto_release) {} - } - - Cursor::~Cursor() - { - if (auto_release_) - ::DestroyCursor(handle_); - } +Cursor::~Cursor() { + if (auto_release_) ::DestroyCursor(handle_); +} - namespace cursors - { - Cursor::Ptr arrow{}; - Cursor::Ptr hand{}; - Cursor::Ptr i_beam{}; +namespace cursors { +Cursor::Ptr arrow{}; +Cursor::Ptr hand{}; +Cursor::Ptr i_beam{}; - void LoadSystemCursors() - { - arrow = std::make_shared<Cursor>(::LoadCursorW(nullptr, IDC_ARROW), false); - hand = std::make_shared<Cursor>(::LoadCursorW(nullptr, IDC_HAND), false); - i_beam = std::make_shared<Cursor>(::LoadCursorW(nullptr, IDC_IBEAM), false); - } - } +void LoadSystemCursors() { + arrow = std::make_shared<Cursor>(::LoadCursorW(nullptr, IDC_ARROW), false); + hand = std::make_shared<Cursor>(::LoadCursorW(nullptr, IDC_HAND), false); + i_beam = std::make_shared<Cursor>(::LoadCursorW(nullptr, IDC_IBEAM), false); } +} // namespace cursors +} // namespace cru::ui |