aboutsummaryrefslogtreecommitdiff
path: root/src/ui/cursor.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-22 13:41:22 +0800
committercrupest <crupest@outlook.com>2019-03-22 13:41:22 +0800
commit63a5d619ac81ba3f48e95c890d96fa7d9047bb26 (patch)
tree0ea055acb55cf32380f22f760d82fba7894effb3 /src/ui/cursor.cpp
parentafdac77a66143375b5bebd4ff128b0fba87c5d21 (diff)
downloadcru-63a5d619ac81ba3f48e95c890d96fa7d9047bb26.tar.gz
cru-63a5d619ac81ba3f48e95c890d96fa7d9047bb26.tar.bz2
cru-63a5d619ac81ba3f48e95c890d96fa7d9047bb26.zip
...
Diffstat (limited to 'src/ui/cursor.cpp')
-rw-r--r--src/ui/cursor.cpp40
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