elm_box_pack_end(bx, sc);
en = elm_entry_add(win);
+ elm_entry_context_menu_horizontal_set(en, 1);
elm_entry_context_menu_item_add(en, "Hello", NULL, ELM_ICON_NONE, NULL, NULL);
elm_entry_context_menu_item_add(en, "World", NULL, ELM_ICON_NONE, NULL, NULL);
elm_entry_entry_set(en,
EAPI void elm_entry_selection_copy(Evas_Object *obj);
EAPI void elm_entry_selection_paste(Evas_Object *obj);
EAPI void elm_entry_context_menu_clear(Evas_Object *obj);
+ EAPI void elm_entry_context_menu_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
EAPI void elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data);
EAPI void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled);
EAPI Eina_Bool elm_entry_context_menu_disabled_get(Evas_Object *obj);
*/
EAPI Evas_Object *elm_hoversel_add(Evas_Object *parent);
+ EAPI void elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
EAPI void elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
EAPI void elm_hoversel_label_set(Evas_Object *obj, const char *label);
EAPI const char *elm_hoversel_label_get(Evas_Object *obj);
Evas_Object *btn, *hover;
Evas_Object *hover_parent;
Eina_List *items;
+ Eina_Bool horizontal:1;
};
struct _Elm_Hoversel_Item
bx = elm_box_add(wd->hover);
elm_box_homogenous_set(bx, 1);
+ elm_box_horizontal_set(bx, wd->horizontal);
snprintf(buf, sizeof(buf), "hoversel_vertical_entry/%s",
elm_widget_style_get(obj));
evas_object_show(wd->hover);
evas_object_smart_callback_call(obj, "clicked", NULL);
+
+ if(wd->horizontal)evas_object_hide(wd->btn);
}
static void
elm_button_label_set(wd->btn, label);
}
+EAPI void
+elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ wd->horizontal = !!horizontal;
+}
+
/**
* Get the hoversel button label
*
Eina_Bool deferred_cur : 1;
Eina_Bool disabled : 1;
Eina_Bool context_menu : 1;
+ Eina_Bool horizontal : 1;
};
struct _Elm_Entry_Context_Menu_Item
if (wd->hoversel) evas_object_del(wd->hoversel);
else elm_widget_scroll_freeze_push(data);
wd->hoversel = elm_hoversel_add(data);
+ elm_hoversel_horizontal_set(wd->hoversel, wd->horizontal);
elm_object_style_set(wd->hoversel, "entry");
elm_widget_sub_object_add(data, wd->hoversel);
elm_hoversel_label_set(wd->hoversel, "Text");
}
}
+EAPI void
+elm_entry_context_menu_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ wd->horizontal = !!horizontal;
+}
+
EAPI void
elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
{