1 #include "e_mod_main.h"
3 static Evry_View *view;
4 static Evas_Object *o_text = NULL;
7 _view_clear(Evry_View *v)
10 evas_object_del(v->o_list);
11 evas_object_del(o_text);
16 _view_update(Evry_View *v __UNUSED__)
22 _cb_key_down(Evry_View *v, const Ecore_Event_Key *ev)
28 if (!strcmp(ev->key, "Down"))
31 evas_object_geometry_get(o, NULL, NULL, NULL, &h);
33 e_box_align_get(o, NULL, &align);
35 align = align - 10.0 / (double)h;
36 if (align < 0.0) align = 0.0;
38 e_box_align_set(v->o_list, 0.5, align);
42 else if (!strcmp(ev->key, "Up"))
45 evas_object_geometry_get(o, NULL, NULL, NULL, &h);
47 e_box_align_get(o, NULL, &align);
49 align = align + 10.0 / (double)h;
50 if (align > 1.0) align = 1.0;
52 e_box_align_set(v->o_list, 0.5, align);
56 evry_view_toggle(v->state, NULL);
61 _view_create(Evry_View *v, const Evry_State *s __UNUSED__, const Evas_Object *swallow)
67 _(" Ok, here comes the explanation of <hilight>everything</hilight>...<br>"
68 " Just type a few letters of the thing you are looking for. <br>"
69 " Use cursor <hilight><up/down></hilight> to choose from the list of things.<br>"
70 " Press <hilight><tab></hilight> to select"
71 " an action, then press <hilight><return></hilight>.<br>"
72 " This page will not show up next time you run <hilight>everything</hilight>.<br>"
73 " <hilight><Esc></hilight> close this Dialog<br>"
74 " <hilight><?></hilight> show this page<br>"
75 " <hilight><return></hilight> run action<br>"
76 " <hilight><ctrl+return></hilight> run action and continue<br>"
77 " <hilight><tab></hilight> toggle between selectors<br>"
78 " <hilight><ctrl+tab></hilight> complete input (depends on plugin)<br>"
79 " <hilight><ctrl+'x'></hilight> jump to plugin beginning with 'x'<br>"
80 " <hilight><ctrl+left/right></hilight> cycle through plugins<br>"
81 " <hilight><ctrl+up/down></hilight> go to first/last item<br>"
82 " <hilight><ctrl+1></hilight> toggle view modes (exit this page ;)<br>"
83 " <hilight><ctrl+2></hilight> toggle list view modes<br>"
84 " <hilight><ctrl+3></hilight> toggle thumb view modes"
87 if (v->active) return v;
89 o = e_box_add(evas_object_evas_get(swallow));
90 e_box_orientation_set(o, 0);
91 e_box_align_set(o, 0.5, 1.0);
93 e_box_freeze(v->o_list);
94 o = edje_object_add(evas_object_evas_get(swallow));
95 e_theme_edje_object_set(o, "base/theme/widgets",
96 "e/modules/everything/textblock");
98 edje_object_part_text_set(o, "e.textblock.text", text);
99 e_box_pack_start(v->o_list, o);
100 edje_object_size_min_calc(o, &mw, &mh);
101 e_box_pack_options_set(o, 1, 0, 1, 0, 0.5, 0.5, mw, mh + 200, 999, 999);
102 e_box_thaw(v->o_list);
112 _view_destroy(Evry_View *v)
118 evry_view_help_init(void)
120 if (!evry_api_version_check(EVRY_API_VERSION))
123 view = E_NEW(Evry_View, 1);
126 view->create = &_view_create;
127 view->destroy = &_view_destroy;
128 view->update = &_view_update;
129 view->clear = &_view_clear;
130 view->cb_key_down = &_cb_key_down;
132 /* view->types = "NONE"; */
133 evry_view_register(view, 2);
139 evry_view_help_shutdown(void)
141 evry_view_unregister(view);