TizenRefApp-5670 Implement base layout(Viewer) 66/59066/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Tue, 9 Feb 2016 13:57:40 +0000 (15:57 +0200)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Tue, 9 Feb 2016 15:56:20 +0000 (17:56 +0200)
Change-Id: I084125cfe1faeb9368714a9df8b0d5859cf9b1f8
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
30 files changed:
.cproject
CMakeLists.txt
edje/images/00_title_bg.#.png [new file with mode: 0755]
edje/images/M01_file_bg.#.png [new file with mode: 0755]
edje/images/M01_file_bg_ef.#.png [new file with mode: 0755]
edje/images/M01_icon_play.png [new file with mode: 0644]
edje/images/T02_progress_bar.png [new file with mode: 0755]
edje/images/T02_progress_bar_button.png [new file with mode: 0755]
edje/images/T02_progress_bar_button_pressed.png [new file with mode: 0755]
edje/images/T02_progress_bg.png [new file with mode: 0755]
edje/images/full_player_button_01.png [new file with mode: 0755]
edje/images/full_player_button_02.png [new file with mode: 0755]
edje/images/full_player_button_next.png [new file with mode: 0644]
edje/images/full_player_button_pause.png [new file with mode: 0644]
edje/images/full_player_button_play.png [new file with mode: 0644]
edje/images/full_player_button_prev.png [new file with mode: 0644]
edje/images/messages_state_ic_lock.png [new file with mode: 0644]
inc/Resource.h
res/edje/viewer_defines.inl [new file with mode: 0755]
res/edje/viewer_layout.edc [new file with mode: 0755]
src/Conversation/ConvList/Controller/inc/ConvList.h
src/Conversation/ConvList/Controller/inc/ConvListItem.h
src/Conversation/ConvList/Controller/src/ConvList.cpp
src/Conversation/ConvList/Controller/src/ConvListItem.cpp
src/Conversation/Main/Controller/inc/Conversation.h
src/Conversation/Main/Controller/src/Conversation.cpp
src/Viewer/Controller/inc/Viewer.h
src/Viewer/Controller/src/Viewer.cpp
src/Viewer/View/inc/ViewerLayout.h [new file with mode: 0644]
src/Viewer/View/src/ViewerLayout.cpp [new file with mode: 0644]

index 2311285..c2bcb32 100644 (file)
--- a/.cproject
+++ b/.cproject
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Settings/View/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Viewer/Controller/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Viewer/View/inc}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Viewer/Utils/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/MsgThread/Controller/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/MsgThread/View/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Common/MsgEngine/inc}&quot;"/>
                                                                </option>
                                                                <option id="gnu.c.compiler.option.include.paths.1766037024" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Viewer/Utils/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                </option>
                                                                <option id="gnu.cpp.compiler.option.include.paths.2132319922" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Viewer/Utils/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Conversation/AppControl/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Conversation/ConvList/Controller/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Conversation/ConvList/View/inc}&quot;"/>
                                                                </option>
                                                                <option id="gnu.c.compiler.option.include.paths.1626765099" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Viewer/Utils/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/email-service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/msg-service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
index 02ee18d..df627a9 100644 (file)
@@ -32,6 +32,7 @@ INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
                     ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings/View/inc/
                     ${CMAKE_CURRENT_SOURCE_DIR}/src/Viewer/Controller/inc/
                     ${CMAKE_CURRENT_SOURCE_DIR}/src/Viewer/View/inc/
+                    ${CMAKE_CURRENT_SOURCE_DIR}/src/Viewer/Utils/inc/
 )
 
 if(NOT DEFINED TIZEN_2_4)
diff --git a/edje/images/00_title_bg.#.png b/edje/images/00_title_bg.#.png
new file mode 100755 (executable)
index 0000000..834f3f6
Binary files /dev/null and b/edje/images/00_title_bg.#.png differ
diff --git a/edje/images/M01_file_bg.#.png b/edje/images/M01_file_bg.#.png
new file mode 100755 (executable)
index 0000000..0f5c388
Binary files /dev/null and b/edje/images/M01_file_bg.#.png differ
diff --git a/edje/images/M01_file_bg_ef.#.png b/edje/images/M01_file_bg_ef.#.png
new file mode 100755 (executable)
index 0000000..000546c
Binary files /dev/null and b/edje/images/M01_file_bg_ef.#.png differ
diff --git a/edje/images/M01_icon_play.png b/edje/images/M01_icon_play.png
new file mode 100644 (file)
index 0000000..2a5ee94
Binary files /dev/null and b/edje/images/M01_icon_play.png differ
diff --git a/edje/images/T02_progress_bar.png b/edje/images/T02_progress_bar.png
new file mode 100755 (executable)
index 0000000..e557cdd
Binary files /dev/null and b/edje/images/T02_progress_bar.png differ
diff --git a/edje/images/T02_progress_bar_button.png b/edje/images/T02_progress_bar_button.png
new file mode 100755 (executable)
index 0000000..c4e7a4f
Binary files /dev/null and b/edje/images/T02_progress_bar_button.png differ
diff --git a/edje/images/T02_progress_bar_button_pressed.png b/edje/images/T02_progress_bar_button_pressed.png
new file mode 100755 (executable)
index 0000000..b1977db
Binary files /dev/null and b/edje/images/T02_progress_bar_button_pressed.png differ
diff --git a/edje/images/T02_progress_bg.png b/edje/images/T02_progress_bg.png
new file mode 100755 (executable)
index 0000000..6bfcd0c
Binary files /dev/null and b/edje/images/T02_progress_bg.png differ
diff --git a/edje/images/full_player_button_01.png b/edje/images/full_player_button_01.png
new file mode 100755 (executable)
index 0000000..6d0a523
Binary files /dev/null and b/edje/images/full_player_button_01.png differ
diff --git a/edje/images/full_player_button_02.png b/edje/images/full_player_button_02.png
new file mode 100755 (executable)
index 0000000..8b57c0b
Binary files /dev/null and b/edje/images/full_player_button_02.png differ
diff --git a/edje/images/full_player_button_next.png b/edje/images/full_player_button_next.png
new file mode 100644 (file)
index 0000000..a113871
Binary files /dev/null and b/edje/images/full_player_button_next.png differ
diff --git a/edje/images/full_player_button_pause.png b/edje/images/full_player_button_pause.png
new file mode 100644 (file)
index 0000000..e333710
Binary files /dev/null and b/edje/images/full_player_button_pause.png differ
diff --git a/edje/images/full_player_button_play.png b/edje/images/full_player_button_play.png
new file mode 100644 (file)
index 0000000..213c6d8
Binary files /dev/null and b/edje/images/full_player_button_play.png differ
diff --git a/edje/images/full_player_button_prev.png b/edje/images/full_player_button_prev.png
new file mode 100644 (file)
index 0000000..155955e
Binary files /dev/null and b/edje/images/full_player_button_prev.png differ
diff --git a/edje/images/messages_state_ic_lock.png b/edje/images/messages_state_ic_lock.png
new file mode 100644 (file)
index 0000000..064efca
Binary files /dev/null and b/edje/images/messages_state_ic_lock.png differ
index 86ec520..e181b21 100644 (file)
@@ -41,6 +41,7 @@
 #define MSG_TITLE_EDJ_PATH               EDJ_PATH"/msg_title.edj"
 #define CONV_LIST_EDJ_PATH               EDJ_PATH"/conv_list.edj"
 #define SELECT_ALL_EDJ_PATH              EDJ_PATH"/select_all.edj"
+#define VIEWER_LAYOUT_EDJ_PATH           EDJ_PATH"/viewer_layout.edj"
 
 // Images(res):
 #define THUMB_CONTACT_IMG_PATH           IMAGE_PATH"/list_ic_contacts.png"
diff --git a/res/edje/viewer_defines.inl b/res/edje/viewer_defines.inl
new file mode 100755 (executable)
index 0000000..87460b7
--- /dev/null
@@ -0,0 +1,470 @@
+/*
+ * 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 "macros.inl"
+
+//Layout
+#define MAIN_W 220
+#define MAIN_W_HORIZONTAL 480
+
+//Body attributes
+#define BODY_PADDING_TOP_1_MIN 30
+#define BODY_PADDING_TOP_2_MIN 15
+#define BODY_PADDING_MID_1_MIN 6
+#define BODY_PADDING_BOTTOM_MIN 12
+
+#define SUBJECT_LOCK_WIDTH 80
+#define SUBJECT_MIN_H 80
+#define SUPPLEMENT_AREA_H 76
+#define SUPPLEMENT_AUDIO_AREA_H 42
+#define SUMMARY_AUDIO_AREA_H 46
+#define PAGE_INDEX_MIN_W 64
+#define DETAIL_PADDING_V_MIN 14
+#define DETAIL_PADDING_H_MIN 32
+
+//play controllbar attributes
+#define PLAY_CTRBAR_MIN_VERTICAL_H 320
+#define PLAY_CTRBAR_TOP_PADDING_MIN_H 12
+#define PLAY_CTRBAR_MIDDLE_PADDING_MIN_H 7
+#define PLAY_CTRBAR_BOTTOM_PADDING_MIN_H 12
+#define PLAY_CTRBAR_PROGRESS_BAR_VERTICAL_W 348
+#define PLAY_CTRBAR_PROGRESS_BAR_HORIZONTAL_W 688
+#define PLAYER_PROGRESSBAR_H 8
+#define PLAYER_CIRCLE_W 26
+#define PLAYER_CIRCLE_H 26
+#define PLAYER_CIRCLE_PRESS_W 26
+#define PLAYER_CIRCLE_PRESS_H 26
+#define PLAY_CTRBAR_SMALL_BUTTON_W 126
+#define PLAY_CTRBAR_LARGE_BUTTON_W 126
+#define PLAY_CTRBAR_BUTTON_MARGIN 34
+#define PLAY_CTRBAR_BUTTON_TEXT_MARGIN 14
+#define PLAY_CTRBAR_PROGRESS_TEXT_MARGIN 14
+#define PLAY_CTRBAR_PROGRESS_TEXT_W 40
+#define PLAY_CTRBAR_BUTTON_VOLUME_START_X 18
+
+//edc images
+#define TITLE_BG "00_title_bg.#.png"
+#define SMALL_BTN_CIRCLE "full_player_button_02.png"
+#define LARGE_BTN_CIRCLE "full_player_button_01.png"
+#define PREV_BTN "full_player_button_prev.png"
+#define PLAY_BTN "full_player_button_play.png"
+#define PAUSE_BTN "full_player_button_pause.png"
+#define NEXT_BTN "full_player_button_next.png"
+#define PROGRESS_BG "T02_progress_bg.png"
+#define PROGRESS_BAR "T02_progress_bar.png"
+#define PROGRESS_BAR_BUTTON "T02_progress_bar_button.png"
+#define PROGRESS_BAR_BUTTON_PRESSED "T02_progress_bar_button_pressed.png"
+#define LOCK_ICON "messages_state_ic_lock.png"
+#define AUDIO_ICON "M01_icon_play.png"
+#define FILE_BG "M01_file_bg.#.png"
+#define FILE_BG_EFFECT "M01_file_bg_ef.#.png"
+
+#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_TRANSPARENT        255 255 255 128
+#define COLOR_GRAY                             245 245 242 255
+#define COLOR_DARK_GRAY                        213 213 212 255
+#define COLOR_BLUE                             2 61 132 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 BUBBLE_NAVI_TITLE_COLOR 61 185 204 255
+#define COLOR_GRAY_TITLE_TEXT_EDC 128 128 128 255
+#define COLOR_TIME_TEXT_EDC 102 102 102 255
+#define COLOR_LOCK_BTN_EDC 179 179 179 255
+
+//MACROS
+#define PART_BG(pName) \
+       part { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       color: 0 0 0 0; \
+               } \
+       }
+
+#define PART_RECT(pName, pR1x, pR1y, pR1xt, pR1yt, pR2x, pR2y, pR2xt, pR2yt) \
+       part { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       rel1 { relative: pR1x pR1y; to_x: pR1xt; to_y: pR1yt; } \
+                       rel2 { relative: pR2x pR2y; to_x: pR2xt; to_y: pR2yt; } \
+                       color: 0 0 0 0; \
+               } \
+       }
+
+#define PART_PIXEL_RECT(pName, pX, pY, pAx, pAy, pRx, pRy, pRt) \
+       part { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       min: pX pY; \
+                       align: pAx pAy; \
+                       rel1 { relative: pRx pRy; to: pRt; } \
+                       rel2 { relative: pRx pRy; to: pRt; } \
+                       color: 0 0 0 0; \
+               } \
+       }
+
+#define PART_PIXEL_RECT_EX(pName, pX, pY, pAx, pAy, pR1x, pR1y, pR2x, pR2y, pRt) \
+       part { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       min: pX pY; \
+                       max: pX pY; \
+                       align: pAx pAy; \
+                       rel1 { relative: pR1x pR1y; to: pRt; } \
+                       rel2 { relative: pR2x pR2y; to: pRt; } \
+                       color: 0 0 0 0; \
+               } \
+       }
+
+
+#define PART_V_PIXEL_RECT(pName, pY, pAy, pRy, pRt) \
+       part { \
+               name: pName; \
+               type: SPACER; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 0 pY; \
+                       fixed: 0 1; \
+                       align: 0.5 pAy; \
+                       rel1 { relative: 0.0 pRy; to: pRt; } \
+                       rel2 { relative: 1.0 pRy; to: pRt; } \
+               } \
+       }
+
+#define PART_H_PIXEL_RECT(pName, pX, pAx, pRx, pRt) \
+       part { \
+               name: pName; \
+               type: SPACER; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       min: pX 0; \
+                       fixed: 1 0; \
+                       align: pAx 0.5; \
+                       rel1 { relative: pRx 0.0; to: pRt; } \
+                       rel2 { relative: pRx 1.0; to: pRt; } \
+               } \
+       }
+
+#define PART_SWALLOW(pName, pTo) \
+       part { \
+               name: pName; \
+               type: SWALLOW; \
+               mouse_events: 1; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       fixed: 1 1; \
+                       rel1 { relative: 0.0 0.0; to: pTo; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; } \
+               } \
+       }
+
+#define PART_EVENT_RECT(pName, pTo) \
+       part { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 1; \
+               repeat_events: 1; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       rel1 { relative: 0.0 0.0; to: pTo; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; } \
+                       color: 0 0 0 0; \
+                       visible: 1; \
+               } \
+               description { \
+                       state: "disabled" 0.0; \
+                       inherit: "default" 0.0; \
+                       visible: 0; \
+               } \
+       }
+
+#define PART_COLOR_RECT(pName, pCr, pCg, pCb, pCa, pTo) \
+       part { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       rel1 { relative: 0.0 0.0; to: pTo; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; } \
+                       color: pCr pCg pCb pCa; \
+               } \
+       }
+
+#define PART_SWALLOW_RECT_BAR(pName, pTo, pRx1, pRy1, pRx2, pRy2)\
+       part{\
+               name: pName;\
+               type: SWALLOW;\
+               mouse_events: 0; \
+               scale: 1;\
+               description{\
+                       state: "default" 0.0;\
+                       rel1 { relative: pRx1 pRy1; to: pTo;}\
+                       rel2 { relative: pRx2 pRy2; to: pTo;}\
+               }\
+       }
+
+#define PART_TEXT(pName, pTo, pAx, pAy) \
+       part { \
+               name: pName; \
+               type: TEXT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       rel1 { relative: 0.0 0.0; to: pTo; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; } \
+                       text { \
+                               size: 30; \
+                               align: pAx pAy; \
+                               ellipsis: 0.0; \
+                               text_class: "label"; \
+                       } \
+                       color: COLOR_BLACK; \
+               } \
+               description { \
+                       state: "pressed" 0.0; \
+                       inherit: "default" 0.0; \
+                       text.size: 30; \
+                       color: COLOR_BLACK; \
+               } \
+       }
+
+#define PART_IMAGE(pName, pTo, pImage) \
+       part { \
+               name: pName; \
+               type: IMAGE; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       rel1 { relative: 0.0 0.0; to: pTo; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; } \
+                       image.normal: pImage; \
+               } \
+       }
+
+#define PART_BORDER_IMAGE(pName, pTo, pImage, pL, pR, pT, pB) \
+       part { \
+               name: pName; \
+               type: IMAGE; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       rel1 { relative: 0.0 0.0; to: pTo; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; } \
+                       image.normal: pImage; \
+                       image.border: pL pR pT pB; \
+               } \
+       }
+
+#define PART_TOP_LINE(pName, pTo) \
+       part \
+       { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 0 1; \
+                       fixed: 0 1; \
+                       visible: 1; \
+                       color: COLOR_BLUE; \
+                       rel1 { relative: 0.0 0.0; to: pTo; offset: 0 0; } \
+                       rel2 { relative: 1.0 0.0; to: pTo; offset: 0 0; } \
+               } \
+       } \
+
+#define PART_LEFT_LINE(pName, pTo) \
+       part \
+       { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 1 0; \
+                       fixed: 1 0; \
+                       visible: 1; \
+                       color: COLOR_BLUE; \
+                       rel1 { relative: 0.0 0.0; to: pTo; offset: -1 0; } \
+                       rel2 { relative: 0.0 1.0; to: pTo; offset: -1 0; } \
+               } \
+       } \
+
+#define PART_RIGHT_LINE(pName, pTo) \
+       part \
+       { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 1 0; \
+                       fixed: 1 0; \
+                       visible: 1; \
+                       color: COLOR_BLUE; \
+                       rel1 { relative: 1.0 0.0; to: pTo; offset: 1 0; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; offset: 1 0; } \
+               } \
+       } \
+
+#define PART_BOTTOM_LINE(pName, pTo) \
+       part \
+       { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 0 1; \
+                       fixed: 0 1; \
+                       visible: 1; \
+                       color: COLOR_BLUE; \
+                       rel1 { relative: 0.0 1.0; to: pTo; offset: 0 0; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; offset: 0 0; } \
+               } \
+       } \
+
+#define PART_BOTTOM_LINE_DOUBLE(pName, pTo) \
+       part \
+       { \
+               name: pName; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 0 1; \
+                       fixed: 0 1; \
+                       visible: 1; \
+                       color: 98 102 117 255; \
+                       rel1 { relative: 0.0 1.0; to: pTo; offset: 0 -1; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; offset: 0 -1; } \
+               } \
+       } \
+       part \
+       { \
+               name: pName##"2"; \
+               type: RECT; \
+               mouse_events: 0; \
+               scale: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       min: 0 1; \
+                       fixed: 0 1; \
+                       visible: 1; \
+                       color: 64 64 64 255; \
+                       rel1 { relative: 0.0 1.0; to: pTo; offset: 0 0; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; offset: 0 0; } \
+               } \
+       } \
+
+#define PART_ACCESS_RECT(pTo) \
+       part \
+       { \
+               name: "access"; \
+               type: RECT; \
+               repeat_events: 1; \
+               description { \
+                       state: "default" 0.0; \
+                       fixed: 1 1; \
+                       color: 0 0 0 0; \
+                       rel1 { relative: 0.0 1.0; to: pTo; offset: 0 0; } \
+                       rel2 { relative: 1.0 1.0; to: pTo; offset: 0 0; } \
+               } \
+       } \
+
+#define PART_PADDING_TOP(pName, pSize, pTo) \
+       PART_V_PIXEL_RECT(pName, pSize, 0.0, 0.0, pTo)
+
+#define PART_PADDING_BOTTOM(pName, pSize, pTo) \
+       PART_V_PIXEL_RECT(pName, pSize, 1.0, 1.0, pTo)
+
+#define PART_PADDING_LEFT(pName, pSize, pTo) \
+       PART_H_PIXEL_RECT(pName, pSize, 0.0, 0.0, pTo)
+
+#define PART_PADDING_RIGHT(pName, pSize, pTo) \
+       PART_H_PIXEL_RECT(pName, pSize, 1.0, 1.0, pTo)
+
+#define SCRIPT_CUSTOM_PART(pPart) \
+       custom_state(PART:pPart, "default", 0.0); \
+       set_state(PART:pPart, "custom", 0.0);
+
+#define SCRIPT_SET_IMAGE(pPart, pVal) \
+       set_state_val(PART:pPart, STATE_IMAGE, IMAGE:pVal);
+
+#define SCRIPT_SET_VISIBLE(pPart, pVal) \
+       set_state_val(PART:pPart, STATE_VISIBLE, pVal);
+
+#define SCRIPT_SET_STATE_DISABLED(pPart) \
+       set_state(PART:pPart, "disabled", 0.0);
+
+#define SCRIPT_SET_STATE_DEFAULT(pPart) \
+       set_state(PART:pPart, "default", 0.0);
+
+#define SCRIPT_SET_STATE_SHOW(pPart) \
+       set_state(PART:pPart, "show", 0.0);
+
+#define SCRIPT_SET_STATE_HIDE(pPart) \
+       set_state(PART:pPart, "hide", 0.0);
+
+#define PROGRAM_SET_VISIBLE(pName, pSignal, pSource, pPart) \
+       program { \
+               name: pName; \
+               signal: pSignal; \
+               source: pSource; \
+               script { \
+                       SCRIPT_SET_STATE_SHOW(pPart) \
+               } \
+       }
+
+#define PROGRAM_SET_INVISIBLE(pName, pSignal, pSource, pPart) \
+       program { \
+               name: pName; \
+               signal: pSignal; \
+               source: pSource; \
+               script { \
+                       SCRIPT_SET_STATE_HIDE(pPart) \
+               } \
+       }
diff --git a/res/edje/viewer_layout.edc b/res/edje/viewer_layout.edc
new file mode 100755 (executable)
index 0000000..6860bf4
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * 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 "viewer_defines.inl"
+
+collections {
+    base_scale: 2.6;
+
+    plugins {
+        plugin {
+            name: "touch_sound";
+            source: "feedback";
+            param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
+        }
+    }
+    group {
+        name : "viewer_layout";
+        parts {
+            part {
+                name: "rect";
+                type: RECT;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                }
+            }
+            part {
+                name: "body.bg";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    color: 0 0 0 0;
+                    rel1{to: "rect"; relative: 0.0 0.0;}
+                    rel2{to: "rect"; relative: 1.0 1.0;}
+                }
+            }
+            part {
+                name: "swallow.recipients";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    fixed: 1 1;
+                    align: 0.0 0.0;
+                    rel1 {to: "rect"; relative:0.0 0.0;}
+                    rel2 {to: "rect"; relative:1.0 0.0;}
+                }
+                description {
+                    state: "show" 0.0;
+                    inherit: "default" 0.0;
+                    max: 0 0;
+                }
+            }
+            part {
+                name: "swallow.subject";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    fixed: 1 1;
+                    align: 0.0 0.0;
+                    rel1 {to: "swallow.recipients"; relative:0.0 1.0;}
+                    rel2 {to: "rect"; relative:1.0 0.0;}
+                }
+            }
+            part {
+                name: "body";
+                type: SWALLOW;
+                scale: 1;
+                mouse_events: 1;
+                repeat_events: 1;
+                description {
+                    state: "default" 0.0;
+                    fixed: 1 0;
+                    min: 0 0;
+                    color: 0 0 0 0;
+                    rel1 {to: "swallow.subject"; relative: 0.0 1.0;}
+                    rel2 {to: "swallow.bottom.content"; relative: 1.0 0.0;}
+                    align: 0.0 0.0;
+                }
+            }
+            part {
+                name: "body.content";
+                type: SWALLOW;
+                scale: 1;
+                mouse_events: 1;
+                repeat_events: 1;
+                description {
+                    state: "default" 0.0;
+                    fixed: 1 0;
+                    min:0 0;
+                    color: 0 0 0 0;
+                    rel1 {to: "swallow.subject"; relative: 0.0 1.0;}
+                    rel2 {to: "swallow.bottom.content"; relative: 1.0 0.0;}
+                    align: 0.0 0.0;
+                }
+            }
+            part {
+                name: "swallow.bottom.content";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    align: 0.0 1.0;
+                    rel1 {to: "rect"; relative:0.0 1.0;}
+                    rel2 {to: "rect"; relative:1.0 1.0;}
+                }
+            }
+            part {
+                name: "swallow.playctrl";
+                type: SWALLOW;
+                scale: 1;
+                mouse_events: 1;
+                description {
+                    state: "default" 0.0;
+                    min: 0 PLAY_CTRBAR_MIN_VERTICAL_H;
+                    visible: 1;
+                    fixed: 0 1;
+                    align: 0.5 1.0;
+                    rel1 {to: "rect"; relative:0.0 1.0;}
+                    rel2 {to: "rect"; relative:1.0 1.0;}
+                }
+            }
+        }
+        programs {
+            program {
+                name: "cutlink_press";
+                signal: "play,press,sound";
+                source: "*";
+                action: RUN_PLUGIN "touch_sound";
+            }
+        }
+
+        SIG("show_recipients", "show", "swallow.recipients");
+        SIG("hide_recipients", "default", "swallow.recipients");
+    }
+}
index 870c1aa..64e2f80 100644 (file)
@@ -115,6 +115,7 @@ namespace Msg
             // IConvListItemListener:
             virtual void onEditDraftMsg(ConvListItem &item);
             virtual void onForwardMsg(ConvListItem &item);
+            virtual void onSlideShow(ConvListItem &item);
 
             // SelectAll callback:
             void onSelectAllChanged(Evas_Object *obj, void *eventInfo);
@@ -138,6 +139,7 @@ namespace Msg
              * @brief called when all messages has been deleted from current thread
              */
             virtual void onAllItemsDeleted(ConvList &list) {};
+            virtual void onSlideShow(MsgId id) {};
             virtual void onEditDraftMsg(MsgId id) {};
             virtual void onForwardMsg(MsgId id) {};
     };
index 4991f28..8e4e0d6 100644 (file)
@@ -104,6 +104,7 @@ namespace Msg
             virtual ~IConvListItemListener() {}
             virtual void onEditDraftMsg(ConvListItem &item) {};
             virtual void onForwardMsg(ConvListItem &item) {};
+            virtual void onSlideShow(ConvListItem &item) {};
     };
 }
 
index a795263..9665693 100644 (file)
@@ -223,6 +223,12 @@ void ConvList::onForwardMsg(ConvListItem &item)
         m_pListner->onForwardMsg(item.getMsgId());
 }
 
+void ConvList::onSlideShow(ConvListItem &item)
+{
+    if(m_pListner)
+        m_pListner->onSlideShow(item.getMsgId());
+}
+
 void ConvList::onEditDraftMsg(ConvListItem &item)
 {
     if(m_pListner)
index 2d4d8c6..0e2b919 100644 (file)
@@ -265,6 +265,9 @@ void ConvListItem::onResendItemPressed(ContextPopupItem &item)
 void ConvListItem::onSlideShowItemPressed(ContextPopupItem &item)
 {
     MSG_LOG("");
+    item.getParent().destroy();
+    if(m_pListener)
+        m_pListener->onSlideShow(*this);
 }
 
 void ConvListItem::onEditItemPressed(ContextPopupItem &item)
index d9e5cf9..a8be162 100644 (file)
@@ -118,6 +118,7 @@ namespace Msg
             virtual void onAllItemsDeleted(ConvList &list);
             virtual void onEditDraftMsg(MsgId id);
             virtual void onForwardMsg(MsgId id);
+            virtual void onSlideShow(MsgId id);
 
             // IAttachPanelListener:
             virtual void onFileSelected(AttachPanel &panel, const AttachPanel::FileList &files);
@@ -152,6 +153,7 @@ namespace Msg
             void notifyConvertMsgType();
             void convertMsgTypeHandler();
             void checkAndSetMsgType();
+            void navigateToSlideShow(MsgId id);
 
             void showMainCtxPopup();
             void showNoRecipPopup();
index 9b41a6d..9c32476 100644 (file)
@@ -27,6 +27,7 @@
 #include "CallbackAssist.h"
 #include "ContactViewer.h"
 #include "VoiceCall.h"
+#include "Viewer.h"
 
 #include <Elementary.h>
 #include <sstream>
@@ -129,7 +130,6 @@ void Conversation::markAsRead()
 void Conversation::recipientClickHandler(const std::string &address)
 {
     MSG_LOG("");
-    // TODO: impl for email
     m_SelectedAddress = address;
     ContactPersonAddressRef contactPersonAddress = getApp().getContactManager().getContactPersonAddress(address);
     if(contactPersonAddress)
@@ -482,6 +482,12 @@ bool Conversation::isBodyEmpty() const
     return m_pBody && m_pBody->isEmpty();
 }
 
+void Conversation::navigateToSlideShow(MsgId id)
+{
+    Viewer *viewer = new Viewer(getParent(), id);
+    getParent().push(*viewer);
+}
+
 void Conversation::showNoRecipPopup()
 {
     Popup &popup = getApp().getPopupManager().getPopup();
@@ -882,6 +888,12 @@ void Conversation::onForwardMsg(MsgId id)
     forwardMsg(id);
 }
 
+void Conversation::onSlideShow(MsgId id)
+{
+    MSG_LOG("");
+    navigateToSlideShow(id);
+}
+
 void Conversation::onFileSelected(AttachPanel &panel, const AttachPanel::FileList &files)
 {
     MSG_LOG("");
index bc850d5..280c577 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "FrameController.h"
 #include "HwButtonListener.h"
+#include "ViewerLayout.h"
+#include "MsgTypes.h"
 
 namespace Msg
 {
@@ -30,7 +32,7 @@ namespace Msg
         , private IHwButtonListener
     {
         public:
-            Viewer(NaviFrameController &parent);
+            Viewer(NaviFrameController &parent, MsgId id);
             virtual ~Viewer();
 
         private:
@@ -44,6 +46,13 @@ namespace Msg
             virtual void onHwMoreButtonClicked();
 
         private:
+            void updateNavibar();
+            void create();
+            void createLayout();
+
+        private:
+            MsgId m_MsgId;
+            ViewerLayout *m_pLayout;
     };
 }
 
index 3305a81..b01c0fe 100644 (file)
 
 using namespace Msg;
 
-Viewer::Viewer(NaviFrameController &parent)
+Viewer::Viewer(NaviFrameController &parent, MsgId id)
     : FrameController(parent)
+    , m_MsgId(id)
+    , m_pLayout(nullptr)
 {
-
+    create();
 }
 
 Viewer::~Viewer()
@@ -37,10 +39,27 @@ Viewer::~Viewer()
 void Viewer::onAttached(ViewItem &item)
 {
     FrameController::onAttached(item);
+    updateNavibar();
+    setContent(*m_pLayout);
+}
+
+void Viewer::updateNavibar()
+{
     getNaviBar().setTitle("Viewer");
     getNaviBar().setColor(NaviBar::NaviBlueColorId);
     getNaviBar().showButton(NaviPrevButtonId, true);
-    setHwButtonListener(getContent(), this);
+}
+
+void Viewer::create()
+{
+    createLayout();
+    setHwButtonListener(*m_pLayout, this);
+}
+
+void Viewer::createLayout()
+{
+    m_pLayout = new ViewerLayout(getParent());
+    m_pLayout->show();
 }
 
 void Viewer::onHwBackButtonClicked()
@@ -56,7 +75,5 @@ void Viewer::onHwMoreButtonClicked()
 void Viewer::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 {
     if(buttonId == NaviPrevButtonId)
-    {
         getParent().pop();
-    }
 }
diff --git a/src/Viewer/View/inc/ViewerLayout.h b/src/Viewer/View/inc/ViewerLayout.h
new file mode 100644 (file)
index 0000000..b865f41
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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 ViewerLayout_h_
+#define ViewerLayout_h_
+
+#include "View.h"
+
+namespace Msg
+{
+    class ViewerLayout
+        : public View
+    {
+        public:
+            ViewerLayout(Evas_Object *parent);
+            virtual ~ViewerLayout();
+
+            void setPlayer(Evas_Object *obj);
+            void setSubject(Evas_Object *obj);
+            void setBody(Evas_Object *obj);
+            void setBg(Evas_Object *obj);
+            void setRecipients(Evas_Object *obj);
+            void showRecipients(bool show);
+    };
+}
+
+#endif // ViewerLayout_h_
diff --git a/src/Viewer/View/src/ViewerLayout.cpp b/src/Viewer/View/src/ViewerLayout.cpp
new file mode 100644 (file)
index 0000000..d55cc2c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * 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 "ViewerLayout.h"
+
+using namespace Msg;
+
+namespace
+{
+    const char *layoutGroup = "viewer_layout";
+    const char *bodyPart = "body";
+    const char *playerPart = "swallow.playctrl";
+    const char *subjectPart = "swallow.subject";
+    const char *bgPart = "body.bg";
+    const char *recipientsPart = "swallow.recipients";
+    const char *showRecipSig = "show_recipients";
+    const char *hideRecipSig = "hide_recipients";
+}
+
+ViewerLayout::ViewerLayout(Evas_Object *parent)
+{
+    setEo(addLayout(parent, VIEWER_LAYOUT_EDJ_PATH, layoutGroup));
+}
+
+ViewerLayout::~ViewerLayout()
+{
+
+}
+
+void ViewerLayout::setPlayer(Evas_Object *obj)
+{
+    setContent(obj, playerPart);
+}
+
+void ViewerLayout::setSubject(Evas_Object *obj)
+{
+    setContent(obj, subjectPart);
+}
+
+void ViewerLayout::setBody(Evas_Object *obj)
+{
+    setContent(obj, bodyPart);
+}
+
+void ViewerLayout::setBg(Evas_Object *obj)
+{
+    setContent(obj, bgPart);
+}
+
+void ViewerLayout::setRecipients(Evas_Object *obj)
+{
+    setContent(obj, recipientsPart);
+}
+
+void ViewerLayout::showRecipients(bool show)
+{
+    const char *sig = show ? showRecipSig : hideRecipSig;
+    emitSignal(sig, "");
+}