Merged Genlist and Gengrid items. 50/80550/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 18 Jul 2016 14:39:38 +0000 (17:39 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 18 Jul 2016 14:40:06 +0000 (17:40 +0300)
Change-Id: I804d141a2eafa1301e499cb13b18ad7a6fffff02
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
74 files changed:
contacts-widget/inc/AddButtonItem.h
contacts-widget/inc/Widget.h
contacts-widget/inc/WidgetGengridItem.h
contacts-widget/src/AddButtonItem.cpp
contacts-widget/src/WidgetGengridItem.cpp
lib-apps-common/inc/Ui/CheckItem.h [moved from lib-apps-common/inc/Ui/GenlistCheckItem.h with 84% similarity]
lib-apps-common/inc/Ui/GenGroupItem.h [moved from lib-apps-common/inc/Ui/GenlistGroupItem.h with 69% similarity]
lib-apps-common/inc/Ui/GenItem.h
lib-apps-common/inc/Ui/GengridItem.h [deleted file]
lib-apps-common/inc/Ui/GenlistItem.h [deleted file]
lib-apps-common/inc/Ux/SelectAllItem.h
lib-apps-common/inc/Ux/SelectItem.h
lib-apps-common/inc/Ux/SelectView.h
lib-apps-common/src/Ui/CheckItem.cpp [moved from lib-apps-common/src/Ui/GenlistCheckItem.cpp with 76% similarity]
lib-apps-common/src/Ui/GenGroupItem.cpp [moved from lib-apps-common/src/Ui/GenlistGroupItem.cpp with 60% similarity]
lib-apps-common/src/Ui/GenItem.cpp
lib-apps-common/src/Ui/Genlist.cpp
lib-apps-common/src/Ui/GenlistItem.cpp [deleted file]
lib-apps-common/src/Ux/SelectAllItem.cpp
lib-apps-common/src/Ux/SelectItem.cpp
lib-contacts/inc/Contacts/Details/ActionFieldItem.h
lib-contacts/inc/Contacts/Details/BasicInfoItem.h
lib-contacts/inc/Contacts/Details/DetailsView.h
lib-contacts/inc/Contacts/Details/FieldItem.h
lib-contacts/inc/Contacts/Details/GroupsFieldItem.h
lib-contacts/inc/Contacts/Details/MultilineFieldItem.h
lib-contacts/inc/Contacts/Details/RingtoneFieldItem.h
lib-contacts/inc/Contacts/Details/TypedFieldItem.h
lib-contacts/inc/Contacts/Groups/AddMembersItem.h
lib-contacts/inc/Contacts/Groups/CreateGroupItem.h
lib-contacts/inc/Contacts/Groups/GroupsView.h
lib-contacts/inc/Contacts/Groups/NameItem.h
lib-contacts/inc/Contacts/Groups/RingtoneItem.h
lib-contacts/inc/Contacts/Input/AddFieldsItem.h
lib-contacts/inc/Contacts/Input/ContactCompoundFieldControl.h
lib-contacts/inc/Contacts/Input/ContactCompoundFieldItem.h
lib-contacts/inc/Contacts/Input/ContactFieldItem.h
lib-contacts/inc/Contacts/Input/ContactFieldSubItem.h
lib-contacts/inc/Contacts/Input/ContactGroupsFieldItem.h
lib-contacts/inc/Contacts/Input/ContactRingtoneFieldItem.h
lib-contacts/inc/Contacts/Input/ContactTextFieldControl.h
lib-contacts/inc/Contacts/Input/ContactTypedFieldItem.h
lib-contacts/inc/Contacts/Input/InputView.h
lib-contacts/inc/Contacts/List/ListSection.h
lib-contacts/inc/Contacts/List/ListView.h
lib-contacts/inc/Contacts/List/MyProfileGroup.h
lib-contacts/inc/Contacts/List/PersonGroupItem.h
lib-contacts/inc/Contacts/List/RemoveFavView.h
lib-contacts/inc/Contacts/List/ReorderView.h
lib-contacts/inc/Contacts/List/SearchItem.h
lib-contacts/inc/Contacts/List/VcardView.h
lib-contacts/inc/Contacts/Settings/ExportItem.h
lib-contacts/inc/Contacts/Settings/ImportItem.h
lib-contacts/inc/Contacts/Settings/NameFormatItem.h
lib-contacts/inc/Contacts/Settings/SortByItem.h
lib-contacts/src/Contacts/Details/DetailsView.cpp
lib-contacts/src/Contacts/Details/FieldItem.cpp
lib-contacts/src/Contacts/Groups/GroupsView.cpp
lib-contacts/src/Contacts/Input/ContactCompoundFieldControl.cpp
lib-contacts/src/Contacts/Input/ContactCompoundFieldItem.cpp
lib-contacts/src/Contacts/Input/ContactTextFieldControl.cpp
lib-contacts/src/Contacts/Input/InputView.cpp
lib-contacts/src/Contacts/List/ListView.cpp
lib-contacts/src/Contacts/List/PersonGroupItem.cpp
lib-contacts/src/Contacts/List/RemoveFavView.cpp
lib-contacts/src/Contacts/List/ReorderView.cpp
lib-contacts/src/Contacts/List/VcardView.cpp
lib-logs/inc/Logs/Details/ActionItem.h
lib-logs/inc/Logs/Details/BasicInfoItem.h
lib-logs/inc/Logs/Details/DetailsView.h
lib-logs/inc/Logs/List/LogGroupItem.h
lib-logs/inc/Logs/List/LogsView.h
lib-logs/src/Logs/Details/DetailsView.cpp
lib-logs/src/Logs/List/LogsView.cpp

index 8cca9de..23e5e3f 100644 (file)
 #ifndef ADD_BUTTON_ITEM_H
 #define ADD_BUTTON_ITEM_H
 
-#include "Ui/GengridItem.h"
+#include "Ui/GenItem.h"
 
-class AddButtonItem : public Ui::GengridItem
+class AddButtonItem : public Ui::GenItem
 {
+public:
+       AddButtonItem();
+
 private:
        virtual Elm_Gengrid_Item_Class *getItemClass() const override;
        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
index 5d71988..ea4b03e 100644 (file)
@@ -28,7 +28,7 @@
 namespace Ui
 {
        class Gengrid;
-       class GengridItem;
+       class GenItem;
 }
 
 class WidgetGengridItem;
@@ -74,7 +74,7 @@ private:
        Evas_Object *m_Layout;
        Evas_Object *m_EditButton;
        Ui::Gengrid *m_Gengrid;
-       Ui::GengridItem *m_AddButton;
+       Ui::GenItem *m_AddButton;
 };
 
 #endif /* WIDGET_H */
index 15ea86d..a988cac 100644 (file)
 #ifndef WIDGET_GENGRID_ITEM_H
 #define WIDGET_GENGRID_ITEM_H
 
-#include "Ui/GengridItem.h"
+#include "Ui/GenItem.h"
 
 class WidgetItem;
 
 /**
  * @brief Widget gengrid item.
  */
-class WidgetGengridItem : public Ui::GengridItem
+class WidgetGengridItem : public Ui::GenItem
 {
 public:
        typedef std::function<void()> DeleteCallback;
index 733feee..bfb1336 100644 (file)
@@ -26,6 +26,11 @@ namespace
        const std::string layoutPath = App::getResourcePath(WIDGET_LAYOUT_EDJ);
 }
 
+AddButtonItem::AddButtonItem()
+       : GenItem(Ui::GenContainer::TypeGengrid)
+{
+}
+
 Elm_Gengrid_Item_Class *AddButtonItem::getItemClass() const
 {
        static Elm_Gengrid_Item_Class itc = createItemClass(WIDGET_ITEM_STYLE);
index 5162de5..ab64557 100644 (file)
@@ -33,7 +33,7 @@ namespace
 }
 
 WidgetGengridItem::WidgetGengridItem(WidgetItem &item)
-       : m_Item(item),  m_EditMode(false)
+       : GenItem(Ui::GenContainer::TypeGengrid), m_Item(item),  m_EditMode(false)
 {
        m_Item.setChangeCallback(std::bind(&WidgetGengridItem::onItemChanged, this, _1));
 }
similarity index 84%
rename from lib-apps-common/inc/Ui/GenlistCheckItem.h
rename to lib-apps-common/inc/Ui/CheckItem.h
index ded5bd6..0b244b9 100644 (file)
  *
  */
 
-#ifndef UI_GENLIST_CHECK_ITEM
-#define UI_GENLIST_CHECK_ITEM
+#ifndef UI_CHECK_ITEM
+#define UI_CHECK_ITEM
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 namespace Ui
 {
        /**
-        * @brief Genlist check item
+        * @brief GenContainer check item
         */
-       class EXPORT_API GenlistCheckItem : public Ui::GenlistItem
+       class EXPORT_API CheckItem : public Ui::GenItem
        {
        public:
                /**
@@ -35,8 +35,8 @@ namespace Ui
                 */
                typedef std::function<bool(bool)> CheckCallback;
 
-               GenlistCheckItem();
-               virtual ~GenlistCheckItem() override;
+               CheckItem();
+               virtual ~CheckItem() override;
 
                /**
                 * @return Whether the item is checked.
@@ -60,7 +60,7 @@ namespace Ui
                 * @brief Set item which "checked" state should be synchronized with this item.
                 * @param[in]   item    Item to link with
                 */
-               void setLinkedItem(GenlistCheckItem *item);
+               void setLinkedItem(CheckItem *item);
 
                /**
                 * @brief Unset linked item.
@@ -74,13 +74,13 @@ namespace Ui
                void updateCheckPart();
 
                /**
-                * @see GenlistItem::getContent()
+                * @see GenItem::getContent()
                 * @remark Use it in derived class to create check component
                 */
                virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                /**
-                * @see GenlistItem::onSelected()
+                * @see GenItem::onSelected()
                 */
                virtual void onSelected() override;
 
@@ -99,8 +99,8 @@ namespace Ui
                Eina_Bool m_IsChecked;
                bool m_IsChecking;
                CheckCallback m_OnChecked;
-               GenlistCheckItem *m_LinkedItem;
+               CheckItem *m_LinkedItem;
        };
 }
 
-#endif /* UI_GENLIST_CHECK_ITEM */
+#endif /* UI_CHECK_ITEM */
similarity index 69%
rename from lib-apps-common/inc/Ui/GenlistGroupItem.h
rename to lib-apps-common/inc/Ui/GenGroupItem.h
index 91295ca..f7c28d4 100644 (file)
  *
  */
 
-#ifndef UI_GENLIST_GROUP_ITEM_H
-#define UI_GENLIST_GROUP_ITEM_H
+#ifndef UI_GEN_GROUP_ITEM_H
+#define UI_GEN_GROUP_ITEM_H
 
-#include "Ui/Genlist.h"
-#include "Ui/GenlistItem.h"
+#include "Ui/GenContainer.h"
+#include "Ui/GenItem.h"
 #include <vector>
 
 namespace Ui
 {
-       class EXPORT_API GenlistGroupItem : virtual public GenlistItem
+       class EXPORT_API GenGroupItem : virtual public GenItem
        {
        public:
-               virtual ~GenlistGroupItem() override;
+               virtual ~GenGroupItem() override;
 
                /**
                 * @return Group first child Item.
                 */
-               GenlistItem *getFirstItem() const;
+               GenItem *getFirstItem() const;
 
                /**
                 * @return Group last child Item.
                 */
-               GenlistItem *getLastItem() const;
+               GenItem *getLastItem() const;
 
                /**
                 * @return Group begin iterator.
@@ -67,46 +67,45 @@ namespace Ui
                /**
                 * @return Group item of the next group or nullptr if none.
                 */
-               GenlistGroupItem *getNextGroupItem() const;
+               GenGroupItem *getNextGroupItem() const;
 
                /**
                 * @return Group item of the previous group or nullptr if none.
                 */
-               GenlistGroupItem *getPrevGroupItem() const;
+               GenGroupItem *getPrevGroupItem() const;
 
                /**
                 * @brief Insert sub item to the group.
                 * @details If group item is not yet inserted itself, sub item is cached
-                *          and inserted into genlist when it's parent is inserted.
-                * @see Genlist::insert()
+                *          and inserted into container when it's parent is inserted.
+                * @see GenContainer::insert()
                 */
-               void insertSubItem(GenlistItem *item,
-                               GenlistItem *sibling = nullptr,
-                               Genlist::Position position = Genlist::Before);
+               void insertSubItem(GenItem *item, GenItem *sibling = nullptr,
+                               GenContainer::Position position = GenContainer::Before);
 
        protected:
                /**
-                * @see GenlistItem::isGroupItem()
+                * @see GenItem::isGroupItem()
                 */
                virtual bool isGroupItem() const override { return true; }
 
                /**
-                * @see GenlistItem::getType()
+                * @see GenItem::getType()
                 */
                virtual Elm_Genlist_Item_Type getType() const override { return ELM_GENLIST_ITEM_GROUP; }
 
                /**
-                * @see GenlistItem::getItemClass()
+                * @see GenItem::getItemClass()
                 */
-               virtual Elm_Genlist_Item_Class *getItemClass() const override;
+               virtual Elm_Gen_Item_Class *getItemClass() const override;
 
                /**
-                * @see GenlistItem::onInserted()
+                * @see GenItem::onInserted()
                 */
                virtual void onInserted() override;
 
                /**
-                * @see GenlistItem::onPop()
+                * @see GenItem::onPop()
                 */
                virtual void onPop() override;
 
@@ -125,4 +124,4 @@ namespace Ui
        };
 }
 
-#endif /* UI_GENLIST_GROUP_ITEM_H */
+#endif /* UI_GEN_GROUP_ITEM_H */
index a64077b..c27476c 100644 (file)
@@ -27,6 +27,7 @@
 namespace Ui
 {
        class GenItem;
+       class GenGroupItem;
        typedef std::weak_ptr<GenItem> GenItemPtr;
 
        class EXPORT_API GenItem
@@ -46,7 +47,7 @@ namespace Ui
                 * @brief Create generic container item.
                 * @param[in]   type    Parent container type
                 */
-               GenItem(GenContainer::Type type);
+               GenItem(GenContainer::Type type = GenContainer::TypeGenlist);
                virtual ~GenItem();
 
                /**
@@ -60,6 +61,16 @@ namespace Ui
                bool isInserted() const;
 
                /**
+                * @return Whether the item is a group item.
+                */
+               virtual bool isGroupItem() const { return false; }
+
+               /**
+                * @return Whether the item can receive focus.
+                */
+               virtual bool isFocusable() const { return false; }
+
+               /**
                 * @return Item type.
                 */
                virtual Elm_Genlist_Item_Type getType() const { return ELM_GENLIST_ITEM_NONE; }
@@ -75,6 +86,11 @@ namespace Ui
                GenContainer *getParent() const;
 
                /**
+                * @return Parent group item or nullptr if none.
+                */
+               GenGroupItem *getParentItem() const;
+
+               /**
                 * @return Next item in container or nullptr if none.
                 */
                GenItem *getNextItem() const;
@@ -102,7 +118,7 @@ namespace Ui
                void setDestroyCallback(SelectCallback callback);
 
                /**
-                * @brief Scroll genlist to item.
+                * @brief Scroll to the item.
                 * @param[in]   position    Item position on screen
                 * @param[in]   isAnimated  Whether scrolling is animated or immediate
                 * @see Elm_Genlist_Item_Scrollto_Type or Elm_Gengrid_Item_Scrollto_Type
@@ -111,6 +127,13 @@ namespace Ui
                                bool isAnimated = false);
 
                /**
+                * @brief Scroll to the item and give it focus.
+                * @see GenItem::scrollTo()
+                */
+               void focus(Elm_Genlist_Item_Scrollto_Type position = ELM_GENLIST_ITEM_SCROLLTO_IN,
+                               bool isAnimated = false);
+
+               /**
                 * @brief Remove item from genlist without destroying it.
                 */
                void pop();
@@ -189,6 +212,11 @@ namespace Ui
                 */
                virtual void onUnrealized() { }
 
+               /**
+                * @brief Called when item is focused by calling focus().
+                */
+               virtual void onFocused() { }
+
        private:
                friend class GenContainer;
                void onInserted(Elm_Object_Item *item);
@@ -201,6 +229,7 @@ namespace Ui
                Elm_Object_Item *m_Item;
                bool m_Preserve;
                bool m_IsRealized;
+               bool m_IsFocusPending;
 
                std::shared_ptr<GenItem> m_SelfPtr;
                SelectCallback m_OnSelected;
diff --git a/lib-apps-common/inc/Ui/GengridItem.h b/lib-apps-common/inc/Ui/GengridItem.h
deleted file mode 100644 (file)
index 025007f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 UI_GENGRID_ITEM_H
-#define UI_GENGRID_ITEM_H
-
-#include "Ui/GenItem.h"
-
-namespace Ui
-{
-       class EXPORT_API GengridItem : public GenItem
-       {
-       public:
-               GengridItem()
-                       : GenItem(GenContainer::TypeGengrid)
-               { }
-       };
-}
-
-#endif /* UI_GENGRID_ITEM_H */
diff --git a/lib-apps-common/inc/Ui/GenlistItem.h b/lib-apps-common/inc/Ui/GenlistItem.h
deleted file mode 100644 (file)
index 7813e15..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 UI_GENLIST_ITEM_H
-#define UI_GENLIST_ITEM_H
-
-#include "Ui/GenItem.h"
-
-namespace Ui
-{
-       class GenlistGroupItem;
-
-       class EXPORT_API GenlistItem : public GenItem
-       {
-       public:
-               GenlistItem();
-
-               /**
-                * @return Whether the item is a group item.
-                */
-               virtual bool isGroupItem() const { return false; }
-
-               /**
-                * @return Whether the item can receive focus.
-                */
-               virtual bool isFocusable() const { return false; }
-
-               /**
-                * @return Parent genlist group item or nullptr if none.
-                */
-               GenlistGroupItem *getParentItem() const;
-
-               /**
-                * @brief Scroll to the item and give it focus.
-                * @see GenlItem::scrollTo()
-                */
-               void focus(Elm_Genlist_Item_Scrollto_Type position = ELM_GENLIST_ITEM_SCROLLTO_IN,
-                               bool isAnimated = false);
-
-       protected:
-               /**
-                * @brief Called when item is focused by calling focus().
-                */
-               virtual void onFocused() { }
-
-               /**
-                * @brief Provides deferred focus if item was not realized when focus() was called.
-                * @see GenItem::onRealized()
-                */
-               virtual void onRealized();
-
-       private:
-               friend class Genlist;
-
-               bool m_IsFocusPending;
-       };
-}
-
-#endif /* UI_GENLIST_ITEM_H */
index adf3c06..a655346 100644 (file)
 #ifndef UX_SELECT_ALL_ITEM_H
 #define UX_SELECT_ALL_ITEM_H
 
-#include "Ui/GenlistCheckItem.h"
+#include "Ui/CheckItem.h"
 
 namespace Ux
 {
        /**
         * @brief "Select all" genlist item
         */
-       class SelectAllItem : public Ui::GenlistCheckItem
+       class SelectAllItem : public Ui::CheckItem
        {
        public:
                /**
@@ -36,12 +36,12 @@ namespace Ux
 
        protected:
                /**
-                * @see GenlistItem::getText()
+                * @see GenItem::getText()
                 */
                virtual char *getText(Evas_Object *parent, const char *part) override;
 
                /**
-                * @see GenlistItem::getContent()
+                * @see GenItem::getContent()
                 */
                virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
index d2d4dc5..d849513 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef UX_SELECT_ITEM_H
 #define UX_SELECT_ITEM_H
 
-#include "Ui/GenlistCheckItem.h"
+#include "Ui/CheckItem.h"
 #include "Ux/SelectTypes.h"
 
 namespace Ux
@@ -26,9 +26,9 @@ namespace Ux
        class SelectView;
 
        /**
-        * @brief Genlist item for SelectView that supports selection mode switching.
+        * @brief GenContainer item for SelectView that supports selection mode switching.
         */
-       class EXPORT_API SelectItem : public Ui::GenlistCheckItem
+       class EXPORT_API SelectItem : public Ui::CheckItem
        {
        public:
                SelectItem();
@@ -81,17 +81,17 @@ namespace Ux
                virtual SelectResult getDefaultResult() const = 0;
 
                /**
-                * @see GenlistItem::getContent()
+                * @see GenItem::getContent()
                 */
                virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                /**
-                * @see GenlistItem::onSelected()
+                * @see GenItem::onSelected()
                 */
                virtual void onSelected() override;
 
                /**
-                * @see GenlistCheckItem::onChecked()
+                * @see CheckItem::onChecked()
                 */
                virtual bool onChecked(bool isChecked) override;
 
index af17568..2caa913 100644 (file)
@@ -26,7 +26,7 @@
 
 namespace Ui
 {
-       class GenlistItem;
+       class GenItem;
 }
 
 namespace Ux
@@ -165,7 +165,7 @@ namespace Ux
                 * @brief Called when "Select All" item should be inserted.
                 * @param[in]   item    "Select All" genlist item
                 */
-               virtual void onSelectAllInsert(Ui::GenlistItem *item) { }
+               virtual void onSelectAllInsert(Ui::GenItem *item) { }
 
                /**
                 * @brief Called when selection mode was changed.
similarity index 76%
rename from lib-apps-common/src/Ui/GenlistCheckItem.cpp
rename to lib-apps-common/src/Ui/CheckItem.cpp
index 96d6386..4a86e5f 100644 (file)
  *
  */
 
-#include "Ui/GenlistCheckItem.h"
+#include "Ui/CheckItem.h"
 #include "Utils/Callback.h"
 
 using namespace Ui;
 
-GenlistCheckItem::GenlistCheckItem()
+CheckItem::CheckItem()
        : m_CheckPart("*"), m_IsChecked(false), m_IsChecking(false),
          m_LinkedItem(nullptr)
 {
 }
 
-GenlistCheckItem::~GenlistCheckItem()
+CheckItem::~CheckItem()
 {
        unsetLinkedItem();
 }
 
-bool GenlistCheckItem::isChecked() const
+bool CheckItem::isChecked() const
 {
        return m_IsChecked;
 }
 
-bool GenlistCheckItem::setChecked(bool isChecked)
+bool CheckItem::setChecked(bool isChecked)
 {
        if (isChecked == m_IsChecked) {
                return true;
@@ -56,12 +56,12 @@ bool GenlistCheckItem::setChecked(bool isChecked)
        return true;
 }
 
-void GenlistCheckItem::setCheckCallback(CheckCallback callback)
+void CheckItem::setCheckCallback(CheckCallback callback)
 {
        m_OnChecked = std::move(callback);
 }
 
-void GenlistCheckItem::setLinkedItem(GenlistCheckItem *item)
+void CheckItem::setLinkedItem(CheckItem *item)
 {
        if (!item) {
                return;
@@ -75,7 +75,7 @@ void GenlistCheckItem::setLinkedItem(GenlistCheckItem *item)
        m_LinkedItem = item;
 }
 
-void GenlistCheckItem::unsetLinkedItem()
+void CheckItem::unsetLinkedItem()
 {
        if (m_LinkedItem) {
                m_LinkedItem->m_LinkedItem = nullptr;
@@ -83,12 +83,12 @@ void GenlistCheckItem::unsetLinkedItem()
        }
 }
 
-void GenlistCheckItem::updateCheckPart()
+void CheckItem::updateCheckPart()
 {
        elm_genlist_item_fields_update(getObjectItem(), m_CheckPart.c_str(), ELM_GENLIST_ITEM_FIELD_CONTENT);
 }
 
-Evas_Object *GenlistCheckItem::getContent(Evas_Object *parent, const char *part)
+Evas_Object *CheckItem::getContent(Evas_Object *parent, const char *part)
 {
        m_CheckPart = part;
 
@@ -97,24 +97,24 @@ Evas_Object *GenlistCheckItem::getContent(Evas_Object *parent, const char *part)
        elm_check_state_pointer_set(check, &m_IsChecked);
        evas_object_propagate_events_set(check, EINA_FALSE);
        evas_object_smart_callback_add(check, "changed",
-                       makeCallback(&GenlistCheckItem::onCheckChanged), this);
+                       makeCallback(&CheckItem::onCheckChanged), this);
 
        return check;
 }
 
-void GenlistCheckItem::onSelected()
+void CheckItem::onSelected()
 {
        setChecked(!m_IsChecked);
 }
 
-void GenlistCheckItem::onCheckChanged(Evas_Object *check, void *eventInfo)
+void CheckItem::onCheckChanged(Evas_Object *check, void *eventInfo)
 {
        if (!notifyCheck()) {
                elm_check_state_set(check, !m_IsChecked);
        }
 }
 
-bool GenlistCheckItem::notifyCheck()
+bool CheckItem::notifyCheck()
 {
        if (m_IsChecking) {
                return false;
similarity index 60%
rename from lib-apps-common/src/Ui/GenlistGroupItem.cpp
rename to lib-apps-common/src/Ui/GenGroupItem.cpp
index f6ce99f..5798418 100644 (file)
  *
  */
 
-#include "Ui/GenlistGroupItem.h"
-#include "Ui/Genlist.h"
+#include "Ui/GenGroupItem.h"
 #include <algorithm>
 
 using namespace Ui;
 
-GenlistGroupItem::~GenlistGroupItem()
+GenGroupItem::~GenGroupItem()
 {
        for (auto &&itemPtr : m_ItemsCache) {
                if (auto item = itemPtr.lock()) {
@@ -30,32 +29,32 @@ GenlistGroupItem::~GenlistGroupItem()
        }
 }
 
-GenlistItem *GenlistGroupItem::getFirstItem() const
+GenItem *GenGroupItem::getFirstItem() const
 {
        const Eina_List *subitems = elm_genlist_item_subitems_get(getObjectItem());
        Elm_Object_Item *item = (Elm_Object_Item *) eina_list_data_get(subitems);
-       return (GenlistItem *) elm_object_item_data_get(item);
+       return (GenItem *) elm_object_item_data_get(item);
 }
 
-GenlistItem *GenlistGroupItem::getLastItem() const
+GenItem *GenGroupItem::getLastItem() const
 {
        const Eina_List *subitems = elm_genlist_item_subitems_get(getObjectItem());
        Elm_Object_Item *item = (Elm_Object_Item *) eina_list_last_data_get(subitems);
-       return (GenlistItem *) elm_object_item_data_get(item);
+       return (GenItem *) elm_object_item_data_get(item);
 }
 
-GenIterator GenlistGroupItem::begin()
+GenIterator GenGroupItem::begin()
 {
        return getFirstItem();
 }
 
-GenIterator GenlistGroupItem::end()
+GenIterator GenGroupItem::end()
 {
-       GenlistItem *lastItem = getLastItem();
+       GenItem *lastItem = getLastItem();
        return lastItem ? lastItem->getNextItem() : nullptr;
 }
 
-size_t GenlistGroupItem::getItemCount() const
+size_t GenGroupItem::getItemCount() const
 {
        if (!m_ItemsCache.empty()) {
                return std::count_if(m_ItemsCache.begin(), m_ItemsCache.end(),
@@ -68,12 +67,12 @@ size_t GenlistGroupItem::getItemCount() const
        return eina_list_count(subitems);
 }
 
-bool GenlistGroupItem::isEmpty() const
+bool GenGroupItem::isEmpty() const
 {
        return getItemCount() == 0;
 }
 
-bool GenlistGroupItem::isExpanded() const
+bool GenGroupItem::isExpanded() const
 {
        Elm_Object_Item *item = getObjectItem();
        if (!item) {
@@ -87,23 +86,23 @@ bool GenlistGroupItem::isExpanded() const
        return true;
 }
 
-GenlistGroupItem *GenlistGroupItem::getNextGroupItem() const
+GenGroupItem *GenGroupItem::getNextGroupItem() const
 {
-       GenlistItem *lastItem = getLastItem();
-       GenlistItem *item = static_cast<GenlistItem *>(lastItem ? lastItem->getNextItem() : getNextItem());
+       GenItem *lastItem = getLastItem();
+       GenItem *item = lastItem ? lastItem->getNextItem() : getNextItem();
        if (item && item->isGroupItem()) {
-               return dynamic_cast<GenlistGroupItem *>(item);
+               return dynamic_cast<GenGroupItem *>(item);
        }
 
        return nullptr;
 }
 
-GenlistGroupItem *GenlistGroupItem::getPrevGroupItem() const
+GenGroupItem *GenGroupItem::getPrevGroupItem() const
 {
-       GenlistItem *item = static_cast<GenlistItem *>(getPrevItem());
+       GenItem *item = getPrevItem();
        if (item) {
                if (item->isGroupItem()) {
-                       return dynamic_cast<GenlistGroupItem *>(item);
+                       return dynamic_cast<GenGroupItem *>(item);
                } else {
                        return item->getParentItem();
                }
@@ -112,16 +111,16 @@ GenlistGroupItem *GenlistGroupItem::getPrevGroupItem() const
        return nullptr;
 }
 
-void GenlistGroupItem::insertSubItem(GenlistItem *item, GenlistItem *sibling,
-               Genlist::Position position)
+void GenGroupItem::insertSubItem(GenItem *item, GenItem *sibling,
+               GenContainer::Position position)
 {
        if (!item) {
                return;
        }
 
-       Genlist *genlist = static_cast<Genlist *>(getParent());
-       if (genlist && isExpanded()) {
-               genlist->insert(item, this, sibling, position);
+       GenContainer *container = getParent();
+       if (container && isExpanded()) {
+               container->insert(item, this, sibling, position);
        } else {
                auto pos = m_ItemsCache.end();
                if (sibling) {
@@ -135,11 +134,11 @@ void GenlistGroupItem::insertSubItem(GenlistItem *item, GenlistItem *sibling,
                }
 
                if (pos != m_ItemsCache.end()) {
-                       if (position == Genlist::After) {
+                       if (position == GenContainer::After) {
                                ++pos;
                        }
                } else {
-                       if (position == Genlist::After) {
+                       if (position == GenContainer::After) {
                                pos = m_ItemsCache.begin();
                        }
                }
@@ -148,25 +147,25 @@ void GenlistGroupItem::insertSubItem(GenlistItem *item, GenlistItem *sibling,
        }
 }
 
-Elm_Genlist_Item_Class *GenlistGroupItem::getItemClass() const
+Elm_Gen_Item_Class *GenGroupItem::getItemClass() const
 {
-       static Elm_Genlist_Item_Class itc = createItemClass("group_index");
+       static Elm_Gen_Item_Class itc = createItemClass("group_index");
        return &itc;
 }
 
-void GenlistGroupItem::onInserted()
+void GenGroupItem::onInserted()
 {
        if (isExpanded()) {
                insertSubItems();
        }
 }
 
-void GenlistGroupItem::onPop()
+void GenGroupItem::onPop()
 {
        popSubItems();
 }
 
-void GenlistGroupItem::onExpanded(bool isExpanded)
+void GenGroupItem::onExpanded(bool isExpanded)
 {
        if (isExpanded) {
                insertSubItems();
@@ -175,23 +174,23 @@ void GenlistGroupItem::onExpanded(bool isExpanded)
        }
 }
 
-void GenlistGroupItem::insertSubItems()
+void GenGroupItem::insertSubItems()
 {
-       Genlist *genlist = static_cast<Genlist *>(getParent());
-       if (genlist) {
+       GenContainer *container = getParent();
+       if (container) {
                for (auto &&itemPtr : m_ItemsCache) {
                        if (auto item = itemPtr.lock()) {
-                               genlist->insert(item.get(), this);
+                               container->insert(item.get(), this);
                        }
                }
                m_ItemsCache.clear();
        }
 }
 
-void GenlistGroupItem::popSubItems()
+void GenGroupItem::popSubItems()
 {
        for (auto it = begin(), endIt = end(); it != endIt; ) {
-               GenlistItem *item = static_cast<GenlistItem *>(*it++);
+               GenItem *item = *it++;
                item->pop();
                m_ItemsCache.push_back(item->getWeakPtr());
        }
index a574377..a6bfaaa 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "Ui/GenItem.h"
 #include "Ui/GenContainer.h"
+#include "Ui/GenGroupItem.h"
 #include "Utils/Callback.h"
 
 using namespace Ui;
@@ -25,6 +26,7 @@ typedef void(*ScrollFunc)(Elm_Object_Item *item, int type);
 
 struct Ui::GenItemApi
 {
+       Elm_Object_Item *(*getParent)(const Elm_Object_Item *item);
        Elm_Object_Item *(*getNext)(const Elm_Object_Item *item);
        Elm_Object_Item *(*getPrev)(const Elm_Object_Item *item);
        ScrollFunc bringIn;
@@ -35,13 +37,15 @@ struct Ui::GenItemApi
 namespace
 {
        const GenItemApi api[] = {
-               { elm_genlist_item_next_get,
+               { elm_genlist_item_parent_get,
+                 elm_genlist_item_next_get,
                  elm_genlist_item_prev_get,
                  (ScrollFunc) elm_genlist_item_bring_in,
                  (ScrollFunc) elm_genlist_item_show,
                  elm_genlist_item_selected_set },
 
-               { elm_gengrid_item_next_get,
+               { [](const Elm_Object_Item *item) -> Elm_Object_Item * { return nullptr; },
+                 elm_gengrid_item_next_get,
                  elm_gengrid_item_prev_get,
                  (ScrollFunc) elm_gengrid_item_bring_in,
                  (ScrollFunc) elm_gengrid_item_show,
@@ -50,7 +54,7 @@ namespace
 }
 
 GenItem::GenItem(GenContainer::Type type)
-       : m_Item(nullptr), m_Preserve(false), m_IsRealized(false),
+       : m_Item(nullptr), m_Preserve(false), m_IsRealized(false), m_IsFocusPending(false),
          m_Api(&api[type])
 {
 }
@@ -81,6 +85,13 @@ Elm_Object_Item *GenItem::getObjectItem() const
        return m_Item;
 }
 
+GenGroupItem *GenItem::getParentItem() const
+{
+       Elm_Object_Item *objectItem = m_Api->getParent(getObjectItem());
+       GenItem *item = (GenItem *) elm_object_item_data_get(objectItem);
+       return dynamic_cast<GenGroupItem *>(item);
+}
+
 GenContainer *GenItem::getParent() const
 {
        Evas_Object *genlist = elm_object_item_widget_get(getObjectItem());
@@ -124,6 +135,16 @@ void GenItem::scrollTo(int position, bool isAnimated)
        scroll(getObjectItem(), position);
 }
 
+void GenItem::focus(Elm_Genlist_Item_Scrollto_Type position, bool isAnimated)
+{
+       scrollTo(position, isAnimated);
+       if (isRealized()) {
+               onFocused();
+       } else {
+               m_IsFocusPending = true;
+       }
+}
+
 void GenItem::pop()
 {
        onPop();
@@ -186,6 +207,11 @@ void GenItem::onRealized(Elm_Object_Item *item)
        }
 
        m_IsRealized = true;
+       if (m_IsFocusPending) {
+               onFocused();
+               m_IsFocusPending = false;
+       }
+
        onRealized();
 }
 
index 70e10b6..b4808df 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include "Ui/Genlist.h"
-#include "Ui/GenlistGroupItem.h"
+#include "Ui/GenGroupItem.h"
 
 using namespace Ui;
 
@@ -39,9 +39,9 @@ void Genlist::onCreated()
 
 void Genlist::onItemExpanded(void *data, Evas_Object *obj, Elm_Object_Item *objectItem)
 {
-       GenlistItem *item = (GenlistItem *) elm_object_item_data_get(objectItem);
+       GenItem *item = (GenItem *) elm_object_item_data_get(objectItem);
        if (item && item->isGroupItem()) {
-               GenlistGroupItem *groupItem = dynamic_cast<GenlistGroupItem *>(item);
+               GenGroupItem *groupItem = dynamic_cast<GenGroupItem *>(item);
                if (groupItem) {
                        groupItem->onExpanded(true);
                }
@@ -50,9 +50,9 @@ void Genlist::onItemExpanded(void *data, Evas_Object *obj, Elm_Object_Item *obje
 
 void Genlist::onItemContracted(void *data, Evas_Object *obj, Elm_Object_Item *objectItem)
 {
-       GenlistItem *item = (GenlistItem *) elm_object_item_data_get(objectItem);
+       GenItem *item = (GenItem *) elm_object_item_data_get(objectItem);
        if (item && item->isGroupItem()) {
-               GenlistGroupItem *groupItem = dynamic_cast<GenlistGroupItem *>(item);
+               GenGroupItem *groupItem = dynamic_cast<GenGroupItem *>(item);
                if (groupItem) {
                        groupItem->onExpanded(false);
                }
diff --git a/lib-apps-common/src/Ui/GenlistItem.cpp b/lib-apps-common/src/Ui/GenlistItem.cpp
deleted file mode 100644 (file)
index 06356e8..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 "Ui/GenlistItem.h"
-#include "Ui/GenlistGroupItem.h"
-
-using namespace Ui;
-
-GenlistItem::GenlistItem()
-       : GenItem(GenContainer::TypeGenlist), m_IsFocusPending(false)
-{
-}
-
-GenlistGroupItem *GenlistItem::getParentItem() const
-{
-       Elm_Object_Item *objectItem = elm_genlist_item_parent_get(getObjectItem());
-       GenlistItem *item = (GenlistItem *) elm_object_item_data_get(objectItem);
-       return dynamic_cast<GenlistGroupItem *>(item);
-}
-
-void GenlistItem::focus(Elm_Genlist_Item_Scrollto_Type position, bool isAnimated)
-{
-       scrollTo(position, isAnimated);
-       if (isRealized()) {
-               onFocused();
-       } else {
-               m_IsFocusPending = true;
-       }
-}
-
-void GenlistItem::onRealized()
-{
-       if (m_IsFocusPending) {
-               onFocused();
-               m_IsFocusPending = false;
-       }
-}
index aebadc8..9bfd5ab 100644 (file)
@@ -39,7 +39,7 @@ char *SelectAllItem::getText(Evas_Object *parent, const char *part)
 Evas_Object *SelectAllItem::getContent(Evas_Object *parent, const char *part)
 {
        if (strcmp(part, "elm.swallow.end") == 0) {
-               return GenlistCheckItem::getContent(parent, part);
+               return CheckItem::getContent(parent, part);
        }
 
        return nullptr;
index 25f313a..5198b98 100644 (file)
@@ -82,7 +82,7 @@ void SelectItem::unsetCustomResult()
 Evas_Object *SelectItem::getContent(Evas_Object *parent, const char *part)
 {
        if (m_SelectMode == SelectMulti) {
-               return GenlistCheckItem::getContent(parent, part);
+               return CheckItem::getContent(parent, part);
        }
 
        return nullptr;
@@ -95,7 +95,7 @@ void SelectItem::onSelected()
                        m_SelectView->onItemSelected(this);
                }
        } else if (m_SelectMode == SelectMulti) {
-               GenlistCheckItem::onSelected();
+               CheckItem::onSelected();
        }
 }
 
index 0708630..910136d 100644 (file)
@@ -41,12 +41,12 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::onSelected()
+                        * @see GenItem::onSelected()
                         */
                        virtual void onSelected() override;
 
index 0960a05..67a9196 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_DETAILS_BASIC_INFO_ITEM_H
 #define CONTACTS_DETAILS_BASIC_INFO_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include "Ux/SelectTypes.h"
 
 #include <contacts.h>
@@ -42,7 +42,7 @@ namespace Contacts
                 * @brief Genlist item displaying contact's image, name, phonetic name,
                 *        company and favorite status.
                 */
-               class BasicInfoItem : public Ui::GenlistItem
+               class BasicInfoItem : public Ui::GenItem
                {
                public:
                        /**
@@ -70,22 +70,22 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getState()
+                        * @see GenItem::getState()
                         */
                        virtual Eina_Bool getState(Evas_Object *parent, const char *part) override;
 
index fc915c6..1969ebc 100644 (file)
@@ -63,7 +63,7 @@ namespace Contacts
                        virtual void onCreated() override;
                        virtual void onMenuPressed() override;
 
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
                        virtual void onSelectModeChanged(Ux::SelectMode selectMode) override;
 
                        FieldItem *createFieldItem(Model::ContactObject &field);
index cb89e6d..f16b5d7 100644 (file)
@@ -57,17 +57,17 @@ namespace Contacts
                        friend class DetailsView;
 
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistCheckItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
index bc095ed..5ae016f 100644 (file)
@@ -35,7 +35,7 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
index 7582360..f7b51d0 100644 (file)
@@ -34,12 +34,12 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
index 0dbd63a..ce77caa 100644 (file)
@@ -34,7 +34,7 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
                };
index 09baee2..9a9e85f 100644 (file)
@@ -50,7 +50,7 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
index e55e1cc..e158cd8 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_GROUPS_ADD_MEMBERS_ITEM_H
 #define CONTACTS_GROUPS_ADD_MEMBERS_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include "Ux/SelectTypes.h"
 
 #include <vector>
@@ -40,7 +40,7 @@ namespace Contacts
                /**
                 * @brief Genlist item representing group's add members item
                 */
-               class AddMembersItem : public Ui::GenlistItem
+               class AddMembersItem : public Ui::GenItem
                {
                public:
                        /**
index f80c7df..e162dae 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_GROUPS_CREATE_GROUP_ITEM_H
 #define CONTACTS_GROUPS_CREATE_GROUP_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 namespace Contacts
 {
@@ -27,7 +27,7 @@ namespace Contacts
                /**
                 * @brief "Create Group" genlist item.
                 */
-               class CreateGroupItem : public Ui::GenlistItem
+               class CreateGroupItem : public Ui::GenItem
                {
                public:
                        /**
index 1571463..fe79f53 100644 (file)
@@ -24,7 +24,7 @@
 namespace Ui
 {
        class Genlist;
-       class GenlistItem;
+       class GenItem;
 }
 
 namespace Contacts
@@ -56,7 +56,7 @@ namespace Contacts
                private:
                        virtual Evas_Object *onCreate(Evas_Object *parent) override;
                        virtual void onMenuPressed() override;
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
                        void updateCreateItem();
 
                        void onInserted(::Model::DataItem &data);
@@ -64,7 +64,7 @@ namespace Contacts
                        void insertItem(GroupItem *item);
                        void updateItem(GroupItem *item, int changes);
                        void deleteItem(GroupItem *item);
-                       Ui::GenlistItem *getNextItem(Model::Group &group);
+                       Ui::GenItem *getNextItem(Model::Group &group);
 
                        Ui::Genlist *m_Genlist;
                        CreateGroupItem *m_CreateItem;
index dd48851..9c53a31 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_GROUPS_NAME_ITEM_H
 #define CONTACTS_GROUPS_NAME_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 #include <string>
 
@@ -31,7 +31,7 @@ namespace Contacts
 {
        namespace Groups
        {
-               class NameItem : public Ui::GenlistItem
+               class NameItem : public Ui::GenItem
                {
                public:
                        /**
index f9d5bfe..7de4ab7 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_GROUPS_RINGTONE_ITEM_H
 #define CONTACTS_GROUPS_RINGTONE_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 #include "App/AppControl.h"
 
@@ -31,7 +31,7 @@ namespace Contacts
                /**
                 * @brief Genlist item representing group's ringtone item
                 */
-               class RingtoneItem : public Ui::GenlistItem
+               class RingtoneItem : public Ui::GenItem
                {
                public:
                        /**
index ede4763..aae54d1 100644 (file)
@@ -19,7 +19,7 @@
 #define CONTACTS_INPUT_ADD_FIELDS_ITEM_H
 
 #include "Contacts/Model/ContactFields.h"
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include <functional>
 
 namespace Contacts
@@ -29,7 +29,7 @@ namespace Contacts
                /**
                 * @brief Genlist item with buttons for adding contact fields.
                 */
-               class AddFieldsItem : public Ui::GenlistItem
+               class AddFieldsItem : public Ui::GenItem
                {
                public:
                        /**
index 03afceb..1c0b0c9 100644 (file)
@@ -36,7 +36,7 @@ namespace Contacts
                         * @param[in]   parent  Parent genlist item
                         * @param[in]   object  Contact compound object
                         */
-                       ContactCompoundFieldControl(Ui::GenlistItem *parent,
+                       ContactCompoundFieldControl(Ui::GenItem *parent,
                                        Model::ContactCompoundObject &object);
 
                        /**
index c5562b1..43d6519 100644 (file)
@@ -37,7 +37,7 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
@@ -48,7 +48,7 @@ namespace Contacts
                        virtual void onInserted() override;
 
                        /**
-                        * @see GenlistItem::onExpanded()
+                        * @see GenItem::onExpanded()
                         */
                        virtual void onExpanded(bool isExpanded) override;
 
index f1904e2..a9172fb 100644 (file)
@@ -19,7 +19,7 @@
 #define CONTACTS_INPUT_CONTACT_FIELD_ITEM_H
 
 #include "Contacts/Input/ContactFieldSubItem.h"
-#include "Ui/GenlistGroupItem.h"
+#include "Ui/GenGroupItem.h"
 #include <functional>
 
 namespace Contacts
@@ -37,7 +37,7 @@ namespace Contacts
                 * @brief Genlist item representing ContactObject and its first field.
                 */
                class ContactFieldItem :
-                       public Ui::GenlistGroupItem,
+                       public Ui::GenGroupItem,
                        public ContactFieldSubItem
                {
                public:
@@ -74,22 +74,22 @@ namespace Contacts
                        friend class ContactFieldSubItem;
 
                        /**
-                        * @see GenlistItem::getType()
+                        * @see GenItem::getType()
                         */
                        virtual Elm_Genlist_Item_Type getType() const override { return ELM_GENLIST_ITEM_TREE; }
 
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::onInserted()
+                        * @see GenItem::onInserted()
                         */
                        virtual void onInserted() override;
 
index 8bdcd45..ae26c01 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_INPUT_CONTACT_FIELD_SUB_ITEM_H
 #define CONTACTS_INPUT_CONTACT_FIELD_SUB_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 namespace Ui
 {
@@ -37,7 +37,7 @@ namespace Contacts
                /**
                 * @brief Genlist item representing contact field of TypeText or TypeDate type.
                 */
-               class ContactFieldSubItem : virtual public Ui::GenlistItem
+               class ContactFieldSubItem : virtual public Ui::GenItem
                {
                public:
                        /**
@@ -57,7 +57,7 @@ namespace Contacts
                        Ui::Control *getFieldControl() const;
 
                        /**
-                        * @see GenlistItem::isFocusable()
+                        * @see GenItem::isFocusable()
                         */
                        virtual bool isFocusable() const override;
 
@@ -68,27 +68,27 @@ namespace Contacts
 
                protected:
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getState()
+                        * @see GenItem::getState()
                         */
                        virtual Eina_Bool getState(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::onInserted()
+                        * @see GenItem::onInserted()
                         */
                        virtual void onInserted() override;
 
                        /**
-                        * @see GenlistItem::onFocused()
+                        * @see GenItem::onFocused()
                         */
                        virtual void onFocused() override;
 
index f7d1fca..09d08bd 100644 (file)
@@ -42,7 +42,7 @@ namespace Contacts
                        ContactGroupsFieldItem(Model::ContactObject &object);
 
                        /**
-                        * @see GenlistItem::isFocusable()
+                        * @see GenItem::isFocusable()
                         */
                        virtual bool isFocusable() const override;
 
index 7a1f756..de808d1 100644 (file)
@@ -34,7 +34,7 @@ namespace Contacts
                        using ContactFieldItem::ContactFieldItem;
 
                        /**
-                        * @see GenlistItem::isFocusable()
+                        * @see GenItem::isFocusable()
                         */
                        virtual bool isFocusable() const override;
 
index fba10fd..58861b6 100644 (file)
@@ -24,7 +24,7 @@
 
 namespace Ui
 {
-       class GenlistItem;
+       class GenItem;
 }
 
 namespace Contacts
@@ -42,7 +42,7 @@ namespace Contacts
                         * @param[in]   parent  Parent genlist item
                         * @param[in]   field   Contact text field to edit
                         */
-                       ContactTextFieldControl(Ui::GenlistItem *parent,
+                       ContactTextFieldControl(Ui::GenItem *parent,
                                        Model::ContactTextField &field);
                        virtual ~ContactTextFieldControl() override;
 
@@ -80,8 +80,8 @@ namespace Contacts
 
                private:
                        virtual void onCreated() override;
-                       static Ui::GenlistItem *findNextItem(Ui::GenlistItem *item);
-                       void setNextItem(Ui::GenlistItem *item);
+                       static Ui::GenItem *findNextItem(Ui::GenItem *item);
+                       void setNextItem(Ui::GenItem *item);
                        void unsetNextItem();
 
                        void onChanged(Evas_Object *entry, void *eventInfo);
@@ -89,8 +89,8 @@ namespace Contacts
                        void onUnfocused(Evas_Object *entry, void *eventInfo);
                        void onActivated(Evas_Object *entry, void *eventInfo);
 
-                       Ui::GenlistItem *m_ParentItem;
-                       Ui::GenlistItem *m_NextItem;
+                       Ui::GenItem *m_ParentItem;
+                       Ui::GenItem *m_NextItem;
                        Model::ContactTextField &m_Field;
 
                        bool m_IsEmpty;
index 54b7dec..66aef96 100644 (file)
@@ -50,12 +50,12 @@ namespace Contacts
                        const Model::ContactTypedObject &getTypedObject() const;
 
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getState()
+                        * @see GenItem::getState()
                         */
                        virtual Eina_Bool getState(Evas_Object *parent, const char *part) override;
 
index 60b7b57..bc9cf6f 100644 (file)
@@ -24,7 +24,7 @@
 namespace Ui
 {
        class Genlist;
-       class GenlistItem;
+       class GenItem;
 }
 
 namespace Contacts
@@ -84,7 +84,7 @@ namespace Contacts
                        virtual bool onBackPressed() override;
 
                        ContactFieldItem *createFieldItem(Model::ContactObject &field);
-                       Ui::GenlistItem *getNextFieldItem(Model::ContactFieldId fieldId);
+                       Ui::GenItem *getNextFieldItem(Model::ContactFieldId fieldId);
 
                        Model::ContactObject &addField(Model::ContactFieldId fieldId);
                        void removeField(Model::ContactObject &field);
index 533cf64..577ad87 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_LIST_LIST_SECTION_H
 #define CONTACTS_LIST_LIST_SECTION_H
 
-#include "Ui/GenlistGroupItem.h"
+#include "Ui/GenGroupItem.h"
 #include "Common/DataTypes.h"
 
 namespace Model
@@ -40,7 +40,7 @@ namespace Contacts
                /**
                 * @brief Represents list section containing genlist items.
                 */
-               class ListSection : public Ui::GenlistGroupItem
+               class ListSection : public Ui::GenGroupItem
                {
                public:
                        enum SectionMode {
index 962d470..7ab6123 100644 (file)
@@ -30,7 +30,7 @@
 namespace Ui
 {
        class Genlist;
-       class GenlistGroupItem;
+       class GenGroupItem;
 }
 
 namespace Contacts
@@ -83,7 +83,7 @@ namespace Contacts
                private:
                        struct Section
                        {
-                               Ui::GenlistGroupItem *m_Item = nullptr;
+                               Ui::GenGroupItem *m_Item = nullptr;
                                bool m_IsVisible = true;
                        };
 
@@ -106,13 +106,13 @@ namespace Contacts
                        bool onSelectFinished();
                        void onManageFavoritesSelected();
 
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
                        virtual void onSelectModeChanged(Ux::SelectMode selectMode) override;
 
                        void setState(State state, bool isEnabled);
 
-                       Ui::GenlistGroupItem *createMyProfileSection();
-                       Ui::GenlistGroupItem *createListSection(SectionId sectionId);
+                       Ui::GenGroupItem *createMyProfileSection();
+                       Ui::GenGroupItem *createListSection(SectionId sectionId);
                        void fillPersonList();
 
                        Ui::Genlist *createGenlist(Evas_Object *parent);
@@ -120,12 +120,12 @@ namespace Contacts
                        void updateEmptyLayout();
                        void updateEmptyState();
 
-                       Ui::GenlistGroupItem *createSection(SectionId sectionId);
-                       void insertSection(Ui::GenlistGroupItem *section, SectionId sectionId);
+                       Ui::GenGroupItem *createSection(SectionId sectionId);
+                       void insertSection(Ui::GenGroupItem *section, SectionId sectionId);
                        void updateSection(SectionId sectionId);
                        void updateSections();
 
-                       Ui::GenlistItem *getNextSectionItem(SectionId sectionId);
+                       Ui::GenItem *getNextSectionItem(SectionId sectionId);
                        bool getSectionVisibility(SectionId sectionId);
 
                        SearchItem *createSearchItem();
index 6cb3a66..7305ce8 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_LIST_MY_PROFILE_GROUP_H
 #define CONTACTS_LIST_MY_PROFILE_GROUP_H
 
-#include "Ui/GenlistGroupItem.h"
+#include "Ui/GenGroupItem.h"
 
 namespace Contacts
 {
@@ -27,7 +27,7 @@ namespace Contacts
                /**
                 * @brief Represents the group containing "My Profile" genlist item.
                 */
-               class MyProfileGroup : public Ui::GenlistGroupItem
+               class MyProfileGroup : public Ui::GenGroupItem
                {
                public:
                        MyProfileGroup();
index 73bd577..80c5b44 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_LIST_PERSON_GROUP_ITEM_H
 #define CONTACTS_LIST_PERSON_GROUP_ITEM_H
 
-#include "Ui/GenlistGroupItem.h"
+#include "Ui/GenGroupItem.h"
 #include "Utils/UniString.h"
 #include <string>
 
@@ -29,7 +29,7 @@ namespace Contacts
                /**
                 * @brief Person alphabet group item
                 */
-               class PersonGroupItem : public Ui::GenlistGroupItem
+               class PersonGroupItem : public Ui::GenGroupItem
                {
                public:
                        /**
index c6c03ea..7b61a03 100644 (file)
@@ -24,7 +24,7 @@
 namespace Ui
 {
        class Genlist;
-       class GenlistGroupItem;
+       class GenGroupItem;
 }
 
 namespace Contacts
@@ -56,20 +56,20 @@ namespace Contacts
                        virtual Evas_Object *onCreate(Evas_Object *parent) override;
                        virtual void onDestroy() override;
 
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
 
-                       Ui::GenlistGroupItem *createListSection(SectionId sectionId);
+                       Ui::GenGroupItem *createListSection(SectionId sectionId);
                        void createSections();
-                       void insertSection(Ui::GenlistGroupItem *section, SectionId sectionId);
+                       void insertSection(Ui::GenGroupItem *section, SectionId sectionId);
                        void updateSection(SectionId sectionId);
                        void updateSections();
 
-                       Ui::GenlistItem *getNextSectionItem(SectionId sectionId);
+                       Ui::GenItem *getNextSectionItem(SectionId sectionId);
 
                        void onSectionUpdated(ContactItem *item, ::Common::ChangeType change, SectionId sectionId);
 
                        Ui::Genlist *m_Genlist;
-                       Ui::GenlistGroupItem *m_Sections[SectionMax];
+                       Ui::GenGroupItem *m_Sections[SectionMax];
                };
        }
 }
index ce98df1..99e6e9e 100644 (file)
@@ -72,7 +72,7 @@ namespace Contacts
                        Evas_Object *m_CancelButton;
                        Evas_Object *m_DoneButton;
                        Ui::Genlist *m_Genlist;
-                       Ui::GenlistItem *m_Section;
+                       Ui::GenItem *m_Section;
                        std::vector<ReorderData> m_ReorderDatas;
                        ReorderItemCallback m_OnItemReordered;
                };
index cf2124b..9265925 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_LIST_CONTACT_SEARCH_ITEM_H
 #define CONTACTS_LIST_CONTACT_SEARCH_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include <string>
 
 namespace Contacts
@@ -28,7 +28,7 @@ namespace Contacts
                /**
                 * @brief Contact search item
                 */
-               class SearchItem : public Ui::GenlistItem
+               class SearchItem : public Ui::GenItem
                {
                public:
                        /**
index 6e9a187..4d8fb42 100644 (file)
@@ -46,7 +46,7 @@ namespace Contacts
 
                private:
                        virtual Evas_Object *onCreate(Evas_Object *parent) override;
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
 
                        bool onSelectResult(Ux::SelectResults results);
                        void onImportFinished(Settings::ImportController *importer);
index 884fea7..7587a88 100644 (file)
@@ -19,7 +19,7 @@
 #define CONTACTS_SETTINGS_EXPORT_ITEM_H
 
 #include "App/AppControl.h"
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 namespace Contacts
 {
@@ -30,7 +30,7 @@ namespace Contacts
                /**
                 * @brief Export item
                 */
-               class ExportItem : public Ui::GenlistItem
+               class ExportItem : public Ui::GenItem
                {
                private:
                        virtual char *getText(Evas_Object *parent, const char *part) override;
index 33241c8..f7d65c6 100644 (file)
@@ -19,7 +19,7 @@
 #define CONTACTS_SETTINGS_IMPORT_ITEM_H
 
 #include "App/AppControl.h"
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 
 namespace Contacts
 {
@@ -30,7 +30,7 @@ namespace Contacts
                /**
                 * @brief Import item
                 */
-               class ImportItem : public Ui::GenlistItem
+               class ImportItem : public Ui::GenItem
                {
                private:
                        virtual char *getText(Evas_Object *parent, const char *part) override;
index 01bd11c..2cb8285 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_SETTINGS_NAME_FORMAT_ITEM_H
 #define CONTACTS_SETTINGS_NAME_FORMAT_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include <contacts_setting.h>
 
 namespace Contacts
@@ -28,7 +28,7 @@ namespace Contacts
                /**
                 * @brief Name format item
                 */
-               class NameFormatItem : public Ui::GenlistItem
+               class NameFormatItem : public Ui::GenItem
                {
                public:
                        NameFormatItem();
index 1367661..882bffe 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef CONTACTS_SETTINGS_SORT_BY_ITEM_H
 #define CONTACTS_SETTINGS_SORT_BY_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include <contacts_setting.h>
 
 namespace Contacts
@@ -28,7 +28,7 @@ namespace Contacts
                /**
                 * @brief SortBy item
                 */
-               class SortByItem : public Ui::GenlistItem
+               class SortByItem : public Ui::GenItem
                {
                public:
                        SortByItem();
index 56d7fcf..ae17df9 100644 (file)
@@ -167,7 +167,7 @@ void DetailsView::onMenuPressed()
        menu->show();
 }
 
-void DetailsView::onSelectAllInsert(Ui::GenlistItem *item)
+void DetailsView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, m_BasicInfoItem, Ui::Genlist::After);
 }
index 693aa11..0f13238 100644 (file)
@@ -79,7 +79,7 @@ Evas_Object *FieldItem::getContent(Evas_Object *parent, const char *part)
 {
        if (getSelectMode() == Ux::SelectMulti) {
                if (strcmp(part, "elm.swallow.end") == 0) {
-                       return GenlistCheckItem::getContent(parent, part);
+                       return CheckItem::getContent(parent, part);
                }
        }
 
index f334cb7..f82cd1f 100644 (file)
@@ -79,7 +79,7 @@ void GroupsView::onMenuPressed()
        menu->show();
 }
 
-void GroupsView::onSelectAllInsert(Ui::GenlistItem *item)
+void GroupsView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, nullptr, Ui::Genlist::After);
 }
@@ -147,7 +147,7 @@ void GroupsView::deleteItem(GroupItem *item)
        delete item;
 }
 
-Ui::GenlistItem *GroupsView::getNextItem(Group &group)
+Ui::GenItem *GroupsView::getNextItem(Group &group)
 {
        for (auto &&item : getSelectItems()) {
                GroupItem *groupItem = static_cast<GroupItem *>(item);
index 07e2a44..bcaf054 100644 (file)
@@ -22,7 +22,7 @@
 using namespace Contacts::Input;
 using namespace Contacts::Model;
 
-ContactCompoundFieldControl::ContactCompoundFieldControl(Ui::GenlistItem *parent,
+ContactCompoundFieldControl::ContactCompoundFieldControl(Ui::GenItem *parent,
                ContactCompoundObject &object)
        : ContactTextFieldControl(parent, *object.getField<ContactTextField>(0)),
          m_Object(object), m_IsCompoundMode(true)
index 8b9a21b..0346f05 100644 (file)
@@ -62,7 +62,7 @@ void ContactCompoundFieldItem::onExpanded(bool isExpanded)
        auto control = static_cast<ContactCompoundFieldControl *>(getFieldControl());
        control->save();
 
-       GenlistGroupItem::onExpanded(isExpanded);
+       GenGroupItem::onExpanded(isExpanded);
        updateExpandIcon(isExpanded);
        control->setCompoundMode(!isExpanded);
 
index a1d4659..1319ea8 100644 (file)
@@ -19,7 +19,7 @@
 #include "Contacts/Model/ContactTextField.h"
 #include "Contacts/Common/Strings.h"
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include "Utils/Callback.h"
 #include "Utils/Range.h"
 
@@ -38,7 +38,7 @@ namespace
        };
 }
 
-ContactTextFieldControl::ContactTextFieldControl(Ui::GenlistItem *parent,
+ContactTextFieldControl::ContactTextFieldControl(Ui::GenItem *parent,
                Model::ContactTextField &field)
        : m_ParentItem(parent), m_NextItem(nullptr), m_Field(field),
          m_IsEmpty(true), m_IsChanged(false), m_IsUpdating(false)
@@ -118,9 +118,9 @@ void ContactTextFieldControl::onCreated()
        update();
 }
 
-Ui::GenlistItem *ContactTextFieldControl::findNextItem(Ui::GenlistItem *item)
+Ui::GenItem *ContactTextFieldControl::findNextItem(Ui::GenItem *item)
 {
-       while ((item = (Ui::GenlistItem *) item->getNextItem())) {
+       while ((item = (Ui::GenItem *) item->getNextItem())) {
                if (item->isFocusable()) {
                        return item;
                }
@@ -129,7 +129,7 @@ Ui::GenlistItem *ContactTextFieldControl::findNextItem(Ui::GenlistItem *item)
        return nullptr;
 }
 
-void ContactTextFieldControl::setNextItem(Ui::GenlistItem *item)
+void ContactTextFieldControl::setNextItem(Ui::GenItem *item)
 {
        unsetNextItem();
        if (!item) {
index 4ce8ea8..597c884 100644 (file)
@@ -223,7 +223,7 @@ ContactFieldItem *InputView::createFieldItem(ContactObject &field)
        return item;
 }
 
-Ui::GenlistItem *InputView::getNextFieldItem(ContactFieldId fieldId)
+Ui::GenItem *InputView::getNextFieldItem(ContactFieldId fieldId)
 {
        for (unsigned id = fieldId + 1; id < Utils::count(m_Items); ++id) {
                if (m_Items[id]) {
index 318f403..ad7b403 100644 (file)
@@ -262,7 +262,7 @@ void ListView::onManageFavoritesSelected()
        manageFavPopup->create(getEvasObject());
 }
 
-void ListView::onSelectAllInsert(Ui::GenlistItem *item)
+void ListView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, m_SearchItem, Ui::Genlist::After);
 }
@@ -289,14 +289,14 @@ void ListView::setState(State state, bool isEnabled)
        }
 }
 
-Ui::GenlistGroupItem *ListView::createMyProfileSection()
+Ui::GenGroupItem *ListView::createMyProfileSection()
 {
        MyProfileGroup *section = new MyProfileGroup();
        insertSection(section, SectionMyProfile);
        return section;
 }
 
-Ui::GenlistGroupItem *ListView::createListSection(SectionId sectionId)
+Ui::GenGroupItem *ListView::createListSection(SectionId sectionId)
 {
        const char *title = nullptr;
        PersonProvider *provider = nullptr;
@@ -420,9 +420,9 @@ void ListView::updateEmptyState()
        m_IsEmpty = isEmpty;
 }
 
-Ui::GenlistGroupItem *ListView::createSection(SectionId sectionId)
+Ui::GenGroupItem *ListView::createSection(SectionId sectionId)
 {
-       Ui::GenlistGroupItem *section = nullptr;
+       Ui::GenGroupItem *section = nullptr;
        switch (sectionId) {
                case SectionMyProfile:
                        section = createMyProfileSection();
@@ -439,7 +439,7 @@ Ui::GenlistGroupItem *ListView::createSection(SectionId sectionId)
        return section;
 }
 
-void ListView::insertSection(Ui::GenlistGroupItem *section, SectionId sectionId)
+void ListView::insertSection(Ui::GenGroupItem *section, SectionId sectionId)
 {
        m_Genlist->insert(section, nullptr, getNextSectionItem(sectionId));
        elm_genlist_item_select_mode_set(section->getObjectItem(), ELM_OBJECT_SELECT_MODE_NONE);
@@ -447,7 +447,7 @@ void ListView::insertSection(Ui::GenlistGroupItem *section, SectionId sectionId)
 
 void ListView::updateSection(SectionId sectionId)
 {
-       Ui::GenlistGroupItem *section = m_Sections[sectionId].m_Item;
+       Ui::GenGroupItem *section = m_Sections[sectionId].m_Item;
        if (!section) {
                if (getSectionVisibility(sectionId)) {
                        createSection(sectionId);
@@ -476,7 +476,7 @@ void ListView::updateSections()
        }
 }
 
-Ui::GenlistItem *ListView::getNextSectionItem(SectionId sectionId)
+Ui::GenItem *ListView::getNextSectionItem(SectionId sectionId)
 {
        for (unsigned section = sectionId + 1; section < SectionMax; ++section) {
                if (m_Sections[section].m_Item && m_Sections[section].m_Item->isInserted()) {
@@ -522,7 +522,7 @@ SearchItem *ListView::createSearchItem()
        elm_genlist_item_select_mode_set(item->getObjectItem(), ELM_OBJECT_SELECT_MODE_NONE);
 
        Elm_Object_Item *indexItem = insertIndexItem(SYMBOL_MAGNIFIER, nullptr);
-       elm_object_item_data_set(indexItem, static_cast<Ui::GenlistItem *>(item));
+       elm_object_item_data_set(indexItem, static_cast<Ui::GenItem *>(item));
        return item;
 }
 
@@ -706,7 +706,7 @@ void ListView::onAddPressed(Evas_Object *button, void *eventInfo)
 
 void ListView::onIndexChanged(Evas_Object *index, Elm_Object_Item *indexItem)
 {
-       Ui::GenlistItem *item = (Ui::GenlistItem *) elm_object_item_data_get(indexItem);
+       Ui::GenItem *item = (Ui::GenItem *) elm_object_item_data_get(indexItem);
        item->scrollTo(ELM_GENLIST_ITEM_SCROLLTO_TOP);
 }
 
index 116a144..960847e 100644 (file)
@@ -44,7 +44,7 @@ Elm_Object_Item *PersonGroupItem::getIndexItem() const
 void PersonGroupItem::setIndexItem(Elm_Object_Item *item)
 {
        m_IndexItem = item;
-       elm_object_item_data_set(m_IndexItem, static_cast<GenlistItem *>(this));
+       elm_object_item_data_set(m_IndexItem, static_cast<GenItem *>(this));
 }
 
 char *PersonGroupItem::getText(Evas_Object *parent, const char *part)
index 6c35b15..626bfb8 100644 (file)
@@ -60,12 +60,12 @@ void RemoveFavView::onDestroy()
        }
 }
 
-void RemoveFavView::onSelectAllInsert(Ui::GenlistItem *item)
+void RemoveFavView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, nullptr, Ui::Genlist::After);
 }
 
-Ui::GenlistGroupItem *RemoveFavView::createListSection(SectionId sectionId)
+Ui::GenGroupItem *RemoveFavView::createListSection(SectionId sectionId)
 {
        const char *title = nullptr;
        PersonProvider *provider = nullptr;
@@ -102,7 +102,7 @@ void RemoveFavView::createSections()
        }
 }
 
-void RemoveFavView::insertSection(Ui::GenlistGroupItem *section, SectionId sectionId)
+void RemoveFavView::insertSection(Ui::GenGroupItem *section, SectionId sectionId)
 {
        m_Genlist->insert(section, nullptr, getNextSectionItem(sectionId));
        elm_genlist_item_select_mode_set(section->getObjectItem(), ELM_OBJECT_SELECT_MODE_NONE);
@@ -110,7 +110,7 @@ void RemoveFavView::insertSection(Ui::GenlistGroupItem *section, SectionId secti
 
 void RemoveFavView::updateSection(SectionId sectionId)
 {
-       Ui::GenlistGroupItem *section = m_Sections[sectionId];
+       Ui::GenGroupItem *section = m_Sections[sectionId];
 
        if (!section->isEmpty()) {
                if (!section->isInserted()) {
@@ -130,7 +130,7 @@ void RemoveFavView::updateSections()
        }
 }
 
-Ui::GenlistItem *RemoveFavView::getNextSectionItem(SectionId sectionId)
+Ui::GenItem *RemoveFavView::getNextSectionItem(SectionId sectionId)
 {
        for (unsigned section = sectionId + 1; section < SectionMax; ++section) {
                if (m_Sections[section] && m_Sections[section]->isInserted()) {
index e1437dd..0506026 100644 (file)
@@ -21,6 +21,7 @@
 #include "Contacts/List/ReorderView.h"
 #include "Contacts/Model/ContactData.h"
 
+#include "Ui/Genlist.h"
 #include "Utils/Callback.h"
 #include "Utils/Logger.h"
 
index 5b473fe..33d5555 100644 (file)
@@ -58,7 +58,7 @@ Evas_Object *VcardView::onCreate(Evas_Object *parent)
        return m_Genlist->getEvasObject();
 }
 
-void VcardView::onSelectAllInsert(Ui::GenlistItem *item)
+void VcardView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, nullptr, Ui::Genlist::After);
 }
index edc8b50..56294a5 100644 (file)
@@ -19,7 +19,7 @@
 #define LOGS_DETAILS_ACTION_ITEM_H
 
 #include "Logs/Model/LogGroup.h"
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include "Common/Actions.h"
 
 namespace Logs
@@ -35,7 +35,7 @@ namespace Logs
                 * @brief Genlist item representing a item which value can be used to
                 *        initiate some external action.
                 */
-               class ActionItem : public Ui::GenlistItem
+               class ActionItem : public Ui::GenItem
                {
                public:
                        /**
@@ -53,22 +53,22 @@ namespace Logs
 
                protected:
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::onSelected()
+                        * @see GenItem::onSelected()
                         */
                        virtual void onSelected() override;
 
index ecdbe6a..f26838b 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef LOGS_DETAILS_BASIC_INFO_ITEM_H
 #define LOGS_DETAILS_BASIC_INFO_ITEM_H
 
-#include "Ui/GenlistItem.h"
+#include "Ui/GenItem.h"
 #include "App/AppControl.h"
 #include "Logs/Model/LogGroup.h"
 
@@ -35,7 +35,7 @@ namespace Logs
                /**
                 * @brief Genlist item displaying contact's image, name.
                 */
-               class BasicInfoItem : public Ui::GenlistItem
+               class BasicInfoItem : public Ui::GenItem
                {
                public:
                        /**
@@ -64,27 +64,27 @@ namespace Logs
 
                protected:
                        /**
-                        * @see GenlistItem::getItemClass()
+                        * @see GenItem::getItemClass()
                         */
                        virtual Elm_Genlist_Item_Class *getItemClass() const override;
 
                        /**
-                        * @see GenlistItem::getText()
+                        * @see GenItem::getText()
                         */
                        virtual char *getText(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getContent()
+                        * @see GenItem::getContent()
                         */
                        virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::getState()
+                        * @see GenItem::getState()
                         */
                        virtual Eina_Bool getState(Evas_Object *parent, const char *part) override;
 
                        /**
-                        * @see GenlistItem::onSelected()
+                        * @see GenItem::onSelected()
                         */
                        virtual void onSelected() override;
 
index aa2b104..d38562c 100644 (file)
@@ -66,7 +66,7 @@ namespace Logs
                        virtual void onMenuPressed() override;
 
                        virtual void onSelectModeChanged(Ux::SelectMode selectMode) override;
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
 
                        void fillGenList();
                        void insertBasicInfoItem();
index e4ecafb..cf679fa 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef LOGS_LIST_LOG_GROUP_ITEM_H
 #define LOGS_LIST_LOG_GROUP_ITEM_H
 
-#include "Ui/GenlistGroupItem.h"
+#include "Ui/GenGroupItem.h"
 #include <time.h>
 
 namespace Logs
@@ -28,7 +28,7 @@ namespace Logs
                /**
                 * @brief Group log item object
                 */
-               class LogGroupItem : public Ui::GenlistGroupItem
+               class LogGroupItem : public Ui::GenGroupItem
                {
                public:
                        /**
index d24d871..ac3b896 100644 (file)
@@ -74,7 +74,7 @@ namespace Logs
                        virtual void onCreated() override;
                        virtual void onNavigation(bool isCurrentView) override;
                        virtual void onMenuPressed() override;
-                       virtual void onSelectAllInsert(Ui::GenlistItem *item) override;
+                       virtual void onSelectAllInsert(Ui::GenItem *item) override;
 
                        void fillLayout();
                        void updateLayout(bool isEmpty);
index ab35ec1..c9905f9 100644 (file)
@@ -116,7 +116,7 @@ void DetailsView::onSelectModeChanged(SelectMode selectMode)
        }
 }
 
-void DetailsView::onSelectAllInsert(Ui::GenlistItem *item)
+void DetailsView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, nullptr, Ui::Genlist::After);
 }
@@ -184,7 +184,7 @@ LogGroupItem *DetailsView::getLastGroupItem()
 {
        if (!m_LastGroupItem) {
                for (auto &&item : *m_Genlist) {
-                       if (((Ui::GenlistItem *)item)->isGroupItem()) {
+                       if (((Ui::GenItem *)item)->isGroupItem()) {
                                setLastGroupItem(dynamic_cast<LogGroupItem *>(item));
                                break;
                        }
index 99a4424..069309d 100644 (file)
@@ -136,7 +136,7 @@ void LogsView::onMenuPressed()
        menu->show();
 }
 
-void LogsView::onSelectAllInsert(Ui::GenlistItem *item)
+void LogsView::onSelectAllInsert(Ui::GenItem *item)
 {
        m_Genlist->insert(item, nullptr, nullptr, Ui::Genlist::After);
 }
@@ -259,9 +259,8 @@ LogGroupItem *LogsView::getLastGroupItem()
 {
        if (!m_LastGroupItem) {
                for (auto &&item : *m_Genlist) {
-                       auto genlistItem = static_cast<Ui::GenlistItem *>(item);
-                       if (genlistItem->isGroupItem()) {
-                               setLastGroupItem(dynamic_cast<LogGroupItem *>(genlistItem));
+                       if (item->isGroupItem()) {
+                               setLastGroupItem(dynamic_cast<LogGroupItem *>(item));
                                break;
                        }
                }
@@ -332,7 +331,7 @@ void LogsView::onLogInserted(LogGroup *group)
 
 void LogsView::onLogItemDelete(LogItem *item)
 {
-       Ui::GenlistGroupItem *groupItem = item->getParentItem();
+       Ui::GenGroupItem *groupItem = item->getParentItem();
        removeSelectItem(item);
        delete item;