Encapsulation and harmonizing operators for LayoutLength
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / layout-size.h
index b4802b3..d025ea7 100644 (file)
@@ -31,23 +31,17 @@ class LayoutSize
 {
 public:
   LayoutSize()
-  : x(0u),
-    y(0u)
+  : x( 0 ),
+    y( 0 )
   {
   }
 
-  LayoutSize( LayoutLength::IntType anX, LayoutLength::IntType aY )
+  LayoutSize( LayoutLength anX, LayoutLength aY )
   : x( anX ),
     y( aY )
   {
   }
 
-  LayoutSize( LayoutLength anX, LayoutLength aY )
-  : x( anX.mValue ),
-    y( aY.mValue )
-  {
-  }
-
   LayoutSize( const LayoutSize& layoutSize )
   : x( layoutSize.x ),
     y( layoutSize.y )
@@ -61,31 +55,24 @@ public:
     return *this;
   }
 
-  LayoutLength::IntType GetWidth()
+  void SetWidth( LayoutLength value )
   {
-    return width;
+    width = value;
   }
 
-  LayoutLength::IntType GetHeight()
+  LayoutLength GetWidth()
   {
-    return height;
+    return width;
   }
 
-  void SetWidth(LayoutLength::IntType value)
-  {
-    width=value;
-  }
-  void SetHeight(LayoutLength::IntType value)
+  void SetHeight( LayoutLength value )
   {
-    height=value;
+    height = value;
   }
-  void SetWidth(LayoutLength value)
-  {
-    width=value.mValue;
-  }
-  void SetHeight(LayoutLength value)
+
+  LayoutLength GetHeight()
   {
-    height=value.mValue;
+    return height;
   }
 
   bool operator==( const LayoutSize& rhs )
@@ -100,14 +87,14 @@ public:
 
   union
   {
-    LayoutLength::IntType x;
-    LayoutLength::IntType width;
+    LayoutLength x;
+    LayoutLength width;
   };
 
   union
   {
-    LayoutLength::IntType y;
-    LayoutLength::IntType height;
+    LayoutLength y;
+    LayoutLength height;
   };
 };