~thalexander/unity/update-fsf-address

« back to all changes in this revision

Viewing changes to unity-shared/AbstractIconRenderer.h

Introspectable: use IntrospectionData class for collecting data from children

Now each introspectable object is called with an IntrospectionData parameter and calling one
of its methods it's the only way to fill introspection data into unity.
As bonus point, remove all the unneeded UnityCore/Variant.cpp inclusions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "Introspectable.h"
26
26
#include "IconTextureSource.h"
27
27
 
28
 
#include <UnityCore/Variant.h>
29
 
 
30
28
namespace unity
31
29
{
32
30
namespace ui
33
31
{
34
32
 
35
 
enum PipRenderStyle 
 
33
enum PipRenderStyle
36
34
{
37
35
  OUTSIDE_TILE,
38
36
  OVER_TILE,
98
96
protected:
99
97
  // Introspectable methods
100
98
  std::string GetName() const { return "RenderArgs"; }
101
 
  void AddProperties(GVariantBuilder* builder)
 
99
  void AddProperties(debug::IntrospectionData& introspection)
102
100
  {
103
 
    unity::variant::BuilderWrapper(builder)
104
 
        .add("logical_center_x", logical_center.x)
105
 
        .add("logical_center_y", logical_center.y)
106
 
        .add("logical_center_z", logical_center.z);
 
101
    introspection.add("logical_center_x", logical_center.x)
 
102
                 .add("logical_center_y", logical_center.y)
 
103
                 .add("logical_center_z", logical_center.z);
107
104
  }
108
105
};
109
106