*/
EAPI Evas_Object *elm_object_item_content_part_get(const Elm_Object_Item *it, const char *item);
-#define elm_object_item_content_get(it, content) elm_object_item_content_part_get((it), NULL, (content))
+#define elm_object_item_content_get(it) elm_object_item_content_part_get((it), NULL)
/**
* Unset a content of an object item
/* naviframe */
#define ELM_NAVIFRAME_ITEM_ICON "elm.swallow.icon"
#define ELM_NAVIFRAME_ITEM_OPTIONHEADER "elm.swallow.optionheader"
- typedef enum
- {
- ELM_NAVIFRAME_PREV_BUTTON,
- ELM_NAVIFRAME_NEXT_BUTTON
- } Elm_Naviframe_Button_Type;
+ #define ELM_NAVIFRAME_ITEM_TITLE_LABEL "elm.text.title"
+ #define ELM_NAVIFRAME_ITEM_PREV_BTN "elm.swallow.prev_btn"
EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style) EINA_ARG_NONNULL(1, 5);
EAPI Evas_Object *elm_naviframe_item_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_naviframe_item_title_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_naviframe_item_title_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
- EAPI void elm_naviframe_item_subtitle_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_naviframe_item_subtitle_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
EAPI Elm_Object_Item *elm_naviframe_top_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI Elm_Object_Item *elm_naviframe_bottom_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style) EINA_ARG_NONNULL(1);
Elm_Naviframe_Item *navi_it = ELM_CAST(it);
char buf[1024];
- if (!part) return;
+ if (!part)
+ snprintf(buf, sizeof(buf), "elm.text.title");
+ else
+ snprintf(buf, sizeof(buf), "%s", part);
EINA_LIST_FOREACH(navi_it->text_list, l, pair)
{
- if (!strcmp(part, pair->part))
+ if (!strcmp(buf, pair->part))
{
if (pair->text)
{
ERR("Failed to allocate new text part of the item! : naviframe=%p", navi_it->base.widget);
return;
}
- eina_stringshare_replace(&pair->part, part);
+ eina_stringshare_replace(&pair->part, buf);
navi_it->text_list = eina_list_append(navi_it->text_list, pair);
}
eina_stringshare_replace(&pair->text, label);
- edje_object_part_text_set(navi_it->base.view, part, label);
+ edje_object_part_text_set(navi_it->base.view, buf, label);
- snprintf(buf, sizeof(buf), "elm,state,%s,show", part);
+ snprintf(buf, sizeof(buf), "elm,state,%s,show", buf);
if (label)
edje_object_signal_emit(navi_it->base.view, buf, "elm");
Eina_List *l = NULL;
Elm_Naviframe_Text_Item_Pair *pair = NULL;
Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ char buf[1024];
- if (!part) return NULL;
+ if (!part)
+ snprintf(buf, sizeof(buf), "elm.text.title");
+ else
+ snprintf(buf, sizeof(buf), "%s", part);
EINA_LIST_FOREACH(navi_it->text_list, l, pair)
{
- if (!strcmp(part, pair->part))
+ if (!strcmp(buf, pair->part))
return pair->text;
}
return NULL;
Elm_Naviframe_Content_Item_Pair *pair = NULL;
Elm_Naviframe_Item *navi_it = ELM_CAST(it);
- if (!part) return;
-
//specified parts
- if (!strcmp(part, "elm.swallow.content"))
+ if ((!part) || (!strcmp(part, "elm.swallow.content")))
{
_item_content_set(navi_it, content);
return;
Elm_Naviframe_Item *navi_it = ELM_CAST(it);
//specified parts
- if (!strcmp(part, "elm.swallow.content"))
+ if ((!part) || (!strcmp(part, "elm.swallow.content")))
return navi_it->content;
else if (!strcmp(part, "elm.swallow.prev_btn"))
return navi_it->title_prev_btn;
Evas_Object *content = NULL;
char buf[1028];
- if (!part) return NULL;
-
//specified parts
//FIXME: could be unset the below specified contents also.
- if (!strcmp(part, "elm.swallow.content") ||
+ if (!part ||
+ !strcmp(part, "elm.swallow.content") ||
!strcmp(part, "elm.swallow.prev_btn") ||
!strcmp(part, "elm.swallow.next_btn"))
{
static void
_title_prev_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn, Eina_Bool back_btn)
{
- char buf[1024];
-
if (it->title_prev_btn == btn) return;
if (it->title_prev_btn)
static void
_title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn)
{
- char buf[1024];
-
if (it->title_next_btn == btn) return;
if (it->title_next_btn)
if (!btn) return;
- elm_object_style_set(btn, buf);
elm_widget_sub_object_add(it->base.widget, btn);
evas_object_event_callback_add(btn,
EVAS_CALLBACK_DEL,