\section{label\-\_\-example\-\_\-01.\-c}

\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -o label\_example\_01 label\_example\_01.c -g `pkg-config --cflags --libs elementary`}

\textcolor{preprocessor}{#include <Elementary.h>}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *label, *label2, *label3, *label4, *label5, *label6;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"label"}, \textcolor{stringliteral}{"Label"});
   elm_win_autodel_set(win, EINA\_TRUE);

   label = elm_label_add(win);
   elm\_object\_text\_set(label, \textcolor{stringliteral}{"Some long text for our label, that is long but "}
                       \textcolor{stringliteral}{"not too long."});
   elm_label_slide_duration_set(label, 3);
   elm_label_slide_mode_set(label, ELM\_LABEL\_SLIDE\_MODE\_ALWAYS);
   elm_object_style_set(label, \textcolor{stringliteral}{"slide\_bounce"});
   evas\_object\_move(label, 0, 10);
   evas\_object\_resize(label, 200, 15);
   evas\_object\_show(label);

   label2 = elm_label_add(win);
   elm\_object\_text\_set(label2, \textcolor{stringliteral}{"This is the text for our second label, which is"}
                       \textcolor{stringliteral}{" much longer than the previous one, maybe even "}
                       \textcolor{stringliteral}{"too long, but maybe not."});
   elm_label_ellipsis_set(label2, EINA\_TRUE);
   evas\_object\_resize(label2, 200, 15);
   evas\_object\_move(label2, 0, 30);
   evas\_object\_show(label2);

   label3 = elm_label_add(win);
   elm\_object\_text\_set(label3, \textcolor{stringliteral}{"Some more long text much as before, long but "}
                       \textcolor{stringliteral}{"not too long."});
   elm_label_line_wrap_set(label3, ELM\_WRAP\_CHAR);
   elm_label_ellipsis_set(label3, EINA\_TRUE);
   evas\_object\_resize(label3, 200, 15);
   evas\_object\_move(label3, 0, 50);
   evas\_object\_show(label3);

   label4 = elm_label_add(win);
   elm\_object\_text\_set(label4, \textcolor{stringliteral}{"And for this label we choose a different text, "}
                       \textcolor{stringliteral}{"for no reason other than that we can."});
   elm_label_line_wrap_set(label4, ELM\_WRAP\_CHAR);
   evas\_object\_resize(label4, 200, 30);
   evas\_object\_move(label4, 0, 80);
   evas\_object\_show(label4);

   label5 = elm_label_add(win);
   elm\_object\_text\_set(label5, \textcolor{stringliteral}{"And for this label we choose a different text, "}
                       \textcolor{stringliteral}{"for no reason other than that we can."});
   elm_label_line_wrap_set(label5, ELM\_WRAP\_WORD);
   evas\_object\_resize(label5, 200, 40);
   evas\_object\_move(label5, 0, 110);
   evas\_object\_show(label5);

   label6 = elm_label_add(win);
   elm\_object\_text\_set(label6, \textcolor{stringliteral}{"Short text"});
   elm_object_style_set(label6, \textcolor{stringliteral}{"marker"});
   evas\_object\_color\_set(label6, 255, 0, 0, 255);
   evas\_object\_resize(label6, 200, 15);
   evas\_object\_move(label6, 0, 140);
   evas\_object\_show(label6);

   evas\_object\_resize(win, 200, 170);
   evas\_object\_show(win);

   elm_run();
   elm_shutdown();

   \textcolor{keywordflow}{return} 0;
\}
ELM_MAIN()
\end{DoxyCodeInclude}
 