forked from enlightenment/efl
elementary/naviframe - updated doc & more contents & text hooks
discomfitor you bothered me! :) SVN revision: 68050
This commit is contained in:
parent
cd92ba4e77
commit
61af3881a2
|
@ -59,8 +59,15 @@ static const Evas_Smart_Cb_Description _signals[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static Evas_Object *_content_get_hook(const Evas_Object *obj,
|
||||
const char *part);
|
||||
static void _text_set_hook(Evas_Object *obj,
|
||||
const char *part,
|
||||
const char *label);
|
||||
static const char *_text_get_hook(const Evas_Object *obj, const char *part);
|
||||
static void _content_set_hook(Evas_Object *obj,
|
||||
const char *part,
|
||||
Evas_Object *content);
|
||||
static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part);
|
||||
static Evas_Object *_content_unset_hook(Evas_Object *obj, const char *part);
|
||||
static void _del_hook(Evas_Object *obj);
|
||||
static void _theme_hook(Evas_Object *obj);
|
||||
static void _emit_hook(Evas_Object *obj,
|
||||
|
@ -213,12 +220,9 @@ static void _emit_hook(Evas_Object *obj,
|
|||
const char *emission,
|
||||
const char *source)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
|
||||
elm_object_signal_emit(wd->base, emission, source);
|
||||
Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
|
||||
if (!it) return;
|
||||
return elm_object_item_signal_emit(it, emission, source);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -460,11 +464,44 @@ _back_btn_new(Evas_Object *obj)
|
|||
btn = elm_button_add(obj);
|
||||
if (!btn) return NULL;
|
||||
evas_object_smart_callback_add(btn, "clicked", _back_btn_clicked, obj);
|
||||
snprintf(buf, sizeof(buf), "naviframe/back_btn/%s", elm_widget_style_get(obj));
|
||||
snprintf(buf, sizeof(buf), "naviframe/back_btn/%s",
|
||||
elm_widget_style_get(obj));
|
||||
elm_object_style_set(btn, buf);
|
||||
return btn;
|
||||
}
|
||||
|
||||
static void _text_set_hook(Evas_Object *obj,
|
||||
const char *part,
|
||||
const char *label)
|
||||
{
|
||||
Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
|
||||
if (!it) return;
|
||||
elm_object_item_part_text_set(it, part, label);
|
||||
}
|
||||
|
||||
static const char *_text_get_hook(const Evas_Object *obj, const char *part)
|
||||
{
|
||||
Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
|
||||
if (!it) return NULL;
|
||||
return elm_object_item_part_text_get(it, part);
|
||||
}
|
||||
|
||||
static void
|
||||
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
|
||||
{
|
||||
Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
|
||||
if (!it) return;
|
||||
elm_object_item_part_content_set(it, part, content);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_content_unset_hook(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
|
||||
if (!it) return NULL;
|
||||
return elm_object_item_part_content_unset(it, part);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_content_get_hook(const Evas_Object *obj, const char *part)
|
||||
{
|
||||
|
@ -1061,12 +1098,17 @@ elm_naviframe_add(Evas_Object *parent)
|
|||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_text_set_hook_set(obj, _text_set_hook);
|
||||
elm_widget_text_get_hook_set(obj, _text_get_hook);
|
||||
elm_widget_content_set_hook_set(obj, _content_set_hook);
|
||||
elm_widget_content_get_hook_set(obj, _content_get_hook);
|
||||
elm_widget_content_unset_hook_set(obj, _content_unset_hook);
|
||||
elm_widget_signal_emit_hook_set(obj, _emit_hook);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
elm_widget_focus_next_hook_set(obj, _focus_next_hook);
|
||||
|
||||
//base
|
||||
//FIXME: Is this base layout really needed?
|
||||
wd->base = elm_layout_add(parent);
|
||||
evas_object_event_callback_add(wd->base,
|
||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
|
|
|
@ -15,15 +15,24 @@
|
|||
* same look & feel for the pages or different styles for the items in it's
|
||||
* application.
|
||||
*
|
||||
* Default content parts of the naviframe that you can use content hooks for are:
|
||||
* Default content parts of the naviframe that you can use content hooks for
|
||||
* are:
|
||||
* @li "default" - The main content of the current page
|
||||
* @li "icon" - An icon in the title area of the current parge
|
||||
* @li "prev_btn" - A button of the current page to go to the previous page
|
||||
* @li "next_btn" - A button of the current page to go to the next page
|
||||
*
|
||||
* Default text parts of the naviframe that you can use for are:
|
||||
* @li "default" - Title label in the title area of the current page
|
||||
* @li "subtitle" - Sub-title label in the title area of the current page
|
||||
*
|
||||
* Signals that you can add callback for are:
|
||||
* @li "transition,finished" - When the transition is finished in changing
|
||||
* the item
|
||||
* @li "transition,finished" - When the transition is finished in changing the
|
||||
* item
|
||||
* @li "title,clicked" - User clicked title area
|
||||
*
|
||||
* Default content parts of the naviframe items that you can use content hooks for are:
|
||||
* Default content parts of the naviframe items that you can use content hooks
|
||||
* for are:
|
||||
* @li "default" - The main content of the page
|
||||
* @li "icon" - An icon in the title area
|
||||
* @li "prev_btn" - A button to go to the previous page
|
||||
|
@ -35,6 +44,11 @@
|
|||
*
|
||||
* Supported elm_object common APIs.
|
||||
* @li elm_object_signal_emit
|
||||
* @li elm_object_part_text_set
|
||||
* @li elm_object_part_text_get
|
||||
* @li elm_object_part_content_set
|
||||
* @li elm_object_part_content_get
|
||||
* @li elm_object_part_content_unset
|
||||
*
|
||||
* Supported elm_object_item common APIs.
|
||||
* @li elm_object_item_part_text_set
|
||||
|
@ -408,7 +422,6 @@ elm_naviframe_item_simple_push(Evas_Object *obj, Evas_Object *content)
|
|||
*/
|
||||
EAPI void elm_naviframe_item_simple_promote(Evas_Object *obj, Evas_Object *content);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue