new test.

SVN revision: 45545
This commit is contained in:
Carsten Haitzler 2010-01-25 09:07:10 +00:00
parent cb8c22cde4
commit 0460f51cff
30 changed files with 179 additions and 2 deletions

View File

@ -14,6 +14,30 @@ sky_04.jpg \
wood_01.jpg \
logo.png \
logo_small.png \
parking.png
parking.png \
icon_00.png \
icon_01.png \
icon_02.png \
icon_03.png \
icon_04.png \
icon_05.png \
icon_06.png \
icon_07.png \
icon_08.png \
icon_09.png \
icon_10.png \
icon_11.png \
icon_12.png \
icon_13.png \
icon_14.png \
icon_15.png \
icon_16.png \
icon_17.png \
icon_18.png \
icon_19.png \
icon_20.png \
icon_21.png \
icon_22.png \
icon_23.png
EXTRA_DIST = $(files_DATA)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -568,6 +568,49 @@ collections {
}
}
group { name: "elm/label/base/marker";
styles
{
style { name: "textblock_style2";
base: "font=Sans:style=Bold font_size=14 align=center color=#fff wrap=word";
tag: "br" "\n";
tag: "hilight" "+ color=#ffff";
tag: "b" "+ color=#ffff";
tag: "tab" "\t";
}
}
parts {
part { name: "elm.text";
type: TEXTBLOCK;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
text {
style: "textblock_style2";
min: 1 1;
}
}
}
}
}
group { name: "elm/label/base_wrap/marker";
parts {
part { name: "elm.text";
type: TEXTBLOCK;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
text {
style: "textblock_style2";
min: 0 1;
}
}
}
}
}
///////////////////////////////////////////////////////////////////////////////
group { name: "elm/button/base/default";

View File

@ -72,7 +72,8 @@ test_flip.c \
test_label.c \
test_conform.c \
test_multi.c \
test_floating.c
test_floating.c \
test_launcher.c
elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@
elementary_test_LDFLAGS =

View File

@ -61,6 +61,7 @@ void test_label(void *data, Evas_Object *obj, void *event_info);
void test_conformant(void *data, Evas_Object *obj, void *event_info);
void test_multi(void *data, Evas_Object *obj, void *event_info);
void test_floating(void *data, Evas_Object *obj, void *event_info);
void test_launcher(void *data, Evas_Object *obj, void *event_info);
static void
my_win_del(void *data, Evas_Object *obj, void *event_info)
@ -204,6 +205,7 @@ my_win_main(void)
elm_list_item_append(li, "Conformant", NULL, NULL, test_conformant, NULL);
elm_list_item_append(li, "Multi Touch", NULL, NULL, test_multi, NULL);
elm_list_item_append(li, "Floating Objects", NULL, NULL, test_floating, NULL);
elm_list_item_append(li, "Launcher", NULL, NULL, test_launcher, NULL);
elm_list_go(li);

View File

@ -0,0 +1,103 @@
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
void
test_launcher(void *data, Evas_Object *obj, void *event_info)
{
Evas_Object *win, *bg, *sc, *tb, *pad;
int i, j, k, n, m;
char buf[PATH_MAX];
win = elm_win_add(NULL, "launcher", ELM_WIN_BASIC);
elm_win_title_set(win, "Launcher");
elm_win_autodel_set(win, 1);
bg = elm_bg_add(win);
snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
elm_bg_file_set(bg, buf, NULL);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
tb = elm_table_add(win);
evas_object_size_hint_weight_set(bg, 0.0, 0.0);
evas_object_size_hint_align_set(bg, 0.5, 0.5);
n = 0; m = 0;
for (k = 0 ; k < 5; k++)
{
pad = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_size_hint_min_set(pad, 470, 4);
evas_object_size_hint_weight_set(pad, 0.0, 0.0);
evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tb, pad, (k * 7) + 1, 0, 5, 1);
pad = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_size_hint_min_set(pad, 470, 4);
evas_object_size_hint_weight_set(pad, 0.0, 0.0);
evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tb, pad, (k * 7) + 1, 14, 5, 1);
pad = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_size_hint_min_set(pad, 4, 4);
evas_object_size_hint_weight_set(pad, 0.0, 0.0);
evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tb, pad, k * 7, 1, 1, 12);
pad = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_size_hint_min_set(pad, 4, 4);
evas_object_size_hint_weight_set(pad, 0.0, 0.0);
evas_object_size_hint_align_set(pad, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tb, pad, (k * 7) + 6, 1, 1, 12);
for (j = 0; j < 6; j++)
{
for (i = 0; i < 5; i++)
{
Evas_Object *ic, *lb;
const char *names[] =
{
"Hello", "World", "Things", "Should",
"Work", "Great", "These", "Days",
"Lots", "Of", "Labels", "Make",
"Everyone", "Happy", "And", "Calm"
};
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", PACKAGE_DATA_DIR, n);
elm_icon_file_set(ic, buf, NULL);
elm_icon_scale_set(ic, 0, 0);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ic, 0.5, 0.5);
elm_table_pack(tb, ic, (k * 7) + 1 + i, 1 + (j * 2), 1, 1);
evas_object_show(ic);
lb = elm_label_add(win);
elm_object_style_set(lb, "marker");
elm_label_label_set(lb, names[m]);
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(lb, 0.5, 0.5);
elm_table_pack(tb, lb, (k * 7) + 1 + i, 1 + (j * 2) + 1, 1, 1);
evas_object_show(lb);
n++; if (n > 23) n = 0;
m++; if (m > 15) m = 0;
}
}
}
sc = elm_scroller_add(win);
elm_scroller_bounce_set(sc, 1, 0);
elm_scroller_policy_set(sc, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, sc);
elm_scroller_content_set(sc, tb);
evas_object_show(tb);
elm_scroller_page_relative_set(sc, 1.0, 1.0);
// elm_scroller_page_size_set(sc, 200, 200);
evas_object_show(sc);
evas_object_resize(win, 480, 800);
evas_object_show(win);
}
#endif

View File

@ -431,6 +431,10 @@ extern "C" {
EAPI void elm_label_label_set(Evas_Object *obj, const char *label);
EAPI const char *elm_label_label_get(Evas_Object *obj);
EAPI void elm_label_line_wrap_set(Evas_Object *obj, Eina_Bool wrap);
/* available styles:
* default
* marker
*/
/* smart callbacks called:
*/