The elm_toolbar_iteams_count have to return only the number of manually added items.
[framework/uifw/elementary.git] / src / examples / frame_example_01.c
1 //Compile with:
2 //gcc -o frame_example_01 frame_example_01.c -g `pkg-config --cflags --libs elementary`
3
4 #include <Elementary.h>
5
6 EAPI_MAIN int
7 elm_main(int argc, char **argv)
8 {
9    Evas_Object *win, *bg;
10    Evas_Object *f1, *r1, *f2, *r2, *f3, *r3, *f4, *r4;
11
12    win = elm_win_add(NULL, "frame", ELM_WIN_BASIC);
13    elm_win_title_set(win, "Frame");
14    elm_win_autodel_set(win, EINA_TRUE);
15    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
16
17    bg = elm_bg_add(win);
18    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19    elm_win_resize_object_add(win, bg);
20    evas_object_show(bg);
21
22    r1 = evas_object_rectangle_add(evas_object_evas_get(win));
23    evas_object_color_set(r1, 255, 0, 0, 255);
24    evas_object_show(r1);
25
26    f1= elm_frame_add(win);
27    elm_object_content_set(f1, r1);
28    elm_object_text_set(f1, "Default frame");
29    evas_object_resize(f1, 100, 100);
30    evas_object_move(f1, 25, 25);
31    evas_object_show(f1);
32
33    r2 = evas_object_rectangle_add(evas_object_evas_get(win));
34    evas_object_color_set(r2, 0, 255, 0, 255);
35    evas_object_show(r2);
36
37    f2 = elm_frame_add(win);
38    elm_object_content_set(f2, r2);
39    elm_object_text_set(f2, "Padding frame");
40    evas_object_resize(f2, 100, 100);
41    evas_object_move(f2, 150, 25);
42    elm_object_style_set(f2, "pad_small");
43    evas_object_show(f2);
44
45    r3 = evas_object_rectangle_add(evas_object_evas_get(win));
46    evas_object_color_set(r3, 0, 0, 255, 255);
47    evas_object_show(r3);
48
49    f3 = elm_frame_add(win);
50    elm_object_content_set(f3, r3);
51    elm_object_text_set(f3, "Top outdent frame");
52    evas_object_resize(f3, 100, 100);
53    evas_object_move(f3, 25, 150);
54    elm_object_style_set(f3, "outdent_top");
55    evas_object_show(f3);
56
57    r4 = evas_object_rectangle_add(evas_object_evas_get(win));
58    evas_object_color_set(r4, 0, 0, 0, 255);
59    evas_object_show(r4);
60
61    f4 = elm_frame_add(win);
62    elm_object_content_set(f4, r4);
63    elm_object_text_set(f4, "Bottom outdent frame");
64    evas_object_resize(f4, 100, 100);
65    evas_object_move(f4, 150, 150);
66    elm_object_style_set(f4, "outdent_bottom");
67    evas_object_show(f4);
68
69    evas_object_resize(win, 275, 275);
70    evas_object_show(win);
71
72    elm_run();
73    elm_shutdown();
74
75    return 0;
76 }
77 ELM_MAIN()