forked from enlightenment/efl
New test for external widget: scroller.
Lots of bug here, but it's probably a corner-case-test SVN revision: 76420
This commit is contained in:
parent
597313e157
commit
17414e4c37
|
@ -448,4 +448,101 @@ collections {
|
|||
}
|
||||
}
|
||||
}
|
||||
group { name: "external/scroller";
|
||||
parts {
|
||||
COMMON_EXTERNAL_UNDER
|
||||
part { name: "ext_label1";
|
||||
type: EXTERNAL;
|
||||
source: "elm/label";
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
max: 200 50;
|
||||
align: 0.5 0.0;
|
||||
params {
|
||||
string: "label" "<b>All the Widgets and the Interaction are pure edje</>\
|
||||
<br>This is not a real test, just an experiment<br><b>BUG</>: clip issue, slider drag, lots of warning, ...";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "ext_scroller1";
|
||||
type: EXTERNAL;
|
||||
source: "elm/scroller";
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
align: 0.5 0.0;
|
||||
rel1.offset: 10 60;
|
||||
rel2 {
|
||||
to_y: "ext_button1";
|
||||
relative: 1.0 0.0;
|
||||
offset: -10 -10;
|
||||
}
|
||||
params {
|
||||
string: "content" "external/slider";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "ext_button1";
|
||||
type: EXTERNAL;
|
||||
source: "elm/button";
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
max: 80 40;
|
||||
align: 0.0 1.0;
|
||||
rel1.offset: 20 0;
|
||||
rel2.offset: 0 -15;
|
||||
params {
|
||||
string: "label" "content 1";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "ext_button2";
|
||||
type: EXTERNAL;
|
||||
source: "elm/button";
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
max: 80 40;
|
||||
align: 0.0 1.0;
|
||||
rel1.offset: 100 0;
|
||||
rel2.offset: 0 -15;
|
||||
params {
|
||||
string: "label" "content 2";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "ext_button3";
|
||||
type: EXTERNAL;
|
||||
source: "elm/button";
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
max: 80 40;
|
||||
align: 0.0 1.0;
|
||||
rel1.offset: 180 0;
|
||||
rel2.offset: 0 -15;
|
||||
params {
|
||||
string: "label" "content unset";
|
||||
}
|
||||
}
|
||||
}
|
||||
COMMON_EXTERNAL_OVER
|
||||
}
|
||||
programs {
|
||||
COMMON_EXTERNAL_PROGRAM
|
||||
program { name: "bt1_click";
|
||||
signal: "clicked";
|
||||
source: "ext_button1";
|
||||
action: PARAM_SET "ext_scroller1" "content" "external/button";
|
||||
|
||||
}
|
||||
program { name: "bt2_click";
|
||||
signal: "clicked";
|
||||
source: "ext_button2";
|
||||
action: PARAM_SET "ext_scroller1" "content" "external/slider";
|
||||
}
|
||||
program { name: "bt3_click";
|
||||
signal: "clicked";
|
||||
source: "ext_button3";
|
||||
action: PARAM_SET "ext_scroller1" "content" "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,6 +186,7 @@ void test_dayselector(void *data, Evas_Object *obj, void *event_info);
|
|||
void test_image(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_external_button(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_external_slider(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_external_scroller(void *data, Evas_Object *obj, void *event_info);
|
||||
#ifdef HAVE_EMOTION
|
||||
void test_video(void *data, Evas_Object *obj, void *event_info);
|
||||
#endif
|
||||
|
@ -531,6 +532,7 @@ add_tests:
|
|||
|
||||
//------------------------------//
|
||||
ADD_TEST(NULL, "Edje External", "ExtButton", test_external_button);
|
||||
ADD_TEST(NULL, "Edje External", "ExtScroller", test_external_scroller);
|
||||
ADD_TEST(NULL, "Edje External", "ExtSlider", test_external_slider);
|
||||
|
||||
//------------------------------//
|
||||
|
|
|
@ -48,5 +48,26 @@ test_external_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e
|
|||
evas_object_show(win);
|
||||
}
|
||||
|
||||
void
|
||||
test_external_scroller(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *ly;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
win = elm_win_util_standard_add("ext_scroller", "Edje External Scroller");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
ly = elm_layout_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/objects/test_external.edj", elm_app_data_dir_get());
|
||||
elm_layout_file_set(ly, buf, "external/scroller");
|
||||
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_win_resize_object_add(win, ly);
|
||||
evas_object_show(ly);
|
||||
|
||||
evas_object_resize(win, 320, 400);
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue