summaryrefslogtreecommitdiff
path: root/src/examples/elementary/clock_cxx_example.cc
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@yahoo.com>2017-09-11 21:12:30 +0300
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2017-09-11 21:13:15 +0300
commita8f86b2c3443a6fa3b16df695a92fbef1d6dbb83 (patch)
treec059b9cb9c579b51a7eb00b9681f62af06f0777b /src/examples/elementary/clock_cxx_example.cc
parent79956eee638109f04f134b829969f40b5079a853 (diff)
Examples: fix C++ examples
The examples have not been updated after the last C++ changes.
Diffstat (limited to 'src/examples/elementary/clock_cxx_example.cc')
-rw-r--r--src/examples/elementary/clock_cxx_example.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/examples/elementary/clock_cxx_example.cc b/src/examples/elementary/clock_cxx_example.cc
index 4d80b308ce..aa5866afb9 100644
--- a/src/examples/elementary/clock_cxx_example.cc
+++ b/src/examples/elementary/clock_cxx_example.cc
@@ -10,32 +10,34 @@ elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
10{ 10{
11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
12 12
13 efl::ui::Win win; 13 using efl::eo::instantiate;
14
15 efl::ui::Win win(instantiate);
14 //win.title_set("Clock Example"); 16 //win.title_set("Clock Example");
15 win.autohide_set(true); 17 win.autohide_set(true);
16 18
17 efl::ui::Box bx(win); 19 efl::ui::Box bx(instantiate, win);
18 //bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 20 //bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19 //win.resize_object_add(bx); 21 //win.resize_object_add(bx);
20 bx.eo_cxx::efl::Gfx::size_set(300,300); 22 bx.eo_cxx::efl::Gfx::size_set(300,300);
21 bx.visible_set(true); 23 bx.visible_set(true);
22 24
23 ::elm::Clock ck(win); 25 ::elm::Clock ck(instantiate, win);
24 bx.pack_end(ck); 26 bx.pack_end(ck);
25 ck.visible_set(true); 27 ck.visible_set(true);
26 28
27 ::elm::Clock ck2(win); 29 ::elm::Clock ck2(instantiate, win);
28 ck2.show_am_pm_set(true); 30 ck2.show_am_pm_set(true);
29 bx.pack_end(ck2); 31 bx.pack_end(ck2);
30 ck2.visible_set(true); 32 ck2.visible_set(true);
31 33
32 ::elm::Clock ck3(win); 34 ::elm::Clock ck3(instantiate, win);
33 ck3.show_seconds_set(true); 35 ck3.show_seconds_set(true);
34 ck3.time_set(10, 11, 12); 36 ck3.time_set(10, 11, 12);
35 bx.pack_end(ck3); 37 bx.pack_end(ck3);
36 ck3.visible_set(true); 38 ck3.visible_set(true);
37 39
38 ::elm::Clock ck4(win); 40 ::elm::Clock ck4(instantiate, win);
39 ck4.edit_set(true); 41 ck4.edit_set(true);
40 ck4.show_seconds_set(true); 42 ck4.show_seconds_set(true);
41 ck4.show_am_pm_set(true); 43 ck4.show_am_pm_set(true);
@@ -43,7 +45,7 @@ elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
43 bx.pack_end(ck4); 45 bx.pack_end(ck4);
44 ck4.visible_set(true); 46 ck4.visible_set(true);
45 47
46 ::elm::Clock ck5(win); 48 ::elm::Clock ck5(instantiate, win);
47 ck5.show_seconds_set(true); 49 ck5.show_seconds_set(true);
48 ck5.edit_set(true); 50 ck5.edit_set(true);
49 int digedit = ELM_CLOCK_EDIT_HOUR_UNIT | ELM_CLOCK_EDIT_MIN_UNIT | ELM_CLOCK_EDIT_SEC_UNIT; 51 int digedit = ELM_CLOCK_EDIT_HOUR_UNIT | ELM_CLOCK_EDIT_MIN_UNIT | ELM_CLOCK_EDIT_SEC_UNIT;