TizenRefApp-8393 [Gallery] Implement PageContent 00/125300/1
authorIgor Nazarov <i.nazarov@samsung.com>
Fri, 14 Apr 2017 14:06:35 +0000 (17:06 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Fri, 14 Apr 2017 14:06:35 +0000 (17:06 +0300)
- Implemented PageContent class;
- UCL refactoring (renaming).

Change-Id: Ib69a034e176e1be634c4546e00e2612a34e47784

24 files changed:
edc/layouts.edc [new file with mode: 0644]
inc/view/ImageGrid.h
inc/view/ImageViewer.h
inc/view/PageContent.h [new file with mode: 0644]
inc/view/types.h
res/edje/theme.edc
src/presenters/NoContentPage.cpp
src/presenters/Page.cpp
src/view/ImageGrid.cpp
src/view/ImageViewer.cpp
src/view/PageContent.cpp [new file with mode: 0644]
ucl/inc/ucl/gui/EdjeWidget.h
ucl/inc/ucl/gui/EdjeWidget.hpp
ucl/inc/ucl/gui/Layout.h
ucl/inc/ucl/gui/Layout.hpp
ucl/inc/ucl/gui/Widget.h
ucl/inc/ucl/gui/Widget.hpp
ucl/inc/ucl/gui/WidgetItem.h
ucl/inc/ucl/gui/WidgetItem.hpp
ucl/inc/ucl/gui/stdTheme/common.h
ucl/src/gui/EdjeWidget.cpp
ucl/src/gui/Layout.cpp
ucl/src/gui/Naviframe.cpp
ucl/src/gui/WidgetItem.cpp

diff --git a/edc/layouts.edc b/edc/layouts.edc
new file mode 100644 (file)
index 0000000..c321322
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group { "elm/layout/gallery/more_option";
+   parts {
+      swallow { "elm.swallow.content";
+         desc { "default";
+         }
+      }
+      swallow { "gallery.swallow.more_option";
+         desc { "default";
+         }
+      }
+   }
+}
index c707646c438b2a71e70e1e0564efbf5f2d34a71e..92fe0345b88b2c0e0de27197869bdf614927eb00 100644 (file)
@@ -25,7 +25,7 @@
 
 namespace gallery {
 
-       class ImageGrid : public ucl::Widget {
+       class ImageGrid : public ucl::ElmWidget {
        public:
                enum class Type {
                        HCOMB_3X3,
index 024dffb9e54d795fdbdc97f43174cc9f40766dd1..3182ae7ccc6d4719c27d15d777a1c7b8f4592071 100644 (file)
@@ -26,7 +26,7 @@ namespace gallery {
 
        constexpr ucl::SmartEvent IMAGE_VIEWER_ZOOM_END {"gallery,zoom,end"};
 
-       class ImageViewer final : public ucl::Widget {
+       class ImageViewer final : public ucl::ElmWidget {
        public:
                class Builder {
                public:
diff --git a/inc/view/PageContent.h b/inc/view/PageContent.h
new file mode 100644 (file)
index 0000000..5f7bfc2
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GALLERY_VIEW_PAGE_CONTENT_H__
+#define __GALLERY_VIEW_PAGE_CONTENT_H__
+
+#include "ucl/gui/Layout.h"
+
+#include "types.h"
+
+namespace gallery {
+
+       class PageContent : public ucl::ElmWidget {
+       public:
+               class Builder {
+               public:
+                       Builder();
+                       Builder &setFlags(int flags);
+                       PageContentSRef build(ucl::Widget &parent) const;
+               private:
+                       int m_flags;
+               };
+
+               enum {
+                       FLAG_MORE_OPTION = 1,
+                       FLAG_SELECT_BUTTON = 2,
+                       FLAG_BOTTOM_BUTTON = 4,
+
+                       FLAGS_SELECT_MODE = (FLAG_SELECT_BUTTON | FLAG_BOTTOM_BUTTON),
+                       FLAGS_ALL = (FLAG_MORE_OPTION | FLAGS_SELECT_MODE)
+               };
+
+               enum class Part {
+                       DEFAULT,
+                       MORE_OPTION,
+                       SELECT_BUTTON,
+                       BOTTOM_BUTTON
+               };
+
+       public:
+               ucl::Result set(Evas_Object *eo, Part part = Part::DEFAULT);
+               Evas_Object *unset(Part part = Part::DEFAULT);
+
+               Evas_Object *get(Part part = Part::DEFAULT) const;
+
+               ucl::Result setSelectButtonVisible(bool visible);
+               ucl::Result setMoreOptionVisible(bool visible);
+
+       private:
+               friend class ucl::RefCountObj<PageContent>;
+               PageContent(ucl::RefCountObjBase &rc,
+                               const ucl::LayoutSRef &layout, int flags);
+               virtual ~PageContent();
+
+               void prepare(int flags);
+
+               template <class FUNC>
+               ucl::Result doWithPart(Part part, FUNC &&func) const;
+
+               ucl::Layout *getTopLayout() const;
+
+       private:
+               ucl::LayoutWRef m_moreOption;
+               ucl::LayoutSRef m_selectMode;
+               ucl::LayoutSRef m_bottomButton;
+       };
+}
+
+#endif // __GALLERY_VIEW_PAGE_CONTENT_H__
index 996f843954421f9327c79e696799a87270f281bf..461f3fcca0fbbe911f13fc719d1abfd6f0cbd15d 100644 (file)
@@ -25,6 +25,8 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(TouchParser);
 
+       UCL_DECLARE_REF_ALIASES(PageContent);
+
        UCL_DECLARE_REF_ALIASES(ImageGrid);
        UCL_DECLARE_REF_ALIASES(ImageViewer);
 }
index c54fad30f187fc381d9fae5ab3b3f4a7bb55f46f..9b86c7b675e8a7a5af76751df3759859e05d4a40 100644 (file)
@@ -29,4 +29,5 @@ collections {
    #include "../../edc/images.edc"
    #include "../../edc/image-grid.edc"
    #include "../../edc/button.edc"
+   #include "../../edc/layouts.edc"
 }
index 7cb27935f9bc574f779c11bad30af59acc7566fa..4ce2e5524a1a89e4375cf9cd5bbe575193371026 100644 (file)
@@ -99,7 +99,7 @@ namespace gallery {
                }
 
                layout->setContent(*icon);
-               layout->setText(PART_TITLE, STR_APP_NAME);
+               layout->setText(STR_APP_NAME, PART_TITLE);
                layout->setText(STR_NO_PHOTOS);
 
                FAIL_RETURN(Page::prepare(
index 7479a1840c76a4dd978dd73290ff9aea710d1c0f..9966d6689db0c4f5e5bd001589b87f44e0f2604a 100644 (file)
@@ -77,7 +77,7 @@ namespace gallery {
 
        void Page::dispatchTopPageChanged()
        {
-               m_navi->callSmartEvent(impl::TOP_PAGE_CHANGED, nullptr);
+               m_navi->callEvent(impl::TOP_PAGE_CHANGED, nullptr);
        }
 
        void Page::onItemDel(Evas_Object *obj, void *eventInfo)
index 1f792a18f10cb00fc94e70ea15f19197c665952b..a481b407b2825949866fa5eec1bb812d3b5f6f92 100644 (file)
@@ -334,11 +334,11 @@ namespace gallery {
                                if (params.flags & UF_BLOCK_CLICKS) {
                                        if (!m_isClicksBlocked) {
                                                m_isClicksBlocked = true;
-                                               m_btn.emitSignal(impl::BTN_BLOCK_CLICKS);
+                                               m_btn.emit(impl::BTN_BLOCK_CLICKS);
                                        }
                                } else if (m_isClicksBlocked) {
                                        m_isClicksBlocked = false;
-                                       m_btn.emitSignal(impl::BTN_UNBLOCK_CLICKS);
+                                       m_btn.emit(impl::BTN_UNBLOCK_CLICKS);
                                }
                        }
 
@@ -371,7 +371,7 @@ namespace gallery {
                                                        evas_object_image_filled_add(m_btn.getEvas()));
                                        evas_object_image_load_size_set(*m_bgImage,
                                                        m_imageLoadSize, m_imageLoadSize);
-                                       m_btn.setContent(impl::BTN_PART_BG, *m_bgImage);
+                                       m_btn.setContent(*m_bgImage, impl::BTN_PART_BG);
                                        show(*m_bgImage);
                                }
 
@@ -435,7 +435,7 @@ namespace gallery {
                                if (!m_layout.setTheme(m_info.slotThemes[isOdd])) {
                                        ELOG("setTheme() failed!");
                                } else if (imageGrid.m_isInSelectMode) {
-                                       m_layout.emitSignal(impl::SIGNAL_FORCE_SELECT_MODE);
+                                       m_layout.emit(impl::SIGNAL_FORCE_SELECT_MODE);
                                }
                        }
                        fill(m_layout);
@@ -446,8 +446,8 @@ namespace gallery {
                                m_items.emplace_back(makeShared<Item>(imageGrid, m_layout));
 
                                const auto partName = impl::SLOT_PART_FMT.format(i);
-                               m_layout.setContent(EdjePart(partName.c_str()),
-                                               m_items.back()->getWidget());
+                               m_layout.setContent(m_items.back()->getWidget(),
+                                               EdjePart(partName.c_str()));
                        }
                }
 
@@ -523,7 +523,7 @@ namespace gallery {
                        const auto signalName = (selected ?
                                        impl::SIGNAL_SELECT_ITEM_FMT.format(itemOffset) :
                                        impl::SIGNAL_UNSELECT_ITEM_FMT.format(itemOffset));
-                       m_layout.emitSignal(EdjeSignal(signalName.c_str()));
+                       m_layout.emit(EdjeSignal(signalName.c_str()));
                }
 
        private:
@@ -550,7 +550,7 @@ namespace gallery {
 
        ImageGrid::ImageGrid(RefCountObjBase *const rc, Evas_Object *const scroller,
                        const Type type, const bool selectModeStartup) :
-               Widget(rc, scroller, true),
+               ElmWidget(rc, scroller, true),
                m_info(getInfo(type)),
 
                m_scroller(makeShared<StyledWidget>(scroller)),
@@ -753,7 +753,7 @@ namespace gallery {
                                impl::SIGNAL_ENABLE_SELECT_MODE :
                                impl::SIGNAL_DISABLE_SELECT_MODE);
                for (auto &slot: m_slots) {
-                       slot->getLayout().emitSignal(aSignal);
+                       slot->getLayout().emit(aSignal);
                }
 
                m_animator = ecore_animator_add(
index 4cfccf4196a8d7bc743d9f41570f07d2f75edb1b..9f3896246da72cbe3878645b814f3dfdcd24f7fa 100644 (file)
@@ -64,7 +64,7 @@ namespace gallery {
        ImageViewer::ImageViewer(RefCountObjBase &rc,
                        const int imageW, const int imageH,
                        Evas_Object *const scroller) :
-               Widget(&rc, scroller, true),
+               ElmWidget(&rc, scroller, true),
                m_imageW(imageW),
                m_imageH(imageH),
 
@@ -354,7 +354,7 @@ namespace gallery {
                                m_state = State::ZOOMED_OUT;
                                elm_object_scroll_freeze_push(*m_scroller);
                        }
-                       callSmartEvent(IMAGE_VIEWER_ZOOM_END, nullptr);
+                       callEvent(IMAGE_VIEWER_ZOOM_END, nullptr);
                        return ECORE_CALLBACK_CANCEL;
                }
 
diff --git a/src/view/PageContent.cpp b/src/view/PageContent.cpp
new file mode 100644 (file)
index 0000000..f3e9c69
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "view/PageContent.h"
+
+#include "common.h"
+
+namespace gallery { namespace { namespace impl {
+
+       using namespace ucl;
+
+       constexpr LayoutTheme LAYOUT_MORE_OPTION
+                       {"layout", "gallery", "more_option"};
+
+       constexpr LayoutTheme LAYOUT_SELECT_MODE
+                       {"layout", "select_mode", "default"};
+
+       constexpr LayoutTheme LAYOUT_BOTTOM_BUTTON
+                       {"layout", "bottom_button", "default"};
+
+       constexpr EdjePart PART_MORE_OPTION {"gallery.swallow.more_option"};
+
+       constexpr EdjeSignal SIGNAL_SHOW_SELECT_BUTTON {"select_mode,button,show"};
+       constexpr EdjeSignal SIGNAL_HIDE_SELECT_BUTTON {"select_mode,button,hide"};
+
+       constexpr EdjeSignal SIGNAL_SHOW_MORE_OPTION {"cue,show"};
+       constexpr EdjeSignal SIGNAL_HIDE_MORE_OPTION {"cue,hide"};
+       constexpr EdjeSignalSrc SIGNAL_SRC_EXT {"ext"};
+
+       template <class OBJ, class FUNC, class ...ARGS>
+       Result callSafe(OBJ *obj, FUNC &&func, ARGS &&...args)
+       {
+               if (!obj) {
+                       FAIL_RETURN(RES_FAIL, "obj is NULL!");
+               }
+               func(*obj, std::forward<ARGS>(args)...);
+               return RES_OK;
+       }
+}}}
+
+namespace gallery {
+
+       using namespace ucl;
+
+       // PageContent::Builder //
+
+       PageContent::Builder::Builder() :
+               m_flags(0)
+       {
+       }
+
+       PageContent::Builder &PageContent::Builder::setFlags(const int flags)
+       {
+               m_flags = flags;
+               return *this;
+       }
+
+       PageContentSRef PageContent::Builder::build(Widget &parent) const
+       {
+               auto layout = Layout::Builder().
+                               setTheme(impl::LAYOUT_MORE_OPTION).
+                               setIsOwner(true).
+                               build(parent);
+               if (!layout) {
+                       LOG_RETURN_VALUE(RES_FAIL, {}, "Layout::build() failed!");
+               }
+
+               auto result = makeShared<PageContent>(layout, m_flags);
+
+               result->bindToEo();
+
+               return result;
+       }
+
+       // PageContent //
+
+       PageContent::PageContent(RefCountObjBase &rc,
+                       const ucl::LayoutSRef &layout, const int flags) :
+               ElmWidget(&rc, *layout, true),
+               m_moreOption(layout)
+       {
+               prepare(flags);
+       }
+
+       PageContent::~PageContent()
+       {
+       }
+
+       void PageContent::prepare(const int flags)
+       {
+               m_moreOption->setIsOwner(false);
+
+               LayoutSRef parent = m_moreOption;
+
+               if (flags & FLAG_SELECT_BUTTON) {
+                       m_selectMode = Layout::Builder().
+                               setTheme(impl::LAYOUT_SELECT_MODE).
+                               build(*parent);
+                       parent->setContent(*m_selectMode);
+                       parent = m_selectMode;
+               }
+
+               if (flags & FLAG_BOTTOM_BUTTON) {
+                       m_bottomButton = Layout::Builder().
+                               setTheme(impl::LAYOUT_BOTTOM_BUTTON).
+                               build(*parent);
+                       parent->setContent(*m_bottomButton);
+                       parent = m_bottomButton;
+               }
+       }
+
+       Result PageContent::set(Evas_Object *const eo, const Part part)
+       {
+               return doWithPart(part,
+                       [eo](Layout &layout, const EdjePart part)
+                       {
+                               layout.setContent(eo, part);
+                       });
+       }
+
+       Evas_Object *PageContent::unset(const Part part)
+       {
+               Evas_Object *result = {};
+               doWithPart(part,
+                       [&result](Layout &layout, const EdjePart part)
+                       {
+                               result = layout.unsetContent(part);
+                       });
+               return result;
+       }
+
+       Evas_Object *PageContent::get(const Part part) const
+       {
+               Evas_Object *result = {};
+               doWithPart(part,
+                       [&result](Layout &layout, const EdjePart part)
+                       {
+                               result = layout.getContent(part);
+                       });
+               return result;
+       }
+
+       Result PageContent::setSelectButtonVisible(const bool visible)
+       {
+               if (!m_selectMode) {
+                       LOG_RETURN(RES_FAIL, "Select button is not supported!");
+               }
+               m_selectMode->emit(visible ? impl::SIGNAL_SHOW_SELECT_BUTTON :
+                               impl::SIGNAL_HIDE_SELECT_BUTTON);
+               return RES_OK;
+       }
+
+       Result PageContent::setMoreOptionVisible(const bool visible)
+       {
+               if (!m_moreOption) {
+                       LOG_RETURN(RES_FAIL, "More option is not supported!");
+               }
+               const auto content = m_moreOption->getContent(impl::PART_MORE_OPTION);
+               if (!content) {
+                       LOG_RETURN(RES_FAIL, "More option is not created!");
+               }
+               elm_layout_signal_emit(content, (visible ?
+                               impl::SIGNAL_SHOW_MORE_OPTION : impl::SIGNAL_HIDE_MORE_OPTION),
+                               impl::SIGNAL_SRC_EXT);
+               return RES_OK;
+       }
+
+       template <class FUNC>
+       Result PageContent::doWithPart(const Part part, FUNC &&func) const
+       {
+               switch (part) {
+               case Part::DEFAULT:
+                       return impl::callSafe(getTopLayout(), func, PART_CONTENT);
+               case Part::MORE_OPTION:
+                       return impl::callSafe(m_moreOption.get(), func,
+                                       impl::PART_MORE_OPTION);
+               case Part::SELECT_BUTTON:
+                       return impl::callSafe(m_selectMode.get(), func, PART_ICON);
+               case Part::BOTTOM_BUTTON:
+                       return impl::callSafe(m_bottomButton.get(), func, PART_BUTTON);
+               }
+               LOG_RETURN(RES_FATAL, "Should not be here!");
+       }
+
+       Layout *PageContent::getTopLayout() const
+       {
+               if (m_bottomButton) {
+                       return m_bottomButton.get();
+               }
+               if (m_selectMode) {
+                       return m_selectMode.get();
+               }
+               return m_moreOption.get();
+       }
+}
index ee3313d8778c6f9a060c1efb1de5ce408a1a8e10..8d20b50ab17e3f54e70f97e84452785d2ee210b3 100644 (file)
@@ -26,20 +26,20 @@ namespace ucl {
        class EdjeWidget : public ElmWidget {
        public:
                void setText(const TString &value);
-               void setText(EdjePart part, const TString &value);
+               void setText(const TString &value, EdjePart part);
 
                TString getText() const;
                TString getText(EdjePart part) const;
 
                void setContent(Evas_Object *content);
-               void setContent(EdjePart part, Evas_Object *content);
+               void setContent(Evas_Object *content, EdjePart part);
                Evas_Object *unsetContent();
                Evas_Object *unsetContent(EdjePart part);
 
                Evas_Object *getContent() const;
                Evas_Object *getContent(EdjePart part) const;
 
-               void emitSignal(EdjeSignal signal, EdjeSignalSrc source =
+               void emit(EdjeSignal signal, EdjeSignalSrc source =
                                EdjeSignalSrc(""));
 
        protected:
index bb539619b8fd0be3f7fc7b9faeefff39f664e9aa..5197f592f690d080f8d695f2f1ddb0ea99294cdd 100644 (file)
@@ -37,8 +37,8 @@ namespace ucl {
                elm_object_content_set(getEo(), content);
        }
 
-       inline void EdjeWidget::setContent(const EdjePart part,
-                       Evas_Object *const content)
+       inline void EdjeWidget::setContent(Evas_Object *const content,
+                       const EdjePart part)
        {
                elm_object_part_content_set(getEo(), part.name, content);
        }
@@ -63,7 +63,7 @@ namespace ucl {
                return elm_object_part_content_get(getEo(), part.name);
        }
 
-       inline void EdjeWidget::emitSignal(const EdjeSignal signal,
+       inline void EdjeWidget::emit(const EdjeSignal signal,
                        const EdjeSignalSrc source)
        {
                elm_object_signal_emit(getEo(), signal.name, source.name);
index dfe8aad08be5cfa0739d5adbecf0bf58ee3b14f9..0df33ab2e52d226008d334ba9812ef5148663eca 100644 (file)
@@ -49,7 +49,7 @@ namespace ucl {
                bool setTheme(const LayoutTheme &theme);
                bool setEdjeFile(const std::string &filePath, EdjeGroup group);
 
-               Variant getEdjeData(EdjeDataKey key);
+               Variant getData(EdjeDataKey key);
        };
 }
 
index 13f7d686db47965263da118074d9a5b48a2c4371..e3df1dbbf69d4379e333f26282aac08fb16bcd57 100644 (file)
@@ -69,7 +69,7 @@ namespace ucl {
                return elm_layout_file_set(getEo(), filePath.c_str(), group.name);
        }
 
-       inline Variant Layout::getEdjeData(EdjeDataKey key)
+       inline Variant Layout::getData(EdjeDataKey key)
        {
                return elm_layout_data_get(getEo(), key);
        }
index 27ef0e671875bdef53c8b27d96c9d8a79fabc052..6c7b8e9568958187f7d111df14dd826f530c8b6e 100644 (file)
@@ -59,7 +59,7 @@ namespace ucl {
                void delEventHandler(WidgetEvent event, WidgetEventHandler handler);
                void delEventHandler(SmartEvent event, WidgetEventHandler handler);
 
-               void callSmartEvent(SmartEvent event, void *eventInfo = nullptr);
+               void callEvent(SmartEvent event, void *eventInfo = nullptr);
 
                void markForDeletion();
 
index 1e4a648e8a84b501e0c59aa4a352134d7b7a5a8a..8e623000c3fac1a06b67b08959e1dff89e000b81 100644 (file)
@@ -74,7 +74,7 @@ namespace ucl {
                return evas_object_data_get(getEo(), key.name);
        }
 
-       inline void Widget::callSmartEvent(SmartEvent event, void *eventInfo)
+       inline void Widget::callEvent(SmartEvent event, void *eventInfo)
        {
                evas_object_smart_callback_call(getEo(), event, eventInfo);
        }
index daef146de3faea08f6aa00fa91478f7227dc05b3..e053626cc79de01d15856eccd401d7fb6c877a1c 100644 (file)
@@ -44,20 +44,20 @@ namespace ucl {
                bool isEnabled() const;
 
                void setText(const TString &value) const;
-               void setText(EdjePart part, const TString &value) const;
+               void setText(const TString &value, EdjePart part) const;
 
                TString getText() const;
                TString getText(EdjePart part) const;
 
                void setContent(Evas_Object *content) const;
-               void setContent(EdjePart part, Evas_Object *content) const;
+               void setContent(Evas_Object *content, EdjePart part) const;
                Evas_Object *unsetContent() const;
                Evas_Object *unsetContent(EdjePart part) const;
 
                Evas_Object *getContent() const;
                Evas_Object *getContent(EdjePart part) const;
 
-               void emitSignal(EdjeSignal signal,EdjeSignalSrc source =
+               void emit(EdjeSignal signal,EdjeSignalSrc source =
                                EdjeSignalSrc("")) const;
 
        private:
index d4ba2692d17834496fa48c1a9df6afc159e94faf..dedabdc95b3215bd7622ffa22e4ec9bb9887b7f6 100644 (file)
@@ -92,8 +92,8 @@ namespace ucl {
                elm_object_item_content_set(getIt(), content);
        }
 
-       inline void WidgetItem::setContent(const EdjePart part,
-                       Evas_Object *const content) const
+       inline void WidgetItem::setContent(Evas_Object *const content,
+                       const EdjePart part) const
        {
                elm_object_item_part_content_set(getIt(), part.name, content);
        }
@@ -118,7 +118,7 @@ namespace ucl {
                return elm_object_item_part_content_get(getIt(), part.name);
        }
 
-       inline void WidgetItem::emitSignal(const EdjeSignal signal,
+       inline void WidgetItem::emit(const EdjeSignal signal,
                        const EdjeSignalSrc source) const
        {
                elm_object_item_signal_emit(getIt(), signal.name, source.name);
index a3eef5214c314601870ded15e4d39370b4d7f495..7ec81b96bd6092451fc526e3f82f44c956000bf9 100644 (file)
@@ -32,6 +32,7 @@ namespace ucl {
 
        constexpr EdjePart PART_CONTENT {"elm.swallow.content"};
        constexpr EdjePart PART_ICON    {"elm.swallow.icon"};
+       constexpr EdjePart PART_BUTTON  {"elm.swallow.button"};
 }
 
 #endif // __UCL_GUI_STD_THEME_COMMON_H__
index f9f4210a601b14f99968d285eb8eea9a246cc222..8d6759685e1711b09258a8240875740588f6e703 100644 (file)
@@ -34,7 +34,7 @@ namespace ucl {
                }
        }
 
-       void EdjeWidget::setText(const EdjePart part, const TString &value)
+       void EdjeWidget::setText(const TString &value, const EdjePart part)
        {
                if (value.isTranslatable()) {
                        if (value.hasDomain()) {
index 7f20f756c284d2704f2dca4b135df4edb9ca5927..070a8d6048bde1b67f00116836d5707a4a47d37e 100644 (file)
@@ -37,13 +37,12 @@ namespace ucl {
                        result->bindToEo();
                }
 
-               bool isOk = false;
+               bool isOk = true;
 
                if (isNotEmpty(m_edjeFilePath) && isValid(m_edjeGroup)) {
                        isOk = result->setEdjeFile(m_edjeFilePath, m_edjeGroup);
-               } else {
-                       isOk = result->setTheme(isValid(m_theme) ?
-                                       m_theme : LAYOUT_DEFAULT);
+               } else if (isValid(m_theme)) {
+                       isOk = result->setTheme(m_theme);
                }
 
                if (!isOk) {
index 8c296fd0c55e568631f96968d8fbff73533a4686..1f8a589da9355078648fb8a8cea095123f19cd40 100644 (file)
@@ -59,7 +59,7 @@ namespace ucl {
        {
                if (!m_isInTransition) {
                        m_isInTransition = true;
-                       callSmartEvent(NAVI_TRANSITION_STARTED);
+                       callEvent(NAVI_TRANSITION_STARTED);
                }
        }
 
index 8cf5bc1979930fd3e4483035c430b4c00882cda4..04d1fca76ee66e5553ff7ee18039e632e6ab71f5 100644 (file)
@@ -33,8 +33,8 @@ namespace ucl {
                }
        }
 
-       void WidgetItem::setText(
-                       const EdjePart part, const TString &value) const
+       void WidgetItem::setText(const TString &value,
+                       const EdjePart part) const
        {
                if (value.isTranslatable()) {
                        if (value.hasDomain()) {