Move FontDefaults Declaration/Definition as it's needed by the TextInput. 40/37940/1
authorVictor Cebollada <v.cebollada@samsung.com>
Wed, 8 Apr 2015 13:19:21 +0000 (14:19 +0100)
committerVictor Cebollada <v.cebollada@samsung.com>
Wed, 8 Apr 2015 13:50:57 +0000 (14:50 +0100)
Change-Id: I61e79c35bf4eb6acf60ac641628719fbd20d1aea
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
dali-toolkit/internal/text/text-controller.cpp

index 34f73b0..591dbaf 100644 (file)
@@ -70,6 +70,31 @@ namespace Toolkit
 namespace Text
 {
 
 namespace Text
 {
 
+struct Controller::FontDefaults
+{
+  FontDefaults()
+  : mDefaultPointSize(0.0f),
+    mFontId(0u)
+  {
+  }
+
+  FontId GetFontId( TextAbstraction::FontClient& fontClient )
+  {
+    if( !mFontId )
+    {
+      Dali::TextAbstraction::PointSize26Dot6 pointSize = mDefaultPointSize*64;
+      mFontId = fontClient.GetFontId( mDefaultFontFamily, mDefaultFontStyle, pointSize );
+    }
+
+    return mFontId;
+  }
+
+  std::string mDefaultFontFamily;
+  std::string mDefaultFontStyle;
+  float mDefaultPointSize;
+  FontId mFontId;
+};
+
 struct Controller::TextInput
 {
   // Used to queue input events until DoRelayout()
 struct Controller::TextInput
 {
   // Used to queue input events until DoRelayout()
@@ -605,31 +630,6 @@ struct Controller::TextInput
   bool mUpdateCursorPosition       : 1; ///< True if the visual position of the cursor must be recalculated
 };
 
   bool mUpdateCursorPosition       : 1; ///< True if the visual position of the cursor must be recalculated
 };
 
-struct Controller::FontDefaults
-{
-  FontDefaults()
-  : mDefaultPointSize(0.0f),
-    mFontId(0u)
-  {
-  }
-
-  FontId GetFontId( TextAbstraction::FontClient& fontClient )
-  {
-    if( !mFontId )
-    {
-      Dali::TextAbstraction::PointSize26Dot6 pointSize = mDefaultPointSize*64;
-      mFontId = fontClient.GetFontId( mDefaultFontFamily, mDefaultFontStyle, pointSize );
-    }
-
-    return mFontId;
-  }
-
-  std::string mDefaultFontFamily;
-  std::string mDefaultFontStyle;
-  float mDefaultPointSize;
-  FontId mFontId;
-};
-
 struct Controller::Impl
 {
   Impl( ControlInterface& controlInterface )
 struct Controller::Impl
 {
   Impl( ControlInterface& controlInterface )