From: Woochan Lee Date: Mon, 18 Jul 2016 07:05:30 +0000 (+0900) Subject: Delete setContent() that has too much params. X-Git-Tag: submit/tizen/20160928.045111^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b492b19c7c0a00842d6aa5071a84b4a9192467f;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git Delete setContent() that has too much params. Change-Id: I03f0eb3502df55000e6f012b3932c9d8d9c8e53c --- diff --git a/src/examples/efl/c/page1.cpp b/src/examples/efl/c/page1.cpp index a1463d5..f61b9fc 100644 --- a/src/examples/efl/c/page1.cpp +++ b/src/examples/efl/c/page1.cpp @@ -48,9 +48,10 @@ view1_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Basic View", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page1", NULL, NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page1")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } diff --git a/src/examples/efl/c/page10.cpp b/src/examples/efl/c/page10.cpp index 6122174..683c45f 100644 --- a/src/examples/efl/c/page10.cpp +++ b/src/examples/efl/c/page10.cpp @@ -57,7 +57,12 @@ view10_rotate_cb(ui_standard_view *view, int degree, void *data) ui_view_set_indicator(view, UI_VIEW_INDICATOR_OPTIMAL); } - ui_standard_view_set_content(view, content, "Page10", NULL, NULL, NULL); + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page10")) + { + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); + return false; + } return true; } diff --git a/src/examples/efl/c/page11.cpp b/src/examples/efl/c/page11.cpp index 345c9b3..eae474a 100644 --- a/src/examples/efl/c/page11.cpp +++ b/src/examples/efl/c/page11.cpp @@ -47,9 +47,10 @@ view11_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Menu Popup", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page11", NULL, NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page11")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } diff --git a/src/examples/efl/c/page12.cpp b/src/examples/efl/c/page12.cpp index 75d3509..fb1503c 100644 --- a/src/examples/efl/c/page12.cpp +++ b/src/examples/efl/c/page12.cpp @@ -112,14 +112,18 @@ view12_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Popup", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - ui_standard_view_set_content(view, content, "Page12", NULL, NULL, NULL); - //Title Right button right_btn = elm_button_add(base); elm_object_text_set(right_btn, "popup"); evas_object_smart_callback_add(right_btn, "clicked", view12_btn_clicked, view); - ui_standard_view_set_title_right_btn(view, right_btn); + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page12") || + !ui_standard_view_set_title_right_btn(view, right_btn)) + { + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); + return false; + } return true; } diff --git a/src/examples/efl/c/page13.cpp b/src/examples/efl/c/page13.cpp index c3074ac..0ee5dbb 100644 --- a/src/examples/efl/c/page13.cpp +++ b/src/examples/efl/c/page13.cpp @@ -47,7 +47,12 @@ view13_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Fade Transition", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - ui_standard_view_set_content(view, content, "Page13", NULL, NULL, NULL); + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page13")) + { + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); + return false; + } return true; } diff --git a/src/examples/efl/c/page14.cpp b/src/examples/efl/c/page14.cpp index 4d28748..957595b 100644 --- a/src/examples/efl/c/page14.cpp +++ b/src/examples/efl/c/page14.cpp @@ -47,7 +47,12 @@ view14_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
None Transition", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - ui_standard_view_set_content(view, content, "Page14", NULL, NULL, NULL); + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page14")) + { + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); + return false; + } return true; } diff --git a/src/examples/efl/c/page15.cpp b/src/examples/efl/c/page15.cpp index 7fa1748..c672668 100644 --- a/src/examples/efl/c/page15.cpp +++ b/src/examples/efl/c/page15.cpp @@ -41,14 +41,18 @@ view15_load_cb(ui_standard_view *view, void *data) content = create_scrolling_content(base); if (!content) return false; - ui_standard_view_set_content(view, content, "Page 15 Scroller In Viewmgr", NULL, NULL, NULL); - //Title Right button Elm_Button *right_btn = elm_button_add(base); elm_object_text_set(right_btn, "Next"); evas_object_smart_callback_add(right_btn, "clicked", view15_btn_clicked_cb, NULL); - ui_standard_view_set_title_right_btn(view, right_btn); + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page15 Scroller in Viewmgr") || + !ui_standard_view_set_title_right_btn(view, right_btn)) + { + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); + return false; + } return true; } diff --git a/src/examples/efl/c/page16.cpp b/src/examples/efl/c/page16.cpp index 2186d93..0f3e466 100644 --- a/src/examples/efl/c/page16.cpp +++ b/src/examples/efl/c/page16.cpp @@ -75,7 +75,12 @@ view16_load_cb(ui_standard_view *view, void *data) content = create_title_handle_content(base, prev_btn_clicked_cb, next_btn_clicked_cb, title_show_btn_clicked_cb, title_hide_btn_clicked_cb, title_show_anim_btn_clicked_cb, title_hide_anim_btn_clicked_cb, view); if (!content) return false; - ui_standard_view_set_content(view, content, "Page16", NULL, NULL, NULL); + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page16")) + { + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); + return false; + } return true; } diff --git a/src/examples/efl/c/page2.cpp b/src/examples/efl/c/page2.cpp index ad85b4c..8d4cfc1 100644 --- a/src/examples/efl/c/page2.cpp +++ b/src/examples/efl/c/page2.cpp @@ -59,9 +59,12 @@ view2_load_cb(ui_standard_view *view, void *data) const int rots[2] = { 0, 90 }; ui_view_set_available_rotations(view, rots, 2); - if (!ui_standard_view_set_content(view, content, "Page2", NULL, left_title_btn, right_title_btn)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page2") || + !ui_standard_view_set_title_left_btn(view, left_title_btn) || + !ui_standard_view_set_title_right_btn(view, right_title_btn)) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } diff --git a/src/examples/efl/c/page3.cpp b/src/examples/efl/c/page3.cpp index d62dd4e..26c6a2e 100644 --- a/src/examples/efl/c/page3.cpp +++ b/src/examples/efl/c/page3.cpp @@ -47,9 +47,11 @@ view3_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Subtitle", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page3", "Subtitle", NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page3") || + !ui_standard_view_set_sub_title(view, "Subtitle")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } diff --git a/src/examples/efl/c/page4.cpp b/src/examples/efl/c/page4.cpp index 660ffc9..257df8f 100644 --- a/src/examples/efl/c/page4.cpp +++ b/src/examples/efl/c/page4.cpp @@ -47,14 +47,14 @@ view4_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Title Badge", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page4 We put a long title here intentionally", NULL, NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page4 We put a long title here intentionally") || + !ui_standard_view_set_title_badge(view, "999+")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } - ui_standard_view_set_title_badge(view, "999+"); - return true; } diff --git a/src/examples/efl/c/page5.cpp b/src/examples/efl/c/page5.cpp index bac11a9..f8d3101 100644 --- a/src/examples/efl/c/page5.cpp +++ b/src/examples/efl/c/page5.cpp @@ -49,9 +49,10 @@ view5_load_cb(ui_view *view, void *data) if (!ui_view_set_content(view, content)) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } + ui_view_set_indicator(view, UI_VIEW_INDICATOR_HIDE); return true; diff --git a/src/examples/efl/c/page6.cpp b/src/examples/efl/c/page6.cpp index a527636..7ce473e 100644 --- a/src/examples/efl/c/page6.cpp +++ b/src/examples/efl/c/page6.cpp @@ -47,15 +47,17 @@ view6_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Toolbar", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page6", NULL, NULL, NULL)) + Elm_Toolbar *toolbar = create_toolbar(base, "toolbar_with_title"); + if (!toolbar) return false; + + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page6") || + !ui_standard_view_set_toolbar(view, toolbar)) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } - Elm_Toolbar *toolbar = create_toolbar(base, "toolbar_with_title"); - if (toolbar) ui_standard_view_set_toolbar(view, toolbar); - return true; } diff --git a/src/examples/efl/c/page7.cpp b/src/examples/efl/c/page7.cpp index 7072d38..30195c1 100644 --- a/src/examples/efl/c/page7.cpp +++ b/src/examples/efl/c/page7.cpp @@ -47,15 +47,17 @@ view7_load_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Navigationbar", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page7", NULL, NULL, NULL)) + Elm_Toolbar *toolbar = create_toolbar(base, "navigationbar"); + if (!toolbar) return false; + + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page7") || + !ui_standard_view_set_toolbar(view, toolbar)) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } - Elm_Toolbar *toolbar = create_toolbar(base, "navigationbar"); - if (toolbar) ui_standard_view_set_toolbar(view, toolbar); - return true; } diff --git a/src/examples/efl/c/page8.cpp b/src/examples/efl/c/page8.cpp index 4f0d351..6089ed4 100644 --- a/src/examples/efl/c/page8.cpp +++ b/src/examples/efl/c/page8.cpp @@ -61,9 +61,10 @@ create_page8() return; } - if (!ui_standard_view_set_content(view, content, "Page8", NULL, NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page8")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); ui_view_destroy(view); return; } diff --git a/src/examples/efl/c/page9.cpp b/src/examples/efl/c/page9.cpp index 4f865e0..44ee940 100644 --- a/src/examples/efl/c/page9.cpp +++ b/src/examples/efl/c/page9.cpp @@ -47,9 +47,10 @@ view9_portrait_cb(ui_standard_view *view, void *data) content = create_content(base, "ViewMgr Demo
Portrait/Landscape", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page9", NULL, NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page9")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } @@ -74,9 +75,10 @@ view9_landscape_cb(ui_standard_view *view, void *data) content = create_landscape_content(base, "ViewMgr Demo
Portrait/Landscape", prev_btn_clicked_cb, next_btn_clicked_cb); if (!content) return false; - if (!ui_standard_view_set_content(view, content, "Page9", NULL, NULL, NULL)) + if (!ui_view_set_content(view, content) || + !ui_standard_view_set_title(view, "Page9")) { - dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view content"); + dlog_print(DLOG_ERROR, LOG_TAG, "failed to set view property"); return false; } diff --git a/src/examples/efl/cpp/page1.h b/src/examples/efl/cpp/page1.h index 0619f5f..e24e775 100644 --- a/src/examples/efl/cpp/page1.h +++ b/src/examples/efl/cpp/page1.h @@ -38,7 +38,10 @@ protected: { UI_VIEWMGR->pushView(new page2()); }); - this->setContent(content, "Page1"); + + //Set title text, content + this->setTitle("Page1"); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page10.h b/src/examples/efl/cpp/page10.h index 99e4cbb..08bd835 100644 --- a/src/examples/efl/cpp/page10.h +++ b/src/examples/efl/cpp/page10.h @@ -46,7 +46,9 @@ protected: UI_VIEWMGR->pushView(new page11()); }); - this->setContent(content, "Page 10"); + //Set title text, content, indicator property + this->setTitle("Page10"); + this->setContent(content); this->setIndicator(UI_VIEW_INDICATOR_DEFAULT); } else { //Landscape @@ -62,7 +64,9 @@ protected: UI_VIEWMGR->pushView(new page11()); }); - this->setContent(content, "Page 10"); + //Set title text, content, indicator property + this->setTitle("Page10"); + this->setContent(content); this->setIndicator(UI_VIEW_INDICATOR_OPTIMAL); } } diff --git a/src/examples/efl/cpp/page11.h b/src/examples/efl/cpp/page11.h index 9ec17bf..535160f 100644 --- a/src/examples/efl/cpp/page11.h +++ b/src/examples/efl/cpp/page11.h @@ -46,7 +46,9 @@ protected: UI_VIEWMGR->pushView(new page12()); }); - this->setContent(content, "Page11"); + //Set title text, content + this->setTitle("Page11"); + this->setContent(content); } void onMenu(UiMenu *menu) diff --git a/src/examples/efl/cpp/page12.h b/src/examples/efl/cpp/page12.h index ae57895..af54b5e 100644 --- a/src/examples/efl/cpp/page12.h +++ b/src/examples/efl/cpp/page12.h @@ -47,8 +47,6 @@ protected: UI_VIEWMGR->pushView(new page13()); }); - this->setContent(content, "Page12"); - //Title Right button Elm_Button *rightBtn = elm_button_add(this->getBase()); elm_object_text_set(rightBtn, "popup"); @@ -60,6 +58,9 @@ protected: }, this); + //Set title text, right button, content + this->setTitle("Page12"); + this->setContent(content); this->setTitleRightBtn(rightBtn); } diff --git a/src/examples/efl/cpp/page13.h b/src/examples/efl/cpp/page13.h index a8ad761..58cc934 100644 --- a/src/examples/efl/cpp/page13.h +++ b/src/examples/efl/cpp/page13.h @@ -40,7 +40,9 @@ protected: UI_VIEWMGR->pushView(new page14()); }); - this->setContent(content, "Page13"); + //Set title text, content + this->setTitle("Page13"); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page14.h b/src/examples/efl/cpp/page14.h index e279f9a..5f73807 100644 --- a/src/examples/efl/cpp/page14.h +++ b/src/examples/efl/cpp/page14.h @@ -40,7 +40,9 @@ protected: UI_VIEWMGR->pushView(new page15()); }); - this->setContent(content, "Page14"); + //Set title text, right button, content + this->setTitle("Page14"); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page15.h b/src/examples/efl/cpp/page15.h index 0eb8db9..35d081d 100644 --- a/src/examples/efl/cpp/page15.h +++ b/src/examples/efl/cpp/page15.h @@ -29,8 +29,6 @@ protected: //Create a main content. Evas_Object *content = createScrollingContent(this->getBase()); - this->setContent(content, "Page15 Scroller In Viewmgr"); - //Title Right button Elm_Button *rightBtn = elm_button_add(this->getBase()); elm_object_text_set(rightBtn, "Next"); @@ -41,6 +39,9 @@ protected: }, this); + //Set title text, right button, content + this->setTitle("Page15 Scroller In Viewmgr"); + this->setContent(content); this->setTitleRightBtn(rightBtn); } diff --git a/src/examples/efl/cpp/page16.h b/src/examples/efl/cpp/page16.h index a89d2cb..f4e7a20 100644 --- a/src/examples/efl/cpp/page16.h +++ b/src/examples/efl/cpp/page16.h @@ -62,7 +62,9 @@ protected: view->setTitleVisible(false, true); }, this); - this->setContent(content, "Page16"); + //Set title text, content + this->setTitle("Page16"); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page2.h b/src/examples/efl/cpp/page2.h index e1c1c31..bb9695c 100644 --- a/src/examples/efl/cpp/page2.h +++ b/src/examples/efl/cpp/page2.h @@ -50,8 +50,11 @@ protected: const int rots[2] = { 0, 90 }; this->setAvailableRotations(rots, 2); - //Arguments: content, title, subtitle, title left button, title right button - this->setContent(content, "Page2", NULL, leftTitleBtn, rightTitleBtn); + //Set title text, left/right buttons, content + this->setTitle("Page2"); + this->setTitleLeftBtn(leftTitleBtn); + this->setTitleRightBtn(rightTitleBtn); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page3.h b/src/examples/efl/cpp/page3.h index 766ceb9..05c0345 100644 --- a/src/examples/efl/cpp/page3.h +++ b/src/examples/efl/cpp/page3.h @@ -38,8 +38,10 @@ protected: UI_VIEWMGR->pushView(new page4()); }); - //Arguments: content, title, subtitle, title left button, title right button - this->setContent(content, "Page3", "Subtitle", NULL, NULL); + //Set title text, subtitle text, content + this->setTitle("Page3"); + this->setSubtitle("subtitle"); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page4.h b/src/examples/efl/cpp/page4.h index 174373a..bd5e894 100644 --- a/src/examples/efl/cpp/page4.h +++ b/src/examples/efl/cpp/page4.h @@ -39,9 +39,10 @@ protected: UI_VIEWMGR->pushView(new page5()); }); - //Arguments: content, title - this->setContent(content, "Page4. We put a long title here intentionally"); + //Set title text, badge text, content + this->setTitle("Page4. We put a long title here intentionally"); this->setTitleBadge("999+"); + this->setContent(content); } public: diff --git a/src/examples/efl/cpp/page5.h b/src/examples/efl/cpp/page5.h index 95492e3..4cc5a55 100644 --- a/src/examples/efl/cpp/page5.h +++ b/src/examples/efl/cpp/page5.h @@ -38,6 +38,7 @@ protected: UI_VIEWMGR->pushView(new page6()); }); + //Set content, indicator property this->setContent(content); this->setIndicator(UI_VIEW_INDICATOR_HIDE); } diff --git a/src/examples/efl/cpp/page6.h b/src/examples/efl/cpp/page6.h index 1a273a6..befcdec 100644 --- a/src/examples/efl/cpp/page6.h +++ b/src/examples/efl/cpp/page6.h @@ -37,9 +37,11 @@ protected: UI_VIEWMGR->pushView(new page7()); }); - //Arguments: content, title - this->setContent(content, "Page6"); Elm_Toolbar *toolbar = createToolbar(this->getBase(), "toolbar_with_title"); + + //Set title text, content, toolbar + this->setTitle("Page6"); + this->setContent(content); this->setToolbar(toolbar); } diff --git a/src/examples/efl/cpp/page7.h b/src/examples/efl/cpp/page7.h index 460d638..8a87f3f 100644 --- a/src/examples/efl/cpp/page7.h +++ b/src/examples/efl/cpp/page7.h @@ -37,9 +37,11 @@ protected: UI_VIEWMGR->pushView(new page8()); }); - //Arguments: content, title - this->setContent(content, "Page7"); Elm_Toolbar *toolbar = createToolbar(this->getBase(), "navigationbar"); + + //Set title text, content, toolbar + this->setTitle("Page7"); + this->setContent(content); this->setToolbar(toolbar); } public: diff --git a/src/examples/efl/cpp/page8.h b/src/examples/efl/cpp/page8.h index 52c6580..3677cae 100644 --- a/src/examples/efl/cpp/page8.h +++ b/src/examples/efl/cpp/page8.h @@ -35,7 +35,9 @@ public: UI_VIEWMGR->pushView(new page9()); }); - this->setContent(content, "Page 8"); + //Set title text, content + this->setTitle("Page8"); + this->setContent(content); //Don't delete view's content when this view popped. //This is a show case for saving this content for reuse later. diff --git a/src/examples/efl/cpp/page9.h b/src/examples/efl/cpp/page9.h index 26eefd7..14a4396 100644 --- a/src/examples/efl/cpp/page9.h +++ b/src/examples/efl/cpp/page9.h @@ -48,7 +48,9 @@ protected: UI_VIEWMGR->pushView(new page10()); }); - this->setContent(content, "Page 9"); + //Set title text, content, indicator property + this->setTitle("Page9"); + this->setContent(content); this->setIndicator(UI_VIEW_INDICATOR_DEFAULT); } @@ -68,7 +70,9 @@ protected: UI_VIEWMGR->pushView(new page10()); }); - this->setContent(content, "Page 9"); + //Set title text, content, indicator property + this->setTitle("Page9"); + this->setContent(content); this->setIndicator(UI_VIEW_INDICATOR_OPTIMAL); } diff --git a/src/include/efl/mobile/UiStandardView.h b/src/include/efl/mobile/UiStandardView.h index 673e69c..98b2d8b 100644 --- a/src/include/efl/mobile/UiStandardView.h +++ b/src/include/efl/mobile/UiStandardView.h @@ -54,20 +54,7 @@ public: * * @return @c true if it succeeds, @c false otherwise. */ - bool setContent(Evas_Object *content, const char *title = NULL); - - /** - * @brief Replace or set a content of the view. - * - * @param content A new content. It allows @c NULL for canceling the previous content. - * @param title The label in the title area. The name of the title label part is "elm.text.title". - * @param subtitle The label in the subtitle area. The name of the subtitle label part is "elm.text.subtitle". - * @param title_left_btn The button in the left part of title area. - * @param title_right_btn The button in the right part of title area. - * - * @return @c true if it succeeds, @c false otherwise. - */ - bool setContent(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *titleLeftBtn, Elm_Button *titleRightBtn); + bool setContent(Evas_Object *content); /** * @brief Set a title badge text. diff --git a/src/include/efl/mobile/c/ui_standard_view.h b/src/include/efl/mobile/c/ui_standard_view.h index 82b77a0..14e7f64 100644 --- a/src/include/efl/mobile/c/ui_standard_view.h +++ b/src/include/efl/mobile/c/ui_standard_view.h @@ -24,22 +24,6 @@ extern "C" { */ EAPI ui_standard_view *ui_standard_view_create(const char *name); -/** - * @brief Replace or set a content of the view. - * - * @param view An ui_standard_view instance. - * @param content A new content. It allows @c NULL for canceling the previous content. - * @param title The label in the title area. The name of the title label part is "elm.text.title". - * @param subtitle The label in the subtitle area. The name of the subtitle label part is "elm.text.subtitle". - * @param title_left_btn The button in the left part of title area. - * @param title_right_btn The button in the right part of title area. - * - * @return @c true if it succeeds, @c false otherwise. - * - * @see ui_view_content_get() - */ -EAPI bool ui_standard_view_set_content(ui_standard_view *view, Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn, Evas_Object *title_right_btn); - /** * @brief Set a title text. * diff --git a/src/lib/efl/mobile/UiStandardView.cpp b/src/lib/efl/mobile/UiStandardView.cpp index ca608e6..5aedd37 100644 --- a/src/lib/efl/mobile/UiStandardView.cpp +++ b/src/lib/efl/mobile/UiStandardView.cpp @@ -45,8 +45,7 @@ public: explicit UiStandardViewImpl(UiStandardView *view); ~UiStandardViewImpl(); - bool setContent(Evas_Object *content, const char *title = NULL); - bool setContent(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *titleLeftBtn, Elm_Button *titleRightBtn); + bool setContent(Evas_Object *content); bool setTitleBadge(const char *text); bool setSubtitle(const char *text); bool setTitleLeftBtn(Elm_Button *titleLeftBtn); @@ -171,7 +170,7 @@ UiStandardViewImpl::~UiStandardViewImpl() _destroyLayout(); } -bool UiStandardViewImpl::setContent(Evas_Object *content, const char *title) +bool UiStandardViewImpl::setContent(Evas_Object *content) { Elm_Layout *layout = this->getBase(); LAYOUT_VALIDATE(); @@ -185,8 +184,6 @@ bool UiStandardViewImpl::setContent(Evas_Object *content, const char *title) elm_object_signal_emit(layout, "elm.state,elm.swallow.content,hide", "viewmgr"); } - this->setTitle(title); - return true; } @@ -449,11 +446,11 @@ void UiStandardView::onUnload() evas_object_hide(layout); } -bool UiStandardView::setContent(Evas_Object *content, const char *title) +bool UiStandardView::setContent(Evas_Object *content) { UiView::setContent(content); - return this->_impl->setContent(content, title); + return this->_impl->setContent(content); } bool UiStandardView::setSubtitle(const char *text) @@ -481,16 +478,6 @@ bool UiStandardView::setTitle(const char *text) return this->_impl->setTitle(text); } -bool UiStandardView::setContent(Evas_Object *content, const char *title, const char *subtitle, Elm_Button *titleLeftBtn, Elm_Button *titleRightBtn) -{ - if (!this->setContent(content, title)) return false; - if (!this->setSubtitle(subtitle)) return false; - if (!this->setTitleLeftBtn(titleLeftBtn)) return false; - if (!this->setTitleRightBtn(titleRightBtn)) return false; - - return true; -} - bool UiStandardView::setToolbar(Elm_Toolbar *toolbar) { return this->_impl->setToolbar(toolbar); diff --git a/src/lib/efl/mobile/c/ui_standard_view.cpp b/src/lib/efl/mobile/c/ui_standard_view.cpp index 53d6ecf..aa6881d 100644 --- a/src/lib/efl/mobile/c/ui_standard_view.cpp +++ b/src/lib/efl/mobile/c/ui_standard_view.cpp @@ -154,14 +154,6 @@ EAPI ui_standard_view* ui_standard_view_create(const char *name) return new ui_standard_view_capi(name); } -EAPI bool ui_standard_view_set_content(ui_standard_view *view, Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn, - Evas_Object *title_right_btn) -{ - ui_standard_view_capi *capi_view; - if (!(capi_view = validate_view(view))) return false; - return capi_view->setContent(content, title, subtitle, title_left_btn, title_right_btn); -} - EAPI bool ui_standard_view_set_title(ui_standard_view *view, const char *text) { ui_standard_view_capi *capi_view;