</option>
<option id="gnu.cpp.compiler.option.include.paths.2037910591" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Conversation/Main/Controller/inc}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Composer/View/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Composer/Controller/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/MsgThread/View/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Settings/Controller/inc}""/>
<listOptionValue builtIn="false" value="Native_API"/>
</option>
<option id="gnu.cpp.compiler.option.dialect.std.1756711526" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++11" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.option.preprocessor.def.1776859471" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols"/>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.1776859471" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false"/>
<option id="gnu.cpp.compiler.option.other.other.1256197611" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -Wno-extern-c-compat" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1529131313" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
</option>
<option id="gnu.cpp.compiler.option.include.paths.1895069727" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Conversation/Main/Controller/inc}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Composer/View/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Composer/Controller/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/MsgThread/View/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Settings/Controller/inc}""/>
#define MSG_THREAD_LAYOUT_EDJ_PATH EDJ_PATH"/msg_thread_layout.edj"
#define THUMBNAIL_EDJ_PATH EDJ_PATH"/msg_thumbnail.edj"
#define DEFAULT_LAYOUT_EDJ_PATH EDJ_PATH"/default_layout.edj"
+#define RECIP_LAYOUT_EDJ_PATH EDJ_PATH"/recip_layout.edj"
+#define RECIP_ENTRY_EDJ_PATH EDJ_PATH"/recip_entry.edj"
#endif /* RESOURCE_H_ */
}
}
}
+ group {
+ name: "recip_del_icon";
+ images {
+ image: "msg_composer_icon_bg.png" RAW;
+ image: "msg_composer_icon_sender.png" RAW;
+ }
+ parts {
+ part {
+ name: "bg";
+ type:IMAGE;
+ description {
+ state: "default" 0.0;
+ image.normal: "msg_composer_icon_bg.png";
+ }
+ description {
+ state: "pressed" 0.0;
+ color: 150 150 150 255;
+ }
+ }
+ part {
+ name: "icon";
+ type:IMAGE;
+ description {
+ state: "default" 0.0;
+ image.normal: "msg_composer_icon_sender.png";
+ color: 255 0 0 255;
+ }
+ }
+ }
+ programs {
+ program { name: "pressed";
+ source: "*";
+ signal: "mouse,down,1";
+ action: STATE_SET "pressed" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }
+ program { name: "unpressed";
+ source: "*";
+ signal: "mouse,up,1";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }
+ }
+ }
+ group {
+ name: "recip_contact_icon";
+ images {
+ image: "msg_composer_icon_bg.png" RAW;
+ image: "msg_composer_icon_recipients.png" RAW;
+ }
+ parts {
+ part {
+ name: "bg";
+ type:IMAGE;
+ description {
+ state: "default" 0.0;
+ image.normal: "msg_composer_icon_bg.png";
+ color: 255 166 0 255;
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default";
+ color: 184 119 0 255;
+ }
+ }
+ part {
+ name: "icon";
+ type:IMAGE;
+ description {
+ state: "default" 0.0;
+ image.normal: "msg_composer_icon_recipients.png";
+ }
+ }
+ }
+ programs {
+ program { name: "pressed";
+ source: "*";
+ signal: "mouse,down,1";
+ action: STATE_SET "pressed" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }
+ program { name: "unpressed";
+ source: "*";
+ signal: "mouse,up,1";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }
+ }
+ }
}
\ No newline at end of file
--- /dev/null
+#include "macros.inl"
+
+collections {
+ BASE_SCALE;
+ images {
+ image: "msg_composer_bubble.#.png" RAW;
+ }
+ group { name: "main";
+ parts {
+ PADDING_LEFT("pad.left", 12);
+ PADDING_RIGHT("pad.right", 10);
+ PADDING_TOP("pad.top", 12);
+ PADDING_BOTTOM("pad.bottom", 13);
+ part {
+ name: "bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default";
+ image.normal: "msg_composer_bubble.#.png";
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "swl.entry";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0 0.5;
+ rel1 { relative: 1.0 1.0; to_x: "pad.left"; to_y: "pad.top"; }
+ rel2 { relative: 0.0 0.0; to_x: "swl.icon"; to_y: "pad.bottom"; }
+ min: 0 37;
+ max: -1 -1;
+ }
+ }
+ part { name: "swl.icon";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to_y: "swl.entry"; }
+ rel2 { relative: 1.0 1.0; to_y: "swl.entry"; }
+ min: 73 73;
+ max: 73 73;
+ }
+ }
+ }
+ }
+}
--- /dev/null
+#include "macros.inl"
+
+collections {
+ BASE_SCALE;
+ group { name: "main";
+ parts {
+ PADDING_TOP("pad.top", 100);
+ part {
+ name: "swl.entry";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default";
+ align: 0.5 0;
+ min: 318 0;
+ max: 318 0;
+ fixed: 1 0;
+ rel1 { relative: 0.0 1.0; to_y: "pad.top"; }
+ }
+ }
+ }
+ }
+}
, m_pMsg(nullptr)
{
}
+
explicit TText(const char *stringId, const char *domainName)
: m_pDomain(domainName)
, m_pMsg(stringId)
}
void CtxPopup::setDirectionPriority(Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second,
- Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth)
+ Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth)
{
elm_ctxpopup_direction_priority_set(getEo(), first, second, third, fourth);
}
{
// Window:
setEo(elm_win_add(nullptr, PACKAGE_NAME, ELM_WIN_BASIC));
- elm_win_conformant_set(getEo(), EINA_TRUE);
- elm_win_autodel_set(getEo(), EINA_TRUE);
+ elm_win_conformant_set(getEo(), true);
+ elm_win_autodel_set(getEo(), true);
// Conform:
m_pConform = elm_conformant_add(getEo());
// Bg:
m_pBg = elm_bg_add(m_pConform);
- evas_object_size_hint_weight_set(m_pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(m_pBg);
-
elm_object_part_content_set(m_pConform, "elm.swallow.bg", m_pBg);
}
#include "FrameController.h"
#include "DefaultLayout.h"
#include "BottomButton.h"
+#include "RecipLayout.h"
+#include "RecipEntryView.h"
namespace Msg {
class RecipFrame
void onNextButtonClicked(Evas_Object *obj, void *event);
private:
- void prepareMainLayout();
+ void prepareLayouts();
void prepareNextButton();
+ void prepareEntry();
private:
- DefaultLayout *m_pLayout;
+ DefaultLayout *m_pBaseLayout;
+ RecipLayout *m_pLayout;
BottomButton *m_pNextButton;
+ RecipEntryView *m_pEntry;
};
}
RecipFrame::RecipFrame(NaviFrameController &parent)
: FrameController(parent)
+ , m_pBaseLayout(nullptr)
, m_pLayout(nullptr)
, m_pNextButton(nullptr)
+ , m_pEntry(nullptr)
{
MSG_LOG("");
- prepareMainLayout();
+ prepareLayouts();
prepareNextButton();
+ prepareEntry();
}
RecipFrame::~RecipFrame()
MSG_LOG("");
}
-void RecipFrame::prepareMainLayout()
+void RecipFrame::prepareLayouts()
{
+ if (!m_pBaseLayout) {
+ m_pBaseLayout = new DefaultLayout(getParent());
+ m_pBaseLayout->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&RecipFrame::onHwBackButtonPreessed), this);
+ }
+
if (!m_pLayout) {
- m_pLayout = new DefaultLayout(getParent());
- m_pLayout->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&RecipFrame::onHwBackButtonPreessed), this);
+ m_pLayout = new RecipLayout(*m_pBaseLayout);
+ m_pBaseLayout->setContent(*m_pLayout);
}
}
void RecipFrame::prepareNextButton()
{
if (!m_pNextButton) {
- m_pNextButton = new BottomButton(*m_pLayout);
+ m_pNextButton = new BottomButton(*m_pBaseLayout);
View::addSmartCb(m_pNextButton->getInnerButton(), "clicked", makeCbFirst(&RecipFrame::onNextButtonClicked), this);
m_pNextButton->setText(msgt("Next")); // TODO: localization
- m_pLayout->setBottomButton(*m_pNextButton);
- m_pLayout->showBottomButton(true);
+ m_pBaseLayout->setBottomButton(*m_pNextButton);
+ m_pBaseLayout->showBottomButton(true);
+ }
+}
+
+void RecipFrame::prepareEntry()
+{
+ if (!m_pEntry) {
+ m_pEntry = new RecipEntryView(*m_pLayout);
+ m_pLayout->setEntry(*m_pEntry);
}
}
{
MSG_LOG("");
FrameController::onAttached(item);
- setContent(*m_pLayout);
+ setContent(*m_pBaseLayout);
}
void RecipFrame::onHwBackButtonPreessed(Evas_Object *obj, void *event_info)
--- /dev/null
+/*
+ * 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_ */
--- /dev/null
+/*
+ * 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 RecipLayout_h_
+#define RecipLayout_h_
+
+#include "View.h"
+
+namespace Msg {
+ class RecipLayout
+ : public View {
+
+ public:
+ RecipLayout(Evas_Object *parent);
+
+ void setEntry(Evas_Object *obj);
+ };
+
+ inline RecipLayout::RecipLayout(Evas_Object *parent)
+ {
+ setEo(addLayout(parent, RECIP_LAYOUT_EDJ_PATH, "main"));
+ }
+
+ inline void RecipLayout::setEntry(Evas_Object *obj)
+ {
+ setContent(obj, "swl.entry");
+ }
+}
+
+#endif /* RecipLayout_h_ */
--- /dev/null
+/*
+ * 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("Enter recipient"), "elm.guide"); // TODO: localization
+ setContent(m_pEntry, "swl.entry");
+}
+
+Evas_Object *RecipEntryView::createButton(const char *icon)
+{
+ Evas_Object *button = elm_button_add(getEo());
+ elm_object_style_set(button, "transparent");
+ Evas_Object *iconLayout = View::addLayout(button, ICONS_EDJ_PATH, icon);
+ setContent(button, iconLayout);
+ 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)
+{
+}