*
* @ref Example_Evas_Init_Shutdown
*
+ * @ref Example_Evas_Text
+ *
* @ref Example_Evas_Images
*
* @ref Example_Evas_Images_2
* @include evas-smart-object.c
* @example evas-smart-object.c
*/
+
+/**
+ * @page Example_Evas_Text Evas text object example
+ *
+ * In this example, we illustrate how to use text objects in various
+ * manners.
+ *
+ * We place, in the canvas, a text object along with a border image to
+ * delimit its geometry. After we instantiate the text object, we set
+ * lots of properties on it to the initial ones from a preset list,
+ * which has the following declaration:
+ * @dontinclude evas-text.c
+ * @skip init values
+ * @until };
+ *
+ * Then, we set the text string itself, on it, with
+ * evas_object_text_text_set(). We set an explicit size of 30 points
+ * for our font, as you could see, what we check back with the the
+ * getter evas_object_text_font_get().
+ *
+ * Look at how it translates to code:
+ * @dontinclude evas-text.c
+ * @skip evas_object_text_add
+ * @until fprintf
+ *
+ * Like in other Evas examples, one interacts with it by means of key
+ * commands:
+ * @dontinclude evas-text.c
+ * @skip static const char *commands
+ * @until ;
+ *
+ * Use the 't' key to exercise the evas_object_text_style_set()
+ * function on the text -- it will cycle through all styles on
+ * #Evas_Text_Style_Type (note we start on #EVAS_TEXT_STYLE_PLAIN,
+ * thus with no effects on it) and, with other keys, you'll be able to
+ * set properties applicable to individual styles on the text object.
+ *
+ * The 'z' key will change the text's @b size, keeping the font family
+ * for it. Use 'f' to change the font, keeping the last size
+ * set. There are three font families the example will cycle through:
+ *
+ * The 'b' command shows us that evas_object_color_set(), on a given
+ * text object, will change the text's @b base color. Experiment with
+ * it, which will cycle through the colors in the <c>.text</c> list in
+ * @c init_data.
+ *
+ * The 's', 'o', 'w' and 'g' keys will make the text object to cycle
+ * to the preset values on colors for shadow, outline, glow and 'glow
+ * 2' effects, respectively. Naturally, they will only take effect on
+ * the text styles which resemble them.
+ *
+ * The full example follows.
+ *
+ * @include evas-text.c
+ * @example evas-text.c
+ */
};
d.t_data = init_data;
-
d.t_data.font_ptr = d.t_data.font;
-
d.t_data.text_ptr = d.t_data.text;
d.t_data.glow_ptr = d.t_data.glow;
d.t_data.glow2_ptr = d.t_data.glow2;
evas_object_show(d.text);
evas_object_text_font_get(d.text, &font, &size);
-
fprintf(stdout, "Adding text object with font %s, size %d\n", font, size);
/* this is a border around the text object above, here just to
* treated specially -- as "borders". This will make those regions be
* treated specially on resizing scales, by keeping their aspect. This
* makes setting frames around other objects on UIs easy.
- * See the following figures for a visual explanation:
- * @image html image-borders.png
+ * See the following figures for a visual explanation:\n
+ * @htmlonly
+ * <img src="image-borders.png" style="max-width: 100%;" />
+ * <a href="image-borders.png">Full-size</a>
+ * @endhtmlonly
* @image rtf image-borders.png
- * @image latex image-borders.eps
- * @image html border-effect.png
+ * @image latex image-borders.eps width=\textwidth
+ * @htmlonly
+ * <img src="border-effect.png" style="max-width: 100%;" />
+ * <a href="border-effect.png">Full-size</a>
+ * @endhtmlonly
* @image rtf border-effect.png
- * @image latex border-effect.eps
+ * @image latex border-effect.eps width=\textwidth
*
* @section Evas_Object_Image_Manipulation Manipulating pixels
*
* @note By default, image objects have no borders set, i. e. @c l, @c
* r, @c t and @c b start as @c 0.
*
- * See the following figures for visual explanation:
- * @image html image-borders.png
+ * See the following figures for visual explanation:\n
+ * @htmlonly
+ * <img src="image-borders.png" style="max-width: 100%;" />
+ * <a href="image-borders.png">Full-size</a>
+ * @endhtmlonly
* @image rtf image-borders.png
- * @image latex image-borders.eps
- * @image html border-effect.png
+ * @image latex image-borders.eps width=\textwidth
+ * @htmlonly
+ * <img src="border-effect.png" style="max-width: 100%;" />
+ * <a href="border-effect.png">Full-size</a>
+ * @endhtmlonly
* @image rtf border-effect.png
- * @image latex border-effect.eps
+ * @image latex border-effect.eps width=\textwidth
*
* @see evas_object_image_border_get()
* @see evas_object_image_border_center_fill_set()
*
* For multiline and multiple style text, see @ref Evas_Object_Textblock.
*
+ * See some @ref Example_Evas_Text "examples" on this group of functions.
+ *
* @ingroup Evas_Object_Specific
*/