aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CruUI/ui/controls/text_block.h23
-rw-r--r--CruUI/ui/ui_base.h13
2 files changed, 13 insertions, 23 deletions
diff --git a/CruUI/ui/controls/text_block.h b/CruUI/ui/controls/text_block.h
index b05e7ff2..a50f5ee9 100644
--- a/CruUI/ui/controls/text_block.h
+++ b/CruUI/ui/controls/text_block.h
@@ -11,29 +11,6 @@ namespace cru
{
namespace controls
{
- struct TextRange
- {
- TextRange() = default;
- TextRange(const int position, const int count)
- : position(position), count(count)
- {
-
- }
- TextRange(const TextRange& other) = default;
- TextRange(TextRange&& other) = default;
- TextRange& operator=(const TextRange& other) = default;
- TextRange& operator=(TextRange&& other) = default;
- ~TextRange() = default;
-
- unsigned position;
- unsigned count;
-
- explicit operator DWRITE_TEXT_RANGE() const
- {
- return DWRITE_TEXT_RANGE { position, count };
- }
- };
-
class TextBlock : public Control
{
public:
diff --git a/CruUI/ui/ui_base.h b/CruUI/ui/ui_base.h
index c9ae6017..43f3c498 100644
--- a/CruUI/ui/ui_base.h
+++ b/CruUI/ui/ui_base.h
@@ -137,5 +137,18 @@ namespace cru
Right,
Middle
};
+
+ struct TextRange
+ {
+ constexpr TextRange() = default;
+ constexpr TextRange(const int position, const int count)
+ : position(position), count(count)
+ {
+
+ }
+
+ unsigned position = 0;
+ unsigned count = 0;
+ };
}
}