# EDC Flags
USER_EXT_EDC_KEYS = EDC0
-USER_EXT_EDC0_EDCS = res/dialer/edje/dialer-keypad.edc res/dialer/edje/dialer-predictive.edc res/dialer/edje/dialer-layout.edc res/speeddial/edje/speeddial-layout.edc
+USER_EXT_EDC0_EDCS = res/dialer/edje/dialer-layout.edc res/dialer/edje/dialer-button-layout.edc res/dialer/edje/dialer-predictive-layout.edc res/speeddial/edje/speeddial-layout.edc
USER_EXT_EDC0_EDCS_IMAGE_DIRS = res
USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS =
USER_EXT_EDC0_EDCS_SOUND_DIRS = edje/sounds
#include "DialerPath.h"
-#define GROUP_DIALER "dialer"
-#define GROUP_BUTTON "button"
+#define LAYOUT_DIALER "dialer"
+#define LAYOUT_BUTTON "button"
-#define GROUP_CALL_BTN "call_btn"
-#define GROUP_BACK_BTN "back_btn"
+#define LAYOUT_BUTTON_CALL "button_call"
+#define LAYOUT_BUTTON_BACK "button_back"
-#define PART_NUMBER "swallow.number"
-#define PART_LETTERS "swallow.letters"
+#define PART_NUMBER "swallow.number"
+#define PART_LETTERS "swallow.letters"
-#define PART_ENTRY "swallow.entry"
-#define PART_PREDICTIVE "swallow.predictive"
-#define PART_KEYPAD "swallow.keypad"
+#define PART_ENTRY "swallow.entry"
+#define PART_PREDICTIVE "swallow.predictive"
+#define PART_KEYPAD "swallow.keypad"
-#define PART_CALL_BTN "swallow.call_btn"
-#define PART_BACK_BTN "swallow.back_btn"
+#define PART_BUTTON_CALL "swallow.call_btn"
+#define PART_BUTTON_BACK "swallow.back_btn"
-#define DIVIDER_WH 2
+#define DIVIDER_WH 2
#define CALL_ICON_WH 70
-#define COLOR_KEYPAD_BTN_NUMBER 0, 0, 0, 217
-#define COLOR_KEYPAD_BTN_LETTERS 51, 51, 51, 205
-#define COLOR_CALL_BTN 89, 176, 58, 255
+#define COLOR_BUTTON_NUMBER 0, 0, 0, 217
+#define COLOR_BUTTON_LETTERS 51, 51, 51, 205
+#define COLOR_BUTTON_CALL 89, 176, 58, 255
#endif /* DIALER_LAYOUT_H */
#include "DialerPath.h"
-#define GROUP_PREDICTIVE "predictive"
-#define GROUP_NO_RESULTS "no_results"
-#define GROUP_RESULTS "results"
-#define GROUP_MORE_BTN "more_btn"
-#define GROUP_SPEED_DIAL "speed_dial"
+#define LAYOUT_PREDICTIVE "predictive"
+#define LAYOUT_NO_RESULTS "no_results"
+#define LAYOUT_RESULTS "results"
+#define LAYOUT_BUTTON_MORE "button_more"
+#define LAYOUT_SPEED_DIAL "speed_dial"
#define PART_CONTENT "swallow.content"
#define PART_BG "rect.bg"
#define PART_ADD_TEXT "text.add"
#define PART_THUMBNAIL "swallow.thumbnail"
+#define PART_BUTTON_MORE "swallow.button_more"
#define PART_SPEED_DIAL "swallow.speed_dial"
-#define PART_MORE_BTN "swallow.more_btn"
#define SIGNAL_PREDICTIVE_SHOW "state,predictive,show"
#define SIGNAL_PREDICTIVE_HIDE "state,predictive,hide"
collections {
base_scale: 2.6;
- group { GROUP_BUTTON;
+ group { LAYOUT_BUTTON;
parts {
rect { "rect.bg";
desc { "default";
#define KEYPAD_REL_H 0.54
#define ACTIONS_H 152
-#define CALL_BTN_WH 104
-#define BACK_BTN_R 82
-#define BACK_BTN_WH 90
+#define BUTTON_CALL_WH 104
+#define BUTTON_BACK_R 82
+#define BUTTON_BACK_WH 90
color_classes {
color_class { //AO008
color: 250 250 250 255;
}
color_class { //AO014
- name: "call_btn";
+ name: "button_call";
color: 250 250 250 255;
}
color_class {
- name: "back_btn";
+ name: "button_back";
color: 170 170 170 255;
}
color_class {
- name: "back_btn_pressed";
+ name: "button_back_pressed";
color: 120 120 120 255;
}
}
collections {
base_scale: 2.6;
- IMAGE_WITH_COLOR(GROUP_CALL_BTN, BUTTON_CALL, "call_btn");
- IMAGE_WITH_COLOR_AND_TOUCH(GROUP_BACK_BTN, BUTTON_BACK, "back_btn", "back_btn_pressed");
+ IMAGE_WITH_COLOR(LAYOUT_BUTTON_CALL, BUTTON_CALL, "button_call");
+ IMAGE_WITH_COLOR_AND_TOUCH(LAYOUT_BUTTON_BACK, BUTTON_BACK, "button_back", "button_back_pressed");
- group { GROUP_DIALER;
+ group { LAYOUT_DIALER;
parts {
spacer { "spacer.flexible";
desc { "default";
color_class: "actions_bg";
}
}
- swallow { PART_CALL_BTN; scale;
+ swallow { PART_BUTTON_CALL; scale;
desc { "default";
- min: CALL_BTN_WH CALL_BTN_WH;
+ min: BUTTON_CALL_WH BUTTON_CALL_WH;
rel1 { relative: 0.5 0.5; to_y: "rect.actions"; }
rel2 { relative: 0.5 0.5; to_y: "rect.actions"; }
}
}
- swallow { PART_BACK_BTN; scale;
+ swallow { PART_BUTTON_BACK; scale;
desc { "default";
align: 1.0 0.5;
- min: BACK_BTN_WH BACK_BTN_WH;
- rel1 { relative: 0.0 0.5; to_x: "spacer.back_btn.right"; to_y: "rect.actions"; }
- rel2 { relative: 0.0 0.5; to_x: "spacer.back_btn.right"; to_y: "rect.actions"; }
+ min: BUTTON_BACK_WH BUTTON_BACK_WH;
+ rel1 { relative: 0.0 0.5; to_x: "spacer.button_back.right"; to_y: "rect.actions"; }
+ rel2 { relative: 0.0 0.5; to_x: "spacer.button_back.right"; to_y: "rect.actions"; }
}
}
- spacer { "spacer.back_btn.right"; scale;
+ spacer { "spacer.button_back.right"; scale;
desc { "default";
align: 1.0 0.5;
- min: BACK_BTN_R 0;
+ min: BUTTON_BACK_R 0;
rel1 { relative: 1.0 0.0; to_y: "rect.actions"; }
rel2 { relative: 1.0 1.0; to_y: "rect.actions"; }
}
#define NUMBER_H 45
#define NUMBER_TEXT_SIZE 32
-#define MORE_BTN_WH 48
-#define MORE_BTN_LR 32
+#define BUTTON_MORE_WH 48
+#define BUTTON_MORE_LR 32
#define MORE_TEXT_SIZE 36
#define SPEED_DIAL_R 12
collections {
base_scale: 2.6;
- group { GROUP_PREDICTIVE;
+ group { LAYOUT_PREDICTIVE;
parts {
rect { PART_BG; scale;
desc { "default";
}
}
- group { GROUP_NO_RESULTS;
+ group { LAYOUT_NO_RESULTS;
parts {
spacer { "spacer.left"; scale;
desc { "default";
}
}
- group { GROUP_RESULTS;
+ group { LAYOUT_RESULTS;
parts {
spacer { "spacer.thumbnail.left"; scale;
desc { "default";
align: 0.0 0.0;
min: 0 NAME_H;
rel1 { relative: 1.0 0.0; to_x: PART_SPEED_DIAL; to_y: "spacer.text.left"; }
- rel2 { relative: 0.0 0.0; to_x: PART_MORE_BTN; to_y: PART_NUMBER; }
+ rel2 { relative: 0.0 0.0; to_x: PART_BUTTON_MORE; to_y: PART_NUMBER; }
text {
align: 0.0 0.5;
style: "name_style";
desc { "default";
align: 0.0 1.0;
rel1 { relative: 1.0 1.0; to: "spacer.text.left"; }
- rel2 { relative: 0.0 1.0; to_x: PART_MORE_BTN; to_y: "spacer.text.left"; }
+ rel2 { relative: 0.0 1.0; to_x: PART_BUTTON_MORE; to_y: "spacer.text.left"; }
text {
align: 0.0 0.5;
style: "number_style";
min: 0 NUMBER_H;
}
}
- swallow { PART_MORE_BTN;
+ swallow { PART_BUTTON_MORE;
desc { "default";
align: 1.0 0.5;
rel1.relative: 1.0 0.0;
}
}
- group { GROUP_MORE_BTN;
+ group { LAYOUT_BUTTON_MORE;
parts {
rect { PART_BG;
desc { "default";
spacer { "spacer.left"; scale;
desc { "default";
align: 0.0 0.5;
- min: MORE_BTN_LR 0;
+ min: BUTTON_MORE_LR 0;
rel1.relative: 0.0 0.0;
rel2.relative: 0.0 1.0;
}
spacer { "spacer.right"; scale;
desc { "default";
align: 1.0 0.5;
- min: MORE_BTN_LR 0;
+ min: BUTTON_MORE_LR 0;
rel1.relative: 1.0 0.0;
rel2.relative: 1.0 1.0;
}
}
- spacer { "spacer.middle"; scale;
- desc { "default";
- align: 0.0 0.5;
- min: MORE_BTN_WH (2*MORE_BTN_WH);
- rel1 { relative: 1.0 0.5; to_x: "spacer.left"; }
- rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
- }
- }
textblock { PART_COUNT; scale; repeat;
desc { "default";
- align: 0.5 0.0;
- min: 0 MORE_BTN_WH;
- rel1 { relative: 0.5 0.0; to: "spacer.middle"; }
- rel2 { relative: 0.5 0.0; to: "spacer.middle"; }
+ align: 0.5 1.0;
+ min: 0 BUTTON_MORE_WH;
+ rel1.relative: 0.5 0.5;
+ rel2.relative: 0.5 0.5;
text {
min: 1 0;
- align: 0.0 0.5;
ellipsis: -1;
style: "count_style";
}
image { "image.arrow"; scale; repeat;
images.image: PREDICTIVE_ARROW COMP;
desc { "default";
- align: 1.0 1.0;
- min: MORE_BTN_WH MORE_BTN_WH;
- rel1 { relative: 1.0 1.0; to: "spacer.middle"; }
- rel2 { relative: 1.0 1.0; to: "spacer.middle"; }
+ align: 0.5 0.0;
+ min: BUTTON_MORE_WH BUTTON_MORE_WH;
+ rel1 { relative: 1.0 0.5; to_x: "spacer.left"; }
+ rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
image.normal: PREDICTIVE_ARROW;
}
}
}
}
- group { GROUP_SPEED_DIAL;
+ group { LAYOUT_SPEED_DIAL;
parts {
spacer { "spacer.right"; scale;
desc { "default";
}
textblock { PART_NUMBER; scale;
desc { "default";
- align: 0.0 0.5;
+ align: 1.0 0.5;
min: SPEED_DIAL_NUMBER_W 0;
- rel1 { relative: 1.0 0.0; to_x: "image.icon"; to_y: "spacer.middle"; }
- rel2 { relative: 1.0 1.0; to_x: "image.icon"; to_y: "spacer.middle"; }
- text {
- align: 0.0 0.5;
- style: "speed_dial_style";
- }
+ rel1 { relative: 1.0 0.0; to: "spacer.middle"; }
+ rel2 { relative: 1.0 1.0; to: "spacer.middle"; }
+ text.style: "speed_dial_style";
}
}
}
void DialerView::fillLayout()
{
Evas_Object *layout = getEvasObject();
- Eina_Bool res = elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_DIALER);
+ Eina_Bool res = elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_DIALER);
WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
elm_object_part_content_set(layout, PART_ENTRY, createEntry(layout));
elm_object_part_content_set(layout, PART_PREDICTIVE, createSearchControl(layout));
elm_object_part_content_set(layout, PART_KEYPAD, createKeypad(layout));
- elm_object_part_content_set(layout, PART_CALL_BTN, createCallButton(layout));
- elm_object_part_content_set(layout, PART_BACK_BTN, createBackspaceButton(layout));
+ elm_object_part_content_set(layout, PART_BUTTON_CALL, createCallButton(layout));
+ elm_object_part_content_set(layout, PART_BUTTON_BACK, createBackspaceButton(layout));
}
Evas_Object *DialerView::createEntry(Evas_Object *parent)
makeCallback(&DialerView::onCallPressed), this);
Evas_Object *edje = elm_layout_edje_get(button);
- edje_object_color_class_set(edje, BUTTON_COLOR_CLASS_NORMAL, COLOR_CALL_BTN,
+ edje_object_color_class_set(edje, BUTTON_COLOR_CLASS_NORMAL, COLOR_BUTTON_CALL,
0, 0, 0, 0, 0, 0, 0, 0);
Evas_Object *image = elm_image_add(button);
- Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), GROUP_CALL_BTN);
+ Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), LAYOUT_BUTTON_CALL);
WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
evas_object_size_hint_min_set(image, iconSize, iconSize);
elm_object_part_content_set(button, "elm.swallow.content", image);
elm_object_style_set(button, "transparent");
Evas_Object *image = elm_image_add(button);
- Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), GROUP_BACK_BTN);
+ Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), LAYOUT_BUTTON_BACK);
WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
elm_object_part_content_set(button, "elm.swallow.content", image);
static const std::string path = App::getResourcePath(DIALER_BUTTON_EDJ);
Evas_Object *layout = elm_layout_add(parent);
- Eina_Bool res = elm_layout_file_set(layout, path.c_str(), GROUP_BUTTON);
+ Eina_Bool res = elm_layout_file_set(layout, path.c_str(), LAYOUT_BUTTON);
WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
Evas_Object *image = elm_image_add(layout);
elm_image_file_set(image, App::getResourcePath(m_Data->numberImage).c_str(), nullptr);
- evas_object_color_set(image, COLOR_KEYPAD_BTN_NUMBER);
+ evas_object_color_set(image, COLOR_BUTTON_NUMBER);
elm_object_part_content_set(layout, PART_NUMBER, image);
if (m_Data->lettersImage) {
image = elm_image_add(layout);
elm_image_file_set(image, App::getResourcePath(m_Data->lettersImage).c_str(), nullptr);
- evas_object_color_set(image, COLOR_KEYPAD_BTN_LETTERS);
+ evas_object_color_set(image, COLOR_BUTTON_LETTERS);
elm_object_part_content_set(layout, PART_LETTERS, image);
}
Evas_Object *SearchResultsControl::onCreate(Evas_Object *parent)
{
Evas_Object *layout = elm_layout_add(parent);
- elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_PREDICTIVE);
+ elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_PREDICTIVE);
Evas_Object *edje = elm_layout_edje_get(layout);
edje_object_signal_callback_add(edje, "mouse,clicked,*", PART_BG,
if (m_State != ResultsEmpty) {
m_State = ResultsEmpty;
- Evas_Object *layout = setLayout(GROUP_NO_RESULTS);
+ Evas_Object *layout = setLayout(LAYOUT_NO_RESULTS);
elm_object_translatable_part_text_set(layout, PART_ADD_TEXT, "IDS_KPD_BUTTON_ADD_TO_CONTACTS_ABB2");
}
}
{
if (m_State != ResultsPresent && m_State != ResultsMany) {
m_State = ResultsPresent;
- setLayout(GROUP_RESULTS);
+ setLayout(LAYOUT_RESULTS);
}
setResultInfo(m_Results->front());
m_State = ResultsMany;
m_ResultsCount = elm_layout_add(getEvasObject());
- elm_layout_file_set(m_ResultsCount, layoutFilePath.c_str(), GROUP_MORE_BTN);
+ elm_layout_file_set(m_ResultsCount, layoutFilePath.c_str(), LAYOUT_BUTTON_MORE);
Evas_Object *edje = elm_layout_edje_get(m_ResultsCount);
edje_object_signal_callback_add(edje, "mouse,clicked,*", PART_BG,
m_State = ResultsPresent;
}
- elm_object_part_content_set(getLayout(), PART_MORE_BTN, m_ResultsCount);
+ elm_object_part_content_set(getLayout(), PART_BUTTON_MORE, m_ResultsCount);
}
void SearchResultsControl::setResultInfo(SearchResultPtr result)
Evas_Object *layout = nullptr;
if (result->getSpeedDialId()) {
layout = elm_layout_add(getEvasObject());
- elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_SPEED_DIAL);
+ elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_SPEED_DIAL);
elm_object_part_text_set(layout, PART_NUMBER, std::to_string(result->getSpeedDialId()).c_str());
}