summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2011-07-26 17:27:05 +0000
committerBruno Dilly <bdilly@profusion.mobi>2011-07-26 17:27:05 +0000
commit80c5c810e8e926bfb9b05c37825cedcbe246a633 (patch)
tree9a46917e604abe64cd59a75b8c9ca1b85952161d /doc
parent86244665aebe12881034b0e517cd4246871e2ef5 (diff)
Elementary: Spinner documentation
SVN revision: 61766
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/examples.dox75
-rw-r--r--doc/index.doxy3
-rw-r--r--doc/widgets/Makefile.am2
-rw-r--r--doc/widgets/widget_preview_spinner.c8
5 files changed, 89 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b8188b2af..68af786f6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -20,6 +20,7 @@ WGT_PREVIEW = \
20 check:preview-00.png:widget_preview_check1:160:50 \ 20 check:preview-00.png:widget_preview_check1:160:50 \
21 check:preview-01.png:widget_preview_check2:160:50 \ 21 check:preview-01.png:widget_preview_check2:160:50 \
22 check:preview-02.png:widget_preview_check3:160:50 \ 22 check:preview-02.png:widget_preview_check3:160:50 \
23 spinner:preview-00.png:widget_preview_spinner:160:30 \
23 bubble:preview-00.png:widget_preview_bubble1:160:50 \ 24 bubble:preview-00.png:widget_preview_bubble1:160:50 \
24 bubble:preview-01.png:widget_preview_bubble2:160:50 \ 25 bubble:preview-01.png:widget_preview_bubble2:160:50 \
25 bubble:preview-02.png:widget_preview_bubble3:160:50 \ 26 bubble:preview-02.png:widget_preview_bubble3:160:50 \
diff --git a/doc/examples.dox b/doc/examples.dox
index c86d97ef9..c88385f9e 100644
--- a/doc/examples.dox
+++ b/doc/examples.dox
@@ -31,6 +31,8 @@
31 * 31 *
32 * @ref calendar_example_06 32 * @ref calendar_example_06
33 * 33 *
34 * @ref spinner_example
35 *
34 * @ref clock_example 36 * @ref clock_example
35 * 37 *
36 * @ref diskselector_example_01 38 * @ref diskselector_example_01
@@ -1400,6 +1402,79 @@
1400 */ 1402 */
1401 1403
1402/** 1404/**
1405 * @page spinner_example Spinner widget example
1406 *
1407 * This code places seven Elementary spinner widgets on a window, each of
1408 * them exemplifying a part of the widget's API.
1409 *
1410 * The first of them is the default spinner:
1411 * @dontinclude spinner_example.c
1412 * @skipline elm_spinner_add
1413 * @until evas_object_show
1414 * As you see, the defaults for a spinner are:
1415 * @li no wrap
1416 * @li min value set to 0
1417 * @li max value set to 100
1418 * @li step value set to 1
1419 * @li label format set to "%0.f"
1420 *
1421 * If another format is required, see the second spinner. It will put a text
1422 * before and after the value, and also format value to display two decimals:
1423 * @skipline format_set
1424 *
1425 * The third one will use a customized step, define new minimum and maximum
1426 * values and enable wrap, so when value reaches minimum it jumps to maximum,
1427 * or jumps to minimum after maximum value is reached. Format is set to display
1428 * a decimal:
1429 * @skipline elm_spinner_add
1430 * @until evas_object_show
1431 *
1432 * The fourth uses @c vertical style, so instead of left and right arrows,
1433 * top and bottom are displayed. Also the change interval is reduced, so
1434 * user can change value faster.
1435 * @skipline style
1436 * @skipline interval
1437 *
1438 * In the fifth the user won't be allowed to set value directly, i.e., will
1439 * be obligate change value only using arrows:
1440 * @skipline editable
1441 *
1442 * The sixth widget will receive a lot of special values, so
1443 * instead of reading numeric values, user will see labels for each one.
1444 * Also direct edition is disabled, otherwise users would see the numeric
1445 * value on edition mode. User will be able to select a month in this widget:
1446 * @skipline elm_spinner_add
1447 * @until evas_object_show
1448 *
1449 * Finally the last widget will exemplify how to listen to widget's signals,
1450 * <tt> changed </tt> and <tt> delay,changed </tt>. First we need to
1451 * implement callback functions that will simply print spinner's value:
1452 * @dontinclude spinner_example.c
1453 * @skip static
1454 * @skip }
1455 * @skipline static
1456 * @until }
1457 * @until }
1458 *
1459 * The first callback function should be called everytime value changes,
1460 * the second one only after user stops to increment or decrement. Try
1461 * to keep arrows pressed and check the difference.
1462 * @skip smart_callback
1463 * @skipline smart_callback
1464 * @skipline smart_callback
1465 *
1466 * See the full @ref spinner_example.c "example", whose window should
1467 * look like this picture:
1468 *
1469 * @image html screenshots/spinner_example.png
1470 * @image latex screenshots/spinner_example.eps width=\textwidth
1471 *
1472 * See the full @ref spinner_example_c "source code" for this example.
1473 *
1474 * @example spinner_example.c
1475 */
1476
1477/**
1403 * @page clock_example Clock widget example 1478 * @page clock_example Clock widget example
1404 * 1479 *
1405 * This code places five Elementary clock widgets on a window, each of 1480 * This code places five Elementary clock widgets on a window, each of
diff --git a/doc/index.doxy b/doc/index.doxy
index 83389a3db..a27714988 100644
--- a/doc/index.doxy
+++ b/doc/index.doxy
@@ -162,6 +162,9 @@
162 * @li @ref Slider 162 * @li @ref Slider
163 * @li @ref Slideshow 163 * @li @ref Slideshow
164 * @li @ref Spinner 164 * @li @ref Spinner
165 *
166 * @image html img/widget/spinner/preview-00.png
167 * @image latex img/widget/spinner/preview-00.eps
165 * @li @ref Thumb 168 * @li @ref Thumb
166 * @li @ref Toggle 169 * @li @ref Toggle
167 * 170 *
diff --git a/doc/widgets/Makefile.am b/doc/widgets/Makefile.am
index 153524441..e67e20b30 100644
--- a/doc/widgets/Makefile.am
+++ b/doc/widgets/Makefile.am
@@ -31,6 +31,7 @@ widget_preview_button3 \
31widget_preview_check1 \ 31widget_preview_check1 \
32widget_preview_check2 \ 32widget_preview_check2 \
33widget_preview_check3 \ 33widget_preview_check3 \
34widget_preview_spinner \
34widget_preview_bubble1 \ 35widget_preview_bubble1 \
35widget_preview_bubble2 \ 36widget_preview_bubble2 \
36widget_preview_bubble3 \ 37widget_preview_bubble3 \
@@ -90,6 +91,7 @@ EXTRA_DIST = \
90 widget_preview_check1.c \ 91 widget_preview_check1.c \
91 widget_preview_check2.c \ 92 widget_preview_check2.c \
92 widget_preview_check3.c \ 93 widget_preview_check3.c \
94 widget_preview_spinner.c \
93 widget_preview_clock.c \ 95 widget_preview_clock.c \
94 widget_preview_colorselector.c \ 96 widget_preview_colorselector.c \
95 widget_preview_conformant.c \ 97 widget_preview_conformant.c \
diff --git a/doc/widgets/widget_preview_spinner.c b/doc/widgets/widget_preview_spinner.c
new file mode 100644
index 000000000..4c6d4afc9
--- /dev/null
+++ b/doc/widgets/widget_preview_spinner.c
@@ -0,0 +1,8 @@
1#include "widget_preview_tmpl_head.c"
2
3Evas_Object *o = elm_spinner_add(win);
4evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
5elm_win_resize_object_add(win, o);
6evas_object_show(o);
7
8#include "widget_preview_tmpl_foot.c"