aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2010-11-10 18:03:56 +0000
committerBruno Dilly <bdilly@profusion.mobi>2010-11-10 18:03:56 +0000
commit8922b61b38d6ea99ac2691460f20368f0bf4a917 (patch)
tree050a5033089212f7c322759c9aa55b85ad0dbc7e /legacy/elementary/src/bin/test_gengrid.c
parentAdd getter for elm_radio (diff)
downloadefl-8922b61b38d6ea99ac2691460f20368f0bf4a917.tar.gz
Add horizontal mode to gengrid test 2
SVN revision: 54409
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index 1f928b9d9d..f5c6b140f8 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -27,6 +27,13 @@ static const char *img[9] =
static Elm_Gengrid_Item_Class gic;
static void
+_horizontal_grid(void *data, Evas_Object *obj, void *event_info __UNUSED__)
+{
+ Evas_Object *grid = data;
+ elm_gengrid_horizontal_set(grid, elm_check_state_get(obj));
+}
+
+static void
grid_drag_up(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
printf("Drag up: %p\n", event_info);
@@ -267,7 +274,7 @@ _size_changed(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_gengrid2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *grid, *bx, *hbx, *bt;
+ Evas_Object *win, *bg, *grid, *bx, *hbx, *bt, *ck;
win = elm_win_add(NULL, "grid2", ELM_WIN_BASIC);
elm_win_title_set(win, "Grid2");
@@ -332,6 +339,12 @@ test_gengrid2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
elm_box_pack_end(hbx, bt);
evas_object_show(bt);
+ ck = elm_check_add(win);
+ elm_check_label_set(ck, "Horizontal Mode");
+ evas_object_smart_callback_add(ck, "changed", _horizontal_grid, grid);
+ elm_box_pack_end(hbx, ck);
+ evas_object_show(ck);
+
gic.item_style = "default";
gic.func.label_get = grid_label_get;
gic.func.icon_get = grid_icon_get;