Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / popup / popup-impl.cpp
index 7b8e420..b67bdcc 100755 (executable)
@@ -263,41 +263,13 @@ void Popup::SetButtonAreaImage( Actor image )
 
 void Popup::SetTitle( const std::string& text )
 {
-  Toolkit::TextView titleActor = Toolkit::TextView::New();
-  titleActor.SetName( "POPUP_TITLE" );
-  titleActor.SetText( text );
-  titleActor.SetColor( Color::BLACK );
-  titleActor.SetMultilinePolicy( Toolkit::TextView::SplitByWord );
-  titleActor.SetWidthExceedPolicy( Toolkit::TextView::Split );
-  titleActor.SetLineJustification( Toolkit::TextView::Center );
-
-  SetTitle( titleActor );
-}
-
-void Popup::SetTitle( Toolkit::TextView titleActor )
-{
-  // Replaces the current title actor.
-  if( mPopupLayout )
-  {
-    mPopupLayout.RemoveChildAt( Toolkit::TableView::CellPosition( 0, 0 ) );
-  }
-
-  mTitle = titleActor;
-
-  if( mPopupLayout )
-  {
-    mTitle.SetPadding( Padding( 0.0f, 0.0f, mPopupStyle->margin, mPopupStyle->margin ) );
-    mTitle.SetResizePolicy( FILL_TO_PARENT, WIDTH );
-    mTitle.SetDimensionDependency( HEIGHT, WIDTH ); // HeightForWidth
-    mPopupLayout.AddChild( mTitle, Toolkit::TableView::CellPosition( 0, 0 ) );
-  }
-
-  RelayoutRequest();
+// TODO
 }
 
-Toolkit::TextView Popup::GetTitle() const
+const std::string& Popup::GetTitle() const
 {
-  return mTitle;
+  static std::string temp("");
+  return temp;
 }
 
 void Popup::CreateFooter()
@@ -740,29 +712,6 @@ Vector3 Popup::GetNaturalSize()
 
   Vector3 naturalSize( 0.0f, 0.0f, 0.0f );
 
-  if ( mTitle )
-  {
-    Vector3 titleNaturalSize = mTitle.GetImplementation().GetNaturalSize();
-    // Buffer to avoid errors. The width of the popup could potentially be the width of the title text.
-    // It was observed in this case that text wrapping was then inconsistent when seen on device
-    const float titleBuffer = 0.5f;
-    titleNaturalSize.width += titleBuffer;
-
-    // As TextView GetNaturalSize does not take wrapping into account, limit the width
-    // to that of the stage
-    if( titleNaturalSize.width >= maxWidth)
-    {
-      naturalSize.width = maxWidth;
-      naturalSize.height = mTitle.GetImplementation().GetHeightForWidth( naturalSize.width );
-    }
-    else
-    {
-      naturalSize += titleNaturalSize;
-    }
-
-    naturalSize.height += mPopupStyle->margin;
-  }
-
   if( mContent )
   {
     Vector3 contentSize = mContent.GetNaturalSize();
@@ -793,12 +742,6 @@ float Popup::GetHeightForWidth( float width )
   float height( 0.0f );
   float popupWidth( width - 2.f * ( POPUP_OUT_MARGIN_WIDTH + mPopupStyle->margin ) );
 
-  if ( mTitle )
-  {
-    height += mTitle.GetImplementation().GetHeightForWidth( popupWidth );
-    height += mPopupStyle->margin;
-  }
-
   if( mContent )
   {
     height += mContent.GetHeightForWidth( popupWidth ) + mPopupStyle->margin;