Wearable native

More Option

This feature is supported in wearable applications only.

The more option is one of the wearable circular UI components. The more option handle can use the elm_layout APIs, because the more option handle is an elm_layout object.

The basic view of the more option is shown on the left in the following figure. It simply contains a cue button. When the cue button is clicked, the view including the selector appears from the cue location (shown on the right in the figure).

The selector can receive a rotary event, and can emit events when each item and selector are clicked. When the back motion is done in the selector view, the selector view disappears.

Figure: More Option

More Option

Adding an Eext More Option Object

To create a more option object, use the eext_more_option_add() function:

Evas_Object *more_option = NULL;
more_option = eext_more_option_add(parent);

Activating a Rotary Event

You do not need to call the eext_rotary_object_event_activated_set() function for the more option object, since it is called automatically according to the elm_panel state.

Configuring the More Option

To configure the direction of the cue button, use the direction state, which has the following values:

  • EEXT_MORE_OPTION_DIRECTION_TOP: Cue button is at the top.
  • EEXT_MORE_OPTION_DIRECTION_BOTTOM: Cue button is at the bottom.
  • EEXT_MORE_OPTION_DIRECTION_LEFT: Cue button is on the left.
  • EEXT_MORE_OPTION_DIRECTION_RIGHT: Cue button is on the right (default value).

To set the cue button direction for the more option:

eext_more_option_direction_set(more_option, EEXT_MORE_OPTION_DIRECTION_RIGHT);

The following table shows the customizable more option parts.

Table: Customizable more option parts
Part Setting function View
selector,main_text eext_more_option_item_part_text_set()

eext_more_option_item_domain_translatable_part_text_set()

main_text

selector,sub_text eext_more_option_item_part_text_set()

eext_more_option_item_domain_translatable_part_text_set()

sub_text

item,icon eext_more_option_item_part_content_set()

Item content

Adding a More Option Item

To add an item, append it with the eext_more_option_item_append() function and set its attributes:

{
   Evas_Object *img = NULL;
   // Append item
   Eext_Object_Item *item  = eext_more_option_item_append(parent);
   // Set the text in the rotary_selector
   eext_more_option_item_part_text_set(item, "selector,main_text", "test1");
   eext_more_option_item_part_text_set(item, "selector,sub_text", "test1");
   // Set the content icon
   img = elm_image_add(parent);
   eext_more_option_item_part_content_set(item, "item,icon", img);
   elm_image_file_set(img, "/music_controller_btn_play.png", NULL);
}

Using the More Option Callbacks

The more option emits the following signals:

  • item,selected: User selected the item.
  • item,clicked: User selected the already selected item again or selected a selector.
  • more,option,opened: Layout with the rotary selector is shown..
  • more,option,closed: Layout with the rotary selector is hidden.

For all these signals, the event_info parameter returned in the callback is NULL.

To register and define a callback function called by the clicked signal:

{
   evas_object_smart_callback_add(more_option, “more,option,opened”, _opened_cb, data);
}

// Callback function for the "more,option,opened" signal
// This callback is called when the more_option is seen
void 
_opened_cb(void *data, Evas_Object *obj, void *event_info)
{
   dlog_print(DLOG_INFO, LOG_TAG, "Open the More Option\n");
}
Go to top