2016-05-26 14:46:29 -07:00
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "elementary_config.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
|
#warning This example can't be implemented with EO APIs... FIXME
|
|
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
|
#include <Elementary.hh>
|
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
|
using efl::eo::instantiate;
|
|
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
|
#define SECS_DAY 86400
|
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
|
static void
|
|
|
|
|
efl_main(void *data EINA_UNUSED, const Efl_Event *ev 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
|
|
|
|
efl::ui::Win win(instantiate);
|
2017-11-01 06:42:04 -07:00
|
|
|
|
win.text_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);
|
2017-11-01 06:42:04 -07:00
|
|
|
|
win.content_set(bx);
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
|
|
::efl::ui::Calendar cal(instantiate, win);
|
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});
|
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});
|
2016-05-26 14:46:29 -07:00
|
|
|
|
//bx.pack_end(cal2);
|
2014-12-16 13:04:43 -08:00
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
|
#endif
|
2014-12-16 13:04:43 -08:00
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
|
win.size_set({500,560});
|
2014-12-16 13:04:43 -08:00
|
|
|
|
}
|
2017-11-01 06:42:04 -07:00
|
|
|
|
EFL_MAIN()
|