diff options
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/StaticCairoText.cpp | 12 | ||||
| -rw-r--r-- | unity-shared/StaticCairoText.h | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/unity-shared/StaticCairoText.cpp b/unity-shared/StaticCairoText.cpp index a30743abc..7eccaa4f4 100644 --- a/unity-shared/StaticCairoText.cpp +++ b/unity-shared/StaticCairoText.cpp @@ -34,6 +34,7 @@ #include <pango/pangocairo.h> #include <UnityCore/GLibWrapper.h> +#include <UnityCore/Variant.h> #include "CairoTexture.h" @@ -495,6 +496,17 @@ std::vector<unsigned> StaticCairoText::GetTextureEndIndices() return list; } +std::string StaticCairoText::GetName() const +{ + return "StaticCairoText"; +} + +void StaticCairoText::AddProperties(GVariantBuilder* builder) +{ + unity::variant::BuilderWrapper(builder) + .add(GetGeometry()); +} + std::string StaticCairoText::Impl::GetEffectiveFont() const { if (font_.empty()) diff --git a/unity-shared/StaticCairoText.h b/unity-shared/StaticCairoText.h index 38c57d4b2..23b23c3ae 100644 --- a/unity-shared/StaticCairoText.h +++ b/unity-shared/StaticCairoText.h @@ -26,11 +26,13 @@ #include <Nux/Nux.h> #include <Nux/View.h> +#include "unity-shared/Introspectable.h" + namespace unity { class Validator; -class StaticCairoText : public nux::View +class StaticCairoText : public nux::View, public unity::debug::Introspectable { NUX_DECLARE_OBJECT_TYPE (StaticCairoText, nux::View); public: @@ -113,6 +115,10 @@ protected: std::vector<unsigned> GetTextureStartIndices(); std::vector<unsigned> GetTextureEndIndices(); + // From debug::Introspectable + std::string GetName() const; + void AddProperties(GVariantBuilder* builder); + private: struct Impl; Impl* pimpl; |
