2016-05-26 14:46:29 -07:00
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "elementary_config.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
|
#include <Elementary.hh>
|
|
|
|
|
|
|
|
|
|
#define SECS_DAY 86400
|
|
|
|
|
|
|
|
|
|
EAPI_MAIN int
|
2017-04-19 23:33:59 -07:00
|
|
|
|
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
2014-12-16 13:04:43 -08:00
|
|
|
|
{
|
|
|
|
|
struct tm selected_time;
|
|
|
|
|
time_t current_time;
|
|
|
|
|
|
|
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
|
|
|
|
|
2017-09-11 11:12:30 -07:00
|
|
|
|
using efl::eo::instantiate;
|
|
|
|
|
|
|
|
|
|
efl::ui::Win win(instantiate);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
//win.title_set("Calendar Day Selection Example");
|
2014-12-16 13:04:43 -08:00
|
|
|
|
win.autohide_set(true);
|
|
|
|
|
|
2017-09-11 11:12:30 -07:00
|
|
|
|
::efl::ui::Box bx(instantiate, win);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
//bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
|
//win.resize_object_add(bx);
|
2017-09-18 23:23:48 -07:00
|
|
|
|
bx.eo_cxx::efl::Gfx::size_set({700,700});
|
2014-12-16 13:04:43 -08:00
|
|
|
|
bx.visible_set(true);
|
|
|
|
|
|
2017-09-11 11:12:30 -07:00
|
|
|
|
::elm::Calendar cal(instantiate, win);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
// cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
|
// cal.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2014-12-16 13:04:43 -08:00
|
|
|
|
cal.select_mode_set(ELM_CALENDAR_SELECT_MODE_NONE);
|
2017-09-18 23:23:48 -07:00
|
|
|
|
cal.eo_cxx::efl::Gfx::size_set({125,135});
|
2014-12-16 13:04:43 -08:00
|
|
|
|
cal.visible_set(true);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
//bx.pack_end(cal); no matching function for call to ‘efl::ui::Box::pack_end(elm::Calendar&)’
|
|
|
|
|
//candidate: bool eo_cxx::efl::pack::Linear::pack_end(Efl_Gfx*) const
|
|
|
|
|
// inline bool eo_cxx::efl::pack::Linear::pack_end(Efl_Gfx * subobj_) const
|
2014-12-16 13:04:43 -08:00
|
|
|
|
|
2017-09-11 11:12:30 -07:00
|
|
|
|
::elm::Calendar cal2(instantiate, win);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
//cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
|
//cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2014-12-16 13:04:43 -08:00
|
|
|
|
current_time = time(NULL) +2 * SECS_DAY;
|
|
|
|
|
localtime_r(¤t_time, &selected_time);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
// cal2.selected_time_set(&selected_time);
|
2017-09-18 23:23:48 -07:00
|
|
|
|
cal2.eo_cxx::efl::Gfx::size_set({125,135});
|
2014-12-16 13:04:43 -08:00
|
|
|
|
cal2.visible_set(true);
|
2016-05-26 14:46:29 -07:00
|
|
|
|
//bx.pack_end(cal2);
|
2014-12-16 13:04:43 -08:00
|
|
|
|
|
2017-09-18 23:23:48 -07:00
|
|
|
|
win.eo_cxx::efl::Gfx::size_set({500,560});
|
2014-12-16 13:04:43 -08:00
|
|
|
|
win.visible_set(true);
|
|
|
|
|
|
|
|
|
|
elm_run();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
ELM_MAIN()
|