@@ -35,6 +35,7 @@ enum ControlType {
ControlTypeString,
ControlTypeRectangle,
ControlTypeSize,
+ ControlTypePoint,
};
namespace details {
@@ -97,6 +98,11 @@ struct control_type<Size> {
static constexpr std::size_t size = 0;
};
+template<>
+struct control_type<Point> {
+ static constexpr ControlType value = ControlTypePoint;
+};
+
template<typename T, std::size_t N>
struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {
static constexpr std::size_t size = N;
@@ -60,6 +60,7 @@ static constexpr size_t ControlValueSize[] = {
[ControlTypeString] = sizeof(char),
[ControlTypeRectangle] = sizeof(Rectangle),
[ControlTypeSize] = sizeof(Size),
+ [ControlTypePoint] = sizeof(Point),
};
} /* namespace */
@@ -254,6 +255,11 @@ std::string ControlValue::toString() const
str += value->toString();
break;
}
+ case ControlTypePoint: {
+ const Point *value = reinterpret_cast<const Point *>(data);
+ str += value->toString();
+ break;
+ }
case ControlTypeNone:
case ControlTypeString:
break;