Efl.Ui.Text.context_menu_item_add

Description

This adds an item to the entry's contextual menu.

A longpress on an entry will make the contextual menu show up unless this has been disabled with Efl.Ui.Text.context_menu_disabled.set. By default this menu provides a few options like enabling selection mode, which is useful on embedded devices that need to be explicit about it. When a selection exists it also shows the copy and cut actions.

With this function, developers can add other options to this menu to perform any action they deem necessary.

Signature

context_menu_item_add {
    params {
        @in label: string @optional;
        @in icon_file: string @optional;
        @in icon_type: Elm.Icon.Type;
        @in func: Evas_Smart_Cb @optional;
        @in data: const(void_ptr) @optional;
    }
}

C signature

void efl_ui_text_context_menu_item_add(Eo *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data);

Parameters

  • label (in) - The item's text label.
  • icon_file (in) - The item's icon file.
  • icon_type (in) - The item's icon type.
  • func (in) - The callback to execute when the item is clicked.
  • data (in) - The data to associate with the item for related functions.

Implemented by