1 #include <Elementary.hh>
5 elm_main (int argc, char *argv[])
7 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
9 ::elm::win_standard win;
10 win.title_set("Bg Plain");
11 win.autohide_set(true);
13 ::elm::bg bg(efl::eo::parent = win);
14 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
15 win.resize_object_add(bg);
18 ::elm::label label1(efl::eo::parent = win);
19 label1.text_set(nullptr, "Bubble with no icon, info or label");
20 label1.visible_set(true);
22 evas::rectangle icon(efl::eo::parent = win);
23 icon.color_set( 0, 0, 255, 255);
24 icon.visible_set(true);
26 ::elm::bubble bubble1(efl::eo::parent = win);
27 bubble1.content_set("icon", icon);
28 bubble1.text_set("info", "INFO");
29 bubble1.text_set(nullptr, "LABEL");
30 bubble1.content_set(nullptr, label1);
31 bubble1.size_set(300, 100);
32 bubble1.visible_set(true);
34 auto on_click = std::bind([&] ()
36 static unsigned char corner = 0;
39 bubble1.pos_set(ELM_BUBBLE_POS_TOP_LEFT);
41 bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner));
44 bubble1.callback_clicked_add(on_click);
46 ::elm::label label2(efl::eo::parent = win);
47 label2.text_set(nullptr, "Bubble with no icon, info or label");
48 label2.visible_set(true);
50 ::elm::bubble bubble2(efl::eo::parent = win);
51 bubble2.content_set(nullptr, label2);
52 bubble2.size_set(200, 50);
53 bubble2.position_set(0, 110);
54 bubble2.visible_set(true);
56 win.size_set(300, 200);
57 win.visible_set(true);