summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2011-08-01 17:37:10 +0000
committerRafael Antognolli <antognolli@gmail.com>2011-08-01 17:37:10 +0000
commit814151560b12cd2517a03d9952e680a210104a6c (patch)
treebaedf14cebfb097c41ed60b7398ca2e91d01d0b1 /doc
parent294d7127a64a7357ede17da4284e817ac28e60a1 (diff)
elementary/thumb - Added explained example and some more doc.
SVN revision: 61960
Diffstat (limited to '')
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/examples.dox48
-rw-r--r--doc/index.doxy3
-rw-r--r--doc/widgets/Makefile.am4
-rw-r--r--doc/widgets/widget_preview_thumb.c12
5 files changed, 68 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 73aef9709..7ea36ff68 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -77,7 +77,8 @@ WGT_PREVIEW = \
77 table::preview-00.png:widget_preview_table:100:100 \ 77 table::preview-00.png:widget_preview_table:100:100 \
78 win:preview-00.png:widget_preview_win:200:200 \ 78 win:preview-00.png:widget_preview_win:200:200 \
79 table:preview-00.png:widget_preview_table:100:100 \ 79 table:preview-00.png:widget_preview_table:100:100 \
80 menu:preview-00.png:widget_preview_menu:100:100 80 menu:preview-00.png:widget_preview_menu:100:100 \
81 thumb:preview-00.png:widget_preview_thumb:100:100
81 82
82widget-build: 83widget-build:
83 @$(MAKE) -C widgets 84 @$(MAKE) -C widgets
diff --git a/doc/examples.dox b/doc/examples.dox
index c4bad80d5..1cdb7aa6f 100644
--- a/doc/examples.dox
+++ b/doc/examples.dox
@@ -81,6 +81,8 @@
81 * 81 *
82 * @ref genlist_example_05 82 * @ref genlist_example_05
83 * 83 *
84 * @ref thumb_example_01
85 *
84 * @ref progressbar_example 86 * @ref progressbar_example
85 * 87 *
86 * @ref slideshow_example 88 * @ref slideshow_example
@@ -4715,6 +4717,46 @@
4715 */ 4717 */
4716 4718
4717/** 4719/**
4720 * @page thumb_example_01 Thumb - generating thumbnails.
4721 *
4722 * This example shows how to create a simple thumbnail object with Elementary.
4723 * The full source code can be found at @ref thumb_example_01_c
4724 *
4725 * Everything is very simple. First we need to tell elementary that we need
4726 * Ethumb to generate the thumbnails:
4727 *
4728 * @dontinclude thumb_example_01.c
4729 * @skipline elm_need_ethumb
4730 *
4731 * Then, after creating the window and background, we setup our client to
4732 * generate images of 160x160:
4733 *
4734 * @skip client_get
4735 * @until size_set
4736 *
4737 * After that, we can start creating thumbnail objects. They are very similar to
4738 * image or icon objects:
4739 *
4740 * @until thumb_reload
4741 *
4742 * As you can see, the main different function here is elm_thumb_reload(), which
4743 * will check if the options of the Ethumb client have changed. If so, it will
4744 * re-generate the thumbnail, and show the new one.
4745 *
4746 * Notice in this example that the thumbnail object is displayed on the size of
4747 * the window (320x320 pixels), but the thumbnail generated and stored has size
4748 * 160x160 pixels. That's why the picture seems upscaled.
4749 *
4750 * Ideally, you will be generating thumbnails with the size that you will be
4751 * using them.
4752 *
4753 * The example will look like this when running:
4754 *
4755 * @image html screenshots/thumb_example_01.png
4756 * @image latex screenshots/thumb_example_01.eps width=\textwidth
4757 */
4758
4759/**
4718 * @page progressbar_example Progress bar widget example 4760 * @page progressbar_example Progress bar widget example
4719 * 4761 *
4720 * This application is a thorough example of the progress bar widget, 4762 * This application is a thorough example of the progress bar widget,
@@ -5645,6 +5687,12 @@
5645 */ 5687 */
5646 5688
5647/** 5689/**
5690 * @page thumb_example_01_c thumb_example_01.c
5691 * @include thumb_example_01.c
5692 * @example thumb_example_01.c
5693 */
5694
5695/**
5648 * @page progressbar_example_c Progress bar example 5696 * @page progressbar_example_c Progress bar example
5649 * @include progressbar_example.c 5697 * @include progressbar_example.c
5650 * @example progressbar_example.c 5698 * @example progressbar_example.c
diff --git a/doc/index.doxy b/doc/index.doxy
index 7400e8664..956c86165 100644
--- a/doc/index.doxy
+++ b/doc/index.doxy
@@ -190,6 +190,9 @@
190 * @image html img/widget/spinner/preview-00.png 190 * @image html img/widget/spinner/preview-00.png
191 * @image latex img/widget/spinner/preview-00.eps 191 * @image latex img/widget/spinner/preview-00.eps
192 * @li @ref Thumb 192 * @li @ref Thumb
193
194 * @image html img/widget/thumb/preview-00.png
195 * @image latex img/widget/thumb/preview-00.eps
193 * @li @ref Toggle 196 * @li @ref Toggle
194 * 197 *
195 * @image html img/widget/toggle/preview-00.png 198 * @image html img/widget/toggle/preview-00.png
diff --git a/doc/widgets/Makefile.am b/doc/widgets/Makefile.am
index d4a6fad87..1bfb9b83a 100644
--- a/doc/widgets/Makefile.am
+++ b/doc/widgets/Makefile.am
@@ -92,7 +92,8 @@ widget_preview_inwin3 \
92widget_preview_scroller \ 92widget_preview_scroller \
93widget_preview_table \ 93widget_preview_table \
94widget_preview_win \ 94widget_preview_win \
95widget_preview_menu 95widget_preview_menu \
96widget_preview_thumb
96 97
97LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_EMAP_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@ 98LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_EMAP_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
98 99
@@ -166,5 +167,6 @@ EXTRA_DIST = \
166 widget_preview_table.c \ 167 widget_preview_table.c \
167 widget_preview_win.c \ 168 widget_preview_win.c \
168 widget_preview_menu.c \ 169 widget_preview_menu.c \
170 widget_preview_thumb.c \
169 widget_preview_tmpl_foot.c \ 171 widget_preview_tmpl_foot.c \
170 widget_preview_tmpl_head.c 172 widget_preview_tmpl_head.c
diff --git a/doc/widgets/widget_preview_thumb.c b/doc/widgets/widget_preview_thumb.c
new file mode 100644
index 000000000..986c1a5ad
--- /dev/null
+++ b/doc/widgets/widget_preview_thumb.c
@@ -0,0 +1,12 @@
1#include "widget_preview_tmpl_head.c"
2
3elm_need_ethumb();
4
5Evas_Object *o = elm_thumb_add(win);
6evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
7elm_win_resize_object_add(win, o);
8
9elm_thumb_file_set(o, PACKAGE_DATA_DIR"/images/plant_01.jpg", NULL);
10evas_object_show(o);
11
12#include "widget_preview_tmpl_foot.c"