${CMAKE_CURRENT_SOURCE_DIR}/src/Conversation/Recipients/Controller/inc/
${CMAKE_CURRENT_SOURCE_DIR}/src/Conversation/ContactList/View/inc/
${CMAKE_CURRENT_SOURCE_DIR}/src/Conversation/ContactList/Controller/inc/
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/Conversation/ConvList/View/inc/
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/Conversation/ConvList/Controller/inc/
${CMAKE_CURRENT_SOURCE_DIR}/src/MsgThread/Controller/inc/
${CMAKE_CURRENT_SOURCE_DIR}/src/MsgThread/View/inc/
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings/Controller/inc/
#define MSG_BODY_EDJ_PATH EDJ_PATH"/msg_body.edj"
#define THUMBNAIL_EDJ_PATH EDJ_PATH"/msg_thumbnail.edj"
#define MSG_TITLE_EDJ_PATH EDJ_PATH"/msg_title.edj"
+#define CONV_LIST_EDJ_PATH EDJ_PATH"/conv_list.edj"
// Images(res):
#define THUMB_CONTACT_IMG_PATH IMAGE_PATH"/list_ic_contacts.png"
#define SENT_BUBBLE_STYLE_04_BORDER 46 82 44 26
#define SENT_BUBBLE_STYLE_05_BORDER 17 111 78 30
+#define GENLIST_ITEM_1LINE_HEIGHT_INC 120
+#define GENLIST_ITEM_2LINE_HEIGHT_INC 144
+#define GENLIST_ITEM_LR_PADDING_INC 32
+#define GENLIST_ITEM_TOP_PADDING_INC 23
+#define GENLIST_ITEM_BOTTOM_PADDING_INC 24 // including bottom line
+#define GENLIST_ITEM_TYPE_BA_PADDING_INC 32
+#define GENLIST_ITEM_TYPE_DC_PADDING_INC 32
+#define GENLIST_ITEM_TYPE_AD_PADDING_INC 32
+#define GENLIST_ITEM_MAIN_LINE_HEIGHT_INC 54
+#define GENLIST_ITEM_MAIN_LINE_ICON_TEXT_PADDING_INC 12
+#define GENLIST_ITEM_MAIN_LINE_TEXT_END_PADDING_INC 32
+#define GENLIST_ITEM_SUB_LINE_HEIGHT_INC 43
+#define GENLIST_ITEM_SUB_LINE_TEXT_END_PADDING_INC 32
+#define GENLIST_ITEM_END_TEXT_WIDTH_INC 121
+#define GENLIST_ITEM_GROUP_INDEX_HEIGHT_INC 64
+#define GENLIST_ITEM_GROUP_INDEX_TOP_PADDING_INC 10
+#define GENLIST_ITEM_GROUP_INDEX_BOTTOM_PADDING_INC 11
+#define GENLIST_ITEM_GROUP_INDEX_RIGHT_PADDING_INC 17
+#define GENLIST_ITEM_GROUP_INDEX_END_TEXT_WIDTH_INC 218
+#define GENLIST_ITEM_GROUP_INDEX_EXPAND_TOP_PADDING_INC 12
+#define GENLIST_ITEM_GROUP_INDEX_EXPAND_BOTTOM_PADDING_INC 12
+#define GENLIST_ITEM_GROUP_INDEX_EXPAND_ICON_SIZE_INC 64 64
+#define GENLIST_ITEM_MULTILINE_1LINE_HEIGHT_INC 120
+
collections {
base_scale: 1.8;
BUBBLE_SENT_MESSAGE_STYLE("sent_style_01_failed_focus", "messagebubble_bg_send_bg.#.png", "bubble_with_search_result_send.#.png", "messagebubble_bg_send_bg_ef.#.png", 255, 255, 255, 204, B042, 15, 32, 15)
+group { name: "elm/genlist/item/sentbubble/default";
+ alias: "elm/genlist/item_compress/sentbubble/default";
+
+ data.item: "banded_bg_area" "elm.swallow.bg";
+
+ data.item: "texts" "elm.text elm.text.multiline";
+ data.item: "contents" "elm.swallow.icon elm.swallow.icon.0 elm.swallow.icon.1 elm.swallow.icon.2 elm.swallow.end";
+
+ script {
+ public main_text_visible = 0;
+ public multiline_text_visible = 0;
+ }
+
+ parts {
+ swallow { "elm.swallow.bg"; scale;
+ desc { "default";
+ }
+ }
+ part { name: "bg";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 10;
+ }
+ description { state: "disabled" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ spacer { "base"; scale;
+ desc { "default";
+ min: 0 GENLIST_ITEM_MULTILINE_1LINE_HEIGHT_INC;
+ align: 0.5 0.5;
+ }
+ }
+ image { "image.bg"; scale;
+ desc{ "default";
+ image.normal: "messagebubble_bg_send_bg.#.png";
+ color: 169 182 148 255;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ rel2.offset: 0 -5;
+ }
+ desc{ "pressed";
+ inherit: "default";
+ color: 140 150 122 255;
+ }
+ }
+ spacer { "elm.padding.left"; scale;
+ desc { "default";
+ min: GENLIST_ITEM_LR_PADDING_INC 0;
+ align: 0.0 0.5;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ }
+ spacer { "elm.padding.right"; scale;
+ desc { "default";
+ min: GENLIST_ITEM_LR_PADDING_INC 0;
+ align: 1.0 0.5;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ spacer { "elm.padding.top"; scale;
+ desc { "default";
+ min: 0 GENLIST_ITEM_TOP_PADDING_INC;
+ max: -1 GENLIST_ITEM_TOP_PADDING_INC;
+ align: 0.5 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ spacer { "elm.padding.bottom"; scale;
+ desc { "default";
+ min: 0 GENLIST_ITEM_BOTTOM_PADDING_INC;
+ max: -1 GENLIST_ITEM_BOTTOM_PADDING_INC;
+ align: 0.5 1.0;
+ rel1.relative: 0.0 1.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ swallow { "elm.swallow.icon"; scale;
+ desc { state: "default";
+ align: 0.0 0.5;
+ rel1 { to: "elm.padding.left"; relative: 1.0 0.5; }
+ rel2 { to: "elm.padding.left"; relative: 1.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.B.A"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 0.0 0.5;
+ rel1 { to: "elm.swallow.icon"; relative: 1.0 0.5; }
+ rel2 { to: "elm.swallow.icon"; relative: 1.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_TYPE_BA_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.end"; scale;
+ desc { state: "default";
+ align: 1.0 0.5;
+ rel1 { to: "elm.padding.right"; relative: 0.0 0.5; }
+ rel2 { to: "elm.padding.right"; relative: 0.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.D.C"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 1.0 0.5;
+ rel1 { to: "elm.swallow.end"; relative: 0.0 0.5; }
+ rel2 { to: "elm.swallow.end"; relative: 0.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_TYPE_DC_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.icon.2"; scale;
+ desc { state: "default";
+ align: 1.0 0.5;
+ rel1 { to: "elm.padding.D.C"; relative: 0.0 0.5; }
+ rel2 { to: "elm.padding.D.C"; relative: 0.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.A.D"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 1.0 0.5;
+ rel1 { to: "elm.swallow.icon.2"; relative: 0.0 0.5; }
+ rel2 { to: "elm.swallow.icon.2"; relative: 0.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_TYPE_AD_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.icon.0"; scale;
+ desc { "default";
+ align: 0.0 0.5;
+ rel1 { to_x: "elm.padding.B.A"; to_y: "elm.padding.main.icon.text"; relative: 1.0 0.5; }
+ rel2 { to_x: "elm.padding.B.A"; to_y: "elm.padding.main.icon.text"; relative: 1.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.main.icon.text"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 0.0 0.5;
+ rel1 { to_x: "elm.swallow.icon.0"; relative: 1.0 0.5; }
+ rel2 { to_x: "elm.swallow.icon.0"; relative: 1.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_MAIN_LINE_TEXT_END_PADDING_INC 0;
+ }
+ }
+ textblock { "elm.text"; scale;
+ desc { "default";
+ align: 0.5 0.0;
+ rel1 { to_x: "elm.padding.main.icon.text"; to_y: "elm.padding.top"; relative: 1.0 1.0; }
+ rel2 { to_x: "elm.padding.main.text.end"; to_y: "base_line"; relative: 0.0 0.0; }
+ text.style: "entry_bubble_sent_textblock_style";
+ text.min: 0 1;
+ }
+ desc { "pressed"; inherit: "default";
+ text.style: "entry_bubble_sent_textblock_style";
+ }
+ desc { "disabled"; inherit: "default";
+ text.style: "list_text_main_dim";
+ }
+ }
+ spacer { "base_line";
+ desc { "default";
+ rel1 { to: "elm.padding.top"; relative: 0.0 0.0; }
+ rel2 { to: "elm.padding.top"; relative: 1.0 0.0; }
+ }
+ desc { "main_text_visible";
+ rel1 { to: "elm.padding.bottom"; relative: 0.0 0.0; }
+ rel2 { to: "elm.padding.bottom"; relative: 1.0 0.0; }
+ }
+ desc { "multiline_text_visible";
+ rel1 { to: "elm.text.multiline"; relative: 0.0 0.0; }
+ rel2 { to: "elm.text.multiline"; relative: 1.0 0.0; }
+ }
+ }
+ spacer { "elm.padding.main.text.end"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 1.0 0.5;
+ rel1 { to_x: "elm.swallow.icon.1"; relative: 0.0 0.5; }
+ rel2 { to_x: "elm.swallow.icon.1"; relative: 0.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_MAIN_LINE_TEXT_END_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.icon.1"; scale;
+ desc { "default";
+ align: 1.0 0.5;
+ rel1 { to_x: "elm.padding.A.D"; to_y: "elm.padding.main.text.end"; relative: 0.0 0.5; }
+ rel2 { to_x: "elm.padding.A.D"; to_y: "elm.padding.main.text.end"; relative: 0.0 0.5; }
+ }
+ }
+ spacer { "multiline_base_line";
+ desc { "default";
+ rel1 { to: "elm.padding.top"; relative: 0.0 1.0; }
+ rel2 { to: "elm.padding.top"; relative: 1.0 1.0; }
+ }
+ desc { "main_text_visible";
+ rel1 { to: "elm.padding.bottom"; relative: 0.0 0.0; }
+ rel2 { to: "elm.padding.bottom"; relative: 1.0 0.0; }
+ }
+ }
+ textblock { "elm.text.multiline"; scale;
+ desc { "default";
+ align: 0.5 1.0;
+ rel1 { to_x: "elm.padding.main.icon.text"; to_y: "multiline_base_line"; relative: 1.0 1.0; }
+ rel2 { to_x: "elm.padding.main.text.end"; to_y: "elm.padding.bottom"; relative: 0.0 0.0; }
+ text.style: "entry_bubble_sent_textblock_style";
+ text.min: 0 1;
+ }
+ desc { "pressed"; inherit: "default";
+ text.style: "entry_bubble_sent_textblock_style";
+ }
+ desc { "disabled"; inherit: "default";
+ text.style: "list_text_multiline_dim";
+ }
+ }
+ rect { "elm.bottomline"; scale;
+ desc { "default";
+ min: 0 LIST_BOTTOMLINE_HEIGHT;
+ max: -1 LIST_BOTTOMLINE_HEIGHT;
+ align: 0.5 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ color: 204 204 204 255;
+ }
+ desc { "hidden"; inherit: "default";
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ signal: "elm,state,elm.swallow.bg,visible";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "elm.bottomline";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.B.A";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon.2,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.A.D";
+ }
+ program {
+ signal: "elm,state,elm.swallow.end,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.D.C";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon.0,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.main.icon.text";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon.1,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.main.text.end";
+ }
+ program { name: "main_text_visible";
+ signal: "elm,state,elm.text,visible";
+ source: "elm";
+ script {
+ if (get_int(multiline_text_visible) == 1) {
+ set_state(PART:"base_line", "multiline_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "main_text_visible", 0.0);
+ }
+ else {
+ set_state(PART:"base_line", "main_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "default", 0.0);
+ }
+ set_int(main_text_visible, 1);
+ }
+ }
+ program { name: "multiline_text_visible";
+ signal: "elm,state,elm.text.multiline,visible";
+ source: "elm";
+ script {
+ if (get_int(main_text_visible) == 1) {
+ set_state(PART:"base_line", "multiline_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "main_text_visible", 0.0);
+ }
+ else {
+ set_state(PART:"base_line", "main_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "default", 0.0);
+ }
+ set_int(multiline_text_visible, 1);
+ }
+ }
+ program { name: "default";
+ signal: "elm,state,default";
+ source: "elm";
+ script {
+ set_state(PART:"base_line", "default", 0.0);
+ set_state(PART:"multiline_base_line", "default", 0.0);
+ set_state(PART:"elm.padding.B.A", "default", 0.0);
+ set_state(PART:"elm.padding.A.D", "default", 0.0);
+ set_state(PART:"elm.padding.D.C", "default", 0.0);
+ set_state(PART:"elm.padding.main.icon.text", "default", 0.0);
+ set_state(PART:"elm.padding.main.text.end", "default", 0.0);
+ set_state(PART:"elm.bottomline", "default", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"elm.text", "default", 0.0);
+ set_state(PART:"elm.text.multiline", "default", 0.0);
+ set_int(main_text_visible, 0);
+ set_int(multiline_text_visible, 0);
+ }
+ }
+ program { name: "pressed";
+ signal: "elm,state,selected";
+ source: "elm";
+ action: STATE_SET "pressed" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ target: "image.bg";
+ }
+ program { name: "unpressed";
+ signal: "elm,state,unselected";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ target: "image.bg";
+ }
+ program { name: "enabled";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ }
+ program { name: "disabled";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ }
+ }
+}
+
+group { name: "elm/genlist/item/receivebubble/default";
+ alias: "elm/genlist/item_compress/receivebubble/default";
+
+ data.item: "banded_bg_area" "elm.swallow.bg";
+
+ data.item: "texts" "elm.text elm.text.multiline";
+ data.item: "contents" "elm.swallow.icon elm.swallow.icon.0 elm.swallow.icon.1 elm.swallow.icon.2 elm.swallow.end";
+
+ script {
+ public main_text_visible = 0;
+ public multiline_text_visible = 0;
+ }
+
+ parts {
+ swallow { "elm.swallow.bg"; scale;
+ desc { "default";
+ }
+ }
+ part { name: "bg";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 10;
+ }
+ description { state: "disabled" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ spacer { "base"; scale;
+ desc { "default";
+ min: 0 GENLIST_ITEM_MULTILINE_1LINE_HEIGHT_INC;
+ align: 0.5 0.5;
+ }
+ }
+ image { "image.bg"; scale;
+ desc{ "default";
+ image.normal: "messagebubble_bg_receive_bg.#.png";
+ color: 169 63 54 255;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ rel2.offset: 0 -5;
+ }
+ desc{ "pressed";
+ inherit: "default";
+ color: 116 43 37 255;
+ }
+ }
+ spacer { "elm.padding.left"; scale;
+ desc { "default";
+ min: GENLIST_ITEM_LR_PADDING_INC 0;
+ align: 0.0 0.5;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ }
+ spacer { "elm.padding.right"; scale;
+ desc { "default";
+ min: GENLIST_ITEM_LR_PADDING_INC 0;
+ align: 1.0 0.5;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ spacer { "elm.padding.top"; scale;
+ desc { "default";
+ min: 0 GENLIST_ITEM_TOP_PADDING_INC;
+ max: -1 GENLIST_ITEM_TOP_PADDING_INC;
+ align: 0.5 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ spacer { "elm.padding.bottom"; scale;
+ desc { "default";
+ min: 0 GENLIST_ITEM_BOTTOM_PADDING_INC;
+ max: -1 GENLIST_ITEM_BOTTOM_PADDING_INC;
+ align: 0.5 1.0;
+ rel1.relative: 0.0 1.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ swallow { "elm.swallow.icon"; scale;
+ desc { state: "default";
+ align: 0.0 0.5;
+ rel1 { to: "elm.padding.left"; relative: 1.0 0.5; }
+ rel2 { to: "elm.padding.left"; relative: 1.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.B.A"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 0.0 0.5;
+ rel1 { to: "elm.swallow.icon"; relative: 1.0 0.5; }
+ rel2 { to: "elm.swallow.icon"; relative: 1.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_TYPE_BA_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.end"; scale;
+ desc { state: "default";
+ align: 1.0 0.5;
+ rel1 { to: "elm.padding.right"; relative: 0.0 0.5; }
+ rel2 { to: "elm.padding.right"; relative: 0.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.D.C"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 1.0 0.5;
+ rel1 { to: "elm.swallow.end"; relative: 0.0 0.5; }
+ rel2 { to: "elm.swallow.end"; relative: 0.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_TYPE_DC_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.icon.2"; scale;
+ desc { state: "default";
+ align: 1.0 0.5;
+ rel1 { to: "elm.padding.D.C"; relative: 0.0 0.5; }
+ rel2 { to: "elm.padding.D.C"; relative: 0.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.A.D"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 1.0 0.5;
+ rel1 { to: "elm.swallow.icon.2"; relative: 0.0 0.5; }
+ rel2 { to: "elm.swallow.icon.2"; relative: 0.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_TYPE_AD_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.icon.0"; scale;
+ desc { "default";
+ align: 0.0 0.5;
+ rel1 { to_x: "elm.padding.B.A"; to_y: "elm.padding.main.icon.text"; relative: 1.0 0.5; }
+ rel2 { to_x: "elm.padding.B.A"; to_y: "elm.padding.main.icon.text"; relative: 1.0 0.5; }
+ }
+ }
+ spacer { "elm.padding.main.icon.text"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 0.0 0.5;
+ rel1 { to_x: "elm.swallow.icon.0"; relative: 1.0 0.5; }
+ rel2 { to_x: "elm.swallow.icon.0"; relative: 1.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_MAIN_LINE_TEXT_END_PADDING_INC 0;
+ }
+ }
+ textblock { "elm.text"; scale;
+ desc { "default";
+ align: 0.5 0.0;
+ rel1 { to_x: "elm.padding.main.icon.text"; to_y: "elm.padding.top"; relative: 1.0 1.0; }
+ rel2 { to_x: "elm.padding.main.text.end"; to_y: "base_line"; relative: 0.0 0.0; }
+ text.style: "entry_bubble_sent_textblock_style";
+ text.min: 0 1;
+ }
+ desc { "pressed"; inherit: "default";
+ text.style: "entry_bubble_sent_textblock_style";
+ }
+ desc { "disabled"; inherit: "default";
+ text.style: "list_text_main_dim";
+ }
+ }
+ spacer { "base_line";
+ desc { "default";
+ rel1 { to: "elm.padding.top"; relative: 0.0 0.0; }
+ rel2 { to: "elm.padding.top"; relative: 1.0 0.0; }
+ }
+ desc { "main_text_visible";
+ rel1 { to: "elm.padding.bottom"; relative: 0.0 0.0; }
+ rel2 { to: "elm.padding.bottom"; relative: 1.0 0.0; }
+ }
+ desc { "multiline_text_visible";
+ rel1 { to: "elm.text.multiline"; relative: 0.0 0.0; }
+ rel2 { to: "elm.text.multiline"; relative: 1.0 0.0; }
+ }
+ }
+ spacer { "elm.padding.main.text.end"; scale;
+ desc { "default";
+ min: 0 0;
+ align: 1.0 0.5;
+ rel1 { to_x: "elm.swallow.icon.1"; relative: 0.0 0.5; }
+ rel2 { to_x: "elm.swallow.icon.1"; relative: 0.0 0.5; }
+ }
+ desc { "icon_visible"; inherit: "default";
+ min: GENLIST_ITEM_MAIN_LINE_TEXT_END_PADDING_INC 0;
+ }
+ }
+ swallow { "elm.swallow.icon.1"; scale;
+ desc { "default";
+ align: 1.0 0.5;
+ rel1 { to_x: "elm.padding.A.D"; to_y: "elm.padding.main.text.end"; relative: 0.0 0.5; }
+ rel2 { to_x: "elm.padding.A.D"; to_y: "elm.padding.main.text.end"; relative: 0.0 0.5; }
+ }
+ }
+ spacer { "multiline_base_line";
+ desc { "default";
+ rel1 { to: "elm.padding.top"; relative: 0.0 1.0; }
+ rel2 { to: "elm.padding.top"; relative: 1.0 1.0; }
+ }
+ desc { "main_text_visible";
+ rel1 { to: "elm.padding.bottom"; relative: 0.0 0.0; }
+ rel2 { to: "elm.padding.bottom"; relative: 1.0 0.0; }
+ }
+ }
+ textblock { "elm.text.multiline"; scale;
+ desc { "default";
+ align: 0.5 1.0;
+ rel1 { to_x: "elm.padding.main.icon.text"; to_y: "multiline_base_line"; relative: 1.0 1.0; }
+ rel2 { to_x: "elm.padding.main.text.end"; to_y: "elm.padding.bottom"; relative: 0.0 0.0; }
+ text.style: "entry_bubble_sent_textblock_style";
+ text.min: 0 1;
+ }
+ desc { "pressed"; inherit: "default";
+ text.style: "entry_bubble_sent_textblock_style";
+ }
+ desc { "disabled"; inherit: "default";
+ text.style: "list_text_multiline_dim";
+ }
+ }
+ rect { "elm.bottomline"; scale;
+ desc { "default";
+ min: 0 LIST_BOTTOMLINE_HEIGHT;
+ max: -1 LIST_BOTTOMLINE_HEIGHT;
+ align: 0.5 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ color: 204 204 204 255;
+ }
+ desc { "hidden"; inherit: "default";
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ signal: "elm,state,elm.swallow.bg,visible";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "elm.bottomline";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.B.A";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon.2,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.A.D";
+ }
+ program {
+ signal: "elm,state,elm.swallow.end,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.D.C";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon.0,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.main.icon.text";
+ }
+ program {
+ signal: "elm,state,elm.swallow.icon.1,visible";
+ source: "elm";
+ action: STATE_SET "icon_visible" 0.0;
+ target: "elm.padding.main.text.end";
+ }
+ program { name: "main_text_visible";
+ signal: "elm,state,elm.text,visible";
+ source: "elm";
+ script {
+ if (get_int(multiline_text_visible) == 1) {
+ set_state(PART:"base_line", "multiline_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "main_text_visible", 0.0);
+ }
+ else {
+ set_state(PART:"base_line", "main_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "default", 0.0);
+ }
+ set_int(main_text_visible, 1);
+ }
+ }
+ program { name: "multiline_text_visible";
+ signal: "elm,state,elm.text.multiline,visible";
+ source: "elm";
+ script {
+ if (get_int(main_text_visible) == 1) {
+ set_state(PART:"base_line", "multiline_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "main_text_visible", 0.0);
+ }
+ else {
+ set_state(PART:"base_line", "main_text_visible", 0.0);
+ set_state(PART:"multiline_base_line", "default", 0.0);
+ }
+ set_int(multiline_text_visible, 1);
+ }
+ }
+ program { name: "default";
+ signal: "elm,state,default";
+ source: "elm";
+ script {
+ set_state(PART:"base_line", "default", 0.0);
+ set_state(PART:"multiline_base_line", "default", 0.0);
+ set_state(PART:"elm.padding.B.A", "default", 0.0);
+ set_state(PART:"elm.padding.A.D", "default", 0.0);
+ set_state(PART:"elm.padding.D.C", "default", 0.0);
+ set_state(PART:"elm.padding.main.icon.text", "default", 0.0);
+ set_state(PART:"elm.padding.main.text.end", "default", 0.0);
+ set_state(PART:"elm.bottomline", "default", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"elm.text", "default", 0.0);
+ set_state(PART:"elm.text.multiline", "default", 0.0);
+ set_int(main_text_visible, 0);
+ set_int(multiline_text_visible, 0);
+ }
+ }
+ program { name: "pressed";
+ signal: "elm,state,selected";
+ source: "elm";
+ action: STATE_SET "pressed" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ target: "image.bg";
+ }
+ program { name: "unpressed";
+ signal: "elm,state,unselected";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ target: "image.bg";
+ }
+ program { name: "enabled";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ }
+ program { name: "disabled";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text.multiline";
+ }
+ }
+}
+
}
\ No newline at end of file
#define TITLE_BG_BLUE 61 185 204 255
-#define TITLE_BG_WHITE 250 250 250 255
\ No newline at end of file
+#define TITLE_BG_WHITE 250 250 250 255
+
+#define BUBBLE_NAVI_TITLE_HEIGHT_POTRAIT 120
+#define BUBBLE_NAVI_TITLE_HEIGHT_LANDSCAPE 120
+#define BUBBLE_NAVI_TITLE_COLOR 250 250 250 255
+#define BUBBLE_NAVI_TITLE_TEXT_COLOR 46 139 153 255
+#define BUBBLE_NAVI_TITLE_ARROW_COLOR 61 185 204 255
+#define BUBBLE_NAVI_TITLE_ARROW_PRESSED_COLOR 46 139 153 255
+#define BUBBLE_NAVI_TITLE_SELECT_ALL_COLOR 61 185 204 255
+
+#define BUBBLE_NAVI_TITLE_TEXT_COLOR_WHITE 250 250 250 222
+#define BUBBLE_NAVI_TITLE_TEXT_PRESSED_COLOR_WHITE 250 250 250 255
+#define BUBBLE_NAVI_TITLE_TEXT_DIMMED_COLOR_WHITE 250 250 250 115
+
+#define BUBBLE_BACKGROUND_COLOR_EDC 250 250 250 255
+#define BUBBLE_BADGE_IMAGE_COLOR_EDC 250 250 250 255
+#define BUBBLE_BADGE_DRAFT_BG_COLOR_EDC 106 126 204 255
+#define BUBBLE_BADGE_FAILED_BG_COLOR_EDC 224 34 34 255
+
+#define BUBBLE_DATELINE_DIVIDER_COLOR_EDC 0 0 0 51
+#define BUBBLE_DATELINE_TEXT_COLOR_EDC 128 128 128 255
+
+#define COLOR_BLACK_EDC 0 0 0 255
+#define COLOR_BLACK_TRANSPARENT_EDC 0 0 0 204
+#define COLOR_WHITE_EDC 255 255 255 255
+#define COLOR_GRAY_EDC 245 245 242 255
+#define COLOR_DARK_GRAY_EDC 213 213 212 255
+#define COLOR_BLUE_EDC 2 61 132 255
+#define COLOR_DARK_BLUE_EDC 1 37 79 255
+#define COLOR_BLUE_TRANSPARENT_EDC 179 197 218 255
+#define COLOR_RED_EDC 224 33 33 255
+#define COLOR_BUBBLE_LINE_EDC 78 97 173 255
+#define COLOR_SEND_BUTTON_EDC 78 97 173 255
+#define COLOR_SEND_BUTTON_PRESSED_EDC 55 69 122 255
+#define COLOR_SEND_BUTTON_DIMMED_EDC 131 145 201 255
+#define COLOR_LINE_INPUT_EDC 78 97 173 255
+#define COLOR_LINE_BODY_DIVIDER_EDC 216 219 235 255
+
+#define COLOR_BLACK 0, 0, 0, 255
+#define COLOR_BLACK_TRANSPARENT 0, 0, 0, 204
+#define COLOR_WHITE 255, 255, 255, 255
+#define COLOR_WHITE_TRANSPARENT1 255, 255, 255, 230
+#define COLOR_WHITE_TRANSPARENT2 255, 255, 255, 204
+#define COLOR_GRAY 245, 245, 242, 255
+#define COLOR_DARK_GRAY 213, 213, 212, 255
+#define COLOR_BLUE 61, 185, 204, 255
+#define COLOR_DARK_BLUE 1, 37, 79, 255
+#define COLOR_BLUE_TRANSPARENT 179, 197, 218, 255
+#define COLOR_RED 224, 33, 33, 255
+#define COLOR_SEND_BUTTON 78, 97, 173, 255
+#define COLOR_SEND_BUTTON_PRESSED 55, 69, 122, 255
+#define COLOR_SEND_BUTTON_DIMMED 131, 145, 201, 255
+
+#define COLOR_ADD_BUTTON COLOR_SEND_BUTTON
+#define COLOR_ADD_BUTTON_PRESSED COLOR_SEND_BUTTON_PRESSED
+#define COLOR_ADD_BUTTON_DIMMED COLOR_SEND_BUTTON_DIMMED
+
+#define BUBBLE_BACKGROUND_COLOR 250, 250, 250, 255
+
+#define COLOR_CONV_BUBBLE_RECIEVE 65 197 217 255
+#define COLOR_CONV_BUBBLE_RECIEVE_PRESSED 50 152 166 255
+
+#define COLOR_CONV_BUBBLE_SEND 90 111 199 230
+#define COLOR_CONV_BUBBLE_SEND_PRESSED 67 84 148 230
+
+#define COLOR_CONV_BUBBLE_DRAFT 106 126 204 255
+#define COLOR_CONV_BUBBLE_DRAFT_PRESED 80 95 153 255
+
+#define COLOR_CONV_BUBBLE_FAILED 0 0 0 102
+#define COLOR_CONV_BUBBLE_FAILED_PRESSED 0 0 0 153
+
+#define BUBBLE_TIME_TEXT_COLOR BUBBLE_DATELINE_TEXT_COLOR_EDC
+#define SENDBUTTON_CHARCOUNT_TEXT_COLOR 128 128 128 255
+
+#define COLOR_BUTTON 61, 185, 204, 255
+#define COLOR_BUTTON_PRESSED 46, 139, 153, 255
\ No newline at end of file
--- /dev/null
+#define SELECT_ALL_HEIGHT 120
+collections {
+ base_scale: 2.6;
+ group { name: "conv_list_base";
+ parts {
+ part { name: "rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ }
+ }
+ part { name: "swl.select";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ to: "rect";
+ relative: 0.0 0.0;
+ }
+ align: 0.5 0.0;
+ max: -1 0;
+ visible: 0;
+ }
+ description { state: "selection" 0.0;
+ inherit: "default" 0.0;
+ max: -1 SELECT_ALL_HEIGHT;
+ visible: 1;
+ }
+ }
+ part { name: "swl.list";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ to: "rect";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to: "rect";
+ relative: 1.0 1.0;
+ }
+ align: 0.5 0.0;
+ }
+ description { state: "selection" 0.0;
+ inherit: "default" 0.0;
+ rel1 {
+ to: "swl.select";
+ relative: 0.0 1.0;
+ }
+ }
+ }
+ }
+ programs {
+ program { name: "show.select";
+ signal: "show.select";
+ source: "*";
+ action: STATE_SET "selection" 0.0;
+ target: "swl.select";
+ target: "swl.list";
+ }
+ program { name: "hide.select";
+ signal: "hide.select";
+ source: "*";
+ action: STATE_SET "default" 0.0;
+ target: "swl.select";
+ target: "swl.list";
+ }
+ }
+ }
+}
\ No newline at end of file
friend class ListView;
public:
- ListItem(Elm_Genlist_Item_Type type, int userType);
+ ListItem(Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE, int userType = 0);
ListItem(const ListItemStyleRef &itemStyle, Elm_Genlist_Item_Type type, int userType);
virtual ~ListItem();
bool getMultiSelection() const;
void clear();
void setMode(Elm_List_Mode mode);
+ void setHomogeneous(bool isHomogeneous);
ListItem *getSelectedItem() const;
void setCheckMode(bool check);
template<typename T>
std::vector<T*> getItems() const;
- void updateAllItems();
+ void updateRealizedItems();
void registerItemRealizedCallback();
void registerItemExpandedCallback();
}
}
- return self->getListItemContent(*self, part) ;
+ return self->getListItemContent(*self, part);
}
Evas_Object *ListItem::addCheck()
elm_genlist_mode_set(getEo(), mode);
}
+void ListView::setHomogeneous(bool isHomogeneous)
+{
+ elm_genlist_homogeneous_set(getEo(), isHomogeneous);
+}
+
ListItem *ListView::getSelectedItem() const
{
Elm_Object_Item *elmItem = elm_genlist_selected_item_get(getEo());
}
}
-void ListView::updateAllItems()
+void ListView::updateRealizedItems()
{
elm_genlist_realized_items_update(getEo());
}
--- /dev/null
+/*
+ * Copyright (c) 2009-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 ConvList_h_
+#define ConvList_h_
+
+#include "ConvListLayout.h"
+#include "ConvListSelectAllView.h"
+#include "ListView.h"
+#include "MsgEngine.h"
+
+namespace Msg
+{
+ class ConvList
+ : public ConvListLayout
+ , private IMsgStorageListener
+ , private IListViewListener
+ {
+ public:
+ enum Mode
+ {
+ NormalMode,
+ SelectMode
+ };
+
+ public:
+ /**
+ * @brief Creates list with messages in thread
+ * @param[in] parent parent Evas_Object
+ * @param[in] msgEngine Message Engine
+ * @param[in] threadId Thread id
+ */
+ ConvList(Evas_Object *parent, MsgEngine &msgEngine, ThreadId threadId);
+ virtual ~ConvList();
+
+ /**
+ * @brief Sets Conversation list mode
+ * @details Set SelectMode to show checkboxes. NormalMode to hide them.
+ * @param[in] mode enum Mode
+ */
+ void setMode(Mode mode);
+ /**
+ * @brief gets current Conversation list mode
+ * @return Conversation list mode
+ */
+ Mode getMode() const;
+
+ private:
+ void create(Evas_Object *parent);
+ Evas_Object *createSelectAll(Evas_Object *parent);
+ Evas_Object *createList(Evas_Object *parent);
+ void fill();
+
+ // IListViewListener:
+ virtual void onListItemSelected(ListItem &listItem, void *funcData);
+ virtual void onListItemChecked(ListItem &listItem, void *funcData);
+
+ private:
+ Mode m_Mode;
+ MsgEngine &m_MsgEngine;
+ ThreadId m_ThreadId;
+ ConvListSelectAllView *m_pSelectAll;
+ ListView *m_pList;
+ };
+}
+
+#endif /* ConvList_h_ */
--- /dev/null
+/*
+ * Copyright (c) 2009-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 ConvListItem_H_
+#define ConvListItem_H_
+
+#include "ConvListViewItem.h"
+#include "MsgTypes.h"
+#include "BubbleView.h"
+
+namespace Msg
+{
+ class MsgConversationItem;
+
+ class ConvListItem
+ : public ConvListViewItem
+ {
+ public:
+ /**
+ * @brief Creates item for Conversation list
+ * @param[in] item MsgConversationItem model
+ */
+ ConvListItem(MsgConversationItem &item);
+ virtual ~ConvListItem();
+
+ protected:
+ virtual Evas_Object *getBubble();
+ virtual std::string getText();
+ virtual std::string getTime();
+
+ private:
+ MsgId m_MsgId;
+ std::string m_MessageText;
+ };
+}
+
+
+#endif /* ConvListItem_H_ */
--- /dev/null
+/*
+ * Copyright (c) 2009-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 "ConvList.h"
+#include "ConvListItem.h"
+#include "Logger.h"
+
+using namespace Msg;
+
+ConvList::ConvList(Evas_Object *parent, MsgEngine &msgEngine, ThreadId threadId)
+ : ConvListLayout(parent)
+ , m_Mode(NormalMode)
+ , m_MsgEngine(msgEngine)
+ , m_ThreadId(threadId)
+ , m_pSelectAll(nullptr)
+ , m_pList(nullptr)
+{
+ create(parent);
+}
+
+ConvList::~ConvList()
+{
+
+}
+
+void ConvList::setMode(ConvList::Mode mode)
+{
+ m_Mode = mode;
+ bool isSelectMode = (m_Mode == ConvList::SelectMode);
+ MSG_LOG("isSelectMode: ",isSelectMode);
+
+ showSelectAllMode(isSelectMode);
+ m_pList->setCheckMode(isSelectMode);
+ if(isSelectMode)
+ {
+ auto items = m_pList->getItems();
+ for(ListItem *it : items)
+ {
+ if(it->isCheckable())
+ {
+ it->setCheckedState(false, false);
+ }
+ }
+ }
+ m_pList->updateRealizedItems();
+}
+
+ConvList::Mode ConvList::getMode() const
+{
+ return m_Mode;
+}
+
+void ConvList::create(Evas_Object *parent)
+{
+ Evas_Object *list = createList(parent);
+ Evas_Object *selectAll = createSelectAll(parent);
+
+ setSelectAll(selectAll);
+ setBubbleList(list);
+ fill();
+ showSelectAllMode(m_Mode == SelectMode);
+}
+
+Evas_Object *ConvList::createSelectAll(Evas_Object *parent)
+{
+ m_pSelectAll = new ConvListSelectAllView(parent);
+ m_pSelectAll->show();
+ return *m_pSelectAll;
+}
+
+Evas_Object *ConvList::createList(Evas_Object *parent)
+{
+ m_pList = new ListView(parent);
+ m_pList->setListener(this);
+ m_pList->setMode(ELM_LIST_COMPRESS);
+ m_pList->setHomogeneous(false);
+ m_pList->show();
+
+ return *m_pList;
+}
+
+
+void ConvList::fill()
+{
+ m_pList->clear();
+
+ MsgConversationListRef convList = m_MsgEngine.getStorage().getConversationList(m_ThreadId);
+ int convListLen = convList->getLength();
+
+ for(int i = 0; i < convListLen; ++i)
+ {
+ MsgConversationItem &item = convList->at(i);
+ ConvListItem *listItem = new ConvListItem(item);
+ m_pList->appendItem(*listItem);
+ }
+}
+
+
+void ConvList::onListItemSelected(ListItem &listItem, void *funcData)
+{
+ ConvListItem &item = static_cast<ConvListItem&>(listItem);
+ item.setSelected(false);
+}
+
+void ConvList::onListItemChecked(ListItem &listItem, void *funcData)
+{
+ ConvListItem &item = static_cast<ConvListItem&>(listItem);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2009-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 "ConvListItem.h"
+#include "MsgConversationItem.h"
+#include "BubbleView.h"
+#include "ListView.h"
+
+using namespace Msg;
+
+ConvListItem::ConvListItem(MsgConversationItem &item)
+ : ConvListViewItem(item.getDirection() == Message::Direction::MD_Sent ? ConvItemType::Sent : ConvItemType::Received)
+ , m_MsgId(item.getMsgId())
+ , m_MessageText(item.getText())
+{
+
+}
+
+ConvListItem::~ConvListItem()
+{
+
+}
+
+Evas_Object *ConvListItem::getBubble()
+{
+ //TODO: implement getting of multimedia
+ return nullptr;
+}
+
+std::string ConvListItem::getText()
+{
+ return m_MessageText;
+}
+
+std::string ConvListItem::getTime()
+{
+ //TODO: convert time_t to string
+ return "10:23 PM";
+}
};
public:
+ //TODO: remove BubbleView from project and use Body's viewer instead
BubbleView(Evas_Object *parent, Style style);
virtual ~BubbleView();
--- /dev/null
+/*
+ * Copyright (c) 2009-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 ConvListLayout_h_
+#define ConvListLayout_h_
+
+#include "View.h"
+
+namespace Msg
+{
+ class ConvListLayout
+ : public View
+ {
+ public:
+ ConvListLayout(Evas_Object *parent);
+ virtual ~ConvListLayout();
+
+ protected:
+ void showSelectAllMode(bool value);
+ void setBubbleList(Evas_Object *layout);
+ void setSelectAll(Evas_Object *layout);
+
+ private:
+ void create(Evas_Object *parent);
+ };
+}
+
+#endif /* ConvListLayout_h_ */
--- /dev/null
+/*
+ * Copyright (c) 2009-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 ConvListSelectAllView_h_
+#define ConvListSelectAllView_h_
+
+#include "View.h"
+
+namespace Msg
+{
+ class ConvListSelectAllView
+ : public View
+ {
+ public:
+ ConvListSelectAllView(Evas_Object *parent);
+ virtual ~ConvListSelectAllView();
+ };
+}
+
+
+
+#endif /* ConvListSelectAllView_h_ */
--- /dev/null
+/*
+ * Copyright (c) 2009-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 ConvListViewItem_H_
+#define ConvListViewItem_H_
+
+#include "ListItem.h"
+
+namespace Msg
+{
+ class ConvListViewItem
+ : public ListItem
+ {
+ public:
+ enum ConvItemType
+ {
+ Sent,
+ Received,
+ };
+
+ ConvListViewItem(ConvItemType type);
+ virtual ~ConvListViewItem();
+
+ protected:
+ virtual Evas_Object *getBubble() = 0;
+ virtual std::string getText() = 0;
+ virtual std::string getTime() = 0;
+
+ private:
+ virtual std::string getListItemText(ListItem &item, const char *part);
+ virtual Evas_Object *getListItemContent(ListItem &item, const char *part);
+ virtual const char *getCheckPart(ListItem &item);
+ };
+}
+
+#endif /* ConvListViewItem_H_ */
{
Evas_Object *label = elm_label_add(parent);
setEo(label);
-
evas_object_show(label);
elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
elm_object_focus_allow_set(label, true);
--- /dev/null
+/*
+ * Copyright (c) 2009-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 "ConvListLayout.h"
+
+using namespace Msg;
+
+namespace
+{
+ const char *layoutStyle = "conv_list_base";
+}
+
+ConvListLayout::ConvListLayout(Evas_Object *parent)
+{
+ create(parent);
+}
+
+ConvListLayout::~ConvListLayout()
+{
+
+}
+
+void ConvListLayout::showSelectAllMode(bool value)
+{
+ const char *signal = value ? "show.select":"hide.select";
+ emitSignal(signal, "*");
+}
+
+void ConvListLayout::setBubbleList(Evas_Object *layout)
+{
+ elm_object_part_content_set(getEo(), "swl.list", layout);
+}
+
+void ConvListLayout::setSelectAll(Evas_Object *layout)
+{
+ elm_object_part_content_set(getEo(), "swl.select", layout);
+}
+
+void ConvListLayout::create(Evas_Object *parent)
+{
+ setEo(elm_layout_add(parent));
+ elm_layout_file_set(getEo(), ResourceUtils::getResourcePath(CONV_LIST_EDJ_PATH).c_str(), layoutStyle);
+ expand();
+ show();
+}
--- /dev/null
+/*
+ * Copyright (c) 2009-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 "ConvListSelectAllView.h"
+
+using namespace Msg;
+
+ConvListSelectAllView::ConvListSelectAllView(Evas_Object *parent)
+{
+//TODO: implement. Possibly move to Common folder.
+}
+
+ConvListSelectAllView::~ConvListSelectAllView()
+{
+
+}
+
+
--- /dev/null
+/*
+ * Copyright (c) 2009-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 "ConvListViewItem.h"
+
+using namespace Msg;
+
+namespace
+{
+ //TODO: Implement different styles
+ ListItemStyleRef sentStyle = ListItemStyle::create("sentbubble");
+ ListItemStyleRef receivedStyle = ListItemStyle::create("receivebubble");
+
+ const char *checkBoxPart = "elm.swallow.icon.2";
+}
+
+ConvListViewItem::ConvListViewItem(ConvItemType type)
+ : ListItem()
+{
+ switch (type)
+ {
+ case Sent:
+ setStyle(sentStyle);
+ break;
+ case Received:
+ setStyle(receivedStyle);
+ break;
+ default:
+ break;
+ }
+}
+
+ConvListViewItem::~ConvListViewItem()
+{
+
+}
+
+std::string ConvListViewItem::getListItemText(ListItem &item, const char *part)
+{
+ if(!strcmp(part, "elm.text"))
+ return getText();
+ else if(!strcmp(part, "elm.text.multiline"))
+ return getTime();
+ else
+ return "";
+}
+
+Evas_Object *ConvListViewItem::getListItemContent(ListItem &item, const char *part)
+{
+ if(!strcmp(part, "elm.swallow.end"))
+ return getBubble();
+ else
+ return nullptr;
+}
+
+const char *ConvListViewItem::getCheckPart(ListItem &item)
+{
+ return checkBoxPart;
+}
#include "ListView.h"
#include "MsgEngine.h"
#include "ConvContactList.h"
+#include "ConvList.h"
namespace Msg
{
void fillMsgAddress(Message &msg);
void saveDraftMsg();
- // Bubble:
- void createBubbleList(Evas_Object *parent);
- void fillConversationList();
-
private:
Mode m_Mode;
ConversationLayout *m_pLayout;
- Scroller *m_pScroller;
- Box *m_pBubbleBox;
MessageInputPanel *m_pMsgInputPanel;
Body *m_pBody;
RecipientsPanel *m_pRecipPanel;
ConvContactList *m_pContactsList;
ThreadId m_ThreadId;
bool m_IsMms; // Compose message type
+ ConvList *m_pConvList;
};
}
: FrameController(parent)
, m_Mode(InitMode)
, m_pLayout(nullptr)
- , m_pScroller(nullptr)
- , m_pBubbleBox(nullptr)
, m_pMsgInputPanel(nullptr)
, m_pBody(nullptr)
, m_pRecipPanel(nullptr)
{
createMainLayout(getParent());
- m_pScroller = new Scroller(*m_pLayout);
- m_pScroller->show();
- m_pScroller->expand();
- m_pScroller->setPpolicy(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
+ m_pConvList = new ConvList(*m_pLayout, getMsgEngine(), m_ThreadId);
+
createMsgInputPanel(*m_pLayout);
createBody(*m_pMsgInputPanel);
updateMsgInputPanel();
m_pLayout->setMsgInputPanel(*m_pMsgInputPanel);
- m_pLayout->setBubble(*m_pScroller);
+ m_pLayout->setBubble(*m_pConvList);
setMode(mode);
- fillConversationList();
getMsgEngine().getStorage().addListener(*this);
}
destroyRecipPanel();
destroyContactList();
- createBubbleList(*m_pScroller);
-
- m_pBubbleBox->setSizeHintAlign(EVAS_HINT_FILL, EVAS_HINT_FILL);
- m_pBubbleBox->setSizeHintWeight(EVAS_HINT_EXPAND, 0);
- m_pScroller->setContent(*m_pBubbleBox);
}
void Conversation::createMainLayout(Evas_Object *parent)
void Conversation::onMsgStorageChange(const MsgIdList &idList)
{
MSG_LOG("");
-
- fillConversationList();
- m_pScroller->navigateToBottom();
}
void Conversation::onContactSelected(ContactListItem &item)
void Conversation::onHwMoreButtonClicked()
{
- MSG_LOG("");
+ //TODO: make more menu popup.
+ m_pConvList->setMode(m_pConvList->getMode() == ConvList::NormalMode ? ConvList::SelectMode : ConvList::NormalMode);
}
void Conversation::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
+++ /dev/null
-/*
- * Copyright (c) 2009-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 "Conversation.h"
-
-#include "App.h"
-#include "Message.h"
-#include "Logger.h"
-#include "Box.h"
-#include "BubbleView.h"
-
-#include <sstream>
-
-using namespace Msg;
-
-void Conversation::createBubbleList(Evas_Object *parent)
-{
- if(!m_pBubbleBox)
- {
- m_pBubbleBox = new Box(parent);
- m_pBubbleBox->setHorizontal(false);
- m_pBubbleBox->setHomogeneous(false);
- m_pBubbleBox->show();
- }
-}
-
-void Conversation::fillConversationList()
-{
- if(m_pBubbleBox)
- {
- m_pBubbleBox->clear();
-
- MsgConversationListRef convList = getMsgEngine().getStorage().getConversationList(m_ThreadId);
- int convListLen = convList->getLength();
-
- for(int i = 0; i < convListLen; ++i)
- {
- MsgConversationItem &item = convList->at(i);
- BubbleView *bubble = new BubbleView(*m_pBubbleBox, (BubbleView::Style)item.getDirection());
- bubble->show();
- bubble->setText(item.getText());
- bubble->setTime("10:23 PM"); // TODO: remove hard code
- m_pBubbleBox->packEnd(*bubble);
- }
- m_pBubbleBox->recalculate();
- }
-}