elementray/naviframe - added more macros.
authorChunEon Park <hermet@hermet.pe.kr>
Sun, 30 Oct 2011 16:10:16 +0000 (16:10 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Sun, 30 Oct 2011 16:10:16 +0000 (16:10 +0000)
these macros are more clear than part names in using content/text_part_set/get/unset functions.

SVN revision: 64525

src/bin/test_naviframe.c
src/lib/Elementary.h.in

index df4973d..c2d8c8c 100644 (file)
@@ -54,8 +54,8 @@ _page4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
                                 bt,
                                 bt2,
                                 NULL);
-   elm_object_item_text_part_set(it, "elm.text.subtitle", "Here is sub-title part!");
-   elm_object_item_content_part_set(it, "elm.swallow.icon", ic);
+   elm_object_item_text_part_set(it, ELM_NAVIFRAME_ITEM_TEXT_SUBTITLE, "Here is sub-title part!");
+   elm_object_item_content_part_set(it, ELM_NAVIFRAME_ITEM_CONTENT_ICON, ic);
    elm_naviframe_item_title_visible_set(it, EINA_FALSE);
    evas_object_smart_callback_add(bt2, "clicked", _title_visible, it);
 }
@@ -93,7 +93,7 @@ _page3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
                                 bt3,
                                 NULL);
    elm_object_item_text_part_set(it, "elm.text.subtitle", "Here is sub-title part!");
-   elm_object_item_content_part_set(it, "elm.swallow.icon", ic);
+   elm_object_item_content_part_set(it, ELM_NAVIFRAME_ITEM_CONTENT_ICON, ic);
 }
 
 void
@@ -123,7 +123,7 @@ _page2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
                                 bt,
                                 bt2,
                                 NULL);
-   elm_object_item_text_part_set(it, "elm.text.subtitle", "Here is sub-title part!");
+   elm_object_item_text_part_set(it, ELM_NAVIFRAME_ITEM_TEXT_SUBTITLE, "Here is sub-title part!");
 }
 
 void
@@ -143,6 +143,7 @@ test_naviframe(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
    nf = elm_naviframe_add(win);
    elm_win_resize_object_add(win, nf);
+   evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(nf);
    evas_object_smart_callback_add(nf, "title,clicked", _title_clicked, 0);
 
index da33280..9c2f5a0 100644 (file)
@@ -28192,17 +28192,21 @@ extern "C" {
     *
     * Default contents parts of the naviframe items that you can use for are:
     * @li "elm.swallow.content" - A main content of the page
+    * @li "elm.swallow.icon" - A icon in the title area
     * @li "elm.swallow.prev_btn" - A button to go to the previous page
     * @li "elm.swallow.next_btn" - A button to go to the next page
     *
     * Default text parts of the naviframe items that you can use for are:
     * @li "elm.text.title" - Title label in the title area
+    * @li "elm.text.subtitle" - Sub-title label in the title area
     *
     * @ref tutorial_naviframe gives a good overview of the usage of the API.
     */
 
-#define ELM_NAVIFRAME_ITEM_PREV_BTN "elm.swallow.prev_btn"
-#define ELM_NAVIFRAME_ITEM_NEXT_BTN "elm.swallow.next_btn"
+#define ELM_NAVIFRAME_ITEM_CONTENT_ICON "elm.swallow.icon"
+#define ELM_NAVIFRAME_ITEM_CONTENT_PREV_BTN "elm.swallow.prev_btn"
+#define ELM_NAVIFRAME_ITEM_CONTNET_NEXT_BTN "elm.swallow.next_btn"
+#define ELM_NAVIFRAME_ITEM_TEXT_SUBTITLE "elm.text.subtitle"
 
    /**
     * @addtogroup Naviframe