From: glima Date: Mon, 18 Jul 2011 21:45:14 +0000 (+0000) Subject: [evas] Fixing oopsies on text/image object docs. X-Git-Tag: accepted/2.0/20130306.225542~242^2~246 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7cc0cacd394b47ef9627a20b9abcf305291bf81;p=profile%2Fivi%2Fevas.git [evas] Fixing oopsies on text/image object docs. Text needed an explanation and citation to the .c example and large images explaining borders were prettyfied on html docs. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@61488 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/doc/examples.dox b/doc/examples.dox index 15700c5..5fd070c 100644 --- a/doc/examples.dox +++ b/doc/examples.dox @@ -7,6 +7,8 @@ * * @ref Example_Evas_Init_Shutdown * + * @ref Example_Evas_Text + * * @ref Example_Evas_Images * * @ref Example_Evas_Images_2 @@ -725,3 +727,59 @@ * @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 .text 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 + */ diff --git a/src/examples/evas-text.c b/src/examples/evas-text.c index 12a4f31..ba55662 100644 --- a/src/examples/evas-text.c +++ b/src/examples/evas-text.c @@ -320,9 +320,7 @@ main(void) }; 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; @@ -384,7 +382,6 @@ main(void) 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 diff --git a/src/lib/Evas.h b/src/lib/Evas.h index 7fdaccd..014f9c2 100644 --- a/src/lib/Evas.h +++ b/src/lib/Evas.h @@ -5883,13 +5883,19 @@ EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNU * 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 + * + * Full-size + * @endhtmlonly * @image rtf image-borders.png - * @image latex image-borders.eps - * @image html border-effect.png + * @image latex image-borders.eps width=\textwidth + * @htmlonly + * + * Full-size + * @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 * @@ -6146,13 +6152,19 @@ EAPI void evas_object_image_file_get (const Ev * @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 + * + * Full-size + * @endhtmlonly * @image rtf image-borders.png - * @image latex image-borders.eps - * @image html border-effect.png + * @image latex image-borders.eps width=\textwidth + * @htmlonly + * + * Full-size + * @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() @@ -6980,6 +6992,8 @@ EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file); * * 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 */