aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_layout.c
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2009-08-13 22:41:43 +0000
committerDavide Andreoli <dave@gurumeditation.it>2009-08-13 22:41:43 +0000
commitcf6f01b171e2434c139cc9c34da23dd31757d28a (patch)
tree50510a3effef269a921800c12521bfe39c0b762d /legacy/elementary/src/bin/test_layout.c
parentelm_list: setters for label, icon and end. (diff)
downloadefl-cf6f01b171e2434c139cc9c34da23dd31757d28a.tar.gz
* Split up elementary test.c in several files, one per widget
SVN revision: 41749
Diffstat (limited to 'legacy/elementary/src/bin/test_layout.c')
-rw-r--r--legacy/elementary/src/bin/test_layout.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_layout.c b/legacy/elementary/src/bin/test_layout.c
new file mode 100644
index 0000000000..c190a7a39f
--- /dev/null
+++ b/legacy/elementary/src/bin/test_layout.c
@@ -0,0 +1,41 @@
+#include <Elementary.h>
+
+void
+test_layout(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win, *bg, *ly, *bt;
+ char buf[PATH_MAX];
+
+ win = elm_win_add(NULL, "layout", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Layout");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, 1.0, 1.0);
+ evas_object_show(bg);
+
+ ly = elm_layout_add(win);
+ snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+ elm_layout_file_set(ly, buf, "layout");
+ evas_object_size_hint_weight_set(ly, 1.0, 1.0);
+ elm_win_resize_object_add(win, ly);
+ evas_object_show(ly);
+
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Button 1");
+ elm_layout_content_set(ly, "element1", bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Button 2");
+ elm_layout_content_set(ly, "element2", bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Button 3");
+ elm_layout_content_set(ly, "element3", bt);
+ evas_object_show(bt);
+
+ evas_object_show(win);
+}