Added TextLabel guide 02/37202/8
authorPaul Wisbey <p.wisbey@samsung.com>
Fri, 20 Mar 2015 14:45:17 +0000 (14:45 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Sun, 22 Mar 2015 11:57:54 +0000 (11:57 +0000)
Change-Id: Ia2caf9462b4cd81a60830eb5259da8bdb5f3e20d

35 files changed:
docs/content/images/background/BackgroundTextLabel.png [moved from docs/content/images/background/BackgroundTextView.png with 100% similarity]
docs/content/images/text-controls/ArabicBegin.png [new file with mode: 0644]
docs/content/images/text-controls/ArabicCenter.png [new file with mode: 0644]
docs/content/images/text-controls/ArabicEnd.png [new file with mode: 0644]
docs/content/images/text-controls/LatinBegin.png [new file with mode: 0644]
docs/content/images/text-controls/LatinCenter.png [new file with mode: 0644]
docs/content/images/text-controls/LatinEnd.png [new file with mode: 0644]
docs/content/images/text-controls/TextLabelCenter.png [new file with mode: 0644]
docs/content/images/text-controls/TextLabelTopLeft.png [new file with mode: 0644]
docs/content/images/text-view/AlessBlessC.png [deleted file]
docs/content/images/text-view/Black-Shadow.png [deleted file]
docs/content/images/text-view/Blue-Glow.png [deleted file]
docs/content/images/text-view/Bold.png [deleted file]
docs/content/images/text-view/FontAppendix01.png [deleted file]
docs/content/images/text-view/FontAppendix02.png [deleted file]
docs/content/images/text-view/FontAppendix03.png [deleted file]
docs/content/images/text-view/FontAppendix04.png [deleted file]
docs/content/images/text-view/FontAppendix05.png [deleted file]
docs/content/images/text-view/FreeSerifFont.png [deleted file]
docs/content/images/text-view/Italic.png [deleted file]
docs/content/images/text-view/Red-Outline.png [deleted file]
docs/content/images/text-view/Smooth-Text.png [deleted file]
docs/content/images/text-view/Underline.png [deleted file]
docs/content/images/text-view/text-view-example-01.png [deleted file]
docs/content/images/text-view/text-view-example-02.png [deleted file]
docs/content/images/text-view/text-view-example-03.png [deleted file]
docs/content/images/text-view/text-view-example-04.png [deleted file]
docs/content/images/text-view/text-view-example-05.png [deleted file]
docs/content/images/text-view/text-view-example-06.png [deleted file]
docs/content/images/text-view/text-view-example-07.png [deleted file]
docs/content/images/text-view/text-view-example-08.png [deleted file]
docs/content/images/text-view/text-view.png [deleted file]
docs/content/main-page.h
docs/content/programming-guide/background.h
docs/content/programming-guide/text-label.h [new file with mode: 0644]

diff --git a/docs/content/images/text-controls/ArabicBegin.png b/docs/content/images/text-controls/ArabicBegin.png
new file mode 100644 (file)
index 0000000..56dcec1
Binary files /dev/null and b/docs/content/images/text-controls/ArabicBegin.png differ
diff --git a/docs/content/images/text-controls/ArabicCenter.png b/docs/content/images/text-controls/ArabicCenter.png
new file mode 100644 (file)
index 0000000..cbc77d3
Binary files /dev/null and b/docs/content/images/text-controls/ArabicCenter.png differ
diff --git a/docs/content/images/text-controls/ArabicEnd.png b/docs/content/images/text-controls/ArabicEnd.png
new file mode 100644 (file)
index 0000000..e35e1a8
Binary files /dev/null and b/docs/content/images/text-controls/ArabicEnd.png differ
diff --git a/docs/content/images/text-controls/LatinBegin.png b/docs/content/images/text-controls/LatinBegin.png
new file mode 100644 (file)
index 0000000..bec2507
Binary files /dev/null and b/docs/content/images/text-controls/LatinBegin.png differ
diff --git a/docs/content/images/text-controls/LatinCenter.png b/docs/content/images/text-controls/LatinCenter.png
new file mode 100644 (file)
index 0000000..ef5aa57
Binary files /dev/null and b/docs/content/images/text-controls/LatinCenter.png differ
diff --git a/docs/content/images/text-controls/LatinEnd.png b/docs/content/images/text-controls/LatinEnd.png
new file mode 100644 (file)
index 0000000..4e22cbc
Binary files /dev/null and b/docs/content/images/text-controls/LatinEnd.png differ
diff --git a/docs/content/images/text-controls/TextLabelCenter.png b/docs/content/images/text-controls/TextLabelCenter.png
new file mode 100644 (file)
index 0000000..07558e3
Binary files /dev/null and b/docs/content/images/text-controls/TextLabelCenter.png differ
diff --git a/docs/content/images/text-controls/TextLabelTopLeft.png b/docs/content/images/text-controls/TextLabelTopLeft.png
new file mode 100644 (file)
index 0000000..ad8f492
Binary files /dev/null and b/docs/content/images/text-controls/TextLabelTopLeft.png differ
diff --git a/docs/content/images/text-view/AlessBlessC.png b/docs/content/images/text-view/AlessBlessC.png
deleted file mode 100644 (file)
index b4cc01c..0000000
Binary files a/docs/content/images/text-view/AlessBlessC.png and /dev/null differ
diff --git a/docs/content/images/text-view/Black-Shadow.png b/docs/content/images/text-view/Black-Shadow.png
deleted file mode 100644 (file)
index 899c8b3..0000000
Binary files a/docs/content/images/text-view/Black-Shadow.png and /dev/null differ
diff --git a/docs/content/images/text-view/Blue-Glow.png b/docs/content/images/text-view/Blue-Glow.png
deleted file mode 100644 (file)
index a9b6cfb..0000000
Binary files a/docs/content/images/text-view/Blue-Glow.png and /dev/null differ
diff --git a/docs/content/images/text-view/Bold.png b/docs/content/images/text-view/Bold.png
deleted file mode 100644 (file)
index 0f4f60e..0000000
Binary files a/docs/content/images/text-view/Bold.png and /dev/null differ
diff --git a/docs/content/images/text-view/FontAppendix01.png b/docs/content/images/text-view/FontAppendix01.png
deleted file mode 100644 (file)
index e600bf4..0000000
Binary files a/docs/content/images/text-view/FontAppendix01.png and /dev/null differ
diff --git a/docs/content/images/text-view/FontAppendix02.png b/docs/content/images/text-view/FontAppendix02.png
deleted file mode 100644 (file)
index 7b002b3..0000000
Binary files a/docs/content/images/text-view/FontAppendix02.png and /dev/null differ
diff --git a/docs/content/images/text-view/FontAppendix03.png b/docs/content/images/text-view/FontAppendix03.png
deleted file mode 100644 (file)
index 024a977..0000000
Binary files a/docs/content/images/text-view/FontAppendix03.png and /dev/null differ
diff --git a/docs/content/images/text-view/FontAppendix04.png b/docs/content/images/text-view/FontAppendix04.png
deleted file mode 100644 (file)
index 337a1d7..0000000
Binary files a/docs/content/images/text-view/FontAppendix04.png and /dev/null differ
diff --git a/docs/content/images/text-view/FontAppendix05.png b/docs/content/images/text-view/FontAppendix05.png
deleted file mode 100644 (file)
index 331daf4..0000000
Binary files a/docs/content/images/text-view/FontAppendix05.png and /dev/null differ
diff --git a/docs/content/images/text-view/FreeSerifFont.png b/docs/content/images/text-view/FreeSerifFont.png
deleted file mode 100644 (file)
index fa945ff..0000000
Binary files a/docs/content/images/text-view/FreeSerifFont.png and /dev/null differ
diff --git a/docs/content/images/text-view/Italic.png b/docs/content/images/text-view/Italic.png
deleted file mode 100644 (file)
index 61fe21e..0000000
Binary files a/docs/content/images/text-view/Italic.png and /dev/null differ
diff --git a/docs/content/images/text-view/Red-Outline.png b/docs/content/images/text-view/Red-Outline.png
deleted file mode 100644 (file)
index 794960b..0000000
Binary files a/docs/content/images/text-view/Red-Outline.png and /dev/null differ
diff --git a/docs/content/images/text-view/Smooth-Text.png b/docs/content/images/text-view/Smooth-Text.png
deleted file mode 100644 (file)
index 7ca0d3b..0000000
Binary files a/docs/content/images/text-view/Smooth-Text.png and /dev/null differ
diff --git a/docs/content/images/text-view/Underline.png b/docs/content/images/text-view/Underline.png
deleted file mode 100644 (file)
index 468cac3..0000000
Binary files a/docs/content/images/text-view/Underline.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-01.png b/docs/content/images/text-view/text-view-example-01.png
deleted file mode 100644 (file)
index 3b8eacd..0000000
Binary files a/docs/content/images/text-view/text-view-example-01.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-02.png b/docs/content/images/text-view/text-view-example-02.png
deleted file mode 100644 (file)
index 32a532a..0000000
Binary files a/docs/content/images/text-view/text-view-example-02.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-03.png b/docs/content/images/text-view/text-view-example-03.png
deleted file mode 100644 (file)
index 0fd7457..0000000
Binary files a/docs/content/images/text-view/text-view-example-03.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-04.png b/docs/content/images/text-view/text-view-example-04.png
deleted file mode 100644 (file)
index 5d0a2dc..0000000
Binary files a/docs/content/images/text-view/text-view-example-04.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-05.png b/docs/content/images/text-view/text-view-example-05.png
deleted file mode 100644 (file)
index eccfde5..0000000
Binary files a/docs/content/images/text-view/text-view-example-05.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-06.png b/docs/content/images/text-view/text-view-example-06.png
deleted file mode 100644 (file)
index 02a5f19..0000000
Binary files a/docs/content/images/text-view/text-view-example-06.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-07.png b/docs/content/images/text-view/text-view-example-07.png
deleted file mode 100644 (file)
index 2326de4..0000000
Binary files a/docs/content/images/text-view/text-view-example-07.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view-example-08.png b/docs/content/images/text-view/text-view-example-08.png
deleted file mode 100644 (file)
index 0224b2e..0000000
Binary files a/docs/content/images/text-view/text-view-example-08.png and /dev/null differ
diff --git a/docs/content/images/text-view/text-view.png b/docs/content/images/text-view/text-view.png
deleted file mode 100644 (file)
index 5d11c48..0000000
Binary files a/docs/content/images/text-view/text-view.png and /dev/null differ
index e40f89c..1073c3f 100644 (file)
@@ -31,6 +31,7 @@
  * - \link constraints-intro Introduction to Constraints \endlink
  *
  * \section UIControls UI Controls
+ * - \link text-label Text Label \endlink
  * - \link item-view Item View \endlink
  * - \link scroll-view Scroll View \endlink
  * - \link size-negotiation Size Negotiation \endlink
index 44972f4..a8dc916 100644 (file)
@@ -16,15 +16,15 @@ control.SetBackgroundColor( Dali::Color::RED );
 </td>
 </table>
 
-This can be used for ALL existing controls like TextView as well:
+This can be used for ALL existing controls like TextLabel as well:
 @code
-Dali::Toolkit::TextView textView = Dali::Toolkit::TextView::New( "Hello World" );
-textView.SetBackgroundColor( Dali::Color::RED );
+Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New( "Hello World" );
+label.SetBackgroundColor( Dali::Color::RED );
 @endcode
 
 <table border=0 cellpadding=10><tr>
 <td>
-\image html BackgroundTextView.png
+\image html BackgroundTextLabel.png
 </td>
 </table>
 
diff --git a/docs/content/programming-guide/text-label.h b/docs/content/programming-guide/text-label.h
new file mode 100644 (file)
index 0000000..35754de
--- /dev/null
@@ -0,0 +1,108 @@
+/*! \page text-label Text Label
+ *
+\section overview Overview
+The Dali::Toolkit::TextLabel is a Dali::Toolkit::Control which renders a short text string.\n
+Text labels are lightweight, non-editable and do not respond to user input.
+
+\subsection basictextlabelusage Basic usage
+
+To display a TextLabel the TEXT property must be set using a UTF-8 string.
+
+\code
+TextLabel label = TextLabel::New();
+label.SetProperty( TextLabel::Property::TEXT, "Hello World" );
+Stage::GetCurrent().Add( label );
+\endcode
+
+The label must also be added to the stage, or to an actor which is on the stage.\n
+In this example the text-label will be automatically given a natural size i.e. large enough to fit the text.\n
+The position of the label on-screen is dependent on the parent-origin and anchor-point properties:
+
+<table border=0 cellpadding=10>
+<tr>
+  <td>
+  \image html TextLabelTopLeft.png
+  </td>
+  <td>
+  \image html TextLabelCenter.png
+  </td>
+</tr>
+<tr>
+  <td>
+  (ParentOrigin::TOP_LEFT, AnchorPoint::TOP_LEFT)
+  </td>
+  <td>
+  (ParentOrigin::CENTER, AnchorPoint::CENTER)
+  </td>
+</tr>
+</table>
+
+\subsection fontselection Font Selection
+
+By default TextLabel will automatically select a suitable font from the platform.\n
+Typically fonts do not support all scripts, for example Latin fonts often do not provide Arabic glyphs.\n
+Therefore you should expect TextLabel to select different fonts for each script.
+
+Alternatively a font may be requested using eiter or all of FONT_FAMILY, FONT_STYLE, and POINT_SIZE properties:
+\code
+label.SetProperty( TextLabel::Property::FONT_FAMILY, "HelveticaNue" );
+label.SetProperty( TextLabel::Property::FONT_STYLE,  "Regular" );
+label.SetProperty( TextLabel::Property::POINT_SIZE,  12.0f );
+\endcode
+However the TextLabel will fall-back to using the default font, if the requested font does not support the required scripts.
+
+\subsection fontselection Text Alignment
+
+Wrapping can be enabled using the MULTI_LINE property:\n
+\code
+label.SetProperty( TextLabel::Property::MULTI_LINE, true );
+\endcode
+
+The text can be either aligned to the start, end, or center of the available area:
+\code
+label.SetProperty( TextLabel::Property::ALIGNMENT, "BEGIN" ); // "CENTER" or "END"
+\endcode
+
+<table border=0 cellpadding=10>
+<tr>
+  <td>
+  Here is the "BEGIN" alignment shown for left-to-right (Latin) and right-to-left (Arabic) scripts:
+  </td>
+</tr>
+<tr>
+  <td>
+  \image html LatinBegin.png
+  </td>
+  <td>
+  \image html ArabicBegin.png
+  </td>
+</tr>
+<tr>
+  <td>
+  Here is the "CENTER" alignment shown for left-to-right (Latin) and right-to-left (Arabic) scripts:
+  </td>
+</tr>
+<tr>
+  <td>
+  \image html LatinCenter.png
+  </td>
+  <td>
+  \image html ArabicCenter.png
+  </td>
+</tr>
+<tr>
+  <td>
+  Here is the "END" alignment shown for left-to-right (Latin) and right-to-left (Arabic) scripts:
+  </td>
+</tr>
+<tr>
+  <td>
+  \image html LatinEnd.png
+  </td>
+  <td>
+  \image html ArabicEnd.png
+  </td>
+</tr>
+</table>
+
+*/