TizenRefApp-8151 Implement base InputView class 67/119367/6
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 16 Mar 2017 12:30:25 +0000 (14:30 +0200)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 20 Mar 2017 08:52:11 +0000 (01:52 -0700)
Change-Id: I1a60015c9a21244a826dfeac9fb38cd947e3175e
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
23 files changed:
inc/Resource.h
res/edje/input_layout.edc [new file with mode: 0644]
res/edje/search_bar.edc
src/Common/Controller/inc/InputFrame.h [new file with mode: 0644]
src/Common/Controller/src/InputFrame.cpp [new file with mode: 0644]
src/Common/View/inc/Entry.h [new file with mode: 0644]
src/Common/View/inc/InputLayout.h [new file with mode: 0644]
src/Common/View/inc/NaviFrameItem.h
src/Common/View/inc/View.h
src/Common/View/src/Entry.cpp [new file with mode: 0644]
src/Common/View/src/InputLayout.cpp [new file with mode: 0644]
src/Common/View/src/NaviFrameItem.cpp
src/Common/View/src/NaviFrameView.cpp
src/Composer/Controller/inc/RecipFrame.h
src/Composer/Controller/inc/RecipInputFrame.h [new file with mode: 0644]
src/Composer/Controller/src/RecipFrame.cpp
src/Composer/Controller/src/RecipInputFrame.cpp [new file with mode: 0644]
src/Composer/View/inc/MsgBodyView.h
src/Composer/View/inc/RecipEntryView.h [deleted file]
src/Composer/View/inc/RecipFieldView.h [new file with mode: 0644]
src/Composer/View/src/MsgBodyView.cpp
src/Composer/View/src/RecipEntryView.cpp [deleted file]
src/Composer/View/src/RecipFieldView.cpp [new file with mode: 0644]

index 631b583678cb77266eb4921a0236c6df6ca8e262..0ef78721705cc1d25b71e70e311a6e88d9fcb690 100644 (file)
@@ -43,5 +43,6 @@
 #define MSG_BODY_EDJ_PATH                EDJ_PATH"/msg_body.edj"
 #define SEARCH_BAR_EDJ_PATH              EDJ_PATH"/search_bar.edj"
 #define CONV_GENLIST_THEME_EDJ_PATH      EDJ_PATH"/conv_genlist_theme.edj"
+#define INPUT_LAYOUT_EDJ_PATH            EDJ_PATH"/input_layout.edj"
 
 #endif /* RESOURCE_H_ */
diff --git a/res/edje/input_layout.edc b/res/edje/input_layout.edc
new file mode 100644 (file)
index 0000000..84a4ceb
--- /dev/null
@@ -0,0 +1,57 @@
+#include "macros.inl"
+
+collections {
+   BASE_SCALE;
+   group {
+      name: "main";
+      parts {
+         PADDING_TOP("entry.top.pad", 20);
+         PADDING_LEFT("entry.left.pad", 65);
+         PADDING_RIGHT("entry.right.pad", 65);
+         PADDING_BOTTOM("padding_text_bottom", 5);
+         part {
+            name: "entry.swl";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 { relative : 1.0 1.0; to_x: "entry.left.pad"; to_y: "entry.top.pad"; }
+               rel2 { relative : 0.0 0.0; to_x: "entry.right.pad"; to_y: "predic_bar.swl"; }
+               align: 0.0 0.5;
+               fixed: 1 1;
+               max: 250 -1;
+            }
+         }
+         part {
+            name: "predic_bar.swl";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 { relative: 0.0 1.0; }
+               rel2 { relative: 1.0 2.0; }
+               align: 0.5 0.0;
+               visible: 0;
+               min: 200 50;
+               max: -1 50;
+            }
+            description {
+               state: "show" 0.0;
+               inherit: "default";
+               visible: 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 1.0; }
+               align: 0.5 1.0;
+            }
+            description {
+               state: "hide" 0.0;
+               inherit: "default";
+            }
+         }
+      }
+      programs {
+         SIG("show_predic_bar", "show", "predic_bar.swl");
+         SIG("hide_predic_bar", "hide", "predic_bar.swl");
+      }
+   }
+}
index 4ce7c216addd3766894b7dc30a040384cb90cf1d..3267bcc9bf671766c702f8a9952e671ee1e967a0 100644 (file)
@@ -5,7 +5,7 @@ collections {
    styles {
       style {
          name: "predictive_style";
-         base: "font=Tizen:style=Regular font_size=34 color=#FAFAFAFF align=left";
+         base: "font=Tizen:weight=Normal:width=Condensed font_size=34 color=#FAFAFAFF align=left";
          tag:  "br" "\n";
          tag:  "hilight" "+ font=Tizen:style=Bold";
          tag:  "b" "+ font=Tizen:style=Bold";
@@ -14,7 +14,7 @@ collections {
       }
       style {
          name: "pressed_predictive_style";
-         base: "font=Tizen:style=Regular font_size=34 color=#FAFAFA66 align=left";
+         base: "font=Tizen:weight=Normal:width=Condensed font_size=34 color=#FAFAFA66 align=left";
          tag:  "br" "\n";
          tag:  "hilight" "+ font=Tizen:style=Bold";
          tag:  "b" "+ font=Tizen:style=Bold";
@@ -34,10 +34,10 @@ collections {
                color: 46 46 46 128;
             }
          }
-         PADDING_TOP("padding_top", 0);
+         PADDING_TOP("padding_text_top", 6);
          PADDING_LEFT("padding_left", 48);
          PADDING_RIGHT("padding_right", 43);
-         PADDING_BOTTOM("padding_text_bottom", 5);
+         PADDING_BOTTOM("padding_text_bottom", 2);
          part {
             name: "swl.button";
             type: SWALLOW;
@@ -45,7 +45,7 @@ collections {
             description {
                state: "default" 0.0;
                min: 42 42;
-               min: 42 42;
+               max: 42 42;
                fixed: 1 0;
                rel1 { relative : 0.0 0.0; to_x: "padding_right"; }
                rel2 { relative : 0.0 1.0; to_x: "padding_right"; }
@@ -91,7 +91,7 @@ collections {
                min: 0 42;
                max: -1 42;
                fixed: 1 1;
-               rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; }
+               rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_text_top"; }
                rel2 { relative: 0.0 0.0; to_x: "divider"; to_y: "padding_text_bottom"; }
                align: 0.0 0.5;
                text {
@@ -100,7 +100,6 @@ collections {
                   align: 0.0 0.5;
                   ellipsis: -1.0;
                   fade_ellipsis: 1.0;
-                  text: "text text text text text text";
                }
             }
             description {
diff --git a/src/Common/Controller/inc/InputFrame.h b/src/Common/Controller/inc/InputFrame.h
new file mode 100644 (file)
index 0000000..3905a75
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2016  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 InputFrame_h_
+#define InputFrame_h_
+
+#include "FrameController.h"
+#include "InputLayout.h"
+
+namespace Msg {
+    class InputFrame
+        : public FrameController {
+
+        public:
+            InputFrame(NaviFrameController &parent);
+            virtual ~InputFrame();
+
+            Entry &getEntry();
+            void setPredictBar(Evas_Object *obj);
+            void showPredictBar(bool value);
+            InputLayout &getLayout();
+
+        protected:
+            // NaviFrameItem
+            void onAttached(ViewItem &item) override;
+
+        private:
+            void onHwBackButtonPreessed(Evas_Object *obj, void *event_info);
+            void onInputPanelEvent(Ecore_IMF_Context *ctx, int value);
+
+            void prepareLayout();
+            void prepareEntry();
+
+        private:
+            InputLayout *m_pLayout;
+            Entry *m_pEntry;
+    };
+}
+
+#endif /* InputFrame_h_ */
diff --git a/src/Common/Controller/src/InputFrame.cpp b/src/Common/Controller/src/InputFrame.cpp
new file mode 100644 (file)
index 0000000..a4d1322
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2016  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 "InputFrame.h"
+
+using namespace Msg;
+
+InputFrame::InputFrame(NaviFrameController &parent)
+    : FrameController(parent)
+    , m_pLayout(nullptr)
+    , m_pEntry(nullptr)
+{
+    prepareLayout();
+    prepareEntry();
+}
+
+InputFrame::~InputFrame()
+{
+    // TODO: check this
+    m_pEntry->delInputPanelEventCb(ECORE_IMF_INPUT_PANEL_STATE_EVENT, makeCbFirst(&InputFrame::onInputPanelEvent));
+}
+
+void InputFrame::onAttached(ViewItem &item)
+{
+    FrameController::onAttached(item);
+    setContent(*m_pLayout);
+}
+
+Entry &InputFrame::getEntry()
+{
+    return *m_pEntry;
+}
+
+void InputFrame::setPredictBar(Evas_Object *obj)
+{
+    m_pLayout->setPredictBar(obj);
+}
+
+void InputFrame::showPredictBar(bool value)
+{
+    m_pLayout->showPredictBar(value);
+}
+
+InputLayout &InputFrame::getLayout()
+{
+    return *m_pLayout;
+}
+
+void InputFrame::prepareLayout()
+{
+    if (!m_pLayout) {
+        m_pLayout = new InputLayout(getParent());
+    }
+}
+
+void InputFrame::prepareEntry()
+{
+    if (!m_pEntry) {
+        m_pEntry = new Entry(*m_pLayout);
+        m_pEntry->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&InputFrame::onHwBackButtonPreessed), this);
+        m_pEntry->addInputPanelEventCb(ECORE_IMF_INPUT_PANEL_STATE_EVENT, makeCbFirst(&InputFrame::onInputPanelEvent), this);
+        m_pEntry->setSingleLine(true);
+        m_pEntry->setFocus(true);
+        m_pEntry->setScrollable(true);
+        m_pEntry->setScrollerPolicy(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_ON);
+        m_pLayout->setEntry(*m_pEntry);
+    }
+}
+
+void InputFrame::onHwBackButtonPreessed(Evas_Object *obj, void *event_info)
+{
+    MSG_LOG("");
+    // Empty callback for back button
+}
+
+void InputFrame::onInputPanelEvent(Ecore_IMF_Context *ctx, int value)
+{
+    switch (value) {
+    case ECORE_IMF_INPUT_PANEL_STATE_HIDE:
+        if (!isPause())
+            pop();
+        break;
+    }
+}
diff --git a/src/Common/View/inc/Entry.h b/src/Common/View/inc/Entry.h
new file mode 100644 (file)
index 0000000..5c1dde2
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2016  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 Entry_h_
+#define Entry_h_
+
+#include "View.h"
+
+namespace Msg {
+    class Entry
+        : public View {
+
+        public:
+            typedef void (*InputPanelEventCb) (void *data, Ecore_IMF_Context *ctx, int value);
+
+        public:
+            Entry(Evas_Object *parent);
+            virtual ~Entry();
+
+            void setInputPanelReturnType(Elm_Input_Panel_Return_Key_Type retType);
+            void setGuideText(const TText &text);
+            std::string getText() const;
+            const char *getEntry() const;
+            void setEditable(bool value);
+            void enabledInputPanel(bool value);
+            void setScrollerPolicy(Elm_Scroller_Policy policyH, Elm_Scroller_Policy policyV);
+            void setAutocapitalType(Elm_Autocapital_Type type);
+            void setScrollable(bool value);
+            void setSingleLine(bool value);
+            void setCursorPos(int pos);
+            int getCursorPos() const;
+            void setEditInfo(Entry &entry);
+            bool isEmpty() const;
+            void clear();
+
+            void addInputPanelEventCb(Ecore_IMF_Input_Panel_Event type, InputPanelEventCb cb, const void *data);
+            void delInputPanelEventCb(Ecore_IMF_Input_Panel_Event type, InputPanelEventCb cb);
+    };
+}
+
+#endif /* Entry_h_ */
diff --git a/src/Common/View/inc/InputLayout.h b/src/Common/View/inc/InputLayout.h
new file mode 100644 (file)
index 0000000..a2c470a
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016  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 InputLayout_h_
+#define InputLayout_h_
+
+#include "Entry.h"
+
+namespace Msg {
+    class InputLayout
+        : public View {
+
+        public:
+            InputLayout(Evas_Object *parent);
+            virtual ~InputLayout();
+
+            void setPredictBar(Evas_Object *obj);
+            void setEntry(Evas_Object *obj);
+            void showPredictBar(bool value);
+    };
+}
+
+#endif /* InputLayout_h_ */
index b230837887aecd69b7ae2804508f073510a646df..b4a71706d9778fd97e695ae39db77b1615d6e21b 100644 (file)
@@ -40,18 +40,7 @@ namespace Msg
         friend class NaviFrameView;
 
         public:
-            /**
-             * @brief An identifiers of buttons that can be shown on the top naviframe-item.
-             */
-            enum NaviButtonId
-            {
-                NaviCancelButtonId = 0,/**< Cancel-button */
-                NaviOkButtonId,        /**< OK-button */
-                NaviCenterButtonId,    /**< Central-button */
-                NaviPrevButtonId,      /**< "Previous"-button */
-                NaviExpandButtonId,    /**< "Expand"-button */
-                NaviButtonMax
-            };
+            typedef void (*PopCb)(NaviFrameItem &, void *);
 
         public:
             /**
@@ -75,16 +64,27 @@ namespace Msg
              */
             bool isPopping() const;
 
+            /**
+             * @brief Set pop callback (called before start pop)
+             * @param cb pop callback
+             * @param data user data
+             */
+            void setOnPopCb(PopCb cb, void *data);
+
         protected:
-            virtual void onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId) {};
+            virtual bool onRequestPop();
 
             //ViewItem
             void onAttached(ViewItem &item) override;
             virtual void onTransitionFinished(NaviFrameItem &item) {};
 
+            void notifyOnPop();
+
         private:
             NaviFrameView &m_Parent;
             bool m_IsPopping;
+            PopCb m_pPopCb;
+            void *m_pPopCbData;
     };
 }
 
index ae797ad3476fe324eb7709835b6af320ec261693..86c7f11b5d806237ef171da292e86c7e1542989b 100644 (file)
@@ -76,14 +76,6 @@ namespace Msg
              */
             void setSizeHintAlign(double x, double y);
 
-            /**
-             * @brief Make the scroller minimum size limited to the minimum size of the view's content
-             *
-             * @param[in] w Enable limiting minimum size horizontally
-             * @param[in] h Enable limiting minimum size vertically
-             */
-            void setScrollerContentMinLimit(Eina_Bool w, Eina_Bool h);
-
             /**
              * @brief Sets size-weight and size-align hints in order to make view expanded.
              */
@@ -304,6 +296,7 @@ namespace Msg
 
             static void setText(Evas_Object *obj, const TText &text, const char *part = nullptr);
             static void setText(Evas_Object *obj, const std::string &text, const char *part = nullptr);
+            static void setText(Evas_Object *obj, const char *text, const char *part = nullptr);
 
             static Evas_Object *addLayout(Evas_Object *parent, const std::string &edjePath, const std::string &group);
             static Evas_Object *addIconButton(Evas_Object *parent, const std::string &iconName, Evas_Smart_Cb clickedCb = nullptr, void *cbData = nullptr);
@@ -375,11 +368,6 @@ namespace Msg
         evas_object_size_hint_align_set(m_pEo, x, y);
     }
 
-    inline void View::setScrollerContentMinLimit(Eina_Bool w, Eina_Bool h)
-    {
-        elm_scroller_content_min_limit(m_pEo, w, h);
-    }
-
     inline void View::setSizeHintMin(Evas_Coord w, Evas_Coord h)
     {
         evas_object_size_hint_min_set(m_pEo, w, h);
@@ -452,7 +440,8 @@ namespace Msg
 
     inline void View::setText(const char *text, const char *part)
     {
-        elm_object_part_text_set(m_pEo, part, text);
+        const char *notNullText = text ? text : "";
+        elm_object_part_text_set(m_pEo, part, notNullText);
     }
 
     inline void View::setText(const std::string &text, const char *part)
@@ -482,7 +471,12 @@ namespace Msg
 
     inline void View::setText(Evas_Object *obj, const std::string &text, const char *part)
     {
-        elm_object_part_text_set(obj, part, text.c_str());
+        setText(obj, part, text.c_str());
+    }
+
+    inline void View::setText(Evas_Object *obj, const char *text, const char *part)
+    {
+        elm_object_part_text_set(obj, part, text);
     }
 
     inline std::string View::getText(const char *part) const
diff --git a/src/Common/View/src/Entry.cpp b/src/Common/View/src/Entry.cpp
new file mode 100644 (file)
index 0000000..1f2bc08
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2016  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 "Entry.h"
+
+using namespace Msg;
+
+Entry::Entry(Evas_Object *parent)
+{
+    setEo(elm_entry_add(parent));
+    // Default settings:
+    setEditable(true);
+    setAutocapitalType(ELM_AUTOCAPITAL_TYPE_NONE);
+    elm_entry_cnp_mode_set(getEo(), ELM_CNP_MODE_PLAINTEXT);
+    elm_entry_context_menu_disabled_set(getEo(), true);
+    elm_entry_end_visible_set(getEo(), false);
+    eext_entry_selection_back_event_allow_set(getEo(), true);
+}
+
+Entry::~Entry()
+{
+}
+
+void Entry::setEditable(bool value)
+{
+    elm_entry_editable_set(getEo(), value);
+}
+
+void Entry::enabledInputPanel(bool value)
+{
+    elm_entry_input_panel_enabled_set(getEo(), value);
+}
+
+void Entry::setInputPanelReturnType(Elm_Input_Panel_Return_Key_Type retType)
+{
+    elm_entry_input_panel_return_key_type_set(getEo(), retType);
+}
+
+void Entry::setGuideText(const TText &text)
+{
+    View::setText(getEo(), text, "elm.guide");
+}
+
+std::string Entry::getText() const
+{
+    return markupToUtf8(getEntry());
+}
+
+const char *Entry::getEntry() const
+{
+    return elm_entry_entry_get(getEo());
+}
+
+void Entry::setScrollerPolicy(Elm_Scroller_Policy policyH, Elm_Scroller_Policy policyV)
+{
+    elm_scroller_policy_set(getEo(), policyH, policyV);
+}
+
+void Entry::setAutocapitalType(Elm_Autocapital_Type type)
+{
+    elm_entry_autocapital_type_set(getEo(), type);
+}
+
+void Entry::setScrollable(bool value)
+{
+    elm_entry_scrollable_set(getEo(), value);
+}
+
+void Entry::setSingleLine(bool value)
+{
+    elm_entry_single_line_set(getEo(), value);
+}
+
+void Entry::setCursorPos(int pos)
+{
+    elm_entry_cursor_pos_set(getEo(), pos);
+}
+
+int Entry::getCursorPos() const
+{
+    return elm_entry_cursor_pos_get(getEo());
+}
+
+void Entry::setEditInfo(Entry &entry)
+{
+    setText(entry.getEntry());
+    setCursorPos(getCursorPos());
+}
+
+bool Entry::isEmpty() const
+{
+    const char *text = getEntry();
+    return text ? text[0] == '\0' : true;
+}
+
+void Entry::clear()
+{
+    View::setText(getEo(), "");
+}
+
+void Entry::addInputPanelEventCb(Ecore_IMF_Input_Panel_Event type, InputPanelEventCb cb, const void *data)
+{
+    Ecore_IMF_Context *imf = (Ecore_IMF_Context*)elm_entry_imf_context_get(getEo());
+    if (imf)
+        ecore_imf_context_input_panel_event_callback_add(imf, type, cb, data);
+}
+
+void Entry::delInputPanelEventCb(Ecore_IMF_Input_Panel_Event type, InputPanelEventCb cb)
+{
+    Ecore_IMF_Context *imf = (Ecore_IMF_Context*)elm_entry_imf_context_get(getEo());
+    if (imf)
+        ecore_imf_context_input_panel_event_callback_del(imf, type, cb);
+}
diff --git a/src/Common/View/src/InputLayout.cpp b/src/Common/View/src/InputLayout.cpp
new file mode 100644 (file)
index 0000000..5d6f1a9
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2016  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 "InputLayout.h"
+
+using namespace Msg;
+
+InputLayout::InputLayout(Evas_Object *parent)
+{
+    setEo(addLayout(parent, INPUT_LAYOUT_EDJ_PATH, "main"));
+}
+
+InputLayout::~InputLayout()
+{
+}
+
+void InputLayout::setPredictBar(Evas_Object *obj)
+{
+    setContent(obj, "predic_bar.swl");
+}
+
+void InputLayout::setEntry(Evas_Object *obj)
+{
+    setContent(obj, "entry.swl");
+}
+
+void InputLayout::showPredictBar(bool value)
+{
+    const char *sig = value ? "show_predic_bar" : "hide_predic_bar";
+    emitSignal(sig);
+}
index 024988cfd3e7448760b787ea67e7157fe1953ca7..0e5bc911a8e7060e421b289664f7181c5efc6728 100644 (file)
@@ -25,6 +25,8 @@ NaviFrameItem::NaviFrameItem(NaviFrameView &parent)
     : ViewItem()
     , m_Parent(parent)
     , m_IsPopping(false)
+    , m_pPopCb(nullptr)
+    , m_pPopCbData(nullptr)
 {
 }
 
@@ -47,6 +49,23 @@ bool NaviFrameItem::isPopping() const
     return m_IsPopping;
 }
 
+void NaviFrameItem::setOnPopCb(PopCb cb, void *data)
+{
+    m_pPopCb = cb;
+    m_pPopCbData = data;
+}
+
+void NaviFrameItem::notifyOnPop()
+{
+    if (m_pPopCb)
+        m_pPopCb(*this, m_pPopCbData);
+}
+
+bool NaviFrameItem::onRequestPop()
+{
+    return true;
+}
+
 void NaviFrameItem::onAttached(ViewItem &item)
 {
     ViewItem::onAttached(item);
index 647190c3d04c0fb041485250386eafac64ee90e7..66943dd95454ccec7d45becbd7e1c130cc044b98 100644 (file)
@@ -130,8 +130,13 @@ void NaviFrameView::pop()
 
 void NaviFrameView::pop(NaviFrameItem &item)
 {
-    // Workaround solution to avoid rejected JIRA issue: http://suprem.sec.samsung.net/jira/browse/TSAM-6776
+    if (item.m_IsPopping || !item.onRequestPop())
+        return;
+
     item.m_IsPopping = true;
+    item.notifyOnPop();
+
+    // Workaround solution to avoid rejected JIRA issue: http://suprem.sec.samsung.net/jira/browse/TSAM-6776
     if (getTransitionStatus())
     {
         m_ItemsToDelete.push_back(&item);
index d671d3a24c84a65c136aba4b0b78290c764aa28c..a80acc676208bf5acd64a93d6faa6df066ac0e2e 100644 (file)
 #ifndef RecipFrame_h_
 #define RecipFrame_h_
 
+#include "RecipFieldView.h"
 #include "FrameController.h"
 #include "DefaultLayout.h"
 #include "BottomButton.h"
 #include "RecipLayout.h"
-#include "RecipEntryView.h"
+#include "RecipInputFrame.h"
 
 namespace Msg {
     class RecipFrame
-        : public FrameController {
+        : public FrameController
+        , private IRecipFieldViewListener {
 
         public:
             RecipFrame(NaviFrameController &parent);
@@ -41,16 +43,25 @@ namespace Msg {
             // Bottom Button:
             void onNextButtonClicked(Evas_Object *obj, void *event);
 
+            // IRecipFieldViewListener:
+            void onFieldClicked(RecipFieldView &obj) override;
+            void onClearButtonClicked(RecipFieldView &obj) override;
+            void onContactButtonClicked(RecipFieldView &obj) override;
+
+            void onInputFramePop(NaviFrameItem &item);
+
         private:
             void prepareLayouts();
             void prepareNextButton();
             void prepareEntry();
+            void showInputFrame();
 
         private:
             DefaultLayout *m_pBaseLayout;
             RecipLayout *m_pLayout;
             BottomButton *m_pNextButton;
-            RecipEntryView *m_pEntry;
+            RecipFieldView *m_pRecipField;
+            RecipInputFrame *m_pInputFrame;
     };
 }
 
diff --git a/src/Composer/Controller/inc/RecipInputFrame.h b/src/Composer/Controller/inc/RecipInputFrame.h
new file mode 100644 (file)
index 0000000..a44d946
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2016  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 RecipInputFrame_h_
+#define RecipInputFrame_h_
+
+#include "InputFrame.h"
+#include "SearchBar.h"
+
+namespace Msg {
+
+    class RecipInputFrame
+        : public InputFrame {
+
+        public:
+            RecipInputFrame(NaviFrameController &parent);
+            virtual ~RecipInputFrame();
+
+        private:
+            // NaviFrameItem:
+            void onAttached(ViewItem &item) override;
+            bool onRequestPop() override;
+
+        private:
+            SearchBar *m_pSearchBar;
+    };
+}
+
+#endif /* RecipInputFrame_h_ */
index 90f29b3fa9bb9dba98747d4469e5165b05946450..a270daef70e8780b3414d7b17d19b73c51226a48 100644 (file)
@@ -25,7 +25,8 @@ RecipFrame::RecipFrame(NaviFrameController &parent)
     , m_pBaseLayout(nullptr)
     , m_pLayout(nullptr)
     , m_pNextButton(nullptr)
-    , m_pEntry(nullptr)
+    , m_pRecipField(nullptr)
+    , m_pInputFrame(nullptr)
 {
     MSG_LOG("");
     prepareLayouts();
@@ -64,9 +65,19 @@ void RecipFrame::prepareNextButton()
 
 void RecipFrame::prepareEntry()
 {
-    if (!m_pEntry) {
-        m_pEntry = new RecipEntryView(*m_pLayout);
-        m_pLayout->setEntry(*m_pEntry);
+    if (!m_pRecipField) {
+        m_pRecipField = new RecipFieldView(*m_pLayout);
+        m_pRecipField->setListener(this);
+        m_pLayout->setEntry(*m_pRecipField);
+    }
+}
+
+void RecipFrame::showInputFrame()
+{
+    if (!m_pInputFrame) {
+        m_pInputFrame = new RecipInputFrame(getParent());
+        m_pInputFrame->setOnPopCb(makeCbLast(&RecipFrame::onInputFramePop), this);
+        getParent().push(*m_pInputFrame);
     }
 }
 
@@ -89,3 +100,25 @@ void RecipFrame::onNextButtonClicked(Evas_Object *obj, void *event)
     auto *composerFrame = new ComposerFrame(getParent());
     getParent().push(*composerFrame);
 }
+
+void RecipFrame::onFieldClicked(RecipFieldView &obj)
+{
+    MSG_LOG("");
+    showInputFrame();
+}
+
+void RecipFrame::onClearButtonClicked(RecipFieldView &obj)
+{
+    MSG_LOG("");
+}
+
+void RecipFrame::onContactButtonClicked(RecipFieldView &obj)
+{
+    MSG_LOG("");
+}
+
+void RecipFrame::onInputFramePop(NaviFrameItem &item)
+{
+    MSG_LOG("");
+    m_pInputFrame = nullptr;
+}
diff --git a/src/Composer/Controller/src/RecipInputFrame.cpp b/src/Composer/Controller/src/RecipInputFrame.cpp
new file mode 100644 (file)
index 0000000..de23df4
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016  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 "RecipInputFrame.h"
+#include "Logger.h"
+
+using namespace Msg;
+
+RecipInputFrame::RecipInputFrame(NaviFrameController &parent)
+    : InputFrame(parent)
+    , m_pSearchBar(nullptr)
+{
+    m_pSearchBar = new SearchBar(getLayout());
+    setPredictBar(*m_pSearchBar);
+    showPredictBar(true);
+}
+
+RecipInputFrame::~RecipInputFrame()
+{
+}
+
+void RecipInputFrame::onAttached(ViewItem &item)
+{
+    MSG_LOG("");
+    InputFrame::onAttached(item);
+}
+
+bool RecipInputFrame::onRequestPop()
+{
+    MSG_LOG("");
+    return true;
+}
index 1c2303ca897357eabbad799ad4e0301cc5fcdbfe..a7803e4134c0bbfc0fac7987d7ef00818b972121 100644 (file)
@@ -17,8 +17,7 @@
 #ifndef MsgBodyView_h_
 #define MsgBodyView_h_
 
-#include "View.h"
-
+#include "Entry.h"
 #include "Logger.h"
 
 
@@ -44,7 +43,7 @@ namespace Msg {
             void prepareSendButton();
 
         private:
-            Evas_Object *m_pEntry;
+            Entry *m_pEntry;
             Evas_Object *m_pSendButton;
     };
 }
diff --git a/src/Composer/View/inc/RecipEntryView.h b/src/Composer/View/inc/RecipEntryView.h
deleted file mode 100644 (file)
index c23e598..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2016  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 RecipEntryView_h_
-#define RecipEntryView_h_
-
-#include "View.h"
-
-namespace Msg {
-    class RecipEntryView
-        : public View {
-
-        public:
-            enum ButtonId {
-                NoneButtonId,
-                ContactButtonId,
-                ClearButtonId
-            };
-
-        public:
-            RecipEntryView(Evas_Object *parent);
-            virtual ~RecipEntryView();
-
-            std::string getText() const;
-            void clear();
-            void showButton(ButtonId id);
-
-        private:
-            void onClearButtonClicked(Evas_Object *obj, void *event);
-            void onContactButtonClicked(Evas_Object *obj, void *event);
-
-        private:
-            void prepareEntry();
-            Evas_Object *createButton(const char *icon);
-            Evas_Object *prepareClearButton();
-            Evas_Object *prepareContactButton();
-
-        private:
-            Evas_Object *m_pEntry;
-            Evas_Object *m_pClearButton;
-            Evas_Object *m_pContactButton;
-    };
-}
-
-#endif /* RecipEntryView_h_ */
diff --git a/src/Composer/View/inc/RecipFieldView.h b/src/Composer/View/inc/RecipFieldView.h
new file mode 100644 (file)
index 0000000..f391da2
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2016  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 RecipFieldView_h_
+#define RecipFieldView_h_
+
+#include "Entry.h"
+
+namespace Msg {
+
+    class IRecipFieldViewListener;
+
+    class RecipFieldView
+        : public View {
+
+        public:
+            enum ButtonId {
+                NoneButtonId,
+                ContactButtonId,
+                ClearButtonId
+            };
+
+        public:
+            RecipFieldView(Evas_Object *parent);
+            virtual ~RecipFieldView();
+
+            void setListener(IRecipFieldViewListener *l);
+            void showButton(ButtonId id);
+            Entry &getEntry();
+
+        private:
+            void onClearButtonClicked(Evas_Object *obj, void *event);
+            void onContactButtonClicked(Evas_Object *obj, void *event);
+            void onEntryClicked(Evas_Object *obj, void *event);
+
+        private:
+            void prepareEntry();
+            Evas_Object *createButton(const char *icon);
+            Evas_Object *prepareClearButton();
+            Evas_Object *prepareContactButton();
+
+        private:
+            IRecipFieldViewListener *m_pListener;
+            Entry *m_pEntry;
+            Evas_Object *m_pClearButton;
+            Evas_Object *m_pContactButton;
+    };
+
+    class IRecipFieldViewListener {
+        public:
+            virtual ~IRecipFieldViewListener() {};
+
+            virtual void onFieldClicked(RecipFieldView &) {};
+            virtual void onClearButtonClicked(RecipFieldView &) {};
+            virtual void onContactButtonClicked(RecipFieldView &) {};
+    };
+}
+
+#endif /* RecipFieldView_h_ */
index 97780bb091d3d3094497755d51390226803e3cd9..da2126ddc6ad97d8c943736661a9a6195441cb70 100644 (file)
@@ -33,16 +33,6 @@ MsgBodyView::~MsgBodyView()
 {
 }
 
-std::string MsgBodyView::getText() const
-{
-    return markupToUtf8(elm_entry_entry_get(m_pEntry));;
-}
-
-void MsgBodyView::clear()
-{
-
-}
-
 void MsgBodyView::disabledSendButton(bool value)
 {
     elm_object_disabled_set(m_pSendButton, value);
@@ -50,17 +40,13 @@ void MsgBodyView::disabledSendButton(bool value)
 
 void MsgBodyView::prepareEntry()
 {
-    m_pEntry = elm_entry_add(getEo());
-    elm_entry_single_line_set(m_pEntry, false);
-    elm_entry_autocapital_type_set(m_pEntry, ELM_AUTOCAPITAL_TYPE_SENTENCE);
-    elm_entry_input_panel_return_key_type_set(m_pEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT);
-    elm_entry_context_menu_disabled_set(m_pEntry, true);
-    elm_entry_select_allow_set(m_pEntry, false);
-    elm_object_focus_allow_set(m_pEntry, true);
-    eext_entry_selection_back_event_allow_set(m_pEntry, false);
-    elm_entry_cnp_mode_set(m_pEntry, ELM_CNP_MODE_PLAINTEXT);
-    View::setText(m_pEntry, msgt("WDS_MSG_NPBODY_ENTER_MESSAGE_ABB"), "elm.guide");
-    setContent(m_pEntry, "swl.entry");
+    m_pEntry = new Entry(getEo());
+    m_pEntry->setSingleLine(false);
+    m_pEntry->setAutocapitalType(ELM_AUTOCAPITAL_TYPE_SENTENCE);
+    m_pEntry->setInputPanelReturnType(ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND);
+    m_pEntry->setFocusAllow(true);
+    m_pEntry->setGuideText(msgt("WDS_MSG_NPBODY_ENTER_MESSAGE_ABB"));
+    setContent(*m_pEntry, "swl.entry");
 }
 
 void MsgBodyView::prepareSendButton()
diff --git a/src/Composer/View/src/RecipEntryView.cpp b/src/Composer/View/src/RecipEntryView.cpp
deleted file mode 100644 (file)
index 6035b3d..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2016  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 "RecipEntryView.h"
-#include "Callback.h"
-#include <efl_extension.h>
-
-using namespace Msg;
-
-RecipEntryView::RecipEntryView(Evas_Object *parent)
-    : m_pEntry(nullptr)
-    , m_pClearButton(nullptr)
-    , m_pContactButton(nullptr)
-{
-    setEo(addLayout(parent, RECIP_ENTRY_EDJ_PATH, "main"));
-    prepareEntry();
-    showButton(ContactButtonId);
-}
-
-RecipEntryView::~RecipEntryView()
-{
-}
-
-void RecipEntryView::prepareEntry()
-{
-    m_pEntry = elm_entry_add(getEo());
-    elm_entry_cnp_mode_set(m_pEntry, ELM_CNP_MODE_PLAINTEXT);
-    elm_entry_editable_set(m_pEntry, true);
-    elm_entry_single_line_set(m_pEntry, true);
-    elm_entry_scrollable_set(m_pEntry, true);
-    eext_entry_selection_back_event_allow_set(m_pEntry, true);
-    elm_scroller_policy_set(m_pEntry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-    elm_entry_autocapital_type_set(m_pEntry, ELM_AUTOCAPITAL_TYPE_NONE);
-    elm_entry_input_panel_return_key_type_set(m_pEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
-    setText(m_pEntry, msgt("WDS_MSG_NPBODY_ENTER_RECIPIENT_ABB"), "elm.guide");
-    setContent(m_pEntry,  "swl.entry");
-}
-
-Evas_Object *RecipEntryView::createButton(const char *icon)
-{
-    Evas_Object *button = addIconButton(getEo(), icon);
-    return button;
-}
-
-Evas_Object *RecipEntryView::prepareClearButton()
-{
-    if (!m_pClearButton) {
-        m_pClearButton = createButton("recip/del_icon");
-        addSmartCb(m_pClearButton, "clicked", makeCbFirst(&RecipEntryView::onClearButtonClicked), this);
-    }
-    return m_pClearButton;
-}
-
-Evas_Object *RecipEntryView::prepareContactButton()
-{
-    if (!m_pContactButton) {
-        m_pContactButton = createButton("recip/contact_icon");
-        addSmartCb(m_pContactButton, "clicked", makeCbFirst(&RecipEntryView::onContactButtonClicked), this);
-    }
-    return m_pContactButton;
-}
-
-std::string RecipEntryView::getText() const
-{
-    return markupToUtf8(elm_entry_entry_get(m_pEntry));
-}
-
-void RecipEntryView::clear()
-{
-    setText(m_pEntry, "");
-}
-
-void RecipEntryView::showButton(ButtonId id)
-{
-    Evas_Object *curButton = getContent("swl.icon");
-    Evas_Object *targetButton = nullptr;
-
-    switch (id) {
-        case ContactButtonId:
-            targetButton = prepareContactButton();
-            break;
-        case ClearButtonId:
-            targetButton = prepareClearButton();
-            break;
-        default:
-            break;
-    }
-
-    if (curButton != targetButton) {
-        Evas_Object *oldButton =  setContent(targetButton, "swl.icon", true);
-        if (oldButton)
-            evas_object_hide(oldButton);
-    }
-}
-
-void RecipEntryView::onClearButtonClicked(Evas_Object *obj, void *event)
-{
-}
-
-void RecipEntryView::onContactButtonClicked(Evas_Object *obj, void *event)
-{
-}
diff --git a/src/Composer/View/src/RecipFieldView.cpp b/src/Composer/View/src/RecipFieldView.cpp
new file mode 100644 (file)
index 0000000..66ad55e
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2016  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 "RecipFieldView.h"
+#include "Callback.h"
+#include "Logger.h"
+
+using namespace Msg;
+
+RecipFieldView::RecipFieldView(Evas_Object *parent)
+    : m_pListener(nullptr)
+    , m_pEntry(nullptr)
+    , m_pClearButton(nullptr)
+    , m_pContactButton(nullptr)
+{
+    setEo(addLayout(parent, RECIP_ENTRY_EDJ_PATH, "main"));
+    prepareEntry();
+    showButton(ContactButtonId);
+}
+
+RecipFieldView::~RecipFieldView()
+{
+}
+
+void RecipFieldView::setListener(IRecipFieldViewListener *l)
+{
+    m_pListener = l;
+}
+
+void RecipFieldView::prepareEntry()
+{
+    m_pEntry = new Entry(getEo());
+    m_pEntry->enabledInputPanel(false);
+    m_pEntry->setEditable(false);
+    m_pEntry->setSingleLine(true);
+    m_pEntry->setScrollable(true);
+    m_pEntry->setScrollerPolicy(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+    m_pEntry->setAutocapitalType(ELM_AUTOCAPITAL_TYPE_NONE);
+    m_pEntry->setInputPanelReturnType(ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
+    m_pEntry->setGuideText(msgt("WDS_MSG_NPBODY_ENTER_RECIPIENT_ABB"));
+    m_pEntry->addSmartCb("clicked", makeCbFirst(&RecipFieldView::onEntryClicked), this);
+    setContent(*m_pEntry,  "swl.entry");
+}
+
+Evas_Object *RecipFieldView::createButton(const char *icon)
+{
+    Evas_Object *button = addIconButton(getEo(), icon);
+    return button;
+}
+
+Evas_Object *RecipFieldView::prepareClearButton()
+{
+    if (!m_pClearButton) {
+        m_pClearButton = createButton("recip/del_icon");
+        addSmartCb(m_pClearButton, "clicked", makeCbFirst(&RecipFieldView::onClearButtonClicked), this);
+    }
+    return m_pClearButton;
+}
+
+Evas_Object *RecipFieldView::prepareContactButton()
+{
+    if (!m_pContactButton) {
+        m_pContactButton = createButton("recip/contact_icon");
+        addSmartCb(m_pContactButton, "clicked", makeCbFirst(&RecipFieldView::onContactButtonClicked), this);
+    }
+    return m_pContactButton;
+}
+
+Entry &RecipFieldView::getEntry()
+{
+    return *m_pEntry;
+}
+
+void RecipFieldView::showButton(ButtonId id)
+{
+    Evas_Object *curButton = getContent("swl.icon");
+    Evas_Object *targetButton = nullptr;
+
+    switch (id) {
+        case ContactButtonId:
+            targetButton = prepareContactButton();
+            break;
+        case ClearButtonId:
+            targetButton = prepareClearButton();
+            break;
+        default:
+            break;
+    }
+
+    if (curButton != targetButton) {
+        Evas_Object *oldButton =  setContent(targetButton, "swl.icon", true);
+        if (oldButton)
+            evas_object_hide(oldButton);
+    }
+}
+
+void RecipFieldView::onClearButtonClicked(Evas_Object *obj, void *event)
+{
+    if (m_pListener)
+        m_pListener->onClearButtonClicked(*this);
+}
+
+void RecipFieldView::onContactButtonClicked(Evas_Object *obj, void *event)
+{
+    if (m_pListener)
+        m_pListener->onContactButtonClicked(*this);
+}
+
+void RecipFieldView::onEntryClicked(Evas_Object *obj, void *event)
+{
+    if (m_pListener)
+        m_pListener->onFieldClicked(*this);
+}