summaryrefslogtreecommitdiff
path: root/src/examples/elementary/calendar_cxx_example_03.cc
blob: 3f75b07167f9bd570a782b2174be9254b836c0d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <Efl_Ui.hh>

using efl::eo::instantiate;

static void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
   Efl_Time min = {}, max = {};

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);

   min.tm_year = 2020 - 1900;
   max.tm_year = 2022 - 1900;

   efl::ui::Win win(instantiate);
   win.text_set("Calendar Min/Max Year Example");
   win.autohide_set(true);

   efl::ui::Calendar cal(instantiate, win);
   win.content_set(cal);
   cal.date_min_set(min);
   cal.date_max_set(max);

   win.size_set({320,320});
}
EFL_MAIN()