rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=d3f72b8c24f74e9635ff6c7df6658344a9521423

commit d3f72b8c24f74e9635ff6c7df6658344a9521423
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Wed Mar 30 17:21:11 2016 +0300

    live_widget_common: containers to set into demo's swallow
    
    Grid, Table, Box, List
---
 .../ui/live_view/elementary/live_widget_common.c   | 56 ++++++++++++++++++++--
 src/bin/ui/property_demo_swallow.c                 |  4 ++
 src/bin/ui/workspace/demo_group.h                  |  4 ++
 3 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/live_view/elementary/live_widget_common.c 
b/src/bin/ui/live_view/elementary/live_widget_common.c
index 2b71da6..37bb03a 100644
--- a/src/bin/ui/live_view/elementary/live_widget_common.c
+++ b/src/bin/ui/live_view/elementary/live_widget_common.c
@@ -72,7 +72,7 @@ _gen_content_get(void *data __UNUSED__,
 Evas_Object *
 object_generate(Demo_Part *part, Evas_Object *object)
 {
-   Evas_Object *content = NULL, *bt = NULL, *table = NULL;
+   Evas_Object *content = NULL, *bt = NULL, *bt2 = NULL, *table = NULL;
    Elm_Genlist_Item_Class *ic = NULL;
    Elm_Gengrid_Item_Class *icg = NULL;
    Elm_Object_Item *item;
@@ -227,9 +227,9 @@ object_generate(Demo_Part *part, Evas_Object *object)
               elm_scroller_policy_set(object, ELM_SCROLLER_POLICY_ON,
                                       ELM_SCROLLER_POLICY_ON);
               table = elm_table_add(content);
-              for (j = 0; j < ELEMENTS_SMALL_COUNT; j++)
+              for (j = 0; j < ELEMENTS_MID_COUNT; j++)
                 {
-                   for (i = 0; i < ELEMENTS_SMALL_COUNT; i++)
+                   for (i = 0; i < ELEMENTS_MID_COUNT; i++)
                      {
                         bt = elm_button_add(table);
                         elm_object_text_set(bt, _("User Text"));
@@ -263,6 +263,56 @@ object_generate(Demo_Part *part, Evas_Object *object)
               elm_toolbar_item_separator_set(item, true);
 
               break;
+            case WIDGET_LIST:
+              content = elm_list_add(object);
+              for (i = 0; i < ELEMENTS_BIG_COUNT; i++)
+                {
+                   bt = elm_button_add(content);
+                   elm_object_text_set(bt, _("User Text"));
+                   bt = elm_button_add(content);
+                   elm_object_text_set(bt, _("User Text"));
+                   elm_list_item_append(content, _("No icons"), bt, bt2, NULL, 
NULL);
+                }
+              break;
+            case WIDGET_GRID:
+              content = elm_grid_add(object);
+              elm_grid_size_set(content, 5, 5);
+              for (j = 0; j < ELEMENTS_SMALL_COUNT; j++)
+                {
+                   for (i = 0; i < ELEMENTS_SMALL_COUNT; i++)
+                     {
+                        bt = elm_button_add(content);
+                        elm_object_text_set(bt, _("User Text"));
+                        elm_grid_pack(content, bt, i, j, 1, 1);
+                        evas_object_show(bt);
+                     }
+                }
+              break;
+            case WIDGET_TABLE:
+              content = elm_grid_add(object);
+              elm_grid_size_set(content, 5, 5);
+              for (j = 0; j < ELEMENTS_SMALL_COUNT; j++)
+                {
+                   for (i = 0; i < ELEMENTS_SMALL_COUNT; i++)
+                     {
+                        bt = elm_button_add(table);
+                        elm_object_text_set(bt, _("User Text"));
+                        elm_table_pack(table, bt, i, j, 1, 1);
+                        evas_object_show(bt);
+                     }
+                }
+              break;
+            case WIDGET_BOX:
+              content = elm_box_add(object);
+              evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
+              for (i = 0; i < ELEMENTS_SMALL_COUNT; i++)
+                {
+                   bt = elm_button_add(content);
+                   elm_object_text_set(bt, _("User Text"));
+                   elm_box_pack_end(content, bt);
+                   evas_object_show(bt);
+                }
+              break;
           }
      }
    return content;
diff --git a/src/bin/ui/property_demo_swallow.c 
b/src/bin/ui/property_demo_swallow.c
index 25fd375..1d54872 100644
--- a/src/bin/ui/property_demo_swallow.c
+++ b/src/bin/ui/property_demo_swallow.c
@@ -82,6 +82,10 @@ static const char *widget_type[] = { N_("button"),
                                      N_("segment_control"),
                                      N_("clock"),
                                      N_("panes"),
+                                     N_("list"),
+                                     N_("grid"),
+                                     N_("table"),
+                                     N_("box"),
                                      N_("genlist"),
                                      N_("gengrid"),
                                      N_("scroller"),
diff --git a/src/bin/ui/workspace/demo_group.h 
b/src/bin/ui/workspace/demo_group.h
index 8cc818d..6e0fbfb 100644
--- a/src/bin/ui/workspace/demo_group.h
+++ b/src/bin/ui/workspace/demo_group.h
@@ -65,6 +65,10 @@ typedef enum _Swallow_Content_Widget_Type
    WIDGET_SEGMENT_CONTROL, /**<segment_control widget */
    WIDGET_CLOCK, /**<clock widget */
    WIDGET_PANES, /**<panes widget */
+   WIDGET_LIST, /**< list widget */
+   WIDGET_GRID, /**< grid widget */
+   WIDGET_TABLE, /**< table widget */
+   WIDGET_BOX, /**< box widget */
    WIDGET_GENLIST, /**<genlist widget */
    WIDGET_GENGRID, /**<gengrid widget */
    WIDGET_SCROLLER, /**<scroller widget */

-- 


Reply via email to