win = elm_win_add(NULL, "flip", ELM_WIN_BASIC);
elm_win_title_set(win, "Flip");
+ elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
elm_win_autodel_set(win, 1);
bg = elm_bg_add(win);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_frame_content_set(fr, tb);
my_show(tb);
- for (j = 0; j < 3; j++)
- for (i = 0; i < 3; i++)
+ for (j = 0; j < 1; j++)
+ for (i = 0; i < 2; i++)
+ {
+ Evas_Object *bt;
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Table");
+ evas_object_size_hint_align_set(bt, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_table_pack(tb, bt, i, j, 1, 1);
+ my_show(bt);
+ }
+ }
+ }
+
+ {
+ Evas_Object *fr = elm_bubble_add(win);
+ elm_bubble_label_set(fr, "Bubble");
+ evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(fr, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ elm_box_pack_end(bx, fr);
+ evas_object_show(fr);
+
+ {
+ Evas_Object *tb = elm_table_add(win);
+ evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_bubble_content_set(fr, tb);
+ my_show(tb);
+ for (j = 0; j < 2; j++)
+ for (i = 0; i < 1; i++)
{
Evas_Object *bt;
bt = elm_button_add(win);
win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
elm_win_title_set(win, "Pager");
+ elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
elm_win_autodel_set(win, 1);
info.win = win;
win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
elm_win_title_set(win, "Pager Slide");
+ elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
elm_win_autodel_set(win, 1);
info.win = win;
_sizing_eval(obj);
}
+static Eina_Bool
+_elm_bubble_focus_cycle_hook(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool circular)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *cur;
+
+ if ((!wd) || (!wd->content))
+ return EINA_FALSE;
+
+ cur = wd->content;
+
+ /* Try Focus cycle in subitem */
+ return elm_widget_focus_cycle(cur, dir, circular);
+}
+
static void
_sizing_eval(Evas_Object *obj)
{
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_focus_cycle_hook_set(obj, _elm_bubble_focus_cycle_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
wd->bbl = edje_object_add(e);
_sizing_eval(obj);
}
+static Eina_Bool
+_elm_flip_focus_cycle_hook(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool circular)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ if (!wd)
+ return EINA_FALSE;
+
+ /* Try Focus cycle in subitem */
+ if (wd->state)
+ return elm_widget_focus_cycle(wd->front.content, dir, circular);
+ else
+ return elm_widget_focus_cycle(wd->back.content, dir, circular);
+
+}
+
static void
_sizing_eval(Evas_Object *obj)
{
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_focus_cycle_hook_set(obj, _elm_flip_focus_cycle_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
wd->clip = evas_object_rectangle_add(e);
cur = wd->content;
/* Try Focus cycle in subitem */
- if (elm_widget_focus_cycle(cur, dir, circular))
- return EINA_TRUE;
- /* Ignore focused subitem */
- if (elm_widget_focus_get(cur) && (!circular))
- return EINA_FALSE;
- /* Try give the focus to sub item*/
- if (elm_widget_can_focus_get(cur))
- {
- elm_widget_focus_steal(cur);
- return EINA_TRUE;
- }
-
- return EINA_FALSE;
+ return elm_widget_focus_cycle(cur, dir, circular);
}
static void
_sizing_eval(obj);
}
+static Eina_Bool
+_elm_pager_focus_cycle_hook(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool circular)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *cur;
+
+ if ((!wd) || (!wd->top))
+ return EINA_FALSE;
+
+ cur = wd->top->content;
+
+ /* Try Focus cycle in subitem */
+ return elm_widget_focus_cycle(cur, dir, circular);
+}
+
static void
_sizing_eval(Evas_Object *obj)
{
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_focus_cycle_hook_set(obj, _elm_pager_focus_cycle_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
wd->clip = evas_object_rectangle_add(e);