1 #include <Elementary.hh>
6 elm_main (int argc, char *argv[])
8 struct tm selected_time;
11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
13 ::elm::win_standard win;
14 win.title_set("Calendar Day Selection Example");
15 win.autohide_set(true);
17 ::elm::box bx(efl::eo::parent = win);
18 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19 win.resize_object_add(bx);
22 ::elm::calendar cal(efl::eo::parent = win);
23 cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
24 cal.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
25 cal.select_mode_set(ELM_CALENDAR_SELECT_MODE_NONE);
26 cal.visible_set(true);
29 ::elm::calendar cal2(efl::eo::parent = win);
30 cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
31 cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
32 current_time = time(NULL) +2 * SECS_DAY;
33 localtime_r(¤t_time, &selected_time);
34 cal2.selected_time_set(&selected_time);
35 cal2.visible_set(true);
38 win.visible_set(true);