diff options
| author | Christopher Townsend <christopher.townsend@canonical.com> | 2013-01-11 16:39:01 -0500 |
|---|---|---|
| committer | Christopher Townsend <christopher.townsend@canonical.com> | 2013-01-11 16:39:01 -0500 |
| commit | 5efd2500f61e565dcc4591a463598bde06cf4ffa (patch) | |
| tree | 4c35662df7456a7e7a2767aeb39a66f140f88683 /unity-shared | |
| parent | 1c79b45b4eac3f7212dafb8cc805f239cbd4ea7b (diff) | |
* Added new Autopilot test for testing clicking to close previews.
* Revert the preview manual test. * Added introspection to StaticCairoText to allow testing of these elements. * Added children to each preview to allow for Autopilot testing. (bzr r3012.2.2)
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; |
