sync with master
authorJinkun Jang <jinkun.jang@samsung.com>
Sat, 16 Mar 2013 11:49:26 +0000 (20:49 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Sat, 16 Mar 2013 11:49:26 +0000 (20:49 +0900)
95 files changed:
.cproject
.project
inc/ClCalendarSelectorPopup.h [new file with mode: 0644]
inc/ClDayPanel.h
inc/ClEventDeleterForm.h
inc/ClEventDetailsForm.h
inc/ClEventEditorForm.h
inc/ClEventItem.h
inc/ClEventListPresentationModel.h
inc/ClEventPresentationModel.h
inc/ClEventSearchPresentationModel.h
inc/ClEventSearcherForm.h
inc/ClICurrentDateChangedEventListener.h
inc/ClIPanningAnimationEventListener.h [new file with mode: 0644]
inc/ClListPanel.h
inc/ClMainForm.h
inc/ClMonthPanel.h
inc/ClNodes.h
inc/ClPanningAnimationManager.h
inc/ClReminderForm.h
inc/ClRepeatForm.h
inc/ClSettingForm.h
inc/ClTaskDetailsForm.h
inc/ClTaskItem.h
inc/ClThreeButtonPopup.h
inc/ClTwoButtonPopup.h
inc/ClTypes.h
inc/ClYearPanel.h
manifest.xml
res/screen-density-xhigh/P01_Task_event_completion.png
res/screen-density-xhigh/P01_all_day_event_list_expand_closed.png [deleted file]
res/screen-density-xhigh/P01_all_day_event_list_expand_closed_press.png [deleted file]
res/screen-density-xhigh/P01_all_day_event_list_expand_opened.png [deleted file]
res/screen-density-xhigh/P01_all_day_event_list_expand_opened_press.png [deleted file]
res/screen-density-xhigh/P01_calendar_bg.png [new file with mode: 0644]
res/screen-density-xhigh/P01_icon_phoneCalendar.png [new file with mode: 0644]
res/screen-density-xhigh/P01_list_icon_alarm.png
res/screen-density-xhigh/P01_list_icon_description.png [deleted file]
res/screen-density-xhigh/P01_list_icon_facebook.png
res/screen-density-xhigh/P01_list_icon_map.png [deleted file]
res/screen-density-xhigh/P01_list_icon_priority.png
res/screen-density-xhigh/P01_list_icon_priority_low.png
res/screen-density-xhigh/P01_list_icon_reminder.png
res/screen-density-xhigh/P01_list_icon_repeat.png
res/screen-density-xhigh/P01_list_icon_save to.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_Today.png
res/screen-density-xhigh/P01_month view_Today_focus.png [deleted file]
res/screen-density-xhigh/P01_month view_day_event.png
res/screen-density-xhigh/P01_month view_day_event_focus.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_day_event_selection.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_day_focus.png
res/screen-density-xhigh/P01_month view_day_press.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_event_bubble_bg_daily.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_event_bubble_bg_event_focus.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_event_bubble_bg_focus.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_event_bubble_bg_press.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_expanded_down.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_expanded_down_press.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_expanded_up.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month view_expanded_up_press.png [new file with mode: 0644]
res/screen-density-xhigh/P01_month-view_event_bubble_bg_today.png [new file with mode: 0644]
res/screen-density-xhigh/P01_year_day_focus.png
res/screen-density-xhigh/P01_year_month_focus.png
res/screen-size-normal/IDL_CALENDAR_SELECTOR_POPUP.xml [new file with mode: 0644]
res/screen-size-normal/IDL_REMINDER_FORM.xml
res/screen-size-normal/IDL_REPEAT_FORM.xml
res/screen-size-normal/IDL_SETTING_FORM.xml
src/ClCalendarApp.cpp
src/ClCalendarSelectorPopup.cpp [new file with mode: 0644]
src/ClDayEventListForm.cpp
src/ClDayPanel.cpp
src/ClEventDeleterForm.cpp
src/ClEventDetailsForm.cpp
src/ClEventEditorForm.cpp
src/ClEventItem.cpp
src/ClEventListPresentationModel.cpp
src/ClEventPresentationModel.cpp
src/ClEventSearchPresentationModel.cpp
src/ClEventSearcherForm.cpp
src/ClEventSelectorForm.cpp
src/ClGoToDatePopup.cpp
src/ClListPanel.cpp
src/ClMainForm.cpp
src/ClMonthPanel.cpp
src/ClNodes.cpp
src/ClPanningAnimationManager.cpp
src/ClReminderForm.cpp
src/ClRepeatForm.cpp
src/ClSettingForm.cpp
src/ClTaskDetailsForm.cpp
src/ClTaskItem.cpp
src/ClThreeButtonPopup.cpp
src/ClTwoButtonPopup.cpp
src/ClTypes.cpp
src/ClYearPanel.cpp

index c636432..b7bbde9 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -3,8 +3,8 @@
 
 <cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
        <storageModule moduleId="org.eclipse.cdt.core.settings">
-               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.1751325626">
-                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.1751325626" moduleId="org.eclipse.cdt.core.settings" name="Debug-Tizen-Emulator">
+               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.542757660">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.542757660" moduleId="org.eclipse.cdt.core.settings" name="Debug">
                                <externalSettings/>
                                <extensions>
                                        <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactExtension="exe" artifactName="Calendar" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.1751325626" name="Debug-Tizen-Emulator" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
-                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.1751325626." name="/" resourcePath="">
-                                               <toolChain errorParsers="" id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.1892029492" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator">
-                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1856951265" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
-                                                       <builder autoBuildTarget="all" buildPath="${workspace_loc:/Calendar/Debug-Tizen-Emulator}" enableAutoBuild="true" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="org.tizen.nativecpp.target.sbi.gnu.builder.603053986" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" parallelBuildOn="true" parallelizationNumber="5" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1926215452" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
-                                                       <tool command="i386-linux-gnueabi-g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.1826960502" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
-                                                               <option id="gnu.cpp.compiler.option.optimization.level.322879977" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-                                                               <option id="gnu.cpp.compiler.option.debugging.level.1461066478" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-                                                               <option id="sbi.gnu.cpp.compiler.option.2136084113" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_gcc45.i386.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.include.paths.1375459491" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.542757660" name="Debug" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug">
+                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.542757660." name="/" resourcePath="">
+                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.1784086492" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug">
+                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.165304646" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+                                                       <builder autoBuildTarget="all" buildPath="${workspace_loc:/Calendar/Debug}" enableAutoBuild="true" id="org.tizen.nativecpp.target.sbi.gnu.builder.910776161" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.707842937" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+                                                       <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.1219153705" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
+                                                               <option id="gnu.cpp.compiler.option.optimization.level.235211314" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.debugging.level.275888905" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.debug.applog.437831432" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog" value="true" valueType="boolean"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.2067868547" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+                                                               </option>
+                                                               <option id="gnu.cpp.compiler.option.include.paths.1491943414" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.137170895" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.147189630" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value=""/>
-                                                                       <listOptionValue builtIn="false" value=" -fPIE"/>
-                                                                       <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.899744908" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.399579441" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                </option>
-                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.1223125203" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
-                                                                       <listOptionValue builtIn="false" value="_DEBUG"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.warnings.toerrors.1009650812" name="Warnings as errors (-Werror)" superClass="gnu.cpp.compiler.option.warnings.toerrors" value="true" valueType="boolean"/>
-                                                               <option id="gnu.cpp.compiler.option.debugging.prof.247942159" name="Generate prof information (-p)" superClass="gnu.cpp.compiler.option.debugging.prof" value="false" valueType="boolean"/>
-                                                               <option id="gnu.cpp.compiler.option.debugging.gprof.760668120" name="Generate gprof information (-pg)" superClass="gnu.cpp.compiler.option.debugging.gprof" value="false" valueType="boolean"/>
-                                                               <option id="sbi.gnu.cpp.compiler.option.debug.applog.312752313" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog" value="false" valueType="boolean"/>
-                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.2048683037" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
-                                                       </tool>
-                                                       <tool command="i386-linux-gnueabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.674016825" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
-                                                               <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1891569187" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
-                                                               <option id="gnu.c.compiler.option.debugging.level.957285492" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-                                                               <option id="sbi.gnu.c.compiler.option.1296154116" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_gcc45.i386.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.c.compiler.option.include.paths.807177598" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.510484615" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="osp"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1702421051" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1395160493" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.1797929835" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value=""/>
-                                                                       <listOptionValue builtIn="false" value=" -fPIE"/>
-                                                                       <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                               </option>
-                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.1190927696" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
-                                                                       <listOptionValue builtIn="false" value="_DEBUG"/>
-                                                               </option>
-                                                               <option id="gnu.c.compiler.option.warnings.toerrors.1007725084" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors" value="true" valueType="boolean"/>
-                                                               <option id="sbi.gnu.c.compiler.option.debug.applog.643187856" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog" value="true" valueType="boolean"/>
-                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.98870158" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
-                                                       </tool>
-                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1293888286" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
-                                                       <tool command="i386-linux-gnueabi-g++" commandLinePattern="${COMMAND} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.387841169" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
-                                                               <option id="gnu.cpp.link.option.paths.806419286" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
-                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.2095979563" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value="-Xlinker --as-needed"/>
-                                                                       <listOptionValue builtIn="false" value=""/>
-                                                                       <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/.. -Xlinker -rpath=\$$ORIGIN/../lib"/>
-                                                                       <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib/osp&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-appfw"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-uifw"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-image"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-json"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-ime"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-net"/>
-                                                                       <listOptionValue builtIn="false" value="-lpthread"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-content"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-locations"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-telephony"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-uix"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-media"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-messaging"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-web"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-social"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-wifi"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-bluetooth"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-nfc"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-face"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-speech-tts"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-speech-stt"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-shell"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-shell-core"/>
-                                                                       <listOptionValue builtIn="false" value="-lxml2"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.link.option.debugging.prof.1855004593" name="Generate prof information (-p)" superClass="gnu.cpp.link.option.debugging.prof" value="false" valueType="boolean"/>
-                                                               <option id="gnu.cpp.link.option.debugging.gprof.1143811435" name="Generate gprof information (-pg)" superClass="gnu.cpp.link.option.debugging.gprof" value="false" valueType="boolean"/>
-                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1335209371" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>
-                                                               </inputType>
-                                                       </tool>
-                                                       <tool command="i386-linux-gnueabi-as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.180811510" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
-                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.505720343" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-                                                       </tool>
-                                                       <tool command="msgfmt" commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT} ${INPUTS}" errorParsers="" id="org.tizen.nativecpp.tool.sbi.po.compiler.116959897" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
-                                                       <tool command="edje_cc" commandLinePattern="${COMMAND} -id ../res/images ${INPUTS} ${OUTPUT}" errorParsers="" id="org.tizen.nativecpp.tool.sbi.edc.compiler.1777475695" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
-                                               </toolChain>
-                                       </folderInfo>
-                                       <sourceEntries>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-                                       </sourceEntries>
-                               </configuration>
-                       </storageModule>
-                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-               </cconfiguration>
-               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.171518306">
-                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.171518306" moduleId="org.eclipse.cdt.core.settings" name="Debug-Tizen-Device">
-                               <externalSettings/>
-                               <extensions>
-                                       <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                               </extensions>
-                       </storageModule>
-                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.171518306" name="Debug-Tizen-Device" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device">
-                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.171518306." name="/" resourcePath="">
-                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.939774" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device">
-                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.2063411103" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
-                                                       <builder buildPath="${workspace_loc:/Calendar/Debug-Tizen-Device}" id="org.tizen.nativecpp.target.sbi.gnu.builder.738839746" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1931560796" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.2069314835" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
-                                                               <option id="gnu.cpp.compiler.option.optimization.level.260438248" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-                                                               <option id="gnu.cpp.compiler.option.debugging.level.1846567654" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-                                                               <option id="sbi.gnu.cpp.compiler.option.773960288" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_gcc45.armel.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.include.paths.1303080444" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.930188054" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="&quot;/home/changyongjeon/tizen-sdk/library&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.596402036" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.2042453024" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.410001358" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="osp"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.1452599114" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.1290489636" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
                                                                        <listOptionValue builtIn="false" value="_DEBUG"/>
                                                                </option>
-                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1386603625" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1444030222" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-gcc" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1408063339" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
-                                                               <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1772269098" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
-                                                               <option id="gnu.c.compiler.option.debugging.level.1257207058" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-                                                               <option id="sbi.gnu.c.compiler.option.1600929677" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_gcc45.armel.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.c.compiler.option.include.paths.1024355022" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+                                                       <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1332097163" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
+                                                               <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.569133032" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+                                                               <option id="sbi.gnu.c.compiler.option.debugging.level.1038790997" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+                                                               <option id="sbi.gnu.c.compiler.option.debug.applog.30619937" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog" value="true" valueType="boolean"/>
+                                                               <option id="sbi.gnu.c.compiler.option.2093892473" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+                                                               </option>
+                                                               <option id="gnu.c.compiler.option.include.paths.2147015964" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.553070194" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.435620859" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.330104379" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1795177369" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;/home/changyongjeon/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.670500493" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.129230233" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                </option>
-                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.1888558053" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
+                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.927058880" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
                                                                        <listOptionValue builtIn="false" value="_DEBUG"/>
                                                                </option>
-                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.2061431545" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.386884738" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1552146659" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.1030250166" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
-                                                               <option id="gnu.cpp.link.option.paths.569449498" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.640241801" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
+                                                       <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.901135465" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
+                                                               <option id="gnu.cpp.link.option.paths.1307041173" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.752085530" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value="-Xlinker --as-needed"/>
+                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.787442281" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Xlinker --as-needed"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/.. -Xlinker -rpath=\$$ORIGIN/../lib"/>
+                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -Xlinker -rpath=/home/developer/sdk_tools/lib"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib/osp&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-losp-shell-core"/>
                                                                        <listOptionValue builtIn="false" value="-lxml2"/>
                                                                </option>
-                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1318565394" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2119600729" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
                                                                        <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                                </inputType>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1122281465" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
-                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.745943632" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.2146766494" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2008442855" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.248419226" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.2010848909" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.129530156" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.572685200" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.139954344" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.739571374" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
                                                </toolChain>
                                        </folderInfo>
                                        <sourceEntries>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
                                        </sourceEntries>
                                </configuration>
                        </storageModule>
                        <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
                </cconfiguration>
-               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.release.1124416249">
-                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.release.1124416249" moduleId="org.eclipse.cdt.core.settings" name="Release">
+               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.release.728069853">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.release.728069853" moduleId="org.eclipse.cdt.core.settings" name="Release">
                                <externalSettings/>
                                <extensions>
                                        <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.app.release.1124416249" name="Release" parent="org.tizen.nativecpp.config.sbi.gcc45.app.release">
-                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.release.1124416249." name="/" resourcePath="">
-                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.release.731556072" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.release">
-                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.2048200043" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
-                                                       <builder buildPath="${workspace_loc:/Calendar/Release}" id="org.tizen.nativecpp.target.sbi.gnu.builder.361177906" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.693257160" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.333535901" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
-                                                               <option id="gnu.cpp.compiler.option.optimization.level.285266013" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
-                                                               <option id="gnu.cpp.compiler.option.debugging.level.1691619210" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
-                                                               <option id="sbi.gnu.cpp.compiler.option.169728016" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_gcc45.armel.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.include.paths.333791176" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.app.release.728069853" name="Release" parent="org.tizen.nativecpp.config.sbi.gcc45.app.release">
+                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.release.728069853." name="/" resourcePath="">
+                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.release.1698569602" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.release">
+                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.530558826" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+                                                       <builder buildPath="${workspace_loc:/Calendar/Release}" id="org.tizen.nativecpp.target.sbi.gnu.builder.975214550" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1514849212" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+                                                       <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.1790549045" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
+                                                               <option id="gnu.cpp.compiler.option.optimization.level.316489008" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.debugging.level.1500294719" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.debug.applog.220428565" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.900296718" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+                                                               </option>
+                                                               <option id="gnu.cpp.compiler.option.include.paths.623797688" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.556269336" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.1909718066" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="osp"/>
+                                                               </option>
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1334366520" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;/home/changyongjeon/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.1938697235" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.528700311" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.1406380561" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="osp"/>
-                                                               </option>
-                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.642852524" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1912377546" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-gcc" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1441685007" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
-                                                               <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.745631856" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
-                                                               <option id="gnu.c.compiler.option.debugging.level.1574266012" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
-                                                               <option id="sbi.gnu.c.compiler.option.1964718468" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_gcc45.armel.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.c.compiler.option.include.paths.1232378738" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+                                                       <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.2061633942" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
+                                                               <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.2022990414" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+                                                               <option id="sbi.gnu.c.compiler.option.debugging.level.2037589780" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level"/>
+                                                               <option id="sbi.gnu.c.compiler.option.debug.applog.930351060" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog"/>
+                                                               <option id="sbi.gnu.c.compiler.option.623943791" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+                                                               </option>
+                                                               <option id="gnu.c.compiler.option.include.paths.499488519" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.970955954" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.120447946" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1228748901" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1091342970" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;/home/changyongjeon/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.460125612" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.1782808167" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                </option>
-                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.524477415" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.1431704404" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.439173106" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.256674454" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
-                                                               <option id="gnu.cpp.link.option.paths.419990482" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.267766539" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
+                                                       <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.1382202266" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
+                                                               <option id="gnu.cpp.link.option.paths.29188932" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.1134695451" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value="-Xlinker --as-needed"/>
+                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.476062144" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Xlinker --as-needed"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/.. -Xlinker -rpath=\$$ORIGIN/../lib"/>
+                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -Xlinker -rpath=/home/developer/sdk_tools/lib"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib/osp&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-losp-shell-core"/>
                                                                        <listOptionValue builtIn="false" value="-lxml2"/>
                                                                </option>
-                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.372445017" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.140241049" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
                                                                        <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                                </inputType>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1637761928" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
-                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.897704995" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1380224608" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.383736666" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1356965384" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.1251472052" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.570781551" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.289169113" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1210919772" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.1547430561" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
                                                </toolChain>
                                        </folderInfo>
                                        <sourceEntries>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
                                        </sourceEntries>
                                </configuration>
                        </storageModule>
                        <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
                </cconfiguration>
-               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.244118101">
-                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.244118101" moduleId="org.eclipse.cdt.core.settings" name="DA-Tizen-Emulator">
+               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da.512415136">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da.512415136" moduleId="org.eclipse.cdt.core.settings" name="Profile">
                                <externalSettings/>
                                <extensions>
                                        <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.244118101" name="DA-Tizen-Emulator" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da">
-                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.244118101." name="/" resourcePath="">
-                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.da.674341324" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.da">
-                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.291324364" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
-                                                       <builder buildPath="${workspace_loc:/Calendar/DA-Tizen-Emulator}" id="org.tizen.nativecpp.target.sbi.gnu.builder.372116971" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.77330789" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
-                                                       <tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da.318500289" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da">
-                                                               <option id="sbi.gnu.cpp.compiler.option.1428797124" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_gcc45.i386.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.include.paths.992313754" 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="${SDK_INSTALL_PATH}/library"/>
+                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da.512415136" name="Profile" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da">
+                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da.512415136." name="/" resourcePath="">
+                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.da.379718720" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.da">
+                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.925955956" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+                                                       <builder buildPath="${workspace_loc:/Calendar/Profile}" id="org.tizen.nativecpp.target.sbi.gnu.builder.1048888722" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1590579036" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+                                                       <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da.1135343449" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da">
+                                                               <option id="gnu.cpp.compiler.option.include.paths.1852294224" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.949834511" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.517248702" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value=""/>
-                                                                       <listOptionValue builtIn="false" value=" -fPIE"/>
-                                                                       <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.730434608" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="osp"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.2056561746" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.810993992" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
                                                                        <listOptionValue builtIn="false" value="_USE_DA_"/>
                                                                </option>
-                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1741693063" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
-                                                       </tool>
-                                                       <tool command="i386-linux-gnueabi-gcc" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1650511277" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
-                                                               <option id="sbi.gnu.c.compiler.option.1251020731" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_gcc45.i386.cpp.app"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.417528574" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
                                                                </option>
-                                                               <option id="gnu.c.compiler.option.include.paths.150708374" 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="${SDK_INSTALL_PATH}/library"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.654237939" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.1841777387" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1890915134" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1888664300" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;/home/changyongjeon/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.582544717" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.2012817072" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                </option>
-                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.782425475" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
-                                                                       <listOptionValue builtIn="false" value="_USE_DA_"/>
-                                                               </option>
-                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.760697298" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
-                                                       </tool>
-                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.580218478" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
-                                                       <tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da.1975451795" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da">
-                                                               <option id="gnu.cpp.link.option.paths.1402110619" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
-                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="${SDK_INSTALL_PATH}/library/da/x86"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library/da/x86&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.164060987" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value="-Xlinker --as-needed"/>
-                                                                       <listOptionValue builtIn="false" value=""/>
-                                                                       <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/.. -Xlinker -rpath=\$$ORIGIN/../lib"/>
-                                                                       <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib/osp&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-appfw"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-uifw"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-image"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-json"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-ime"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-net"/>
-                                                                       <listOptionValue builtIn="false" value="-lpthread"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-content"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-locations"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-telephony"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-uix"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-media"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-messaging"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-web"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-social"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-wifi"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-bluetooth"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-nfc"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-face"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-speech-tts"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-speech-stt"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-shell"/>
-                                                                       <listOptionValue builtIn="false" value="-losp-shell-core"/>
-                                                                       <listOptionValue builtIn="false" value="-lxml2"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.link.option.libs.206572174" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
-                                                                       <listOptionValue builtIn="false" value="daprobe"/>
-                                                               </option>
-                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.762561480" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>
-                                                               </inputType>
-                                                       </tool>
-                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1141710483" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
-                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1674496866" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.534040833" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1814926663" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.873720266" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
-                                               </toolChain>
-                                       </folderInfo>
-                                       <sourceEntries>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
-                                       </sourceEntries>
-                               </configuration>
-                       </storageModule>
-                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-               </cconfiguration>
-               <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.577459549">
-                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.577459549" moduleId="org.eclipse.cdt.core.settings" name="DA-Tizen-Device">
-                               <externalSettings/>
-                               <extensions>
-                                       <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-                               </extensions>
-                       </storageModule>
-                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactExtension="exe" artifactName="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.577459549" name="DA-Tizen-Device" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da">
-                                       <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.577459549." name="/" resourcePath="">
-                                               <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.da.813829651" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.da">
-                                                       <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1268815427" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
-                                                       <builder buildPath="${workspace_loc:/Calendar/DA-Tizen-Device}" id="org.tizen.nativecpp.target.sbi.gnu.builder.1878293371" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.1716136726" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da.135267948" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da">
-                                                               <option id="sbi.gnu.cpp.compiler.option.282319682" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_gcc45.armel.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.include.paths.2051312289" 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="${SDK_INSTALL_PATH}/library"/>
+                                                       <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1476507802" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
+                                                               <option id="gnu.c.compiler.option.include.paths.102162816" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.427944221" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.1240429594" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value=""/>
-                                                                       <listOptionValue builtIn="false" value=" -fPIE"/>
-                                                                       <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                               </option>
-                                                               <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.1502516937" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="osp"/>
-                                                               </option>
-                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.2099719296" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.1447234965" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
                                                                        <listOptionValue builtIn="false" value="_USE_DA_"/>
                                                                </option>
-                                                               <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.846446939" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
-                                                       </tool>
-                                                       <tool command="arm-linux-gnueabi-gcc" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1645862831" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
-                                                               <option id="sbi.gnu.c.compiler.option.1409755636" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_gcc45.armel.cpp.app"/>
-                                                               </option>
-                                                               <option id="gnu.c.compiler.option.include.paths.2046580924" 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="${SDK_INSTALL_PATH}/library"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library&quot;"/>
+                                                               <option id="sbi.gnu.c.compiler.option.1978908648" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+                                                                       <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.1732172101" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks.cpp.318626302" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.2042675089" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.735561538" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;/home/sungwan/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;/home/changyongjeon/tizen-sdk/library&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/osp&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.232355573" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                               <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.653114653" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                </option>
-                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.686813534" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
-                                                                       <listOptionValue builtIn="false" value="_USE_DA_"/>
-                                                               </option>
-                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.1014512003" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+                                                               <inputType id="sbi.gnu.c.compiler.tizen.inputType.760077495" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1297629972" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da.1404308749" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da">
-                                                               <option id="gnu.cpp.link.option.paths.1261961419" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+                                                       <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1486173805" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
+                                                       <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da.1991210840" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da">
+                                                               <option id="gnu.cpp.link.option.libs.894907098" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
+                                                                       <listOptionValue builtIn="false" value="daprobe"/>
+                                                               </option>
+                                                               <option id="gnu.cpp.link.option.paths.1651496236" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+                                                                       <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library/da/x86&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="${SDK_INSTALL_PATH}/library/da/arm"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SDK_INSTALL_PATH}/library/da/arm&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.1607873256" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
-                                                                       <listOptionValue builtIn="false" value="-Xlinker --as-needed"/>
+                                                               <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.242786465" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/changyongjeon/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Xlinker --as-needed"/>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                        <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/.. -Xlinker -rpath=\$$ORIGIN/../lib"/>
+                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -Xlinker -rpath=/home/developer/sdk_tools/lib"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib/osp&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-losp-shell-core"/>
                                                                        <listOptionValue builtIn="false" value="-lxml2"/>
                                                                </option>
-                                                               <option id="gnu.cpp.link.option.libs.792949656" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
-                                                                       <listOptionValue builtIn="false" value="daprobe"/>
-                                                               </option>
-                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1453208215" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1884830703" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
                                                                        <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                                </inputType>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.435627942" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
-                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1327230074" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1183746044" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1120253230" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.698484456" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.281241436" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.205853613" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1921438963" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1319955583" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
-                                                       <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.926956975" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
                                                </toolChain>
                                        </folderInfo>
                                        <sourceEntries>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
                                        </sourceEntries>
                                </configuration>
                </cconfiguration>
        </storageModule>
        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-               <project id="Calendar.org.tizen.nativecpp.target.sbi.gcc45.app.1751095700" name="Tizen Application" projectType="org.tizen.nativecpp.target.sbi.gcc45.app"/>
-       </storageModule>
-       <storageModule moduleId="com.samsung.tizen.nativeapp.projectInfo" version="1.0.0"/>
-       <storageModule moduleId="refreshScope" versionNumber="1">
-               <resource resourceType="PROJECT" workspacePath="/Calendar"/>
+               <project id="Calendar.org.tizen.nativecpp.target.sbi.gcc45.app.893663013" name="Tizen Application" projectType="org.tizen.nativecpp.target.sbi.gcc45.app"/>
        </storageModule>
        <storageModule moduleId="scannerConfiguration">
                <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.1751325626">
-                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
-               </scannerConfigBuildInfo>
-               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.171518306">
-                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
-               </scannerConfigBuildInfo>
-               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.577459549">
+               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da.512415136">
                        <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
                </scannerConfigBuildInfo>
-               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.244118101">
+               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.542757660">
                        <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
                </scannerConfigBuildInfo>
-               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.release.1124416249">
+               <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.release.728069853">
                        <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
                </scannerConfigBuildInfo>
        </storageModule>
+       <storageModule moduleId="com.samsung.tizen.nativeapp.projectInfo" version="1.0.0"/>
+       <storageModule moduleId="refreshScope" versionNumber="1">
+               <resource resourceType="PROJECT" workspacePath="/Calendar"/>
+       </storageModule>
+       <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
 </cproject>
index a919d38..40b6a53 100644 (file)
--- a/.project
+++ b/.project
@@ -23,7 +23,7 @@
                                </dictionary>
                                <dictionary>
                                        <key>org.eclipse.cdt.make.core.buildArguments</key>
-                                       <value>-j5</value>
+                                       <value></value>
                                </dictionary>
                                <dictionary>
                                        <key>org.eclipse.cdt.make.core.buildCommand</key>
@@ -31,7 +31,7 @@
                                </dictionary>
                                <dictionary>
                                        <key>org.eclipse.cdt.make.core.buildLocation</key>
-                                       <value>${workspace_loc:/Calendar/Debug-Tizen-Emulator}</value>
+                                       <value>${workspace_loc:/Calendar/Debug}</value>
                                </dictionary>
                                <dictionary>
                                        <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
                <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
                <nature>org.tizen.nativecpp.apichecker.core.tizenCppNature</nature>
        </natures>
+       <filteredResources>
+               <filter>
+                       <id>1360216703005</id>
+                       <name></name>
+                       <type>26</type>
+                       <matcher>
+                               <id>org.eclipse.ui.ide.multiFilter</id>
+                               <arguments>1.0-projectRelativePath-matches-false-false-*/.tpk</arguments>
+                       </matcher>
+               </filter>
+       </filteredResources>
 </projectDescription>
diff --git a/inc/ClCalendarSelectorPopup.h b/inc/ClCalendarSelectorPopup.h
new file mode 100644 (file)
index 0000000..60f3b20
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       ClCalendarSelectorPopup.h
+ * @brief      This is the header file for the CalendarSelectorPopup class.
+ */
+
+#ifndef _CL_CALENDAR_SELECTOR_POPUP_H_
+#define _CL_CALENDAR_SELECTOR_POPUP_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class CalendarSelectorPopup
+       : public Tizen::Ui::Controls::Popup
+       , public virtual Tizen::Ui::IActionEventListener
+       , public virtual Tizen::Ui::Controls::IListViewItemEventListener
+       , public virtual Tizen::Ui::Controls::IListViewItemProvider
+{
+public:
+       result Initialize(void);
+       void RequestCalendar(Tizen::Ui::Control* pTarget = null);
+
+       CalendarSelectorPopup(void);
+       virtual ~CalendarSelectorPopup(void);
+
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+
+       virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+       virtual int GetItemCount(void);
+       virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+       virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+
+       virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+       virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
+       virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus status);
+       virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
+       virtual void OnListViewItemReordered(Tizen::Ui::Controls::ListView& listView, int indexFrom, int indexTo);
+
+public:
+       Tizen::Base::Collection::IList* __pCalendars;
+       Tizen::Ui::Controls::ListView* __pListView;
+       Tizen::Ui::Control* __pTarget;
+}; // CalendarSelectorPopup
+
+#endif // _CL_CALENDAR_SELECTOR_POPUP_H_
index 65a2b55..b6bfe70 100644 (file)
 #include "ClIDateFocusEventListener.h"
 #include "ClIEventActionEventListener.h"
 #include "ClIPanningAnimationControlProvider.h"
+#include "ClIPanningAnimationEventListener.h"
 
 class EventListPresentationModel;
 class PanningAnimationManager;
 
 class DayPanel
        : public Tizen::Ui::Controls::Panel
-       , public virtual Tizen::Ui::Animations::IControlAnimatorEventListener
+       , public virtual Tizen::Ui::Controls::IScrollEventListener
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
        , public virtual ICalendarEventChangedEventListener
        , public virtual ICurrentDateChangedEventListener
        , public virtual IDateFocusEventListener
        , public virtual IEventActionEventListener
        , public virtual IPanningAnimationControlProvider
+       , public virtual IPanningAnimationEventListener
 {
 public:
        result Initialize(void);
@@ -56,9 +58,8 @@ public:
        virtual result OnTerminating(void);
        virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
-       virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
+       virtual void OnScrollEndReached(Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type);
+       virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, int scrollPos);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
@@ -77,6 +78,8 @@ public:
        virtual Tizen::Ui::Control* GetNextControl(void);
        virtual Tizen::Ui::Control* GetPreviewControl(void);
 
+       virtual void OnPanningAnimationEnded(ViewScrollEffect direction);
+
 private:
        void DrawCurrentDate(void);
        void DrawEvents(void);
index 2dcb971..514ce79 100755 (executable)
@@ -80,6 +80,9 @@ public:
        virtual void OnCalendarEventChanged(void);
 
 private:
+       int GetSelectedEventCount(void);
+       bool IsSelectedAllEvent(void);
+       bool IsSelectedAllEventBeforeToday(void);
        result UpdateSelectedLabel(void);
 
 private:
index 7e22d52..438ea1d 100644 (file)
@@ -77,17 +77,16 @@ public:
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-       static EventDetailsForm* CreateEventDetailsFormN(void);
-
 private:
        Tizen::Ui::Controls::TableViewItem* CreateMainItemN(int itemWidth, const Tizen::Base::String& title,
                                                                                                          const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end);
        Tizen::Ui::Controls::TableViewItem* CreateDescriptionItemN(int itemWidth, const Tizen::Base::String& description);
        Tizen::Ui::Controls::TableViewItem* CreateLocationItemN(int itemWidth, const Tizen::Base::String& location);
-       Tizen::Ui::Controls::TableViewItem* CreateReminderItemN(int itemWidth, const Tizen::Base::String& alarm);
+       Tizen::Ui::Controls::TableViewItem* CreateReminderItemN(int itemWidth);
        Tizen::Ui::Controls::TableViewItem* CreateRepeatItemN(int itemWidth, const Tizen::Base::String& repeat);
-//     Tizen::Ui::Controls::TableViewItem* CreateSaveToItemN(int itemWidth, const Tizen::Base::String& calendarName,
-//                                                                                                             const Tizen::Graphics::Bitmap* pCalendarIcon = null);
+       Tizen::Ui::Controls::TableViewItem* CreateSaveToItemN(int itemWidth, const Tizen::Base::String& accountName,
+                                                                                                               const Tizen::Base::String& calendarName,
+                                                                                                               const Tizen::Graphics::Bitmap* pCalendarIcon = null);
        result SendAppControlResult(Tizen::App::AppCtrlResult appControlResult);
        void InitializeSubMenu(void);
 
index a787da5..3fca127 100644 (file)
 #ifndef _CL_EVENT_EDITOR_FORM_H_
 #define _CL_EVENT_EDITOR_FORM_H_
 
+#include <FApp.h>
 #include <FGraphics.h>
 #include <FSocial.h>
 #include <FUi.h>
 
+class CalendarSelectorPopup;
 class EventPresentationModel;
 
 class EventEditorForm
@@ -48,6 +50,7 @@ public:
 
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
@@ -92,8 +95,6 @@ public:
        virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute);
        virtual void OnTimeChangeCanceled(const Tizen::Ui::Control& source);
 
-       static EventEditorForm* CreateEventEditorFormN(void);
-
 private:
        enum EditEventFormStyle
        {
@@ -111,10 +112,10 @@ private:
        Tizen::Ui::Controls::TableViewItem* CreateReminderItemN(int itemWidth, int itemHeight, const Tizen::Base::String& reminder,
                                                                                                                        int index, bool showItem = true, bool hasAddButton = false);
        Tizen::Ui::Controls::TableViewItem* CreateRepeatItemN(int itemWidth, const Tizen::Base::String& repeat);
-//     Tizen::Ui::Controls::TableViewItem* CreateSaveToItemN(int itemWidth, const Tizen::Base::String& calendarName,
-//                                                                                                             const Tizen::Graphics::Bitmap* pCalendarIcon = null);
+       Tizen::Ui::Controls::TableViewItem* CreateSaveToItemN(int itemWidth, const Tizen::Base::String& calendarName,
+                                                                                                               const Tizen::Graphics::Bitmap* pCalendarIcon = null);
        result SetStyle(EditEventFormStyle style);
-//     result Update(void);
+       result SendAppControlResult(Tizen::App::AppCtrlResult appControlResult);
        result UpdatePm(void);
 
 private:
@@ -129,16 +130,16 @@ private:
        Tizen::Ui::Controls::EditTime* __pEditTimeStartTime;
        Tizen::Ui::Controls::EditDate* __pEditDateEndDate;
        Tizen::Ui::Controls::EditTime* __pEditTimeEndTime;
-       Tizen::Ui::Controls::CheckButton* __pCheckButtonAllDayEvent;
 //     Tizen::Ui::Controls::Label* __pLabelTimeZone;
        Tizen::Ui::Controls::Label* __pLabelReminder[MAX_COUNT_OF_REMINDER];
        Tizen::Ui::Controls::Label* __pLabelRepeat;
        Tizen::Ui::Controls::TableViewItem* __pTableViewItemNote;
        Tizen::Ui::Controls::ExpandableEditArea* __pExpandableEditAreaNote;
-//     Tizen::Ui::Controls::Label* __pLabelSaveTo;
+       Tizen::Ui::Controls::Label* __pLabelSaveTo;
        Tizen::Ui::Controls::Button* __pButtonAddReminer;
        Tizen::Ui::Controls::Button* __pButtonDeleteReminder;
        Tizen::Ui::Controls::TableViewItem* __pItemReminder[MAX_COUNT_OF_REMINDER];
+       CalendarSelectorPopup* __pCalendarSelectorPopup;
 }; // EventEditorForm
 
 #endif // _CL_EVENT_EDITOR_FORM_H_
index 41d4f2a..4032990 100644 (file)
@@ -25,6 +25,7 @@
 #include <FBase.h>
 #include <FGraphics.h>
 #include <FLocales.h>
+#include <FSocial.h>
 #include <FUi.h>
 #include "ClTypes.h"
 
@@ -35,6 +36,7 @@ public:
        const Tizen::Graphics::Color GetCalendarColor(void) const;
        const Tizen::Base::String& GetDateRangeText(void) const;
        const Tizen::Base::String& GetLocation(void) const;
+       Tizen::Social::EventPriority GetPriority(void) const;
        const Tizen::Base::String& GetSearchText(void) const;
        const Tizen::Base::String& GetTitle(void) const;
        bool HasReminder(void) const;
@@ -48,6 +50,7 @@ public:
        void SetDateRangeText(const Tizen::Base::String& range);
        void SetFacebookEvent(bool isFacebookEvent);
        void SetLocation(const Tizen::Base::String& location);
+       void SetPriority(Tizen::Social::EventPriority priority);
        void SetReminder(bool hasReminder);
        void SetRepeat(bool isRepeated);
        void SetSearchText(const Tizen::Base::String& searchText);
@@ -67,6 +70,7 @@ private:
        Tizen::Base::String __searchText;
        Tizen::Ui::Controls::ICustomElement* __pTitleElement;
        Tizen::Ui::Controls::ICustomElement* __pLocationElement;
+       Tizen::Social::EventPriority __priority;
        bool __hasReminder;
        bool __isRepeated;
        bool __isFacebook;
index bbf4fb3..3e3c6c1 100644 (file)
@@ -113,7 +113,6 @@ private:
        int ConvertDayOfWeek(int dayOfWeek) const;
        int FindGroupIndex(const Tizen::Base::DateTime& date, int start, int end) const;
        void FireCalendarEventChangedEvent(void);
-       void FireCurrentDateChangedEvent(const Tizen::Base::DateTime& current, const Tizen::Base::DateTime& preview);
        result LoadEvents(const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end);
        void RemoveAllEvents(void);
        void UnloadEvents(const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end);
@@ -138,7 +137,7 @@ private:
        Tizen::Locales::DateTimeFormatter* __pMonthFormatter;
        Tizen::Locales::DateTimeFormatter* __pYearFormatter;
        Tizen::Locales::DateTimeFormatter* __pTimeFormatter;
-       Tizen::Base::Collection::LinkedList __dateChangedListeners;
+       Tizen::Base::Runtime::Event* __pCurrentDateChangeEvent;
        Tizen::Base::Collection::LinkedList __eventChangedListeners;
        Tizen::Base::Runtime::Timer __timer;
        bool __isEmpty;
index 9d95283..383efcf 100644 (file)
@@ -32,6 +32,7 @@ class EventPresentationModel
 public:
        result Construct(const Tizen::Social::RecordId eventId = Tizen::Social::INVALID_RECORD_ID);
 
+       Tizen::Base::String GetAccountName(void) const;
        Tizen::Graphics::Bitmap* GetCalendarIconN(void) const;
        Tizen::Base::String GetCalendarName(void) const;
        Tizen::Social::RecordId GetEventId(void) const;
@@ -54,6 +55,8 @@ public:
        bool IsAllDayEvent(void) const;
        bool IsRecurring(void) const;
        bool IsAllEventEditing(void) const;
+       bool IsSaved(void) const;
+       bool IsEditable(void) const;
 
        result RemoveEvent(void);
        result RemoveEvent(bool deleteOriginal);
index 0e4b79c..f6a1243 100644 (file)
@@ -45,23 +45,16 @@ public:
        Tizen::Graphics::Color GetCalendarColor(const Tizen::Social::RecordId& calendarId) const;
 
        int GetWholeDayCount(void) const;
-       int GetAllDayEventCount(const Tizen::Base::DateTime& date) const;
-       int GetAllDayEventCount(int groupIndex) const;
-       int GetEventCount(const Tizen::Base::DateTime& date) const;
-       int GetEventCount(int groupIndex) const;
        int GetWholeEventCount(const Tizen::Base::DateTime& date) const;
        int GetWholeEventCount(int groupIndex) const;
        Tizen::Base::DateTime GetDateTimeFromGroupIndex(int groupIndex) const;
        int GetGroupIndex(const Tizen::Base::DateTime& date) const;
-       const Tizen::Social::CalEventInstance* GetAllDayEvent(const Tizen::Base::DateTime& date, int index) const;
-       const Tizen::Social::CalEventInstance* GetAllDayEvent(int groupIndex, int index) const;
-       const Tizen::Social::CalEventInstance* GetEvent(const Tizen::Base::DateTime& date, int index) const;
-       const Tizen::Social::CalEventInstance* GetEvent(int groupIndex, int index) const;
-       const Tizen::Social::CalEventInstance* GetEventWithWholeIndex(const Tizen::Base::DateTime& date, int index) const;
-       const Tizen::Social::CalEventInstance* GetEventWithWholeIndex(int groupIndex, int index) const;
+       const Tizen::Social::CalEvent* GetEvent(const Tizen::Base::DateTime& date, int index) const;
+       const Tizen::Social::CalEvent* GetEvent(int groupIndex, int index) const;
+       Tizen::Social::CalEventInstance* GetEventInstanceN(int groupIndex, int index) const;
 
        Tizen::Base::String GetSearchText(void) const;
-       result RemoveEvent(const Tizen::Social::CalEventInstance& event, bool deleteOriginal = false);
+       result RemoveEvent(const Tizen::Social::CalEventInstance& event, bool deleteOriginal);
        result SearchEvent(const Tizen::Base::String& text);
 
        EventSearchPresentationModel(void);
index 34d7201..ec5c398 100644 (file)
@@ -33,6 +33,7 @@ class EventSearcherForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::IActionEventListener
        , public virtual Tizen::Ui::IKeypadEventListener
+       , public virtual Tizen::Ui::ITextEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemEventListener
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemProvider
@@ -51,6 +52,9 @@ public:
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
+       virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
+       virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
+
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
        virtual int GetGroupCount(void);
@@ -88,6 +92,7 @@ private:
        Tizen::Ui::Controls::SearchBar* __pSearchBarInput;
        Tizen::Ui::Controls::GroupedListView* __pGroupedListViewEvents;
        Tizen::Ui::Controls::ListContextItem* __pContextItem;
+       Tizen::Ui::Controls::ListContextItem* __pContextItemNoEdit;
        SharePopup* __pSharePopup;
 };
 
index 7f55a12..27112c5 100644 (file)
@@ -25,7 +25,7 @@
 #include <FBase.h>
 
 class ICurrentDateChangedEventListener
-       : public Tizen::Base::Object
+       : public Tizen::Base::Runtime::IEventListener
 {
 public:
        virtual ~ICurrentDateChangedEventListener(void) { };
diff --git a/inc/ClIPanningAnimationEventListener.h b/inc/ClIPanningAnimationEventListener.h
new file mode 100644 (file)
index 0000000..a7ebdda
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       ClIPanningAnimationEventListener.h
+ * @brief      This is the header file for the IPanningAnimationEventListener interface.
+ */
+
+#ifndef _CL_IPANNING_ANIMATION_EVENT_LISTENER_H_
+#define _CL_IPANNING_ANIMATION_EVENT_LISTENER_H_
+
+#include "ClTypes.h"
+
+class IPanningAnimationEventListener
+{
+public:
+       virtual ~IPanningAnimationEventListener(void) { }
+
+       virtual void OnPanningAnimationEnded(ViewScrollEffect direction) = 0;
+}; // IPanningAnimationEventListener
+
+#endif // _CL_IPANNING_ANIMATION_EVENT_LISTENER_H_
index 4a55a61..82111f2 100644 (file)
@@ -88,6 +88,7 @@ private:
        EventListPresentationModel* __pPm;
        Tizen::Ui::Controls::GroupedListView* __pGroupedListViewEventsList;
        Tizen::Ui::Controls::ListContextItem* __pContextItem;
+       Tizen::Ui::Controls::ListContextItem* __pContextItemNoEdit;
        Tizen::Locales::DateTimeFormatter* __pDateFormatter;
        SharePopup* __pSharePopup;
 }; // ListPanel
index a16de87..0d6a402 100644 (file)
@@ -27,7 +27,6 @@
 class MainForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::IActionEventListener
-       , public virtual Tizen::Ui::ITouchEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
 {
 public:
@@ -43,13 +42,6 @@ public:
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
-       virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo);
-       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-
 private:
        void InitializeViewMenu(void);
        void InitializeSubMenu(void);
@@ -57,7 +49,6 @@ private:
 private:
        Tizen::Ui::Controls::ContextMenu* __pContextMenuView;
        Tizen::Ui::Controls::ContextMenu* __pContextMenuSub;
-       bool __isTitlePressed;
 }; // MainForm
 
 #endif // _CL_MAIN_FORM_H_
index 2afe598..6672aef 100644 (file)
@@ -30,6 +30,7 @@
 #include "ClICurrentDateChangedEventListener.h"
 #include "ClIDateFocusEventListener.h"
 #include "ClIPanningAnimationControlProvider.h"
+#include "ClIPanningAnimationEventListener.h"
 
 class EventListPresentationModel;
 class PanningAnimationManager;
@@ -37,7 +38,6 @@ class SharePopup;
 
 class MonthPanel
        : public Tizen::Ui::Controls::Panel
-       , public virtual Tizen::Ui::Animations::IControlAnimatorEventListener
        , public virtual Tizen::Ui::Controls::IListViewItemEventListener
        , public virtual Tizen::Ui::Controls::IListViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
@@ -45,6 +45,7 @@ class MonthPanel
        , public virtual ICurrentDateChangedEventListener
        , public virtual IDateFocusEventListener
        , public virtual IPanningAnimationControlProvider
+       , public virtual IPanningAnimationEventListener
 {
 public:
        result Initialize(void);
@@ -56,10 +57,6 @@ public:
        virtual result OnTerminating(void);
        virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
-       virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-
        virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
        virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
        virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus status);
@@ -85,6 +82,8 @@ public:
        virtual Tizen::Ui::Control* GetNextControl(void);
        virtual Tizen::Ui::Control* GetPreviewControl(void);
 
+       virtual void OnPanningAnimationEnded(ViewScrollEffect direction);
+
 private:
        void DrawCalendar(void);
        void DrawCurrentDate(void);
@@ -96,6 +95,7 @@ private:
        Tizen::Ui::Controls::Panel* __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_COUNT];
        Tizen::Ui::Controls::ListView* __pListViewEvent;
        Tizen::Ui::Controls::ListContextItem* __pContextItem;
+       Tizen::Ui::Controls::ListContextItem* __pContextItemNoEdit;
        PanningAnimationManager* __pPanningAnimationManager;
        SharePopup* __pSharePopup;
 }; // MonthPanel
index e7471f5..6072a59 100644 (file)
@@ -16,7 +16,7 @@
 
 /**
  * @file       ClNodes.h
- * @brief      This is the header file for the EventNode class and EventListNode class.
+ * @brief      This is the header file for the EventInstanceNode class, EventInstanceListNode class, EventPtr class, and EventListNode class.
  */
 
 #ifndef _CL_NODES_H_
@@ -25,7 +25,7 @@
 #include <FBase.h>
 #include <FSocial.h>
 
-class EventNode
+class EventInstanceNode
        : public Tizen::Base::Object
 {
 public:
@@ -33,23 +33,23 @@ public:
        void RemoveRef(void);
        Tizen::Social::CalEventInstance* GetEvent(void);
 
-       EventNode(Tizen::Social::CalEventInstance& event);
+       EventInstanceNode(Tizen::Social::CalEventInstance& event);
 private:
-       EventNode(void);
-       EventNode(const EventNode&);
-       virtual ~EventNode(void);
-       EventNode& operator=(const EventNode&);
+       EventInstanceNode(void);
+       EventInstanceNode(const EventInstanceNode&);
+       virtual ~EventInstanceNode(void);
+       EventInstanceNode& operator=(const EventInstanceNode&);
 
        Tizen::Social::CalEventInstance* __pEvent;
        int __refCount;
-}; // EventNode
+}; // EventInstanceNode
 
 
-class EventListNode
+class EventInstanceListNode
        : public Tizen::Base::Object
 {
 public:
-       void Add(EventNode& eventNode);
+       void Add(EventInstanceNode& eventNode);
 
        const Tizen::Base::DateTime& GetDate(void) const;
        int GetAllDayEventCount(void) const;
@@ -59,6 +59,47 @@ public:
        Tizen::Social::CalEventInstance* GetEvent(int index) const;
        Tizen::Social::CalEventInstance* GetEventWithWholeIndex(int index) const;
 
+       EventInstanceListNode(const Tizen::Base::DateTime& date);
+       virtual ~EventInstanceListNode(void);
+
+private:
+       Tizen::Base::DateTime __date;
+       Tizen::Base::Collection::ArrayList* __pAllDayEvents;
+       Tizen::Base::Collection::ArrayList* __pEvents;
+}; // EventInstanceListNode
+
+
+class EventPtr
+       : public Tizen::Base::Object
+{
+public:
+       EventPtr(Tizen::Social::CalEvent& event);
+       EventPtr(const EventPtr& eventPtr);
+       virtual ~EventPtr(void);
+
+       virtual EventPtr& operator=(const EventPtr& eventPtr);
+       virtual Tizen::Social::CalEvent& operator*(void);
+       virtual Tizen::Social::CalEvent* operator->(void);
+
+private:
+       EventPtr(void);
+
+private:
+       Tizen::Social::CalEvent* __pEvent;
+       int* __pRefCount;
+}; // EventPtr
+
+
+class EventListNode
+       : public Tizen::Base::Object
+{
+public:
+       void Add(EventPtr& eventPtr);
+
+       const Tizen::Base::DateTime& GetDate(void) const;
+       int GetEventCount(void) const;
+       Tizen::Social::CalEvent* GetEvent(int index) const;
+
        EventListNode(const Tizen::Base::DateTime& date);
        virtual ~EventListNode(void);
 
index 1ad743e..1e633c2 100644 (file)
 #include <FUi.h>
 
 #include "ClIPanningAnimationControlProvider.h"
+#include "ClIPanningAnimationEventListener.h"
 #include "ClTypes.h"
 
 class PanningAnimationManager
-       : public Tizen::Ui::TouchPanningGestureDetector
-       , public virtual Tizen::Ui::ITouchEventListener
-       , public virtual Tizen::Ui::ITouchPanningGestureEventListener
-       , public virtual Tizen::Ui::Animations::IControlAnimatorEventListener
+       : public Tizen::Ui::Controls::ScrollPanel
+       , public virtual Tizen::Ui::Controls::IScrollEventListener
 {
 public:
-       ViewScrollEffect GetScrollDirection(void) const;
-       void Initialize(IPanningAnimationControlProvider& provider);
-       result RunPanningAnimation(ViewScrollEffect scrollDirection);
-       void SetControlAnimatorEventListener(Tizen::Ui::Animations::IControlAnimatorEventListener& listener);
+       result AddView(Tizen::Ui::Control& view, ViewScrollEffect position);
+       void Initialize(const Tizen::Graphics::Rectangle& bounds, IPanningAnimationControlProvider& provider);
+       result RemoveView(ViewScrollEffect position);
+       void ResetPosition(void);
+       void SetPanningAnimationEventListener(IPanningAnimationEventListener& listener);
 
        PanningAnimationManager(void);
        virtual ~PanningAnimationManager(void);
 
-       virtual void OnTouchMoved(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
 
-       virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-
-       virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo);
-       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
-
-       virtual void OnPanningGestureStarted(Tizen::Ui::TouchPanningGestureDetector& gestureDetector);
-       virtual void OnPanningGestureChanged(Tizen::Ui::TouchPanningGestureDetector& gestureDetector);
-       virtual void OnPanningGestureFinished(Tizen::Ui::TouchPanningGestureDetector& gestureDetector);
-       virtual void OnPanningGestureCanceled(Tizen::Ui::TouchPanningGestureDetector& gestureDetector);
+       virtual void OnScrollEndReached(Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type);
 
 private:
-       result RunPanningAnimation(int endPosition, bool runForce = false);
+       void RunPanningAnimation(ViewScrollEffect direction);
 
 private:
        IPanningAnimationControlProvider* __pProvider;
-       Tizen::Ui::Animations::IControlAnimatorEventListener* __pControlAnimatorEventListener;
+       IPanningAnimationEventListener* __pPanningAnimationEventListener;
        Tizen::Ui::Control* __pCurrent;
        Tizen::Ui::Control* __pNext;
        Tizen::Ui::Control* __pPreview;
-       ViewScrollEffect __effectDirection;
-       bool __isTouchPanningTriggered;
-       bool __isPanningEffectRunning;
+       bool __isInitialized;
 }; // PanningAnimationManager
 
 #endif // _CL_PANNING_ANIMATION_MANAGER_H_
index 24a8fe2..01fe612 100644 (file)
@@ -30,8 +30,8 @@ class ReminderForm
        , public virtual Tizen::Ui::IActionEventListener
        , public virtual Tizen::Ui::IKeypadEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
-       , public virtual Tizen::Ui::Controls::IGroupedTableViewItemEventListener
-       , public virtual Tizen::Ui::Controls::IGroupedTableViewItemProvider
+       , public virtual Tizen::Ui::Controls::ISectionTableViewItemEventListener
+       , public virtual Tizen::Ui::Controls::ISectionTableViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
@@ -45,20 +45,25 @@ public:
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
-       virtual int GetGroupCount(void);
-       virtual int GetItemCount(int groupIndex);
-       virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
-       virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
-       virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
-       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
-       virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-       virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-       virtual int GetDefaultGroupItemHeight(void);
+       virtual int GetSectionCount(void);
+       virtual int GetItemCount(int sectionIndex);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int sectionIndex, int itemIndex, int itemWidth);
+       virtual bool DeleteItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual Tizen::Base::String GetSectionHeader(int sectionIndex);
+       virtual bool HasSectionHeader(int sectionIndex);
+       virtual Tizen::Base::String GetSectionFooter(int sectionIndex);
+       virtual bool HasSectionFooter(int sectionIndex);
        virtual int GetDefaultItemHeight(void);
 
-       virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-       virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-       virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
+       virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView,
+                                                                                                               int sectionIndex, int itemIndex,
+                                                                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                                                                               Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView,
+                                                                                                                                                  int sectionIndex, int itemIndex,
+                                                                                                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                                                                                                  bool activated);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
@@ -72,8 +77,6 @@ public:
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction);
 
-       static ReminderForm* CreateReminderFormN(void);
-
 private:
        enum ReminderType
        {
@@ -94,7 +97,7 @@ private:
        Tizen::Ui::Controls::EditField* __pEditFieldReminderTime;
        Tizen::Ui::Controls::Button* __pButtonReminderTimeUnit;
        Tizen::Ui::Controls::Label* __pLabelBefore;
-       Tizen::Ui::Controls::GroupedTableView* __pTableView;
+       Tizen::Ui::Controls::SectionTableView* __pTableView;
        Tizen::Ui::Controls::ContextMenu* __pContextMenuTimeUnitSelector;
        ReminderType __reminderType;
        Tizen::Social::ReminderTimeUnit __reminderTimeUnit;
index 33689e4..ceee1f9 100644 (file)
@@ -32,8 +32,8 @@ class RepeatForm
        , public virtual Tizen::Ui::IDateChangeEventListener
        , public virtual Tizen::Ui::IKeypadEventListener
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
-       , public virtual Tizen::Ui::Controls::IGroupedTableViewItemEventListener
-       , public virtual Tizen::Ui::Controls::IGroupedTableViewItemProvider
+       , public virtual Tizen::Ui::Controls::ISectionTableViewItemEventListener
+       , public virtual Tizen::Ui::Controls::ISectionTableViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
@@ -50,20 +50,25 @@ public:
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
-       virtual int GetGroupCount(void);
-       virtual int GetItemCount(int groupIndex);
-       virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
-       virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
-       virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
-       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
-       virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-       virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-       virtual int GetDefaultGroupItemHeight(void);
+       virtual int GetSectionCount(void);
+       virtual int GetItemCount(int sectionIndex);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int sectionIndex, int itemIndex, int itemWidth);
+       virtual bool DeleteItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual Tizen::Base::String GetSectionHeader(int sectionIndex);
+       virtual bool HasSectionHeader(int sectionIndex);
+       virtual Tizen::Base::String GetSectionFooter(int sectionIndex);
+       virtual bool HasSectionFooter(int sectionIndex);
        virtual int GetDefaultItemHeight(void);
 
-       virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-       virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-       virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
+       virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView,
+                                                                                                               int sectionIndex, int itemIndex,
+                                                                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                                                                               Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView,
+                                                                                                                                                  int sectionIndex, int itemIndex,
+                                                                                                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                                                                                                  bool activated);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
@@ -77,8 +82,6 @@ public:
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
        virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction);
 
-       static RepeatForm* CreateRepeatFormN(void);
-
 private:
        enum RepeatType
        {
@@ -102,7 +105,7 @@ private:
 
 private:
        Tizen::Social::Recurrence* __pRepeat;
-       Tizen::Ui::Controls::GroupedTableView* __pTableView;
+       Tizen::Ui::Controls::SectionTableView* __pTableView;
        Tizen::Ui::Controls::EditField* __pEditFieldRepeatCount;
        Tizen::Ui::Controls::EditDate* __pEditDateUntilDate;
        Tizen::Base::DateTime __startDate;
index 8f0660c..4b9d075 100644 (file)
@@ -28,8 +28,8 @@
 class SettingForm
        : public Tizen::Ui::Controls::Form
        , public virtual Tizen::Ui::Controls::IFormBackEventListener
-       , public virtual Tizen::Ui::Controls::IGroupedTableViewItemEventListener
-       , public virtual Tizen::Ui::Controls::IGroupedTableViewItemProvider
+       , public virtual Tizen::Ui::Controls::ISectionTableViewItemEventListener
+       , public virtual Tizen::Ui::Controls::ISectionTableViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
 {
 public:
@@ -43,40 +43,46 @@ public:
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
 
-       virtual int GetGroupCount(void);
-       virtual int GetItemCount(int groupIndex);
-       virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
-       virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
-       virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
-       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
-       virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-       virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
-       virtual int GetDefaultGroupItemHeight(void);
+       virtual int GetSectionCount(void);
+       virtual int GetItemCount(int sectionIndex);
+       virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int sectionIndex, int itemIndex, int itemWidth);
+       virtual bool DeleteItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual void UpdateItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+       virtual Tizen::Base::String GetSectionHeader(int sectionIndex);
+       virtual bool HasSectionHeader(int sectionIndex);
+       virtual Tizen::Base::String GetSectionFooter(int sectionIndex);
+       virtual bool HasSectionFooter(int sectionIndex);
        virtual int GetDefaultItemHeight(void);
 
-       virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-       virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
-       virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
+       virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView,
+                                                                                                               int sectionIndex, int itemIndex,
+                                                                                                               Tizen::Ui::Controls::TableViewItem* pItem,
+                                                                                                               Tizen::Ui::Controls::TableViewItemStatus status);
+       virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView,
+                                                                                                                                                  int sectionIndex, int itemIndex,
+                                                                                                                                                  Tizen::Ui::Controls::TableViewContextItem* pContextItem,
+                                                                                                                                                  bool activated);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
 private:
-       Tizen::Ui::Controls::TableViewGroupItem* CreateEmptyGroupItemN(int itemWidth);
        Tizen::Ui::Controls::TableViewItem* CreateLockTimeZoneOnOffItemN(int itemWidth, bool isOn);
        Tizen::Ui::Controls::TableViewItem* CreateLockTimeZoneSelectionItemN(int itemWidth);
-       Tizen::Ui::Controls::TableViewGroupItem* CreateLockTimeZoneDescriptionItemN(int itemWidth);
        Tizen::Ui::Controls::TableViewItem* CreateFirstDayOfWeekExpanderItemN(int itemWidth, bool isSundayFirst);
-       Tizen::Ui::Controls::TableViewItem* CreateFirstDayOfWeekSundayItemN(int itemWidth, bool isSelected);
-       Tizen::Ui::Controls::TableViewItem* CreateFirstDayOfWeekMondayItemN(int itemWidth, bool isSelected);
+       Tizen::Ui::Controls::TableViewItem* CreateFirstDayOfWeekSundayItemN(int itemWidth);
+       Tizen::Ui::Controls::TableViewItem* CreateFirstDayOfWeekMondayItemN(int itemWidth);
        Tizen::Ui::Controls::TableViewItem* CreateImportItemN(int itemWidth);
        Tizen::Ui::Controls::TableViewItem* CreateExportItemN(int itemWidth);
+       void CollapseGroup(int sectionIndex);
+       void ExpandGroup(int sectionIndex);
 
 private:
-       Tizen::Ui::Controls::GroupedTableView* __pGroupedTableView;
+       Tizen::Ui::Controls::SectionTableView* __pTableView;
        Tizen::Ui::Controls::Label* __pLabelLockTimeZone;
        Tizen::Ui::Controls::Label* __pLabelFirstDayOfWeek;
+       Tizen::Ui::Controls::Label* __pLabelFirstDayOfWeekExpandIcon;
        int __descriptionItemHeight;
        bool __isLockTimeZoneSet;
        bool __isFirstDayOfWeekSelectionItemExpanded;
index ae966c8..9f65548 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <FApp.h>
 #include <FBase.h>
+#include <FGraphics.h>
 #include <FSocial.h>
 #include <FUi.h>
 
@@ -78,8 +79,14 @@ private:
                                                                                                                           const Tizen::Base::DateTime& dueDate, bool isCompleted);
        Tizen::Ui::Controls::TableViewItem* CreateDescriptionItemN(int itemWidth, const Tizen::Base::String& description);
        Tizen::Ui::Controls::TableViewItem* CreateLocationItemN(int itemWidth, const Tizen::Base::String& location);
-       Tizen::Ui::Controls::TableViewItem* CreateReminderItemN(int itemWidth, const Tizen::Base::String& reminder);
+       Tizen::Ui::Controls::TableViewItem* CreateReminderItemN(int itemWidth);
        Tizen::Ui::Controls::TableViewItem* CreatePriorityItemN(int itemWidth, const Tizen::Base::String& priority);
+       Tizen::Ui::Controls::TableViewItem* CreateSaveToItemN(int itemWidth, const Tizen::Base::String& accountName,
+                                                                                                               const Tizen::Base::String& calendarName,
+                                                                                                               const Tizen::Graphics::Bitmap* pCalendarIcon = null);
+       Tizen::Base::String GetAccountName(Tizen::Social::RecordId calendarId = Tizen::Social::INVALID_RECORD_ID) const;
+       Tizen::Graphics::Bitmap* GetCalendarIconN(Tizen::Social::RecordId calendarId = Tizen::Social::INVALID_RECORD_ID) const;
+       Tizen::Base::String GetCalendarName(Tizen::Social::RecordId calendarId = Tizen::Social::INVALID_RECORD_ID) const;
        Tizen::Base::String GetReminderString(const Tizen::Social::Reminder* pReminder = null) const;
        result SendAppControlResult(Tizen::App::AppCtrlResult appControlResult);
 
index 316f2d8..ee9c35b 100644 (file)
@@ -64,6 +64,7 @@ private:
        Tizen::Base::String __title;
        Tizen::Base::String __location;
        Tizen::Base::String __dueDate;
+       Tizen::Ui::Controls::ICustomElement* __pTitleElement;
        TaskPriority __priority;
        bool __hasReminder;
        bool __isCanceled;
index e9f4a2a..03b813c 100644 (file)
@@ -45,7 +45,7 @@ private:
 private:
        ThreeButtonPopupStyle __style;
        Tizen::Ui::Control* __pTarget;
-       const Tizen::Social::CalEventInstance* __pEvent;
+       Tizen::Social::CalEventInstance* __pEvent;
 }; // ThreeButtonPopup
 
 #endif // _CL_THREE_BUTTON_POPUP_H_
index a572bbc..1b2ce2c 100644 (file)
@@ -45,7 +45,7 @@ private:
 private:
        TwoButtonPopupStyle __style;
        Tizen::Ui::Control* __pTarget;
-       const Tizen::Social::CalEventInstance* __pEvent;
+       Tizen::Social::CalEventInstance* __pEvent;
 }; // TwoButtonPopup
 
 #endif // _CL_TWO_BUTTON_POPUP_H_
index 6784d65..97e254e 100644 (file)
@@ -130,8 +130,8 @@ extern const wchar_t* IDS_COM_POP_AM_M_ABB;
 extern const wchar_t* IDS_COM_POP_PM_M_ABB;
 extern const wchar_t* IDS_CLD_MBODY_LOCK_TIME_ZONE;
 extern const wchar_t* IDS_CLD_BODY_LOCK_TIME_ZONE_DESCRIPTION_MSG;
-extern const wchar_t* IDS_CLD_BODY_IMPORT_EVENTS_EVENTS_TASKS_ABB;
-extern const wchar_t* IDS_CLD_BODY_EXPORT_EVENTS_EVENTS_TASKS_ABB;
+extern const wchar_t* IDS_CLD_BODY_IMPORT_EVENTS_TASKS_ABB;
+extern const wchar_t* IDS_CLD_BODY_EXPORT_EVENTS_TASKS_ABB;
 extern const wchar_t* IDS_COM_POP_SAVING_FAILED;
 
 extern const wchar_t* IDS_MONTH_VIEW_LIST_TO;
@@ -182,21 +182,26 @@ extern const wchar_t* IDB_DAY_VIEW_TIME_LINE;
 extern const wchar_t* IDB_DAY_VIEW_TIME_LINE_PRESS;
 
 extern const wchar_t* IDB_LIST_ICON_ALARM;
-extern const wchar_t* IDB_LIST_ICON_DESCRIPTION;
 extern const wchar_t* IDB_LIST_ICON_FACEBOOK;
-extern const wchar_t* IDB_LIST_ICON_MAP;
 extern const wchar_t* IDB_LIST_ICON_PRIORITY;
 extern const wchar_t* IDB_LIST_ICON_PRIORITY_LOW;
 extern const wchar_t* IDB_LIST_ICON_REMINDER;
 extern const wchar_t* IDB_LIST_ICON_REPEAT;
+extern const wchar_t* IDB_LIST_ICON_SAVE_TO;
 
 extern const wchar_t* IDB_TASK_EVENT_COMPLETION_PRESS;
 
-extern const wchar_t* IDB_ICON_ALARM_64X64;
+extern const wchar_t* IDB_MONTH_VIEW_CALENDAR_BG;
 extern const wchar_t* IDB_MONTH_VIEW_DAY_EVENT;
+extern const wchar_t* IDB_MONTH_VIEW_DAY_EVENT_FOCUS;
 extern const wchar_t* IDB_MONTH_VIEW_DAY_FOCUS;
+extern const wchar_t* IDB_MONTH_VIEW_DAY_PRESS;
 extern const wchar_t* IDB_MONTH_VIEW_TODAY;
-extern const wchar_t* IDB_MONTH_VIEW_TODAY_FOCUS;
+extern const wchar_t* IDB_MONTH_VIEW_BUBBLE_EVENT;
+extern const wchar_t* IDB_MONTH_VIEW_BUBBLE_EVENT_FOCUS;
+extern const wchar_t* IDB_MONTH_VIEW_BUBBLE_FOCUS;
+extern const wchar_t* IDB_MONTH_VIEW_BUBBLE_PRESS;
+extern const wchar_t* IDB_MONTH_VIEW_BUBBLE_TODAY;
 
 extern const wchar_t* IDB_YEAR_DAY_FOCUS;
 extern const wchar_t* IDB_YEAR_MONTH_FOCUS;
@@ -218,7 +223,10 @@ extern const wchar_t* IDB_LIST_VIEW_NO_CONTENTS_TEXT;
 extern const wchar_t* IDB_FORM_BACK;
 extern const wchar_t* IDB_FORM_BACK_PRESS;
 
+extern const wchar_t* IDB_ICON_PHONE_CALENDAR;
+
 //etc
+extern const wchar_t* ID_OPERATION_ADD;
 extern const wchar_t* ID_OPERATION_CONFIG;
 extern const wchar_t* ID_OPERATION_MAIN;
 extern const wchar_t* ID_OPERATION_PICK;
@@ -314,7 +322,6 @@ enum
 {
        IDA_MAIN_FORM_HEADER_TODAY = 10001,
        IDA_MAIN_FORM_HEADER_VIEW_MENU = 10002,
-       IDA_MAIN_FORM_HEADER_GO_TO_DATE = 10003,
        IDA_MAIN_FORM_FOOTER_CREATE = 10011,
        IDA_MAIN_FORM_FOOTER_SUB_MENU = 10019,
 
@@ -323,9 +330,11 @@ enum
        IDA_VIEW_MENU_DAY = 10303,
        IDA_VIEW_MENU_LIST = 10304,
 
-       IDA_SUB_MENU_DELETE = 10401,
-       IDA_SUB_MENU_SEARCH = 10402,
-       IDA_SUB_MENU_CALENDARS = 10403,
+       IDA_SUB_MENU_GO_TO_DATE = 10401,
+       IDA_SUB_MENU_DELETE = 10402,
+       IDA_SUB_MENU_SEARCH = 10403,
+       IDA_SUB_MENU_CALENDARS = 10404,
+       IDA_SUB_MENU_SETTING = 10405,
 
        IDA_GO_TO_DATE_POPUP_DONE = 10801,
 
@@ -334,7 +343,9 @@ enum
        IDA_EVENT_POPUP_ONLY_THIS_EVENT_DELETE = 11901,
        IDA_EVENT_POPUP_ALL_REPETITIVE_EVENT_DELETE = 11902,
        IDA_EVENT_POPUP_ONLY_THIS_EVENT_EDIT = 11903,
-       IDA_EVENT_POPUP_ALL_REPETITIVE_EVENT_EDIT = 11904
+       IDA_EVENT_POPUP_ALL_REPETITIVE_EVENT_EDIT = 11904,
+
+       IDA_CALENDAR_SELECTOR_POPUP_DONE = 20901
 };
 
 #endif // _CL_TYPES_H_
index 218f415..63a2a9f 100644 (file)
 #include "ClICurrentDateChangedEventListener.h"
 #include "ClIDateFocusEventListener.h"
 #include "ClIPanningAnimationControlProvider.h"
+#include "ClIPanningAnimationEventListener.h"
 
 class EventListPresentationModel;
 class PanningAnimationManager;
 
 class YearPanel
        : public Tizen::Ui::Controls::Panel
-       , public virtual Tizen::Ui::Animations::IControlAnimatorEventListener
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
        , public virtual ICurrentDateChangedEventListener
        , public virtual IDateFocusEventListener
        , public virtual IPanningAnimationControlProvider
+       , public virtual IPanningAnimationEventListener
 {
 public:
        result Initialize(void);
@@ -51,10 +52,6 @@ public:
        virtual result OnTerminating(void);
        virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
 
-       virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-       virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control);
-
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
@@ -68,6 +65,8 @@ public:
        virtual Tizen::Ui::Control* GetNextControl(void);
        virtual Tizen::Ui::Control* GetPreviewControl(void);
 
+       virtual void OnPanningAnimationEnded(ViewScrollEffect direction);
+
 private:
        result CreateBitmapElements(void);
        void DrawCurrentDate(void);
@@ -83,6 +82,7 @@ private:
        Tizen::Graphics::Bitmap* __pBitmapWeekText[YEAR_PANEL_COUNT_OF_WEEK];
        Tizen::Graphics::Bitmap* __pBitmapWeekdayText[YEAR_PANEL_COUNT_OF_DAY];
        Tizen::Graphics::Bitmap* __pBitmapHolidayText[YEAR_PANEL_COUNT_OF_DAY];
+       Tizen::Graphics::Bitmap* __pBitmapTodayText[YEAR_PANEL_COUNT_OF_DAY];
        Tizen::Graphics::Bitmap* __pBitmapFocus;
 }; // YearPanel
 
index 7d7347a..22fa603 100644 (file)
@@ -64,6 +64,7 @@
     <Apps>
         <ApiVersion>2.0</ApiVersion>
         <Privileges>
+            <Privilege>http://tizen.org/privilege/account.read</Privilege>
             <Privilege>http://tizen.org/privilege/calendar.read</Privilege>
             <Privilege>http://tizen.org/privilege/setting</Privilege>
             <Privilege>http://tizen.org/privilege/calendar.write</Privilege>
             </Icons>
             <AppControls>
                 <AppControl>
+                    <Operation>http://tizen.org/appcontrol/operation/add</Operation>
                     <Operation>http://tizen.org/appcontrol/operation/configure</Operation>
                     <Operation>http://tizen.org/appcontrol/operation/pick</Operation>
                     <Operation>http://tizen.org/appcontrol/operation/view</Operation>
index ab376b9..65946b9 100644 (file)
Binary files a/res/screen-density-xhigh/P01_Task_event_completion.png and b/res/screen-density-xhigh/P01_Task_event_completion.png differ
diff --git a/res/screen-density-xhigh/P01_all_day_event_list_expand_closed.png b/res/screen-density-xhigh/P01_all_day_event_list_expand_closed.png
deleted file mode 100644 (file)
index aa00456..0000000
Binary files a/res/screen-density-xhigh/P01_all_day_event_list_expand_closed.png and /dev/null differ
diff --git a/res/screen-density-xhigh/P01_all_day_event_list_expand_closed_press.png b/res/screen-density-xhigh/P01_all_day_event_list_expand_closed_press.png
deleted file mode 100644 (file)
index d5a0854..0000000
Binary files a/res/screen-density-xhigh/P01_all_day_event_list_expand_closed_press.png and /dev/null differ
diff --git a/res/screen-density-xhigh/P01_all_day_event_list_expand_opened.png b/res/screen-density-xhigh/P01_all_day_event_list_expand_opened.png
deleted file mode 100644 (file)
index ac3efb6..0000000
Binary files a/res/screen-density-xhigh/P01_all_day_event_list_expand_opened.png and /dev/null differ
diff --git a/res/screen-density-xhigh/P01_all_day_event_list_expand_opened_press.png b/res/screen-density-xhigh/P01_all_day_event_list_expand_opened_press.png
deleted file mode 100644 (file)
index bb9de71..0000000
Binary files a/res/screen-density-xhigh/P01_all_day_event_list_expand_opened_press.png and /dev/null differ
diff --git a/res/screen-density-xhigh/P01_calendar_bg.png b/res/screen-density-xhigh/P01_calendar_bg.png
new file mode 100644 (file)
index 0000000..5a3c7b0
Binary files /dev/null and b/res/screen-density-xhigh/P01_calendar_bg.png differ
diff --git a/res/screen-density-xhigh/P01_icon_phoneCalendar.png b/res/screen-density-xhigh/P01_icon_phoneCalendar.png
new file mode 100644 (file)
index 0000000..4ef169f
Binary files /dev/null and b/res/screen-density-xhigh/P01_icon_phoneCalendar.png differ
index cc102dd..b9aaeff 100644 (file)
Binary files a/res/screen-density-xhigh/P01_list_icon_alarm.png and b/res/screen-density-xhigh/P01_list_icon_alarm.png differ
diff --git a/res/screen-density-xhigh/P01_list_icon_description.png b/res/screen-density-xhigh/P01_list_icon_description.png
deleted file mode 100644 (file)
index 845373e..0000000
Binary files a/res/screen-density-xhigh/P01_list_icon_description.png and /dev/null differ
index e10f8d7..052eb28 100644 (file)
Binary files a/res/screen-density-xhigh/P01_list_icon_facebook.png and b/res/screen-density-xhigh/P01_list_icon_facebook.png differ
diff --git a/res/screen-density-xhigh/P01_list_icon_map.png b/res/screen-density-xhigh/P01_list_icon_map.png
deleted file mode 100644 (file)
index 3e6b898..0000000
Binary files a/res/screen-density-xhigh/P01_list_icon_map.png and /dev/null differ
index 60dcbe7..5a45369 100644 (file)
Binary files a/res/screen-density-xhigh/P01_list_icon_priority.png and b/res/screen-density-xhigh/P01_list_icon_priority.png differ
index 5cd921e..15534ef 100644 (file)
Binary files a/res/screen-density-xhigh/P01_list_icon_priority_low.png and b/res/screen-density-xhigh/P01_list_icon_priority_low.png differ
index 89b0ae6..1de2ca6 100644 (file)
Binary files a/res/screen-density-xhigh/P01_list_icon_reminder.png and b/res/screen-density-xhigh/P01_list_icon_reminder.png differ
index d67e5aa..f53e13b 100644 (file)
Binary files a/res/screen-density-xhigh/P01_list_icon_repeat.png and b/res/screen-density-xhigh/P01_list_icon_repeat.png differ
diff --git a/res/screen-density-xhigh/P01_list_icon_save to.png b/res/screen-density-xhigh/P01_list_icon_save to.png
new file mode 100644 (file)
index 0000000..384c1ef
Binary files /dev/null and b/res/screen-density-xhigh/P01_list_icon_save to.png differ
index 3805478..cc25cb7 100644 (file)
Binary files a/res/screen-density-xhigh/P01_month view_Today.png and b/res/screen-density-xhigh/P01_month view_Today.png differ
diff --git a/res/screen-density-xhigh/P01_month view_Today_focus.png b/res/screen-density-xhigh/P01_month view_Today_focus.png
deleted file mode 100644 (file)
index 6035762..0000000
Binary files a/res/screen-density-xhigh/P01_month view_Today_focus.png and /dev/null differ
index c80f6ec..b18dd19 100644 (file)
Binary files a/res/screen-density-xhigh/P01_month view_day_event.png and b/res/screen-density-xhigh/P01_month view_day_event.png differ
diff --git a/res/screen-density-xhigh/P01_month view_day_event_focus.png b/res/screen-density-xhigh/P01_month view_day_event_focus.png
new file mode 100644 (file)
index 0000000..bb7cbdb
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_day_event_focus.png differ
diff --git a/res/screen-density-xhigh/P01_month view_day_event_selection.png b/res/screen-density-xhigh/P01_month view_day_event_selection.png
new file mode 100644 (file)
index 0000000..850cbc5
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_day_event_selection.png differ
index 73f401e..7d27367 100644 (file)
Binary files a/res/screen-density-xhigh/P01_month view_day_focus.png and b/res/screen-density-xhigh/P01_month view_day_focus.png differ
diff --git a/res/screen-density-xhigh/P01_month view_day_press.png b/res/screen-density-xhigh/P01_month view_day_press.png
new file mode 100644 (file)
index 0000000..4d50ee4
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_day_press.png differ
diff --git a/res/screen-density-xhigh/P01_month view_event_bubble_bg_daily.png b/res/screen-density-xhigh/P01_month view_event_bubble_bg_daily.png
new file mode 100644 (file)
index 0000000..efa4241
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_event_bubble_bg_daily.png differ
diff --git a/res/screen-density-xhigh/P01_month view_event_bubble_bg_event_focus.png b/res/screen-density-xhigh/P01_month view_event_bubble_bg_event_focus.png
new file mode 100644 (file)
index 0000000..47e7995
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_event_bubble_bg_event_focus.png differ
diff --git a/res/screen-density-xhigh/P01_month view_event_bubble_bg_focus.png b/res/screen-density-xhigh/P01_month view_event_bubble_bg_focus.png
new file mode 100644 (file)
index 0000000..34e6d89
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_event_bubble_bg_focus.png differ
diff --git a/res/screen-density-xhigh/P01_month view_event_bubble_bg_press.png b/res/screen-density-xhigh/P01_month view_event_bubble_bg_press.png
new file mode 100644 (file)
index 0000000..3eea7cb
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_event_bubble_bg_press.png differ
diff --git a/res/screen-density-xhigh/P01_month view_expanded_down.png b/res/screen-density-xhigh/P01_month view_expanded_down.png
new file mode 100644 (file)
index 0000000..e57c998
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_expanded_down.png differ
diff --git a/res/screen-density-xhigh/P01_month view_expanded_down_press.png b/res/screen-density-xhigh/P01_month view_expanded_down_press.png
new file mode 100644 (file)
index 0000000..fd2647d
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_expanded_down_press.png differ
diff --git a/res/screen-density-xhigh/P01_month view_expanded_up.png b/res/screen-density-xhigh/P01_month view_expanded_up.png
new file mode 100644 (file)
index 0000000..c5e15f0
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_expanded_up.png differ
diff --git a/res/screen-density-xhigh/P01_month view_expanded_up_press.png b/res/screen-density-xhigh/P01_month view_expanded_up_press.png
new file mode 100644 (file)
index 0000000..3bda595
Binary files /dev/null and b/res/screen-density-xhigh/P01_month view_expanded_up_press.png differ
diff --git a/res/screen-density-xhigh/P01_month-view_event_bubble_bg_today.png b/res/screen-density-xhigh/P01_month-view_event_bubble_bg_today.png
new file mode 100644 (file)
index 0000000..e0caa92
Binary files /dev/null and b/res/screen-density-xhigh/P01_month-view_event_bubble_bg_today.png differ
index d3bb0a8..3829dd7 100644 (file)
Binary files a/res/screen-density-xhigh/P01_year_day_focus.png and b/res/screen-density-xhigh/P01_year_day_focus.png differ
index 040b8c6..aef47d6 100644 (file)
Binary files a/res/screen-density-xhigh/P01_year_month_focus.png and b/res/screen-density-xhigh/P01_year_month_focus.png differ
diff --git a/res/screen-size-normal/IDL_CALENDAR_SELECTOR_POPUP.xml b/res/screen-size-normal/IDL_CALENDAR_SELECTOR_POPUP.xml
new file mode 100644 (file)
index 0000000..c808891
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+
+<ScenePopup Bversion="2.0.0.201303041025" Dversion="20120315">
+    <Popup id="IDL_CALENDAR_SELECTOR_POPUP">
+        <property color="" titleText="::IDS_ST_BODY_SAVE_TO" titleTextColor=""/>
+        <layout height="630" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="688"/>
+        <layout height="630" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="648"/>
+    </Popup>
+    <Button id="IDC_BUTTON_CANCEL" parent="IDL_CALENDAR_SELECTOR_POPUP">
+        <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0" highlightedBitmapY="0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_CLD_SK_CANCEL" textSize="36" verticalAlign="ALIGN_MIDDLE"/>
+        <layout bottomRelation="IDL_CALENDAR_SELECTOR_POPUP" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="74" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="396" x="126" y="456"/>
+        <layout bottomRelation="IDL_CALENDAR_SELECTOR_POPUP" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="74" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="395" x="142" y="216"/>
+    </Button>
+    <ListView id="IDC_LISTVIEW" parent="IDL_CALENDAR_SELECTOR_POPUP">
+        <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" fastScroll="false" itemDivider="true" itemDividerColor="" sweepEnabled="false" textOfEmptyList=""/>
+        <layout bottomRelation="IDC_BUTTON_CANCEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="516" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="" leftRelationType="" marginBottom="20" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_CALENDAR_SELECTOR_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="648" x="0" y="-80"/>
+        <layout bottomRelation="IDL_CALENDAR_SELECTOR_POPUP" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="276" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="IDL_CALENDAR_SELECTOR_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="114" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_CALENDAR_SELECTOR_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALENDAR_SELECTOR_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="680" x="0" y="0"/>
+    </ListView>
+</ScenePopup>
index 6de8635..caccc6c 100644 (file)
@@ -18,9 +18,9 @@
         <property backgroundBitmapPath="" color="#F8F6EF" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" titleIconPath="" titleText="::IDS_CLD_BODY_REMINDER" titleTextColor=""/>
         <itemSet/>
     </Header>
-    <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_REMINDER_FORM">
-        <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="true" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
-        <layout bottomRelation="IDL_REMINDER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1022" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REMINDER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_REMINDER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REMINDER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
-        <layout bottomRelation="IDL_REMINDER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1022" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REMINDER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_REMINDER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REMINDER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
-    </GroupedTableView>
+    <SectionTableView id="IDC_SECTIONTABLEVIEW" parent="IDL_REMINDER_FORM">
+        <property backgroundColor="" backgroundColorOpacity="0" fastScrollIndex="" groupedLookEnabled="true" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sectionColor="" useSearchIcon="false"/>
+        <layout bottomRelation="IDL_REMINDER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1011" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REMINDER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_REMINDER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REMINDER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+        <layout bottomRelation="IDL_REMINDER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="484" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REMINDER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_REMINDER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REMINDER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+    </SectionTableView>
 </Scene>
index 797d584..3f94923 100644 (file)
@@ -18,9 +18,9 @@
         <property backgroundBitmapPath="" color="#F8F6EF" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" titleIconPath="" titleText="::IDS_CLD_BODY_REPEAT" titleTextColor=""/>
         <itemSet/>
     </Header>
-    <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_REPEAT_FORM">
-        <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="true" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
-        <layout bottomRelation="IDL_REPEAT_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1022" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REPEAT_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_REPEAT_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REPEAT_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
-        <layout bottomRelation="IDL_REPEAT_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1022" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REPEAT_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_REPEAT_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REPEAT_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
-    </GroupedTableView>
+    <SectionTableView id="IDC_SECTIONTABLEVIEW" parent="IDL_REPEAT_FORM">
+        <property backgroundColor="" backgroundColorOpacity="0" fastScrollIndex="" groupedLookEnabled="true" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sectionColor="" useSearchIcon="false"/>
+        <layout bottomRelation="IDL_REPEAT_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1011" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REPEAT_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_REPEAT_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REPEAT_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+        <layout bottomRelation="IDL_REPEAT_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="484" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_REPEAT_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_REPEAT_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_REPEAT_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+    </SectionTableView>
 </Scene>
index e426fd3..17a8415 100644 (file)
@@ -18,9 +18,9 @@
         <property backgroundBitmapPath="" color="#F8F6EF" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" titleIconPath="" titleText="::IDS_CLD_BODY_CALENDAR" titleTextColor=""/>
         <itemSet/>
     </Header>
-    <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTING_FORM">
-        <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="true" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
-        <layout bottomRelation="IDL_SETTING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1022" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_SETTING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
-        <layout bottomRelation="IDL_SETTING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1022" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_SETTING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
-    </GroupedTableView>
+    <SectionTableView id="IDC_SECTIONTABLEVIEW" parent="IDL_SETTING_FORM">
+        <property backgroundColor="" backgroundColorOpacity="0" fastScrollIndex="" groupedLookEnabled="true" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sectionColor="" useSearchIcon="false"/>
+        <layout bottomRelation="IDL_SETTING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1011" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_SETTING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+        <layout bottomRelation="IDL_SETTING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="484" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="IDL_SETTING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+    </SectionTableView>
 </Scene>
index 0cd322e..b6d210d 100644 (file)
@@ -218,6 +218,7 @@ void
 CalendarApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId, const String* pUriData,
                                                                                        const String* pMimeType, const IMap* pExtraData)
 {
+       AppLogDebug("%ls", operationId.GetPointer());
        if (pMimeType != null)
        {
                __mimeType = *pMimeType;
@@ -303,6 +304,12 @@ CalendarApp::OnAppControlRequestReceived(RequestId reqId, const String& operatio
                        }
                }
        }
+       else if (operationId == ID_OPERATION_ADD)
+       {
+               __initialScene = IDSCN_EVENT_EDITOR;
+               __type = OPERATION_TYPE_APPCONTROL;
+               requestFailed = false;
+       }
        else if (operationId == ID_OPERATION_CONFIG)
        {
                __initialScene = IDSCN_SETTING;
diff --git a/src/ClCalendarSelectorPopup.cpp b/src/ClCalendarSelectorPopup.cpp
new file mode 100644 (file)
index 0000000..85a7654
--- /dev/null
@@ -0,0 +1,240 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.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://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       ClCalendarSelectorPopup.cpp
+ * @brief      This is the implementation file for the CalendarSelectorPopup class.
+ */
+
+#include <new>
+#include <FGraphics.h>
+#include <FSocial.h>
+#include "ClCalendarSelectorPopup.h"
+#include "ClResourceManager.h"
+#include "ClTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+enum CalendarItemElementId
+{
+       CALENDAR_ITEM_ELEMENT_ID_ICON,
+       CALENDAR_ITEM_ELEMENT_ID_NAME,
+       CALENDAR_ITEM_ELEMENT_ID_ADDRESS
+};
+
+static const int IDA_CALENDAR_SELECTOR_POPUP_CANCEL = 20902;
+
+static const RecordId ID_DEFAULT_BIRTHDAY_CALENDAR = 3;
+
+static const int H_ITEM = 140;
+static const int X_CALENDAR_ICON = 16;
+static const int Y_CALENDAR_ICON = 38;
+static const int W_CALENDAR_ICON = 64;
+static const int W_CALENDAR_ICON_MARGIN = 16;
+static const int H_CALENDAR_ICON = 64;
+static const int Y_CALENDAR_NAME = 22;
+static const int H_CALENDAR_NAME = 42;
+static const int Y_CALENDAR_ADDRESS = 64;
+static const int H_CALENDAR_ADDRESS = 54;
+static const int FONT_SIZE_DETAIL02 = 44;
+static const unsigned int COLOR_DETAIL02 = Color32<0, 0, 0>::Value;
+static const unsigned int COLOR_DETAIL02_FOCUS = Color32<255, 255, 255>::Value;
+static const int FONT_SIZE_DETAIL03 = 32;
+static const unsigned int COLOR_DETAIL03 = Color32<128, 128, 128>::Value;
+static const unsigned int COLOR_DETAIL03_FOCUS = Color32<255, 255, 255>::Value;
+
+CalendarSelectorPopup::CalendarSelectorPopup(void)
+       : __pCalendars(null)
+       , __pListView(null)
+       , __pTarget(null)
+{
+
+}
+
+CalendarSelectorPopup::~CalendarSelectorPopup(void)
+{
+       if (__pCalendars != null)
+       {
+               __pCalendars->RemoveAll(true);
+               delete __pCalendars;
+       }
+}
+
+result
+CalendarSelectorPopup::Initialize(void)
+{
+       return Construct(L"IDL_CALENDAR_SELECTOR_POPUP");
+}
+
+void
+CalendarSelectorPopup::RequestCalendar(Control* pTarget)
+{
+       if (__pCalendars != null)
+       {
+               __pCalendars->RemoveAll(true);
+               delete __pCalendars;
+       }
+
+       Calendarbook calendarbook;
+       calendarbook.Construct();
+
+       CalendarbookFilter filter(CB_FI_TYPE_CALENDAR);
+       filter.AppendInt(FI_CONJ_OP_NONE, CALENDAR_FI_PR_ITEM_TYPE, FI_CMP_OP_EQUAL, CALENDAR_ITEM_TYPE_EVENT_ONLY);
+
+       __pCalendars = calendarbook.SearchN(filter);
+       TryReturnVoid(__pCalendars != null, "[E_FAILURE] Unable to get calendar list.");
+
+       IEnumerator* pEnum = __pCalendars->GetEnumeratorN();
+       int index = 0;
+       while (pEnum->MoveNext() == E_SUCCESS)
+       {
+               if (static_cast<Calendar*>(pEnum->GetCurrent())->GetRecordId() == ID_DEFAULT_BIRTHDAY_CALENDAR)
+               {
+                       __pCalendars->RemoveAt(index, true);
+                       break;
+               }
+               ++index;
+       }
+       delete pEnum;
+
+       __pTarget = pTarget;
+       SetShowState(true);
+       Show();
+}
+
+result
+CalendarSelectorPopup::OnInitializing(void)
+{
+       __pListView = dynamic_cast<ListView*>(GetControl(L"IDC_LISTVIEW"));
+       AppAssertf(__pListView != null, "[E_FAILURE] Unable to get listview.");
+       __pListView->SetItemProvider(*this);
+       __pListView->AddListViewItemEventListener(*this);
+       // TBD : Below code will be deleted.(Tizen SDK 2.0 has a defect on first drawing.)
+       __pListView->UpdateList();
+
+       Button* pButtonCancel = dynamic_cast<Button*>(GetControl(L"IDC_BUTTON_CANCEL"));
+       AppAssertf(pButtonCancel != null, "[E_FAILURE] Unable to get button.");
+       pButtonCancel->SetActionId(IDA_CALENDAR_SELECTOR_POPUP_CANCEL);
+       pButtonCancel->AddActionEventListener(*this);
+
+       return E_SUCCESS;
+}
+
+result
+CalendarSelectorPopup::OnTerminating(void)
+{
+       return E_SUCCESS;
+}
+
+void
+CalendarSelectorPopup::OnActionPerformed(const Control& source, int actionId)
+{
+       SetShowState(false);
+}
+
+int
+CalendarSelectorPopup::GetItemCount(void)
+{
+       return __pCalendars->GetCount();
+}
+
+ListItemBase*
+CalendarSelectorPopup::CreateItem(int index, int itemWidth)
+{
+       CustomItem* pItem = new (std::nothrow) CustomItem();
+       pItem->Construct(Dimension(itemWidth, H_ITEM), LIST_ANNEX_STYLE_NORMAL);
+
+       Calendar* pCalendar = static_cast<Calendar*>(__pCalendars->GetAt(index));
+       Bitmap* pBitmapIcon = null;
+       String accountName;
+       if (pCalendar->GetAccountId() != INVALID_ACCOUNT_ID)
+       {
+               Account account = AccountAccessor::GetInstance()->GetAccount(pCalendar->GetAccountId());
+               pBitmapIcon = ResourceManager::GetBitmapN(account.GetAccountProvider().GetIconPath());
+               accountName = account.GetUserName();
+       }
+       else
+       {
+               pBitmapIcon = ResourceManager::GetBitmapN(IDB_ICON_PHONE_CALENDAR);
+               accountName = L"Phone";
+       }
+
+       int x = 0;
+       if (pBitmapIcon != null)
+       {
+               pItem->AddElement(Rectangle(X_CALENDAR_ICON, Y_CALENDAR_ICON, W_CALENDAR_ICON, H_CALENDAR_ICON),
+                                               CALENDAR_ITEM_ELEMENT_ID_ICON, *pBitmapIcon);
+               delete pBitmapIcon;
+               x += X_CALENDAR_ICON + W_CALENDAR_ICON + W_CALENDAR_ICON_MARGIN;
+       }
+
+       pItem->AddElement(Rectangle(x, Y_CALENDAR_NAME, itemWidth - x, H_CALENDAR_NAME),
+                                       CALENDAR_ITEM_ELEMENT_ID_NAME, accountName, FONT_SIZE_DETAIL03,
+                                       Color(COLOR_DETAIL03), Color(COLOR_DETAIL03_FOCUS), Color(COLOR_DETAIL03_FOCUS));
+
+       pItem->AddElement(Rectangle(x, Y_CALENDAR_ADDRESS, itemWidth - x, H_CALENDAR_ADDRESS),
+                                       CALENDAR_ITEM_ELEMENT_ID_ADDRESS, pCalendar->GetName(), FONT_SIZE_DETAIL02,
+                                       Color(COLOR_DETAIL02), Color(COLOR_DETAIL02_FOCUS), Color(COLOR_DETAIL02_FOCUS));
+
+       return pItem;
+}
+
+bool
+CalendarSelectorPopup::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+       delete pItem;
+       return true;
+}
+
+void
+CalendarSelectorPopup::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+       if (status == LIST_ITEM_STATUS_SELECTED)
+       {
+               if (__pTarget != null)
+               {
+                       LinkedList* pArgs = new (std::nothrow) LinkedList();
+                       pArgs->Add(new (std::nothrow) Integer(static_cast<Calendar*>(__pCalendars->GetAt(index))->GetRecordId()));
+                       __pTarget->SendUserEvent(IDA_CALENDAR_SELECTOR_POPUP_DONE, pArgs);
+               }
+               SetShowState(false);
+       }
+}
+
+void
+CalendarSelectorPopup::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
+{
+}
+
+void
+CalendarSelectorPopup::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId, ListContextItemStatus status)
+{
+}
+
+void
+CalendarSelectorPopup::OnListViewItemLongPressed(ListView& listView, int index, int elementId, bool& invokeListViewItemCallback)
+{
+}
+
+void
+CalendarSelectorPopup::OnListViewItemReordered(ListView& listView, int indexFrom, int indexTo)
+{
+}
index db0fa1b..0838580 100644 (file)
@@ -142,6 +142,7 @@ DayEventListForm::CreateItem(int index, int itemWidth)
        }
        pItem->SetReminder(pEvent->HasReminder());
        pItem->SetRepeat(pEvent->IsRecurring());
+       pItem->SetPriority(pEvent->GetPriority());
 //     pItem->SetFacebookEvent(false);
        pItem->UpdateElements();
        return pItem;
index fe4ca96..c9446d1 100644 (file)
@@ -47,7 +47,7 @@ static const int IDA_DAY_PANEL_EVENT_MORE = 11422;
 
 static const int MIN_H_ALL_DAY_EVENT_LIST_PANEL = 80;
 static const int MAX_H_ALL_DAY_EVENT_LIST_PANEL = 400;
-static const unsigned int COLOR_ALL_DAY_EVENT_LIST_PANEL_BACKGROUND = Color32<230, 229, 222>::Value;
+static const unsigned int COLOR_ALL_DAY_EVENT_LIST_PANEL_BACKGROUND = Color32<242, 237, 226>::Value;
 static const int Y_ALL_DAY_EVENT_LIST = 80;
 static const unsigned int COLOR_ALL_DAY_EVENT_LIST_LINE = Color32<169, 169, 169>::Value;
 static const int H_ALL_DAY_EVENT_ITEM = 80;
@@ -61,7 +61,7 @@ static const int H_EVENT_COLOR_BAR = 72;
 static const int W_ALL_DAY_EVENT_EXPAND_ICON_MARGIN = 16;
 static const int H_ALL_DAY_EVENT_EXPAND = 80;
 static const int FONT_SIZE_ALL_DAY_EVENT_EXPAND = 34;
-static const int H_EVENT_MIN = 48;
+static const int H_EVENT_MIN = 39;
 static const int H_EVENT_LIST_ITEM = 80;
 static const int Y_EVENT_LIST_WITH_ALL_DAY_EVENTS = 80;
 static const int X_CURRENT_TIME_ARROW = 33;
@@ -80,14 +80,10 @@ static const int H_TIME_LINE_NUMBER = 24;
 static const int FONT_SIZE_TIME_LINE_NUMBER = 24;
 static const unsigned int COLOR_TIME_LINE_NUMBER = Color32<171, 171, 171>::Value;
 static const unsigned int COLOR_EVENT_PANEL_BACKGROUND = Color32<0, 0, 0, 0>::Value;
-static const unsigned int COLOR_EVENT_PANEL_DIVIDER_LINE = Color32<173, 173, 173>::Value;
-static const int Y_EVENT_PANEL_DIVIDER_LINE_MIDDLE = 39;
-static const int H_EVENT_PANEL_DIVIDER_LINE_MIDDLE = 1;
-static const unsigned int COLOR_EVENT_PANEL_DIVIDER_LINE_MIDDLE = Color32<173, 173, 173, 77>::Value;
 static const int H_1_LINE_EVENT_TEXT = 80;
 static const int FONT_SIZE_EVENT = 24;
-static const unsigned int COLOR_EVENT = Color32<0, 0, 0>::Value;
-static const int H_EVENT_MORE_BUTTON_MIN = 80;
+static const unsigned int COLOR_EVENT = Color32<255, 255, 255>::Value;
+static const int H_EVENT_MORE_BUTTON_MIN = 79;
 static const unsigned int COLOR_EVENT_MORE_BACKGROUND = Color32<59, 151, 207>::Value;
 
 static const int MAX_COLUMN_COUNT = 8;
@@ -205,7 +201,7 @@ DayEventButton::Initialize(int x, int width, const CalEventInstance& event, cons
                endPosition = TIME_LINE_COUNT * H_EVENT_LIST_ITEM;
        }
 
-       int height = endPosition - startPosition;
+       int height = endPosition - startPosition - 1;
        if (height < H_EVENT_MIN)
        {
                height = H_EVENT_MIN;
@@ -220,15 +216,12 @@ DayEventButton::Initialize(int x, int width, const CalEventInstance& event, cons
                                __pEvent->GetSubject() + ((endPosition - startPosition) >= H_1_LINE_EVENT_TEXT ? L"\n" : L", ") + __pEvent->GetLocation());
        }
 
-       Color bgColor = calendarColor;
-       bgColor.SetAlpha(128);
-       SetColor(BUTTON_STATUS_NORMAL, bgColor);
+       SetColor(BUTTON_STATUS_NORMAL, calendarColor);
        SetColor(BUTTON_STATUS_PRESSED, calendarColor);
        SetColor(BUTTON_STATUS_HIGHLIGHTED, calendarColor);
 
        SetTextSize(FONT_SIZE_EVENT);
        Color textColor(COLOR_EVENT);
-       textColor.SetAlpha(128);
        SetTextColor(textColor);
        SetPressedTextColor(textColor);
        SetHighlightedTextColor(textColor);
@@ -339,7 +332,7 @@ DayEventMoreButton::AddEvent(CalEventInstance& event)
                endPosition = TIME_LINE_COUNT * H_EVENT_LIST_ITEM;
        }
 
-       int height = endPosition - startPosition;
+       int height = endPosition - startPosition - 1;
        if (height < H_EVENT_MORE_BUTTON_MIN)
        {
                height = H_EVENT_MORE_BUTTON_MIN;
@@ -412,6 +405,7 @@ class DayEventPanel
        , public virtual IActionEventListener
        , public virtual IListViewItemEventListener
        , public virtual IListViewItemProvider
+       , public virtual IScrollEventListener
 {
 public:
        const DateTime& GetDate(void) const;
@@ -420,11 +414,10 @@ public:
        void SetDate(const DateTime& date);
        void SetDateFocusEventListener(IDateFocusEventListener& listener);
        void SetEventActionEventListener(IEventActionEventListener& listener);
+       void SetScrollEventListener(IScrollEventListener& listener);
        void SetScrollPosition(int scrollPosition);
        void UpdateEvent(void);
 
-       void SetPanningAnimationManager(PanningAnimationManager& manager);
-
        DayEventPanel(void);
        virtual ~DayEventPanel(void);
 
@@ -444,6 +437,9 @@ public:
 
        virtual void OnActionPerformed(const Control& source, int actionId);
 
+       virtual void OnScrollEndReached(Control& source, ScrollEndEvent type);
+       virtual void OnScrollPositionChanged(Control& source, int scrollPos);
+
 private:
        void ArrangeEvent(void);
        result InitializeAllDayEventList(void);
@@ -457,7 +453,7 @@ private:
        const EventListPresentationModel* __pPm;
        IDateFocusEventListener* __pDateFocusEventListener;
        IEventActionEventListener* __pEventActionEventListener;
-       PanningAnimationManager* __pPanningAnimationManager;
+       IScrollEventListener* __pScrollEventListener;
        Panel* __pPanelAllDayEvents;
        ListView* __pListViewAllDayEvents;
        Button* __pButtonAllDayEventsPanelExpander;
@@ -476,7 +472,7 @@ DayEventPanel::DayEventPanel(void)
        : __pPm(null)
        , __pDateFocusEventListener(null)
        , __pEventActionEventListener(null)
-       , __pPanningAnimationManager(null)
+       , __pScrollEventListener(null)
        , __pPanelAllDayEvents(null)
        , __pListViewAllDayEvents(null)
        , __pButtonAllDayEventsPanelExpander(null)
@@ -492,31 +488,6 @@ DayEventPanel::DayEventPanel(void)
 
 DayEventPanel::~DayEventPanel(void)
 {
-       if (__pPanningAnimationManager != null)
-       {
-               RemoveTouchEventListener(*__pPanningAnimationManager);
-               __pPanelAllDayEvents->RemoveTouchEventListener(*__pPanningAnimationManager);
-               __pListViewAllDayEvents->RemoveTouchEventListener(*__pPanningAnimationManager);
-               __pButtonAllDayEventsPanelExpander->RemoveTouchEventListener(*__pPanningAnimationManager);
-               __pPanelDayEvents->RemoveTouchEventListener(*__pPanningAnimationManager);
-               __pListViewTimeLine->RemoveTouchEventListener(*__pPanningAnimationManager);
-
-               RemoveGestureDetector(*__pPanningAnimationManager);
-               __pPanelAllDayEvents->RemoveGestureDetector(*__pPanningAnimationManager);
-               __pListViewAllDayEvents->RemoveGestureDetector(*__pPanningAnimationManager);
-               __pButtonAllDayEventsPanelExpander->RemoveGestureDetector(*__pPanningAnimationManager);
-               __pPanelDayEvents->RemoveGestureDetector(*__pPanningAnimationManager);
-               __pListViewTimeLine->RemoveGestureDetector(*__pPanningAnimationManager);
-
-               IEnumerator* pEnum = __eventButtons.GetEnumeratorN();
-               while (pEnum->MoveNext() == E_SUCCESS)
-               {
-                       Control* pControl = static_cast<Control*>(pEnum->GetCurrent());
-                       pControl->RemoveTouchEventListener(*__pPanningAnimationManager);
-                       pControl->RemoveGestureDetector(*__pPanningAnimationManager);
-               }
-               delete pEnum;
-       }
 }
 
 const DateTime&
@@ -571,6 +542,12 @@ DayEventPanel::SetEventActionEventListener(IEventActionEventListener& listener)
 }
 
 void
+DayEventPanel::SetScrollEventListener(IScrollEventListener& listener)
+{
+       __pScrollEventListener = &listener;
+}
+
+void
 DayEventPanel::SetScrollPosition(int scrollPosition)
 {
        __pPanelDayEvents->SetScrollPosition(scrollPosition);
@@ -602,35 +579,6 @@ DayEventPanel::UpdateEvent(void)
 }
 
 void
-DayEventPanel::SetPanningAnimationManager(PanningAnimationManager& manager)
-{
-       __pPanningAnimationManager = &manager;
-
-       AddTouchEventListener(manager);
-       __pPanelAllDayEvents->AddTouchEventListener(manager);
-       __pListViewAllDayEvents->AddTouchEventListener(manager);
-       __pButtonAllDayEventsPanelExpander->AddTouchEventListener(manager);
-       __pPanelDayEvents->AddTouchEventListener(manager);
-       __pListViewTimeLine->AddTouchEventListener(manager);
-
-       AddGestureDetector(manager);
-       __pPanelAllDayEvents->AddGestureDetector(manager);
-       __pListViewAllDayEvents->AddGestureDetector(manager);
-       __pButtonAllDayEventsPanelExpander->AddGestureDetector(manager);
-       __pPanelDayEvents->AddGestureDetector(manager);
-       __pListViewTimeLine->AddGestureDetector(manager);
-
-       IEnumerator* pEnum = __eventButtons.GetEnumeratorN();
-       while (pEnum->MoveNext() == E_SUCCESS)
-       {
-               Control* pControl = static_cast<Control*>(pEnum->GetCurrent());
-               pControl->AddTouchEventListener(manager);
-               pControl->AddGestureDetector(manager);
-       }
-       delete pEnum;
-}
-
-void
 DayEventPanel::OnClearBackground(void)
 {
        bool is24HourNotationEnabled = false;
@@ -667,6 +615,8 @@ DayEventPanel::OnInitializing(void)
        __pPanelDayEvents = new (std::nothrow) ScrollPanel();
        __pPanelDayEvents->Construct(Rectangle(0, 0, GetWidth(), GetHeight()));
        AddControl(*__pPanelDayEvents);
+       __pPanelDayEvents->SetScrollInputMode(SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION);
+       __pPanelDayEvents->AddScrollEventListener(*this);
 
        InitializeTimeLine();
 
@@ -788,15 +738,24 @@ DayEventPanel::OnActionPerformed(const Control& source, int actionId)
 }
 
 void
+DayEventPanel::OnScrollEndReached(Control& source, ScrollEndEvent type)
+{
+}
+
+void
+DayEventPanel::OnScrollPositionChanged(Control& source, int scrollPos)
+{
+       if (__pScrollEventListener != null)
+       {
+               __pScrollEventListener->OnScrollPositionChanged(*this, scrollPos);
+       }
+}
+
+void
 DayEventPanel::ArrangeEvent(void)
 {
        while (__eventButtons.GetCount() > 0)
        {
-               if (__pPanningAnimationManager != null)
-               {
-                       static_cast<Control*>(__eventButtons.GetAt(0))->RemoveTouchEventListener(*__pPanningAnimationManager);
-                       static_cast<Control*>(__eventButtons.GetAt(0))->RemoveGestureDetector(*__pPanningAnimationManager);
-               }
                __pPanelDayEvents->RemoveControl(*static_cast<Control*>(__eventButtons.GetAt(0)));
                __eventButtons.RemoveAt(0);
        }
@@ -897,11 +856,6 @@ DayEventPanel::ArrangeEvent(void)
                        {
                                pButton->SetEventActionEventListener(*__pEventActionEventListener);
                        }
-                       if (__pPanningAnimationManager != null)
-                       {
-                               pButton->AddTouchEventListener(*__pPanningAnimationManager);
-                               pButton->AddGestureDetector(*__pPanningAnimationManager);
-                       }
                }
 
                if (col + 1 < maxEventColumns)
@@ -927,11 +881,6 @@ DayEventPanel::ArrangeEvent(void)
                }
                __pPanelDayEvents->AddControl(*pButton);
                __eventButtons.Add(pButton);
-               if (__pPanningAnimationManager != null)
-               {
-                       pButton->AddTouchEventListener(*__pPanningAnimationManager);
-                       pButton->AddGestureDetector(*__pPanningAnimationManager);
-               }
        }
 
        for (int col = 0; col < maxColumns; ++col)
@@ -1170,15 +1119,16 @@ DayPanel::OnInitializing(void)
 
        // Create panning animation manager
        __pPanningAnimationManager = new (std::nothrow) PanningAnimationManager();
-       __pPanningAnimationManager->Initialize(*this);
-       __pPanningAnimationManager->SetControlAnimatorEventListener(*this);
+       __pPanningAnimationManager->Initialize(bounds, *this);
+       __pPanningAnimationManager->SetPanningAnimationEventListener(*this);
+       AddControl(*__pPanningAnimationManager);
 
        DayEventPanel* pPanel = new (std::nothrow) DayEventPanel();
        pPanel->Initialize(bounds, __pPm->GetCurrentDate(), *__pPm);
        pPanel->SetEventActionEventListener(*this);
-       AddControl(*pPanel);
+       __pPanningAnimationManager->AddView(*pPanel, VIEW_SCROLL_EFFECT_CURRENT);
        pPanel->SetDateFocusEventListener(*this);
-       pPanel->SetPanningAnimationManager(*__pPanningAnimationManager);
+       pPanel->SetScrollEventListener(*this);
        __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT] = pPanel;
 
        return E_SUCCESS;
@@ -1187,16 +1137,8 @@ DayPanel::OnInitializing(void)
 result
 DayPanel::OnTerminating(void)
 {
-       RemoveControl(*__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT]);
-       if (__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] != null)
-       {
-               RemoveControl(*__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT]);
-       }
-       if (__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] != null)
-       {
-               RemoveControl(*__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW]);
-       }
-       delete __pPanningAnimationManager;
+       __pPm->RemoveCalendarEventChangedEventListener(*this);
+       __pPm->RemoveCurrentDateChangedEventListener(*this);
        return E_SUCCESS;
 }
 
@@ -1208,7 +1150,7 @@ DayPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
        case IDA_MAIN_FORM_HEADER_TODAY:
                __pPm->SetTodayToCurrentDate();
                break;
-       case IDA_MAIN_FORM_HEADER_GO_TO_DATE:
+       case IDA_SUB_MENU_GO_TO_DATE:
                GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
                break;
        case IDA_MAIN_FORM_FOOTER_CREATE:
@@ -1231,6 +1173,10 @@ DayPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_CALENDAR_LIST,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
                break;
+       case IDA_SUB_MENU_SETTING:
+               SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_SETTING,
+                                                                                                                                         SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+               break;
        case IDA_VIEW_MENU_YEAR:
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_YEAR,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
@@ -1264,66 +1210,26 @@ DayPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
 }
 
 void
-DayPanel::OnControlAnimationStarted(ControlAnimator& source, Control& control)
+DayPanel::OnScrollEndReached(Control& source, ScrollEndEvent type)
 {
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_PREVIEW)
-       {
-               DayEventPanel* pPanel = static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT]);
-               pPanel->SetPosition(-GetWidth(), pPanel->GetY());
-
-               DateTime date = __pPm->GetCurrentDate();
-               date.AddDays(-2);
-               pPanel->SetDate(date);
-               pPanel->RequestRedraw(false);
-       }
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_NEXT)
-       {
-               DayEventPanel* pPanel = static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW]);
-               pPanel->SetPosition(GetWidth(), pPanel->GetY());
-
-               DateTime date = __pPm->GetCurrentDate();
-               date.AddDays(2);
-               pPanel->SetDate(date);
-               pPanel->RequestRedraw(false);
-       }
-
-       static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW])->SetScrollPosition(
-                       static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT])->GetScrollPosition());
-       static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT])->SetScrollPosition(
-                       static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT])->GetScrollPosition());
 }
 
 void
-DayPanel::OnControlAnimationFinished(ControlAnimator& source, Control& control)
+DayPanel::OnScrollPositionChanged(Control& source, int scrollPos)
 {
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_PREVIEW)
+       for (int i = VIEW_SCROLL_EFFECT_CURRENT; i < VIEW_SCROLL_EFFECT_COUNT; ++i)
        {
-               Panel* pPanel = __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT];
-               __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT];
-               __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW];
-               __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] = pPanel;
-
-               __pPm->AddCurrentDay(-1);
-       }
-       else if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_NEXT)
-       {
-               Panel* pPanel = __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW];
-               __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT];
-               __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT];
-               __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] = pPanel;
-
-               __pPm->AddCurrentDay(1);
+               if (&source != __pPanelDayEvent[i] && __pPanelDayEvent[i] != null)
+               {
+                       static_cast<DayEventPanel*>(__pPanelDayEvent[i])->SetScrollPosition(scrollPos);
+               }
        }
 }
 
 void
-DayPanel::OnControlAnimationStopped(ControlAnimator& source, Control& control)
-{
-}
-
-void
 DayPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
@@ -1345,51 +1251,69 @@ DayPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& curre
                {
                case VIEW_SCROLL_EFFECT_NEXT:
                        date.AddDays(1);
-                       pPanel->Initialize(Rectangle(GetWidth(), 0, GetWidth(), GetHeight()), date, *__pPm);
+                       if (date > Calendarbook::GetMaxDateTime())
+                       {
+                               DateTime minDate = Calendarbook::GetMinDateTime();
+                               date.SetValue(minDate.GetYear(), minDate.GetMonth(), minDate.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->Initialize(Rectangle(0, 0, GetWidth(), GetHeight()), date, *__pPm);
                        break;
                case VIEW_SCROLL_EFFECT_PREVIEW:
                        date.AddDays(-1);
-                       pPanel->Initialize(Rectangle(-GetWidth(), 0, GetWidth(), GetHeight()), date, *__pPm);
+                       if (date < Calendarbook::GetMinDateTime())
+                       {
+                               DateTime maxDate = Calendarbook::GetMaxDateTime();
+                               date.SetValue(maxDate.GetYear(), maxDate.GetMonth(), maxDate.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->Initialize(Rectangle(0, 0, GetWidth(), GetHeight()), date, *__pPm);
                        break;
                }
                pPanel->SetEventActionEventListener(*this);
-               AddControl(*pPanel);
+               __pPanningAnimationManager->AddView(*pPanel, (ViewScrollEffect)i);
                pPanel->SetDateFocusEventListener(*this);
-               pPanel->SetPanningAnimationManager(*__pPanningAnimationManager);
+               pPanel->SetScrollEventListener(*this);
                __pPanelDayEvent[i] = pPanel;
        }
 
+       __pPanningAnimationManager->ResetPosition();
        Update(true);
 
        __pPm->AddCalendarEventChangedEventListener(*this);
        __pPm->AddCurrentDateChangedEventListener(*this);
+       AppLogDebug("Exit.");
 }
 
 void
 DayPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
        __pPm->RemoveCalendarEventChangedEventListener(*this);
        __pPm->RemoveCurrentDateChangedEventListener(*this);
 
-       RemoveControl(*__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT]);
+       __pPanningAnimationManager->RemoveView(VIEW_SCROLL_EFFECT_NEXT);
        __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] = null;
-       RemoveControl(*__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW]);
+       __pPanningAnimationManager->RemoveView(VIEW_SCROLL_EFFECT_PREVIEW);
        __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] = null;
+       AppLogDebug("Exit.");
 }
 
 void
 DayPanel::OnCalendarEventChanged(void)
 {
+       AppLogDebug("Enter.");
        static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT])->UpdateEvent();
        static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT])->UpdateEvent();
        static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW])->UpdateEvent();
+       AppLogDebug("Exit.");
 }
 
 void
 DayPanel::OnCurrentDateChanged(const DateTime& currentDate, const DateTime& prevDate)
 {
+       AppLogDebug("Enter.");
        DateTime currentCalendarDate = static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT])->GetDate();
        Update(!EventListPresentationModel::IsSameDay(currentDate, currentCalendarDate));
+       AppLogDebug("Exit.");
 }
 
 void
@@ -1444,6 +1368,49 @@ DayPanel::GetPreviewControl(void)
 }
 
 void
+DayPanel::OnPanningAnimationEnded(ViewScrollEffect direction)
+{
+       if (__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] != null && __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] != null)
+       {
+               if (direction == VIEW_SCROLL_EFFECT_PREVIEW)
+               {
+                       DayEventPanel* pPanel = static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT]);
+                       DateTime date = __pPm->GetCurrentDate();
+                       date.AddDays(-2);
+                       if (date < Calendarbook::GetMinDateTime())
+                       {
+                               DateTime maxDate = Calendarbook::GetMaxDateTime();
+                               date.SetValue(maxDate.GetYear(), maxDate.GetMonth(), maxDate.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->SetDate(date);
+                       pPanel->RequestRedraw(false);
+
+                       __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT];
+                       __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW];
+                       __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] = pPanel;
+               }
+               else if (direction == VIEW_SCROLL_EFFECT_NEXT)
+               {
+                       DayEventPanel* pPanel = static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW]);
+                       DateTime date = __pPm->GetCurrentDate();
+                       date.AddDays(2);
+                       if (date > Calendarbook::GetMaxDateTime())
+                       {
+                               DateTime minDate = Calendarbook::GetMinDateTime();
+                               date.SetValue(minDate.GetYear(), minDate.GetMonth(), minDate.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->SetDate(date);
+                       pPanel->RequestRedraw(false);
+
+                       __pPanelDayEvent[VIEW_SCROLL_EFFECT_PREVIEW] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT];
+                       __pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT];
+                       __pPanelDayEvent[VIEW_SCROLL_EFFECT_NEXT] = pPanel;
+               }
+       }
+       __pPm->SetCurrentDate(static_cast<DayEventPanel*>(__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT])->GetDate());
+}
+
+void
 DayPanel::DrawCurrentDate(void)
 {
        Form* pForm = dynamic_cast<Form*>(GetParent());
@@ -1471,6 +1438,11 @@ DayPanel::DrawEvents(void)
                date = pNextPanel->GetDate();
                DateTime nextDate = __pPm->GetCurrentDate();
                nextDate.AddDays(1);
+               if (nextDate > Calendarbook::GetMaxDateTime())
+               {
+                       DateTime minDate = Calendarbook::GetMinDateTime();
+                       nextDate.SetValue(minDate.GetYear(), minDate.GetMonth(), minDate.GetDay(), nextDate.GetHour(), nextDate.GetMinute());
+               }
                pNextPanel->SetDate(nextDate);
        }
 
@@ -1480,6 +1452,11 @@ DayPanel::DrawEvents(void)
                date = pPrevPanel->GetDate();
                DateTime prevDate = __pPm->GetCurrentDate();
                prevDate.AddDays(-1);
+               if (prevDate < Calendarbook::GetMinDateTime())
+               {
+                       DateTime maxDate = Calendarbook::GetMaxDateTime();
+                       prevDate.SetValue(maxDate.GetYear(), maxDate.GetMonth(), maxDate.GetDay(), prevDate.GetHour(), prevDate.GetMinute());
+               }
                pPrevPanel->SetDate(prevDate);
        }
 }
index c05c750..8bf4c8f 100755 (executable)
@@ -59,12 +59,14 @@ static const int H_GROUP_ITEM_MINIMUM = 0;
 static const int PREVIOUS_DATE = -1;
 static const int NEXT_DATE = 1;
 
-static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
-static const unsigned int COLOR_GROUP_ITEM_BACKGROUND = Color32<209, 227, 238>::Value;
-static const unsigned int COLOR_GROUP_ITEM_TODAY_BACKGROUND = Color32<117, 171, 204>::Value;
-static const unsigned int COLOR_GROUP_ITEM_TEXT = Color32<0, 94, 160>::Value;
+static const unsigned int COLOR_GROUP_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TODAY_BACKGROUND = Color32<239, 236, 224>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TEXT = Color32<128, 128, 128>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TODAY_TEXT = Color32<59, 115, 182>::Value;
 static const unsigned int COLOR_TOP_BOTTOM_ITEM_TEXT = Color32<42, 137, 194>::Value;
-static const unsigned int COLOR_ITEM_TEXT_PRESSED = Color32<249, 249, 249>::Value;
+static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
+static const unsigned int COLOR_ITEM_TODAY_BACKGROUND = Color32<239, 236, 224>::Value;
+static const unsigned int COLOR_ITEM_TEXT_PRESSED = Color32<255, 255, 255>::Value;
 
 EventDeleterForm::EventDeleterForm(void)
        : __pPm(null)
@@ -281,12 +283,13 @@ EventDeleterForm::CreateGroupItem(int groupIndex, int itemWidth)
        if (EventListPresentationModel::IsToday(date) == true)
        {
                pItem->SetBackgroundColor(Color(COLOR_GROUP_ITEM_TODAY_BACKGROUND));
+               pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TODAY_TEXT));
        }
        else
        {
                pItem->SetBackgroundColor(Color(COLOR_GROUP_ITEM_BACKGROUND));
+               pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TEXT));
        }
-       pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TEXT));
 
        return pItem;
 }
@@ -334,6 +337,10 @@ EventDeleterForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        EventItem* pItem = new (std::nothrow) EventItem();
        pItem->Initialize(EVENT_ITEM_STYLE_SELECTION, itemWidth);
+       if (EventListPresentationModel::IsToday(__pPm->GetDateTimeFromGroupIndex(groupIndex)) == true)
+       {
+               pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, Color(COLOR_ITEM_TODAY_BACKGROUND));
+       }
        pItem->SetTitle(pEvent->GetSubject());
        pItem->SetCalendarColor(__pPm->GetCalendarColor(pEvent->GetCalendarId()));
        if (pEvent->IsAllDayEvent() == true)
@@ -349,6 +356,7 @@ EventDeleterForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        pItem->SetReminder(pEvent->HasReminder());
        pItem->SetRepeat(pEvent->IsRecurring());
+       pItem->SetPriority(pEvent->GetPriority());
 //     pItem->SetFacebookEvent(false);
        pItem->UpdateElements();
 
@@ -419,40 +427,15 @@ EventDeleterForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, i
 
        if (__pGroupedListViewDeleteList->IsItemChecked(groupIndex, itemIndex) == true)
        {
-               bool checkedFlag = true;
-               for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
-               {
-                       if (__topBottomItemEnabled == true)
-                       {
-                               if (i == 0)
-                               {
-                                       i++;
-                               }
-                               else if (i == __pGroupedListViewDeleteList->GetGroupCount() - 1)
-                               {
-                                       break;
-                               }
-                       }
-                       for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
-                       {
-                               if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == false)
-                               {
-                                       checkedFlag = false;
-                                       break;
-                               }
-                       }
-               }
-
-               if (checkedFlag == true)
-               {
-                       __pSelectAll->SetSelected(true);
-                       Invalidate(true);
-               }
+               __pSelectAll->SetSelected(IsSelectedAllEvent());
+               __pSelectBeforeToday->SetSelected(IsSelectedAllEventBeforeToday());
        }
        else if (__pGroupedListViewDeleteList->IsItemChecked(groupIndex, itemIndex) == false)
        {
                __pSelectAll->SetSelected(false);
-               if (__pPm->GetCurrentDate() > __pPm->GetDateTimeFromGroupIndex(groupIndex))
+
+               int actualIndex = (__topBottomItemEnabled == true) ? groupIndex - TOP_BOTTOM_ITEM_COUNT : groupIndex;
+               if (__pPm->GetCurrentDate() > __pPm->GetDateTimeFromGroupIndex(actualIndex))
                {
                        __pSelectBeforeToday->SetSelected(false);
                }
@@ -561,27 +544,31 @@ EventDeleterForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneI
 void
 EventDeleterForm::OnActionPerformed(const Control& source, int actionId)
 {
-       int groupIndex = 0;
        TwoButtonPopupStyle style = TWO_BUTTON_POPUP_STYLE_SINGLE_EVENT;
 
-       DateTime today = __pPm->GetToday();
+       DateTime today = EventListPresentationModel::GetToday();
        today.SetValue(today.GetYear(), today.GetMonth(), today.GetDay(), 0, 0, 0);
 
+       int startGroupIndex = 0;
+       int endGroupIndex = __pGroupedListViewDeleteList->GetGroupCount() - 1;
+       if (__topBottomItemEnabled == true)
+       {
+               startGroupIndex = TOP_BOTTOM_ITEM_COUNT;
+               endGroupIndex -= TOP_BOTTOM_ITEM_COUNT;
+       }
+
        switch (actionId)
        {
        case IDA_EVENT_DELETER_FORM_FOOTER_DELETE:
-               for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
+               for (int i = startGroupIndex; i <= endGroupIndex; i++)
                {
-                       for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
+                       int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+                       for (int j = 0; j < itemCount; j++)
                        {
                                if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == true)
                                {
-                                       int actualGroupIndex = i;
-                                       if (__topBottomItemEnabled == true)
-                                       {
-                                               actualGroupIndex -= TOP_BOTTOM_ITEM_COUNT;
-                                       }
-                                       if (__pPm->GetEventWithWholeIndex(actualGroupIndex, j)->IsRecurring() == true)
+                                       const CalEventInstance* pEventInstance = __pPm->GetEventWithWholeIndex(i - startGroupIndex, j);
+                                       if (pEventInstance != null && pEventInstance->IsRecurring() == true)
                                        {
                                                style = TWO_BUTTON_POPUP_STYLE_REPEATED_EVENT;
                                                break;
@@ -593,72 +580,57 @@ EventDeleterForm::OnActionPerformed(const Control& source, int actionId)
                TwoButtonPopup::RequestTwoButtonPopup(style, this);
                break;
        case IDA_SELECT_ALL_CHECKED:
-               for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
+               for (int i = startGroupIndex; i <= endGroupIndex; i++)
                {
-                       for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
+                       int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+                       for (int j = 0; j < itemCount; j++)
                        {
-                               if (__topBottomItemEnabled == true && (i == 0 || i == __pGroupedListViewDeleteList->GetGroupCount() - 1))
-                               {
-                                       break;
-                               }
                                __pGroupedListViewDeleteList->SetItemChecked(i, j, true);
                        }
                }
+               __pSelectBeforeToday->SetSelected(IsSelectedAllEventBeforeToday());
                UpdateSelectedLabel();
                break;
        case IDA_SELECT_ALL_UNCHECKED:
-               for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
+               for (int i = startGroupIndex; i <= endGroupIndex; i++)
                {
-                       for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
+                       int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+                       for (int j = 0; j < itemCount; j++)
                        {
                                __pGroupedListViewDeleteList->SetItemChecked(i, j, false);
                        }
                }
-               __pSelectBeforeToday->SetSelected(false);
+               __pSelectBeforeToday->SetSelected(IsSelectedAllEventBeforeToday());
                UpdateSelectedLabel();
                break;
        case IDA_BEFORE_TODAY_CHECKED:
-               for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
+               if (__topBottomItemEnabled == true)
                {
-                       if (__topBottomItemEnabled == true && (i != 0 && i != __pGroupedListViewDeleteList->GetGroupCount() - 1))
+                       for (int i = startGroupIndex; i <= endGroupIndex && __pPm->GetDateTimeFromGroupIndex(i - startGroupIndex) < today; i++)
                        {
-                               groupIndex = i - 1;
-
-
-                               if (__pPm->GetDateTimeFromGroupIndex(groupIndex) < today)
+                               int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+                               for (int j = 0; j < itemCount; j++)
                                {
-                                       for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
-                                       {
-                                               if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == false)
-                                               {
-                                                       __pGroupedListViewDeleteList->SetItemChecked(i, j, true);
-                                               }
-                                       }
+                                       __pGroupedListViewDeleteList->SetItemChecked(i, j, true);
                                }
                        }
                }
+               __pSelectAll->SetSelected(IsSelectedAllEvent());
                UpdateSelectedLabel();
                break;
        case IDA_BEFORE_TODAY_UNCHECKED:
-               for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
+               if (__topBottomItemEnabled == true)
                {
-                       if (__topBottomItemEnabled == true && (i != 0 && i != __pGroupedListViewDeleteList->GetGroupCount() - 1))
+                       for (int i = startGroupIndex; i <= endGroupIndex && __pPm->GetDateTimeFromGroupIndex(i - startGroupIndex) < today; i++)
                        {
-                               groupIndex = i - 1;
-
-                               if (__pPm->GetDateTimeFromGroupIndex(groupIndex) < today)
+                               int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+                               for (int j = 0; j < itemCount; j++)
                                {
-                                       for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
-                                       {
-                                               if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == true)
-                                               {
-                                                       __pGroupedListViewDeleteList->SetItemChecked(i, j, false);
-                                               }
-                                       }
+                                       __pGroupedListViewDeleteList->SetItemChecked(i, j, false);
                                }
                        }
                }
-               __pSelectAll->SetSelected(false);
+               __pSelectAll->SetSelected(IsSelectedAllEvent());
                UpdateSelectedLabel();
                break;
        }
@@ -667,61 +639,111 @@ EventDeleterForm::OnActionPerformed(const Control& source, int actionId)
 void
 EventDeleterForm::OnCalendarEventChanged(void)
 {
-       if (__pSelectAll->IsSelected() == true)
-       {
-               __pSelectAll->SetSelected(false);
-       }
-       if (__pSelectBeforeToday->IsSelected() == true)
-       {
-               __pSelectBeforeToday->SetSelected(false);
-       }
-
        __pGroupedListViewDeleteList->UpdateList();
 
+       __pSelectAll->SetSelected(IsSelectedAllEvent());
+       __pSelectBeforeToday->SetSelected(IsSelectedAllEventBeforeToday());
        UpdateSelectedLabel();
 }
 
-result
-EventDeleterForm::UpdateSelectedLabel(void)
+int
+EventDeleterForm::GetSelectedEventCount(void)
 {
-       int itemCount = 0;
-       int wholeEventCount = 0;
-       for (int i = 0; i < __pGroupedListViewDeleteList->GetGroupCount(); i++)
+       int startGroupIndex = 0;
+       int endGroupIndex = __pGroupedListViewDeleteList->GetGroupCount() - 1;
+       if (__topBottomItemEnabled == true)
+       {
+               startGroupIndex = TOP_BOTTOM_ITEM_COUNT;
+               endGroupIndex -= TOP_BOTTOM_ITEM_COUNT;
+       }
+
+       if (endGroupIndex < 0)
+       {
+               return 0;
+       }
+
+       int count = 0;
+       for (int i = startGroupIndex; i <= endGroupIndex; i++)
        {
-               if (__pPm != null)
+               int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+               for (int j = 0; j < itemCount; j++)
                {
-                       if (__topBottomItemEnabled == true)
+                       if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == true)
                        {
-                                if (i > 0 && i < __pGroupedListViewDeleteList->GetGroupCount() - 1)
-                                {
-                                        wholeEventCount += __pPm->GetWholeEventCount(i - 1);
-                                }
+                               count++;
                        }
                }
-               for (int j = 0; j < __pGroupedListViewDeleteList->GetItemCountAt(i); j++)
+       }
+       return count;
+}
+
+bool
+EventDeleterForm::IsSelectedAllEvent(void)
+{
+       int startGroupIndex = 0;
+       int endGroupIndex = __pGroupedListViewDeleteList->GetGroupCount() - 1;
+       if (__topBottomItemEnabled == true)
+       {
+               startGroupIndex = TOP_BOTTOM_ITEM_COUNT;
+               endGroupIndex -= TOP_BOTTOM_ITEM_COUNT;
+       }
+
+       if (endGroupIndex < 0)
+       {
+               return false;
+       }
+
+       for (int i = startGroupIndex; i <= endGroupIndex; i++)
+       {
+               int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+               for (int j = 0; j < itemCount; j++)
                {
-                       if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == true)
+                       if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == false)
                        {
-                               itemCount++;
+                               return false;
                        }
                }
        }
+       return true;
+}
+bool
+EventDeleterForm::IsSelectedAllEventBeforeToday(void)
+{
+       DateTime today = EventListPresentationModel::GetToday();
+       today.SetValue(today.GetYear(), today.GetMonth(), today.GetDay(), 0, 0, 0);
 
-       Footer* pFooter = GetFooter();
-       if (itemCount > 0)
+       int startGroupIndex = 0;
+       int endGroupIndex = __pGroupedListViewDeleteList->GetGroupCount() - 1;
+       if (__topBottomItemEnabled == true)
        {
-               pFooter->SetItemEnabled(0, true);
+               startGroupIndex = TOP_BOTTOM_ITEM_COUNT;
+               endGroupIndex -= TOP_BOTTOM_ITEM_COUNT;
        }
-       else
+
+       if (endGroupIndex < 0)
        {
-               pFooter->SetItemEnabled(0, false);
+               return false;
        }
 
-       if (itemCount != 0 && itemCount == wholeEventCount)
+       for (int i = startGroupIndex; i <= endGroupIndex && __pPm->GetDateTimeFromGroupIndex(i - startGroupIndex) < today; i++)
        {
-               __pSelectAll->SetSelected(true);
-               __pSelectAll->Invalidate(false);
+               int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
+               for (int j = 0; j < itemCount; j++)
+               {
+                       if (__pGroupedListViewDeleteList->IsItemChecked(i, j) == false)
+                       {
+                               return false;
+                       }
+               }
        }
+       return true;
+}
+
+result
+EventDeleterForm::UpdateSelectedLabel(void)
+{
+       int itemCount = GetSelectedEventCount();
+       GetFooter()->SetItemEnabled(0, itemCount > 0);
 
        String labelString = ResourceManager::GetString(IDS_COM_BODY_PD_SELECTED);
        labelString.Format(labelString.GetLength() + Integer::ToString(itemCount).GetLength(), labelString.GetPointer(), itemCount);
index 3c7e8b6..68bfbf9 100644 (file)
@@ -59,8 +59,8 @@ enum
        ADDITIONAL_CONTENT_ITEM_REPEAT,
        ADDITIONAL_CONTENT_ITEM_COUNT,
 
-//     SAVE_TO_ITEM_SAVE_TO = 0,
-//     SAVE_TO_ITEM_COUNT
+       SAVE_TO_ITEM_SAVE_TO = 0,
+       SAVE_TO_ITEM_COUNT
 };
 
 static const int IDA_EVENT_DETAILS_FORM_EDIT = 60001;
@@ -70,51 +70,53 @@ static const int IDA_EVENT_DETAILS_FORM_ADD_TO_CALENDAR = 60004;
 static const int IDA_DETAIL_FORM_FOOTER_SUB_MENU = 60010;
 
 static const unsigned int COLOR_ITEM_BACKGROUND = Color32<232, 232, 232>::Value;
-static const int H_ITEM = 112;
-static const int H_MAIN_ITEM = 264;
-static const int Y_MAIN_ITEM_SUBJECT = 16;
-static const int H_MAIN_ITEM_SUBJECT = 120;
+static const int H_ITEM = 140;
+static const int H_MAIN_ITEM = 313;
+static const int Y_MAIN_ITEM_SUBJECT = 18;
+static const int H_MAIN_ITEM_SUBJECT = 136;
 static const int W_MAIN_ITEM_SUBJECT_MARGIN = 40;
 static const int H_MAIN_ITEM_SUBJECT_MARGIN = 32;
-static const int X_MAIN_ITEM_ALARM_ICON = 16;
-static const int Y_MAIN_ITEM_ALARM_ICON = 36;
-static const int W_MAIN_ITEM_ALARM_ICON = 64;
-static const int H_MAIN_ITEM_ALARM_ICON = 64;
-static const int X_MAIN_ITEM_ALARM = 96;
-static const int Y_MAIN_ITEM_ALARM01 = 16;
-static const int Y_MAIN_ITEM_ALARM02 = 58;
-static const int H_MAIN_ITEM_ALARM01 = 42;
-static const int H_MAIN_ITEM_ALARM02 = 60;
-static const int Y_REMINDER_ITEM_REMINDER = 32;
+static const int X_MAIN_ITEM_ALARM = 0;
+static const int W_MAIN_ITEM_ALARM_MARGIN = 32;
+static const int H_MAIN_ITEM_ALARM = 159;
+static const int Y_MAIN_ITEM_ALARM01 = 19;
+static const int Y_MAIN_ITEM_ALARM02 = 73;
+static const int H_MAIN_ITEM_ALARM01 = 54;
+static const int H_MAIN_ITEM_ALARM02 = 54;
+static const int W_REMINDER_ITEM_MARGIN = 16;
+static const int H_REMINDER_ITEM = 112;
 static const int H_REMINDER_ITEM_REMINDER = 48;
-static const int Y_REMINDER_ITEM_MARGIN = 40;
-static const int Y_REMINDER_ITEM_REPEAT = 32;
-static const int H_REMINDER_ITEM_REPEAT = 48;
-static const int W_DESCRIPTION_ITEM_MARGIN = 16;
-static const int H_DESCRIPTION_ITEM_MARGIN = 22;
-//static const int H_SAVE_TO_ITEM = 112;
-//static const int Y_SAVE_TO_ITEM_SAVE_TO = 8;
-//static const int H_SAVE_TO_ITEM_SAVE_TO = 48;
-//static const int Y_SAVE_TO_ITEM_CALENDAR_NAME = 56;
-//static const int H_SAVE_TO_ITEM_CALENDAR_NAME = 48;
+static const int H_REMINDER_ITEM_MARGIN = 40;
+static const int W_REPEAT_ITEM_MARGIN = 16;
+static const int H_REPEAT_ITEM = 112;
+static const int Y_DESCRIPTION_ITEM_DESCRIPTION = 22;
+static const int H_DESCRIPTION_ITEM_DESCRIPTION = 42;
+static const int Y_DESCRIPTION_ITEM_CONTENT = 64;
+static const int H_DESCRIPTION_ITEM_CONTENT = 54;
+static const int W_DESCRIPTION_ITEM_MARGIN = 32;
+static const int H_DESCRIPTION_ITEM_MARGIN = 44;
+static const int Y_LOCATION_ITEM_LOCATION = 22;
+static const int H_LOCATION_ITEM_LOCATION = 42;
+static const int Y_LOCATION_ITEM_CONTENT = 54;
+static const int H_LOCATION_ITEM_CONTENT = 54;
+static const int H_SAVE_TO_ITEM = 140;
+static const int Y_SAVE_TO_ITEM_CALENDAR_NAME = 22;
+static const int H_SAVE_TO_ITEM_CALENDAR_NAME = 42;
+static const int Y_SAVE_TO_ITEM_CALENDAR_ADDRESS = 64;
+static const int H_SAVE_TO_ITEM_CALENDAR_ADDRESS = 54;
 static const int FONT_SIZE_DETAIL01 = 56;
-static const unsigned int COLOR_DETAIL01 = Color32<0, 0, 0>::Value;
-static const int FONT_SIZE_DETAIL02 = 32;
-static const unsigned int COLOR_DETAIL02 = Color32<128, 128, 128>::Value;
-static const int FONT_SIZE_DETAIL03 = 44;
-static const unsigned int COLOR_DETAIL03 = Color32<0, 0, 0>::Value;
-//static const int X_ITEM_SAVE_TO_ICON = 16;
-//static const int Y_ITEM_SAVE_TO_ICON = 66;
-//static const int W_ITEM_SAVE_TO_ICON = 32;
-//static const int H_ITEM_SAVE_TO_ICON = 32;
-//static const unsigned int COLOR_SAVE_TO_ICON = Color32<100, 100, 100>::Value;
-const int MAX_TITLE_TEXT = 20;
+static const unsigned int COLOR_DETAIL01 = Color32<59, 115, 182>::Value;
+static const int FONT_SIZE_DETAIL02 = 44;
+static const unsigned int COLOR_DETAIL02 = Color32<0, 0, 0>::Value;
+static const int FONT_SIZE_DETAIL03 = 32;
+static const unsigned int COLOR_DETAIL03 = Color32<128, 128, 128>::Value;
+static const int X_ITEM_SAVE_TO_ICON = 16;
+static const int Y_ITEM_SAVE_TO_ICON = 38;
+static const int W_ITEM_SAVE_TO_ICON = 64;
+static const int H_ITEM_SAVE_TO_ICON = 64;
+static const int MAX_TITLE_TEXT = 20;
 static const int W_SUB_MENU_MARGIN = 64;
 static const int H_SUB_MENU_HALF_BUTTON = 36;
-static const int X_ITEM_ICON = 20;
-static const int Y_ITEM_ICON = 19;
-static const int W_ITEM_ICON = 74;
-static const int H_ITEM_ICON = 74;
 
 EventDetailsForm::EventDetailsForm(void)
        : __pPm(null)
@@ -245,6 +247,10 @@ EventDetailsForm::OnFormBackRequested(Form& source)
 int
 EventDetailsForm::GetSectionCount(void)
 {
+       if (__pPm->IsSaved() == false)
+       {
+               return GROUP_COUNT - 1;
+       }
        return GROUP_COUNT;
 }
 
@@ -259,8 +265,8 @@ EventDetailsForm::GetItemCount(int sectionIndex)
                return INFORMATION_CONTENT_ITEM_COUNT;
        case GROUP_ADDITIONAL_CONTENT:
                return ADDITIONAL_CONTENT_ITEM_COUNT;
-//     case GROUP_SAVE_TO:
-//             return SAVE_TO_ITEM_COUNT;
+       case GROUP_SAVE_TO:
+               return SAVE_TO_ITEM_COUNT;
        }
 
        return 0;
@@ -292,21 +298,21 @@ EventDetailsForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
        case GROUP_ADDITIONAL_CONTENT:
                if (itemIndex == 0)
                {
-                       pItem = CreateReminderItemN(itemWidth, __pPm->GetReminderString(itemIndex));
+                       pItem = CreateReminderItemN(itemWidth);
                }
                else
                {
                        pItem = CreateRepeatItemN(itemWidth, __pPm->GetRecurrenceString());
                }
                break;
-//     case GROUP_SAVE_TO:
-//             if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
-//             {
-//                     const Bitmap* pIcon = __pPm->GetCalendarIconN();
-//                     pItem = CreateSaveToItemN(itemWidth, __pPm->GetCalendarName(), pIcon);
-//                     delete pIcon;
-//             }
-//             break;
+       case GROUP_SAVE_TO:
+               if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
+               {
+                       const Bitmap* pIcon = __pPm->GetCalendarIconN();
+                       pItem = CreateSaveToItemN(itemWidth, __pPm->GetAccountName(), __pPm->GetCalendarName(), pIcon);
+                       delete pIcon;
+               }
+               break;
        }
 
        return pItem;
@@ -387,6 +393,25 @@ EventDetailsForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneI
                                __pPm->SetAllEventEditing(true);
                                __pPm->SetEventInstance(*pEvent);
                                __pTableView->UpdateTableView();
+
+                               GetFooter()->SetItemEnabled(0, __pPm->IsEditable());
+                               GetFooter()->Invalidate(true);
+
+                               if (__pPm->IsEditable() == true)
+                               {
+                                       if (__pContextMenuSub->GetItemIndexFromActionId(IDA_EVENT_DETAILS_FORM_DELETE) < 0)
+                                       {
+                                               __pContextMenuSub->InsertItemAt(0, ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_EVENT_DETAILS_FORM_DELETE);
+                                       }
+                               }
+                               else
+                               {
+                                       int deleteIndex = __pContextMenuSub->GetItemIndexFromActionId(IDA_EVENT_DETAILS_FORM_DELETE);
+                                       if (deleteIndex >= 0)
+                                       {
+                                               __pContextMenuSub->RemoveItemAt(deleteIndex);
+                                       }
+                               }
                        }
 
                        pArgs->RemoveAll(true);
@@ -520,6 +545,7 @@ EventDetailsForm::OnActionPerformed(const Control& source, int actionId)
                {
                        GetFooter()->RemoveAllItems();
                }
+               __pTableView->UpdateTableView();
                break;
        default:
                break;
@@ -558,6 +584,7 @@ EventDetailsForm::CreateMainItemN(int itemWidth, const String& title, const Date
                pLabelSubject->SetTextColor(Color(COLOR_DETAIL01));
                pLabelSubject->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                y = actualHeight;
+               pItem->SetSize(itemWidth, y + H_MAIN_ITEM_ALARM);
        }
        else
        {
@@ -570,17 +597,6 @@ EventDetailsForm::CreateMainItemN(int itemWidth, const String& title, const Date
                y += H_MAIN_ITEM_SUBJECT;
        }
 
-       Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_ICON_ALARM_64X64);
-       if (pIcon != null)
-       {
-               Label* pLabelIcon = new (std::nothrow) Label();
-               pLabelIcon->Construct(Rectangle(X_MAIN_ITEM_ALARM_ICON, y + Y_MAIN_ITEM_ALARM_ICON,
-                                                                               W_MAIN_ITEM_ALARM_ICON, H_MAIN_ITEM_ALARM_ICON), L"");
-               pItem->AddControl(*pLabelIcon);
-               pLabelIcon->SetBackgroundBitmap(*pIcon);
-               delete pIcon;
-       }
-
        if (start.GetYear() == end.GetYear() && start.GetMonth() == end.GetMonth() && start.GetDay() == end.GetDay())
        {
                // for one day event
@@ -592,37 +608,76 @@ EventDetailsForm::CreateMainItemN(int itemWidth, const String& title, const Date
                pLabelAlarm01->SetTextColor(Color(COLOR_DETAIL02));
                pLabelAlarm01->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
 
-               String range = __pPm->GetTimeString(start)
-                                        + ResourceManager::GetString(IDS_EVENT_DETAILS_TO) + __pPm->GetTimeString(end);
-               Label* pLabelAlarm02 = new (std::nothrow) Label();
-               pLabelAlarm02->Construct(Rectangle(X_MAIN_ITEM_ALARM, y + Y_MAIN_ITEM_ALARM02,
-                                                                                  itemWidth - X_MAIN_ITEM_ALARM, H_MAIN_ITEM_ALARM02), range);
-               pItem->AddControl(*pLabelAlarm02);
-               pLabelAlarm02->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-               pLabelAlarm02->SetTextColor(Color(COLOR_DETAIL03));
-               pLabelAlarm02->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               if (__pPm->IsAllDayEvent() == false)
+               {
+                       String range = __pPm->GetTimeString(start)
+                                                + ResourceManager::GetString(IDS_EVENT_DETAILS_TO) + __pPm->GetTimeString(end);
+                       Label* pLabelAlarm02 = new (std::nothrow) Label();
+                       pLabelAlarm02->Construct(Rectangle(X_MAIN_ITEM_ALARM, y + Y_MAIN_ITEM_ALARM02,
+                                                                                          itemWidth - X_MAIN_ITEM_ALARM, H_MAIN_ITEM_ALARM02), range);
+                       pItem->AddControl(*pLabelAlarm02);
+                       pLabelAlarm02->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+                       pLabelAlarm02->SetTextColor(Color(COLOR_DETAIL03));
+                       pLabelAlarm02->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               }
+               else
+               {
+                       pItem->SetSize(pItem->GetWidth(), pItem->GetHeight() - H_MAIN_ITEM_ALARM02);
+               }
        }
        else
        {
-               Label* pLabelAlarm01 = new (std::nothrow) Label();
-               pLabelAlarm01->Construct(Rectangle(X_MAIN_ITEM_ALARM, y + Y_MAIN_ITEM_ALARM01,
-                                                                                  itemWidth - X_MAIN_ITEM_ALARM, H_MAIN_ITEM_ALARM01), __pPm->GetDateTimeString(start));
-               pItem->AddControl(*pLabelAlarm01);
-               pLabelAlarm01->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-               pLabelAlarm01->SetTextColor(Color(COLOR_DETAIL02));
-               pLabelAlarm01->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               // for multi day event
+               Font font;
+               font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_DETAIL02);
 
-               Label* pLabelAlarm02 = new (std::nothrow) Label();
-               pLabelAlarm02->Construct(Rectangle(X_MAIN_ITEM_ALARM, y + Y_MAIN_ITEM_ALARM02,
-                                                                                  itemWidth - X_MAIN_ITEM_ALARM, H_MAIN_ITEM_ALARM02), __pPm->GetDateTimeString(end));
-               pItem->AddControl(*pLabelAlarm02);
-               pLabelAlarm02->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-               pLabelAlarm02->SetTextColor(Color(COLOR_DETAIL02));
-               pLabelAlarm02->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       }
+               Dimension textExtent;
+               String startDateText = __pPm->GetDateString(start);
+               font.GetTextExtent(startDateText, startDateText.GetLength(), textExtent);
+               Label* pLabelAlarmStartDate = new (std::nothrow) Label();
+               pLabelAlarmStartDate->Construct(Rectangle(X_MAIN_ITEM_ALARM, y + Y_MAIN_ITEM_ALARM01,
+                                                                                  textExtent.width + W_MAIN_ITEM_ALARM_MARGIN, H_MAIN_ITEM_ALARM01), startDateText);
+               pItem->AddControl(*pLabelAlarmStartDate);
+               pLabelAlarmStartDate->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+               pLabelAlarmStartDate->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelAlarmStartDate->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+               if (__pPm->IsAllDayEvent() == false)
+               {
+                       Label* pLabelAlarmStartTime = new (std::nothrow) Label();
+                       pLabelAlarmStartTime->Construct(Rectangle(X_MAIN_ITEM_ALARM + textExtent.width, y + Y_MAIN_ITEM_ALARM01,
+                                                                                               itemWidth - X_MAIN_ITEM_ALARM - textExtent.width, H_MAIN_ITEM_ALARM01),
+                                                                                               L" / " + __pPm->GetTimeString(start));
+                       pItem->AddControl(*pLabelAlarmStartTime);
+                       pLabelAlarmStartTime->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+                       pLabelAlarmStartTime->SetTextColor(Color(COLOR_DETAIL03));
+                       pLabelAlarmStartTime->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+                       pLabelAlarmStartTime->SetTextVerticalAlignment(ALIGNMENT_BOTTOM);
+               }
 
-       y += Y_MAIN_ITEM_ALARM02 + H_MAIN_ITEM_ALARM02;
-       pItem->SetSize(itemWidth, y);
+               String endDateText = __pPm->GetDateString(end);
+               font.GetTextExtent(endDateText, endDateText.GetLength(), textExtent);
+               Label* pLabelAlarmEndDate = new (std::nothrow) Label();
+               pLabelAlarmEndDate->Construct(Rectangle(X_MAIN_ITEM_ALARM, y + Y_MAIN_ITEM_ALARM02,
+                                                                                  textExtent.width + W_MAIN_ITEM_ALARM_MARGIN, H_MAIN_ITEM_ALARM02), endDateText);
+               pItem->AddControl(*pLabelAlarmEndDate);
+               pLabelAlarmEndDate->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+               pLabelAlarmEndDate->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelAlarmEndDate->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+               if (__pPm->IsAllDayEvent() == false)
+               {
+                       Label* pLabelAlarmEndTime = new (std::nothrow) Label();
+                       pLabelAlarmEndTime->Construct(Rectangle(X_MAIN_ITEM_ALARM + textExtent.width, y + Y_MAIN_ITEM_ALARM02,
+                                                                                               itemWidth - X_MAIN_ITEM_ALARM - textExtent.width, H_MAIN_ITEM_ALARM02),
+                                                                                               L" / " + __pPm->GetTimeString(end));
+                       pItem->AddControl(*pLabelAlarmEndTime);
+                       pLabelAlarmEndTime->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+                       pLabelAlarmEndTime->SetTextColor(Color(COLOR_DETAIL03));
+                       pLabelAlarmEndTime->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+                       pLabelAlarmEndTime->SetTextVerticalAlignment(ALIGNMENT_BOTTOM);
+               }
+       }
 
        return pItem;
 }
@@ -634,7 +689,7 @@ EventDetailsForm::CreateDescriptionItemN(int itemWidth, const String& descriptio
        if (description.IsEmpty() != true)
        {
                EnrichedText text;
-               text.Construct(Dimension(itemWidth - W_DESCRIPTION_ITEM_MARGIN * 2, Integer::VALUE_MAX));
+               text.Construct(Dimension(itemWidth - W_DESCRIPTION_ITEM_MARGIN, Integer::VALUE_MAX));
                text.SetTextWrapStyle(TEXT_WRAP_WORD_WRAP);
                text.SetTextAbbreviationEnabled(false);
 
@@ -645,35 +700,37 @@ EventDetailsForm::CreateDescriptionItemN(int itemWidth, const String& descriptio
                pElement->SetFont(font);
                text.Add(*pElement);
 
-               int actualHeight = text.GetTextExtent().height;
+               int descriptionHeight = text.GetTextExtent().height;
                text.RemoveAll(true);
 
-               actualHeight += H_DESCRIPTION_ITEM_MARGIN * 2;
-               if (actualHeight < H_ITEM)
+               int itemHeight = descriptionHeight + H_DESCRIPTION_ITEM_MARGIN + H_DESCRIPTION_ITEM_DESCRIPTION;
+               if (itemHeight < H_ITEM)
                {
-                       actualHeight = H_ITEM;
+                       itemHeight = H_ITEM;
+               }
+               if (descriptionHeight < H_DESCRIPTION_ITEM_CONTENT)
+               {
+                       descriptionHeight = H_DESCRIPTION_ITEM_CONTENT;
                }
 
-               pItem->Construct(Dimension(itemWidth, actualHeight));
+               pItem->Construct(Dimension(itemWidth, itemHeight));
                pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
                pItem->SetEnabled(false);
 
-               Label* pLabelIcon = new (std::nothrow) Label();
-               pLabelIcon->Construct(Rectangle(X_ITEM_ICON, Y_ITEM_ICON, W_ITEM_ICON, H_ITEM_ICON), L"");
-               Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_LIST_ICON_DESCRIPTION);
-               if (pIcon != null)
-               {
-                       pLabelIcon->SetBackgroundBitmap(*pIcon);
-                       delete pIcon;
-               }
-               pItem->AddControl(*pLabelIcon);
-
                Label* pLabelDescription = new (std::nothrow) Label();
-               pLabelDescription->Construct(Rectangle(X_ITEM_ICON + W_ITEM_ICON, 0, itemWidth - X_ITEM_ICON - W_ITEM_ICON, actualHeight), description);
+               pLabelDescription->Construct(Rectangle(0, Y_DESCRIPTION_ITEM_DESCRIPTION, itemWidth, H_DESCRIPTION_ITEM_DESCRIPTION),
+                                                                               ResourceManager::GetString(IDS_CLD_BODY_CREATE_DESCRIPTION));
                pItem->AddControl(*pLabelDescription);
-               pLabelDescription->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-               pLabelDescription->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelDescription->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+               pLabelDescription->SetTextColor(Color(COLOR_DETAIL03));
                pLabelDescription->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+               Label* pLabelContent = new (std::nothrow) Label();
+               pLabelContent->Construct(Rectangle(0, Y_DESCRIPTION_ITEM_CONTENT, itemWidth, descriptionHeight), description);
+               pItem->AddControl(*pLabelContent);
+               pLabelContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+               pLabelContent->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelContent->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        }
        else
        {
@@ -693,22 +750,20 @@ EventDetailsForm::CreateLocationItemN(int itemWidth, const String& location)
                pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
                pItem->SetEnabled(false);
 
-               Label* pLabelIcon = new (std::nothrow) Label();
-               pLabelIcon->Construct(Rectangle(X_ITEM_ICON, Y_ITEM_ICON, W_ITEM_ICON, H_ITEM_ICON), L"");
-               Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_LIST_ICON_MAP);
-               if (pIcon != null)
-               {
-                       pLabelIcon->SetBackgroundBitmap(*pIcon);
-                       delete pIcon;
-               }
-               pItem->AddControl(*pLabelIcon);
-
                Label* pLabelLocation = new (std::nothrow) Label();
-               pLabelLocation->Construct(Rectangle(X_ITEM_ICON + W_ITEM_ICON, 0, itemWidth - X_ITEM_ICON - W_ITEM_ICON, H_ITEM), location);
+               pLabelLocation->Construct(Rectangle(0, Y_LOCATION_ITEM_LOCATION, itemWidth, H_LOCATION_ITEM_LOCATION),
+                                                                       ResourceManager::GetString(IDS_CLD_BODY_LOCATION));
                pLabelLocation->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
                pLabelLocation->SetTextColor(Color(COLOR_DETAIL03));
                pLabelLocation->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                pItem->AddControl(*pLabelLocation);
+
+               Label* pLabelContent = new (std::nothrow) Label();
+               pLabelContent->Construct(Rectangle(0, Y_LOCATION_ITEM_CONTENT, itemWidth, H_LOCATION_ITEM_CONTENT), location);
+               pLabelContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+               pLabelContent->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelContent->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               pItem->AddControl(*pLabelContent);
        }
        else
        {
@@ -718,10 +773,10 @@ EventDetailsForm::CreateLocationItemN(int itemWidth, const String& location)
 }
 
 TableViewItem*
-EventDetailsForm::CreateReminderItemN(int itemWidth, const String& alarm)
+EventDetailsForm::CreateReminderItemN(int itemWidth)
 {
        int countReminder = (__pPm->GetCountReminder() > 1) ? __pPm->GetCountReminder() : 1;
-       int height = (countReminder > 1) ? H_REMINDER_ITEM_REMINDER * countReminder + Y_REMINDER_ITEM_MARGIN : H_ITEM;
+       int height = (countReminder > 1) ? H_REMINDER_ITEM_REMINDER * countReminder + H_REMINDER_ITEM_MARGIN : H_REMINDER_ITEM;
 
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, height));
@@ -729,11 +784,11 @@ EventDetailsForm::CreateReminderItemN(int itemWidth, const String& alarm)
        pItem->SetEnabled(false);
 
        Label* pLabelReminder = new (std::nothrow) Label();
-       pLabelReminder->Construct(Rectangle(0, (height - H_REMINDER_ITEM_REMINDER) / 2, itemWidth, H_REMINDER_ITEM_REMINDER),
+       pLabelReminder->Construct(Rectangle(0, 0, itemWidth, height),
                                                          ResourceManager::GetString(IDS_CLD_BODY_REMINDER));
        pItem->AddControl(*pLabelReminder);
-       pLabelReminder->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-       pLabelReminder->SetTextColor(Color(COLOR_DETAIL03));
+       pLabelReminder->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabelReminder->SetTextColor(Color(COLOR_DETAIL02));
        pLabelReminder->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pLabelReminder->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
 
@@ -741,10 +796,10 @@ EventDetailsForm::CreateReminderItemN(int itemWidth, const String& alarm)
        for (int i = 0; i < countReminder; i++)
        {
                Label* pLabelReminderContent = new (std::nothrow) Label();
-               pLabelReminderContent->Construct(Rectangle(0, yPos, itemWidth-16, H_REMINDER_ITEM_REMINDER), L"");
+               pLabelReminderContent->Construct(Rectangle(0, yPos, itemWidth - W_REMINDER_ITEM_MARGIN, H_REMINDER_ITEM_REMINDER), L"");
                pLabelReminderContent->SetText(__pPm->GetReminderString(i));
-               pLabelReminderContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-               pLabelReminderContent->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelReminderContent->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+               pLabelReminderContent->SetTextColor(Color(COLOR_DETAIL03));
                pLabelReminderContent->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
                pLabelReminderContent->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
                pItem->AddControl(*pLabelReminderContent);
@@ -758,62 +813,64 @@ TableViewItem*
 EventDetailsForm::CreateRepeatItemN(int itemWidth, const String& repeat)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, H_ITEM));
+       pItem->Construct(Dimension(itemWidth, H_REPEAT_ITEM));
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
        pItem->SetEnabled(false);
 
        Label* pLabelRepeat = new (std::nothrow) Label();
-       pLabelRepeat->Construct(Rectangle(0, Y_REMINDER_ITEM_REPEAT, itemWidth, H_REMINDER_ITEM_REPEAT),
+       pLabelRepeat->Construct(Rectangle(0, 0, itemWidth, H_REPEAT_ITEM),
                                                          ResourceManager::GetString(IDS_CLD_BODY_REPEAT));
        pItem->AddControl(*pLabelRepeat);
-       pLabelRepeat->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-       pLabelRepeat->SetTextColor(Color(COLOR_DETAIL03));
+       pLabelRepeat->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabelRepeat->SetTextColor(Color(COLOR_DETAIL02));
        pLabelRepeat->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pLabelRepeat->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
 
        Label* pLabelRepeatContent = new (std::nothrow) Label();
-       pLabelRepeatContent->Construct(Rectangle(0, Y_REMINDER_ITEM_REPEAT, itemWidth-16, H_REMINDER_ITEM_REPEAT), repeat);
+       pLabelRepeatContent->Construct(Rectangle(0, 0, itemWidth - W_REPEAT_ITEM_MARGIN, H_REPEAT_ITEM), repeat);
        pItem->AddControl(*pLabelRepeatContent);
-       pLabelRepeatContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-       pLabelRepeatContent->SetTextColor(Color(COLOR_DETAIL02));
+       pLabelRepeatContent->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pLabelRepeatContent->SetTextColor(Color(COLOR_DETAIL03));
        pLabelRepeatContent->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
        pLabelRepeatContent->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
        return pItem;
 }
 
-//TableViewItem*
-//EventDetailsForm::CreateSaveToItemN(int itemWidth, const String& calendarName, const Bitmap* pCalendarIcon)
-//{
-//     TableViewItem* pItem = new (std::nothrow) TableViewItem();
-//     pItem->Construct(Dimension(itemWidth, H_SAVE_TO_ITEM));
-//     pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
-//     pItem->SetEnabled(false);
-//
-//     Label* pLabelSaveTo = new (std::nothrow) Label();
-//     pLabelSaveTo->Construct(Rectangle(0, Y_SAVE_TO_ITEM_SAVE_TO, itemWidth, H_SAVE_TO_ITEM_SAVE_TO),
-//                                                     ResourceManager::GetString(IDS_EVENT_DETAILS_SAVE_TO));
-//     pItem->AddControl(*pLabelSaveTo);
-//     pLabelSaveTo->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-//     pLabelSaveTo->SetTextColor(Color(COLOR_DETAIL02));
-//     pLabelSaveTo->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-//
-//     Label* pIconLabel = new (std::nothrow) Label();
-//     pIconLabel->Construct(Rectangle(X_ITEM_SAVE_TO_ICON, Y_ITEM_SAVE_TO_ICON,
-//                                                                                             W_ITEM_SAVE_TO_ICON, H_ITEM_SAVE_TO_ICON), L"");
-//     pItem->AddControl(*pIconLabel);
-//     pIconLabel->SetBackgroundColor(Color(COLOR_SAVE_TO_ICON));
-//     pIconLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-//
-//     Label* pLabelCalendarName = new (std::nothrow) Label();
-//     pLabelCalendarName->Construct(Rectangle(X_ITEM_SAVE_TO_ICON + W_ITEM_SAVE_TO_ICON, Y_SAVE_TO_ITEM_CALENDAR_NAME,
-//                                                               itemWidth - W_ITEM_SAVE_TO_ICON, H_SAVE_TO_ITEM_CALENDAR_NAME), calendarName);
-//     pItem->AddControl(*pLabelCalendarName);
-//     pLabelCalendarName->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-//     pLabelCalendarName->SetTextColor(Color(COLOR_DETAIL03));
-//     pLabelCalendarName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-//
-//     return pItem;
-//}
+TableViewItem*
+EventDetailsForm::CreateSaveToItemN(int itemWidth, const String& accountName, const String& calendarName, const Bitmap* pCalendarIcon)
+{
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       pItem->Construct(Dimension(itemWidth, H_SAVE_TO_ITEM));
+       pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
+       pItem->SetEnabled(false);
+
+       int x = 0;
+       if (pCalendarIcon != null)
+       {
+               Label* pIconLabel = new (std::nothrow) Label();
+               pIconLabel->Construct(Rectangle(X_ITEM_SAVE_TO_ICON, Y_ITEM_SAVE_TO_ICON,
+                                                                                                       W_ITEM_SAVE_TO_ICON, H_ITEM_SAVE_TO_ICON), L"");
+               pIconLabel->SetBackgroundBitmap(*pCalendarIcon);
+               pItem->AddControl(*pIconLabel);
+               x += X_ITEM_SAVE_TO_ICON + W_ITEM_SAVE_TO_ICON;
+       }
+
+       Label* pLabelCalendarName = new (std::nothrow) Label();
+       pLabelCalendarName->Construct(Rectangle(x, Y_SAVE_TO_ITEM_CALENDAR_NAME, itemWidth - x, H_SAVE_TO_ITEM_CALENDAR_NAME), accountName);
+       pItem->AddControl(*pLabelCalendarName);
+       pLabelCalendarName->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pLabelCalendarName->SetTextColor(Color(COLOR_DETAIL03));
+       pLabelCalendarName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+       Label* pLabelCalendarAddress = new (std::nothrow) Label();
+       pLabelCalendarAddress->Construct(Rectangle(x, Y_SAVE_TO_ITEM_CALENDAR_ADDRESS, itemWidth - x, H_SAVE_TO_ITEM_CALENDAR_ADDRESS), calendarName);
+       pItem->AddControl(*pLabelCalendarAddress);
+       pLabelCalendarAddress->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabelCalendarAddress->SetTextColor(Color(COLOR_DETAIL02));
+       pLabelCalendarAddress->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+       return pItem;
+}
 
 result
 EventDetailsForm::SendAppControlResult(AppCtrlResult appControlResult)
index fe652ab..ff7dc16 100644 (file)
  * @brief      This is the implementation file for the EventEditorForm class.
  */
 
-#include <FApp.h>
 #include <FBase.h>
 #include <FSystem.h>
+#include "ClCalendarApp.h"
+#include "ClCalendarSelectorPopup.h"
 #include "ClEventEditorForm.h"
 #include "ClEventPresentationModel.h"
 #include "ClResourceManager.h"
@@ -44,7 +45,7 @@ enum
        GROUP_DATE_SELECTOR,
        GROUP_INFORMATION_CONTENT,
        GROUP_ADDITIONAL_CONTENT,
-//     GROUP_SAVE_TO,
+       GROUP_SAVE_TO,
        GROUP_COUNT,
 
        TITLE_CONTENT_ITEM_TITLE = 0,
@@ -68,8 +69,8 @@ enum
        ADDITIONAL_CONTENT_ITEM_REPEAT,
        ADDITIONAL_CONTENT_ITEM_COUNT,
 
-//     SAVE_TO_ITEM_SAVE_TO = 0,
-//     SAVE_TO_ITEM_COUNT
+       SAVE_TO_ITEM_SAVE_TO = 0,
+       SAVE_TO_ITEM_COUNT
 };
 
 static const int IDA_EVENT_EDITOR_FORM_SAVE = 20001;
@@ -91,14 +92,8 @@ static const int Y_ITEM_CONTENT02 = 60;
 static const int H_ITEM_CONTENT02 = 54;
 static const int X_DATE_SELECTOR = 380;
 static const int Y_DATE_SELECTOR = 0;
-static const int X_ITEM_ICON = 20;
-static const int Y_ITEM_ICON = 19;
-static const int W_ITEM_ICON = 74;
-static const int H_ITEM_ICON = 74;
-static const int X_DESCRIPTION = 94;
 static const int Y_DESCRIPTION = 16;
 static const int H_DESCRIPTION = 80;
-static const int X_LOCATION = 94;
 static const int W_REMINDER_ADD_WIDTH = 100;
 static const int W_REMINDER_ADD_BUTTON = 74;
 static const int W_REMINDER_ADD_BUTTON_MARGIN = 94;
@@ -106,23 +101,13 @@ static const int H_REMINDER_ADD_BUTTON = 74;
 static const int W_REMINDER_DELETE_BUTTON = 74;
 static const int W_REMINDER_DELETE_BUTTON_MARGIN = 184;
 static const int H_REMINDER_DELETE_BUTTON = 74;
-//static const int X_ITEM_SAVE_TO_ICON = 16;
-//static const int Y_ITEM_SAVE_TO_ICON = 68;
-//static const int W_ITEM_SAVE_TO_ICON = 32;
-//static const int H_ITEM_SAVE_TO_ICON = 32;
-//static const int FONT_SIZE_DETAIL01 = 56;
-//static const unsigned int COLOR_DETAIL01 = Color32<0, 0, 0>::Value;
 static const int FONT_SIZE_DETAIL02 = 32;
 static const unsigned int COLOR_DETAIL02 = Color32<128, 128, 128>::Value;
 static const int FONT_SIZE_DETAIL03 = 44;
 static const unsigned int COLOR_DETAIL03 = Color32<0, 0, 0>::Value;
-//static const unsigned int COLOR_DETAIL03_FOCUS = Color32<158, 187, 205>::Value;
 static const unsigned int COLOR_ADDITIONAL_CONTENT = Color32<59, 115, 182>::Value;
 
 static const int EXPANDABLE_EDIT_MAX_LINE = 10;
-static const int HALF_TIME_OF_DAY = 12;
-static const int HOUR_TO_HALF_MINUTE = 30;
-static const int HOUR_TO_MAX_MINUTE = 60;
 
 EventEditorForm::EventEditorForm(void)
        : __pPm(null)
@@ -138,9 +123,10 @@ EventEditorForm::EventEditorForm(void)
        , __pLabelRepeat(null)
        , __pTableViewItemNote(null)
        , __pExpandableEditAreaNote(null)
-//     , __pLabelSaveTo(null)
+       , __pLabelSaveTo(null)
        , __pButtonAddReminer(null)
        , __pButtonDeleteReminder(null)
+       , __pCalendarSelectorPopup(null)
 {
        memset(__pLabelReminder, 0, sizeof(Label*) * MAX_COUNT_OF_REMINDER);
        memset(__pItemReminder, 0, sizeof(TableViewItem*) * MAX_COUNT_OF_REMINDER);
@@ -173,6 +159,9 @@ EventEditorForm::OnInitializing(void)
        __pTableView->AddSectionTableViewItemEventListener(*this);
        __pTableView->SetGroupedLookEnabled(true);
 
+       __pCalendarSelectorPopup = new (std::nothrow) CalendarSelectorPopup();
+       __pCalendarSelectorPopup->Initialize();
+
        return E_SUCCESS;
 }
 
@@ -180,12 +169,49 @@ result
 EventEditorForm::OnTerminating(void)
 {
        delete __pPm;
+       delete __pCalendarSelectorPopup;
        return E_SUCCESS;
 }
 
 void
+EventEditorForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       switch (requestId)
+       {
+       case IDA_CALENDAR_SELECTOR_POPUP_DONE:
+               if (pArgs != null)
+               {
+                       __pPm->SetCalendar(static_cast<Integer*>(pArgs->GetAt(0))->value);
+                       __pTableView->RefreshItem(GROUP_SAVE_TO, SAVE_TO_ITEM_SAVE_TO, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+               }
+               break;
+       }
+
+       if (pArgs != null)
+       {
+               pArgs->RemoveAll(true);
+               delete pArgs;
+       }
+}
+
+void
 EventEditorForm::OnFormBackRequested(Form& source)
 {
+       SetFocus();
+
+       CalendarApp* pApp = static_cast<CalendarApp*>(UiApp::GetInstance());
+       if (pApp != null)
+       {
+               if (pApp->GetOperationType() == OPERATION_TYPE_APPCONTROL)
+               {
+                       result r = SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED);
+                       AppLogDebugIf(r != E_SUCCESS, "[%s] Unable to return result.", GetErrorMessage(r));
+
+                       pApp->Terminate();
+                       return;
+               }
+       }
+
        SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
 }
 
@@ -220,8 +246,8 @@ EventEditorForm::GetItemCount(int sectionIndex)
                return INFORMATION_CONTENT_ITEM_COUNT;
        case GROUP_ADDITIONAL_CONTENT:
                return ADDITIONAL_CONTENT_ITEM_COUNT;
-//     case GROUP_SAVE_TO:
-//             return SAVE_TO_ITEM_COUNT;
+       case GROUP_SAVE_TO:
+               return SAVE_TO_ITEM_COUNT;
        }
 
        return 0;
@@ -305,14 +331,14 @@ EventEditorForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
                        break;
                }
                break;
-//     case GROUP_SAVE_TO:
-//             if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
-//             {
-//                     const Bitmap* pIcon = __pPm->GetCalendarIconN();
-//                     pItem = CreateSaveToItemN(itemWidth, __pPm->GetCalendarName(), pIcon);
-//                     delete pIcon;
-//             }
-//             break;
+       case GROUP_SAVE_TO:
+               if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
+               {
+                       const Bitmap* pIcon = __pPm->GetCalendarIconN();
+                       pItem = CreateSaveToItemN(itemWidth, __pPm->GetCalendarName(), pIcon);
+                       delete pIcon;
+               }
+               break;
        }
 
        return pItem;
@@ -327,8 +353,11 @@ EventEditorForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                switch (itemIndex)
                {
                case TITLE_CONTENT_ITEM_TITLE:
-                       __pPm->SetSubject(__pEditFieldTitle->GetText());
-                       __pEditFieldTitle = null;
+                       if (__pEditFieldTitle != null)
+                       {
+                               __pPm->SetSubject(__pEditFieldTitle->GetText());
+                               __pEditFieldTitle = null;
+                       }
                        break;
                }
                break;
@@ -338,16 +367,22 @@ EventEditorForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                case FROM_DATE_SELECTOR_ITEM_START:
                        if (__pPm->IsAllDayEvent() == true)
                        {
-                               DateTime start;
-                               start.SetValue(__pEditDateStartDate->GetYear(), __pEditDateStartDate->GetMonth(), __pEditDateStartDate->GetDay());
-                               __pPm->SetStartTime(start);
+                               if (__pEditDateStartDate != null)
+                               {
+                                       DateTime start;
+                                       start.SetValue(__pEditDateStartDate->GetYear(), __pEditDateStartDate->GetMonth(), __pEditDateStartDate->GetDay());
+                                       __pPm->SetStartTime(start);
+                               }
                        }
                        else
                        {
-                               DateTime start;
-                               start.SetValue(__pEditDateStartDate->GetYear(), __pEditDateStartDate->GetMonth(), __pEditDateStartDate->GetDay(),
-                                                          __pEditTimeStartTime->GetHour(), __pEditTimeStartTime->GetMinute());
-                               __pPm->SetStartTime(start);
+                               if (__pEditDateStartDate != null && __pEditTimeStartTime != null)
+                               {
+                                       DateTime start;
+                                       start.SetValue(__pEditDateStartDate->GetYear(), __pEditDateStartDate->GetMonth(), __pEditDateStartDate->GetDay(),
+                                                                  __pEditTimeStartTime->GetHour(), __pEditTimeStartTime->GetMinute());
+                                       __pPm->SetStartTime(start);
+                               }
                        }
                        __pEditDateStartDate = null;
                        __pEditTimeStartTime = null;
@@ -355,16 +390,22 @@ EventEditorForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                case TO_DATE_SELECTOR_ITEM_END:
                        if (__pPm->IsAllDayEvent() == true)
                        {
-                               DateTime end;
-                               end.SetValue(__pEditDateEndDate->GetYear(), __pEditDateEndDate->GetMonth(), __pEditDateEndDate->GetDay());
-                               __pPm->SetEndTime(end);
+                               if (__pEditDateEndDate != null)
+                               {
+                                       DateTime end;
+                                       end.SetValue(__pEditDateEndDate->GetYear(), __pEditDateEndDate->GetMonth(), __pEditDateEndDate->GetDay());
+                                       __pPm->SetEndTime(end);
+                               }
                        }
                        else
                        {
-                               DateTime end;
-                               end.SetValue(__pEditDateEndDate->GetYear(), __pEditDateEndDate->GetMonth(), __pEditDateEndDate->GetDay(),
-                                                        __pEditTimeEndTime->GetHour(), __pEditTimeEndTime->GetMinute());
-                               __pPm->SetEndTime(end);
+                               if (__pEditDateEndDate != null && __pEditTimeEndTime != null)
+                               {
+                                       DateTime end;
+                                       end.SetValue(__pEditDateEndDate->GetYear(), __pEditDateEndDate->GetMonth(), __pEditDateEndDate->GetDay(),
+                                                                __pEditTimeEndTime->GetHour(), __pEditTimeEndTime->GetMinute());
+                                       __pPm->SetEndTime(end);
+                               }
                        }
                        __pEditDateEndDate = null;
                        __pEditTimeEndTime = null;
@@ -373,7 +414,6 @@ EventEditorForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pIte
 //                     __pLabelTimeZone = null;
 //                     break;
                case DATE_SELECTOR_ITEM_ALL_DAY_EVENT:
-                       __pPm->SetAllDayEvent(__pTableView->IsItemChecked(GROUP_DATE_SELECTOR, DATE_SELECTOR_ITEM_ALL_DAY_EVENT));
                        break;
                }
                break;
@@ -381,12 +421,18 @@ EventEditorForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                switch (itemIndex)
                {
                case INFORMATION_CONTENT_ITEM_LOCATION:
-                       __pPm->SetLocation(__pEditFieldLocation->GetText());
-                       __pEditFieldLocation = null;
+                       if (__pEditFieldLocation != null)
+                       {
+                               __pPm->SetLocation(__pEditFieldLocation->GetText());
+                               __pEditFieldLocation = null;
+                       }
                        break;
                case INFORMATION_CONTENT_ITEM_DESCRIPTION:
-                       __pPm->SetDescription(__pExpandableEditAreaNote->GetText());
-                       __pExpandableEditAreaNote = null;
+                       if (__pExpandableEditAreaNote != null)
+                       {
+                               __pPm->SetDescription(__pExpandableEditAreaNote->GetText());
+                               __pExpandableEditAreaNote = null;
+                       }
                        break;
                }
                break;
@@ -412,9 +458,9 @@ EventEditorForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                        break;
                }
                break;
-//     case GROUP_SAVE_TO:
-//             __pLabelSaveTo = null;
-//             break;
+       case GROUP_SAVE_TO:
+               __pLabelSaveTo = null;
+               break;
        default:
                break;
        }
@@ -448,12 +494,12 @@ EventEditorForm::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                {
                        if (__pExpandableEditAreaNote->GetHeight() >= H_ITEM)
                        {
-                               __pExpandableEditAreaNote->SetPosition(X_DESCRIPTION, 0);
+                               __pExpandableEditAreaNote->SetPosition(0, 0);
                                pItem->SetSize(pItem->GetWidth(), __pExpandableEditAreaNote->GetHeight());
                        }
                        else
                        {
-                               __pExpandableEditAreaNote->SetPosition(X_DESCRIPTION, (H_ITEM - __pExpandableEditAreaNote->GetHeight()) / 2);
+                               __pExpandableEditAreaNote->SetPosition(0, (H_ITEM - __pExpandableEditAreaNote->GetHeight()) / 2);
                                pItem->SetSize(pItem->GetWidth(), H_ITEM);
                        }
                        pItem->Invalidate(true);
@@ -517,6 +563,13 @@ EventEditorForm::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pIte
                        break;
                }
                break;
+       case GROUP_SAVE_TO:
+               if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
+               {
+                       __pLabelSaveTo->SetText(__pPm->GetCalendarName());
+                       __pLabelSaveTo->Invalidate(false);
+               }
+               break;
        }
 }
 
@@ -590,14 +643,30 @@ EventEditorForm::OnSectionTableViewItemStateChanged(SectionTableView& tableView,
                        {
                                __pPm->SetAllDayEvent(false);
 
+                               DateTime startTime;
+                               startTime.SetValue(__pEditDateStartDate->GetYear(), __pEditDateStartDate->GetMonth(), __pEditDateStartDate->GetDay(),
+                                                                       __pEditTimeStartTime->GetHour(), __pEditTimeStartTime->GetMinute());
+                               DateTime endTime;
+                               endTime.SetValue(__pEditDateEndDate->GetYear(), __pEditDateEndDate->GetMonth(), __pEditDateEndDate->GetDay(),
+                                                               __pEditTimeEndTime->GetHour(), __pEditTimeEndTime->GetMinute());
+                               if (startTime >= endTime)
+                               {
+                                       endTime.AddHours(1);
+                               }
+                               __pPm->SetStartEndTime(startTime, endTime);
+
                                if (__pEditTimeStartTime != null)
                                {
+                                       __pEditTimeStartTime->SetTime(__pPm->GetStartTime());
                                        __pEditTimeStartTime->SetShowState(true);
+                                       __pEditTimeStartTime->Invalidate(false);
                                }
 
                                if (__pEditTimeEndTime != null)
                                {
+                                       __pEditTimeEndTime->SetTime(__pPm->GetEndTime());
                                        __pEditTimeEndTime->SetShowState(true);
+                                       __pEditTimeEndTime->Invalidate(false);
                                }
                        }
                }
@@ -653,13 +722,13 @@ EventEditorForm::OnSectionTableViewItemStateChanged(SectionTableView& tableView,
                                                                                                                                                  SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pList);
                }
                break;
-//     case GROUP_SAVE_TO:
-//             if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
-//             {
-//                     // Call SaveTo Popup.(Tizen 2.0 b1 RC1 APIs are not supported yet.)
-//                     UpdatePm();
-//             }
-//             break;
+       case GROUP_SAVE_TO:
+               if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
+               {
+                       // Call SaveTo Popup.(Tizen 2.0 b1 RC1 APIs are not supported yet.)
+                       __pCalendarSelectorPopup->RequestCalendar(this);
+               }
+               break;
        }
 }
 
@@ -672,6 +741,7 @@ EventEditorForm::OnSectionTableViewContextItemActivationStateChanged(SectionTabl
 void
 EventEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        if (previousSceneId == IDSCN_REMINDER)
        {
                int index = 0;
@@ -760,58 +830,80 @@ EventEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId
        }
        else
        {
-               if (pArgs != null)
+               CalendarApp* pApp = static_cast<CalendarApp*>(UiApp::GetInstance());
+               if (pApp->GetOperationType() == OPERATION_TYPE_DEFAULT)
                {
-                       CalEventInstance* pEvent = dynamic_cast<CalEventInstance*>(pArgs->GetAt(0));
-                       DateTime* pStartTime = null;
-
-                       if (pEvent != null)
+                       if (pArgs != null)
                        {
-                               bool allEventEditing = true;
-                               Boolean* pAllEventEditing = dynamic_cast<Boolean*>(pArgs->GetAt(1));
-                               if (pAllEventEditing != null)
-                               {
-                                       allEventEditing = pAllEventEditing->value;
-                               }
-                               __pPm->SetAllEventEditing(allEventEditing);
+                               CalEventInstance* pEvent = dynamic_cast<CalEventInstance*>(pArgs->GetAt(0));
+                               DateTime* pStartTime = null;
 
-                               result r = E_SUCCESS;
-                               if (allEventEditing == true)
-                               {
-                                       r = __pPm->SetEventId(pEvent->GetOriginalEventId());
-                               }
-                               else
+                               if (pEvent != null)
                                {
-                                       r = __pPm->SetEventInstance(*pEvent);
-                               }
-                               if (r != E_SUCCESS)
-                               {
-                                       AppLog("[%s] Unable to get event.", GetErrorMessage(r));
-                                       SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
-                                       return;
-                               }
+                                       bool allEventEditing = true;
+                                       Boolean* pAllEventEditing = dynamic_cast<Boolean*>(pArgs->GetAt(1));
+                                       if (pAllEventEditing != null)
+                                       {
+                                               allEventEditing = pAllEventEditing->value;
+                                       }
+                                       __pPm->SetAllEventEditing(allEventEditing);
 
-                               SetStyle(EDIT_EVENT_FORM_STYLE_EDIT);
-                       }
+                                       result r = E_SUCCESS;
+                                       if (allEventEditing == true)
+                                       {
+                                               r = __pPm->SetEventId(pEvent->GetOriginalEventId());
+                                       }
+                                       else
+                                       {
+                                               r = __pPm->SetEventInstance(*pEvent);
+                                       }
+                                       if (r != E_SUCCESS)
+                                       {
+                                               AppLogDebug("[%s] Unable to get event.", GetErrorMessage(r));
+                                               SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+                                               AppLogDebug("Enter.");
+                                               return;
+                                       }
 
-                       pStartTime = dynamic_cast<DateTime*>(pArgs->GetAt(0));
-                       if (pStartTime != null)
-                       {
-                               DateTime end;
-                               if (pStartTime->GetMinute() >= 0 && pStartTime->GetMinute() < HOUR_TO_HALF_MINUTE)
-                               {
-                                       pStartTime->AddMinutes(HOUR_TO_HALF_MINUTE - pStartTime->GetMinute());
+                                       SetStyle(EDIT_EVENT_FORM_STYLE_EDIT);
                                }
-                               else if (pStartTime->GetMinute() >= HOUR_TO_HALF_MINUTE && pStartTime->GetMinute() < HOUR_TO_MAX_MINUTE)
+
+                               pStartTime = dynamic_cast<DateTime*>(pArgs->GetAt(0));
+                               if (pStartTime != null)
                                {
-                                       pStartTime->AddMinutes(HOUR_TO_MAX_MINUTE - pStartTime->GetMinute());
-                               }
+                                       pStartTime->AddHours(1);
+                                       pStartTime->AddMinutes(-pStartTime->GetMinute());
+                                       pStartTime->AddSeconds(-pStartTime->GetSecond());
+                                       DateTime end = *pStartTime;
+                                       end.AddHours(1);
+                                       __pPm->SetStartEndTime(*pStartTime, end);
 
-                               end = *pStartTime;
-                               end.AddHours(1);
-                               __pPm->SetStartEndTime(*pStartTime, end);
+                                       SetStyle(EDIT_EVENT_FORM_STYLE_CREATE);
 
-                               SetStyle(EDIT_EVENT_FORM_STYLE_CREATE);
+                                       if (__pEditFieldTitle != null)
+                                       {
+                                               __pEditFieldTitle->SetFocus();
+                                       }
+                               }
+                       }
+               }
+               else
+               {
+                       //AppControl
+                       DateTime start;
+                       SystemTime::GetCurrentTime(TIME_MODE_WALL, start);
+                       start.AddHours(1);
+                       start.AddMinutes(-start.GetMinute());
+                       start.AddSeconds(-start.GetSecond());
+
+                       DateTime end = start;
+                       end.AddHours(1);
+                       __pPm->SetStartEndTime(start, end);
+
+                       SetStyle(EDIT_EVENT_FORM_STYLE_CREATE);
+                       if (__pEditFieldTitle != null)
+                       {
+                               __pEditFieldTitle->SetFocus();
                        }
                }
        }
@@ -823,30 +915,41 @@ EventEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       AppLogDebug("Exit.");
 }
 
 void
 EventEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
+       AppLogDebug("Exit.");
 }
 
 void
 EventEditorForm::OnActionPerformed(const Control& source, int actionId)
 {
-       Frame* pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
-       AppAssertf(pFrame != null, "[E_FAILURE] Unable to get frame.");
-       if (pFrame->GetFrameAnimator() != null && pFrame->GetFrameAnimator()->GetStatus() == ANIMATOR_STATUS_PLAYING)
-       {
-               // Ignore event, if animator's status is ANIMATOR_STATUS_PLAYING.
-               return;
-       }
-
+       AppLogDebug("Enter.");
+       SetFocus();
        switch (actionId)
        {
        case IDA_EVENT_EDITOR_FORM_SAVE:
                UpdatePm();
                if (__pPm->Update() == E_SUCCESS)
                {
+                       CalendarApp* pApp = static_cast<CalendarApp*>(UiApp::GetInstance());
+                       if (pApp != null)
+                       {
+                               if (pApp->GetOperationType() == OPERATION_TYPE_APPCONTROL)
+                               {
+                                       result r = SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED);
+                                       AppLogDebugIf(r != E_SUCCESS, "[%s] Unable to return result.", GetErrorMessage(r));
+
+                                       pApp->Terminate();
+                                       AppLogDebug("Exit.");
+                                       return;
+                               }
+                       }
+
                        CalEventInstance* pEventInstance = __pPm->GetEventInstance();
                        if (pEventInstance != null)
                        {
@@ -963,8 +1066,7 @@ EventEditorForm::OnActionPerformed(const Control& source, int actionId)
                break;
        }
        }
-
-       SetFocus();
+       AppLogDebug("Exit.");
 }
 
 void
@@ -1031,32 +1133,17 @@ EventEditorForm::OnDateChangeCanceled(const Control& source)
 void
 EventEditorForm::OnKeypadWillOpen(Control& source)
 {
-       ButtonItem saveItem;
-       saveItem.Construct(BUTTON_ITEM_STYLE_TEXT, IDA_EVENT_EDITOR_FORM_SAVE);
-       saveItem.SetText(ResourceManager::GetString(IDS_CLD_SK_SAVE));
-       GetHeader()->SetButton(BUTTON_POSITION_LEFT, saveItem);
-
-       ButtonItem cancelItem;
-       cancelItem.Construct(BUTTON_ITEM_STYLE_TEXT, IDA_EVENT_EDITOR_FORM_CANCEL);
-       cancelItem.SetText(ResourceManager::GetString(IDS_CLD_SK_CANCEL));
-       GetHeader()->SetButton(BUTTON_POSITION_RIGHT, cancelItem);
-
-       GetHeader()->AddActionEventListener(*this);
-       GetFooter()->SetShowState(false);
-       Invalidate(true);
 }
 
 void
 EventEditorForm::OnKeypadOpened(Control& source)
 {
+       Invalidate(true);
 }
 
 void
 EventEditorForm::OnKeypadClosed(Control& source)
 {
-       GetHeader()->RemoveActionEventListener(*this);
-       GetHeader()->RemoveAllButtons();
-       GetFooter()->SetShowState(true);
        Invalidate(true);
 }
 
@@ -1152,6 +1239,7 @@ EventEditorForm::CreateStartTimeItemN(int itemWidth, const DateTime& start, bool
 
        pItem->AddControl(*pStartDate);
 
+       pStartDate->SetYearRange(Calendarbook::GetMinDateTime().GetYear(), Calendarbook::GetMaxDateTime().GetYear());
        pStartDate->SetDate(start);
        pStartDate->AddDateChangeEventListener(*this);
        pItem->SetIndividualSelectionEnabled(pStartDate, true);
@@ -1199,6 +1287,7 @@ EventEditorForm::CreateEndTimeItemN(int itemWidth, const DateTime& end, bool isA
 
        pItem->AddControl(*pEndDate);
 
+       pEndDate->SetYearRange(Calendarbook::GetMinDateTime().GetYear(), Calendarbook::GetMaxDateTime().GetYear());
        pEndDate->SetDate(end);
        pEndDate->AddDateChangeEventListener(*this);
        pItem->SetIndividualSelectionEnabled(pEndDate, true);
@@ -1270,7 +1359,7 @@ EventEditorForm::CreateAllDayEventItemN(int itemWidth)
 
        Label* pLabel = null;
 
-       pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_MARK);
+       pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING);
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
 
        pLabel = new (std::nothrow) Label();
@@ -1291,18 +1380,8 @@ EventEditorForm::CreateDescriptionItemN(int itemWidth, const String& description
        pItem->Construct(Dimension(itemWidth, H_ITEM));
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
 
-       Label* pLabelIcon = new (std::nothrow) Label();
-       pLabelIcon->Construct(Rectangle(X_ITEM_ICON, Y_ITEM_ICON, W_ITEM_ICON, H_ITEM_ICON), L"");
-       Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_LIST_ICON_DESCRIPTION);
-       if (pIcon != null)
-       {
-               pLabelIcon->SetBackgroundBitmap(*pIcon);
-               delete pIcon;
-       }
-       pItem->AddControl(*pLabelIcon);
-
        __pExpandableEditAreaNote = new (std::nothrow) ExpandableEditArea();
-       __pExpandableEditAreaNote->Construct(Rectangle(X_DESCRIPTION, Y_DESCRIPTION, itemWidth - X_DESCRIPTION, H_DESCRIPTION),
+       __pExpandableEditAreaNote->Construct(Rectangle(0, Y_DESCRIPTION, itemWidth, H_DESCRIPTION),
                                                                EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE, EXPANDABLE_EDIT_MAX_LINE);
        __pExpandableEditAreaNote->SetBackgroundBitmap(EDIT_STATUS_NORMAL, *ResourceManager::GetBlankBitmap());
        __pExpandableEditAreaNote->SetBackgroundBitmap(EDIT_STATUS_DISABLED, *ResourceManager::GetBlankBitmap());
@@ -1321,7 +1400,7 @@ EventEditorForm::CreateDescriptionItemN(int itemWidth, const String& description
        // Adjust text position
        if (__pExpandableEditAreaNote->GetHeight() >= H_ITEM && __pExpandableEditAreaNote->GetY() != 0)
        {
-               __pExpandableEditAreaNote->SetPosition(X_DESCRIPTION, 0);
+               __pExpandableEditAreaNote->SetPosition(0, 0);
        }
 
        return pItem;
@@ -1334,18 +1413,8 @@ EventEditorForm::CreateLocationItemN(int itemWidth, const String& location)
        pItem->Construct(Dimension(itemWidth, H_ITEM));
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
 
-       Label* pLabelIcon = new (std::nothrow) Label();
-       pLabelIcon->Construct(Rectangle(X_ITEM_ICON, Y_ITEM_ICON, W_ITEM_ICON, H_ITEM_ICON), L"");
-       Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_LIST_ICON_MAP);
-       if (pIcon != null)
-       {
-               pLabelIcon->SetBackgroundBitmap(*pIcon);
-               delete pIcon;
-       }
-       pItem->AddControl(*pLabelIcon);
-
        EditField* pLocation = new (std::nothrow) EditField();
-       pLocation->Construct(Rectangle(X_LOCATION, 0, itemWidth - X_LOCATION, H_ITEM), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
+       pLocation->Construct(Rectangle(0, 0, itemWidth, H_ITEM), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
 
        pItem->AddControl(*pLocation);
        pItem->SetIndividualSelectionEnabled(pLocation, true);
@@ -1511,63 +1580,40 @@ EventEditorForm::CreateRepeatItemN(int itemWidth, const String& repeat)
        return pItem;
 }
 
-//TableViewItem*
-//EventEditorForm::CreateSaveToItemN(int itemWidth, const String& calendarName, const Bitmap* pCalendarIcon)
-//{
-//     TableViewItem* pItem = new (std::nothrow) TableViewItem();
-//
-//     Rectangle contentBounds(0, Y_ITEM_CONTENT02, itemWidth, H_ITEM_CONTENT02);
-//     Label* pLabel = null;
-//     Label* pIconLabel = null;
-//     Label* pContentLabel = null;
-//
-//     pItem->Construct(Dimension(itemWidth, H_ITEM_2LINE));
-//     pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
-//
-//     pLabel = new (std::nothrow) Label();
-//     pLabel->Construct(Rectangle(0, Y_ITEM_CONTENT01, itemWidth, H_ITEM_CONTENT01),
-//                                               ResourceManager::GetString(IDS_EVENT_EDITOR_SAVE_TO));
-//
-//     pItem->AddControl(*pLabel);
-//
-//     pLabel->SetTextColor(Color(COLOR_DETAIL02));
-//     pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-//     pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-//
-//     if (pCalendarIcon != null)
-//     {
-//             pIconLabel = new (std::nothrow) Label();
-//             pIconLabel->Construct(Rectangle(0, Y_ITEM_CONTENT02, W_ITEM_SAVE_TO_ICON, H_ITEM_SAVE_TO_ICON), L"");
-//
-//             pItem->AddControl(*pIconLabel);
-//
-//             pIconLabel->SetBackgroundBitmap(*pCalendarIcon);
-//             contentBounds.x += W_ITEM_SAVE_TO_ICON;
-//             contentBounds.width -= W_ITEM_SAVE_TO_ICON;
-//     }
-//
-//     pIconLabel = new (std::nothrow) Label();
-//     pIconLabel->Construct(Rectangle(X_ITEM_SAVE_TO_ICON, Y_ITEM_SAVE_TO_ICON, W_ITEM_SAVE_TO_ICON, H_ITEM_SAVE_TO_ICON), L"");
-//     pItem->AddControl(*pIconLabel);
-//     pIconLabel->SetBackgroundColor(COLOR_DETAIL04);
-//     pIconLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-//
-//     contentBounds.x += W_ITEM_SAVE_TO_ICON + X_ITEM_SAVE_TO_ICON;
-//     contentBounds.width -= W_ITEM_SAVE_TO_ICON;
-//
-//     pContentLabel = new (std::nothrow) Label();
-//     pContentLabel->Construct(contentBounds, calendarName);
-//
-//     pItem->AddControl(*pContentLabel);
-//
-//     pContentLabel->SetTextColor(Color(COLOR_DETAIL03));
-//     pContentLabel->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-//     pContentLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-//
-//     __pLabelSaveTo = pContentLabel;
-//
-//     return pItem;
-//}
+TableViewItem*
+EventEditorForm::CreateSaveToItemN(int itemWidth, const String& calendarName, const Bitmap* pCalendarIcon)
+{
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+
+       Label* pLabel = null;
+       Label* pContentLabel = null;
+
+       pItem->Construct(Dimension(itemWidth, H_ITEM_2LINE));
+       pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+       pLabel = new (std::nothrow) Label();
+       pLabel->Construct(Rectangle(0, Y_ITEM_CONTENT01, itemWidth, H_ITEM_CONTENT01),
+                                                 ResourceManager::GetString(IDS_ST_BODY_SAVE_TO));
+
+       pItem->AddControl(*pLabel);
+
+       pLabel->SetTextColor(Color(COLOR_DETAIL02));
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+       pContentLabel = new (std::nothrow) Label();
+       pContentLabel->Construct(Rectangle(0, Y_ITEM_CONTENT02, itemWidth, H_ITEM_CONTENT02), calendarName);
+
+       pItem->AddControl(*pContentLabel);
+
+       pContentLabel->SetTextColor(Color(COLOR_ADDITIONAL_CONTENT));
+       pContentLabel->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pContentLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+       __pLabelSaveTo = pContentLabel;
+
+       return pItem;
+}
 
 result
 EventEditorForm::SetStyle(EditEventFormStyle style)
@@ -1585,6 +1631,13 @@ EventEditorForm::SetStyle(EditEventFormStyle style)
 
        if (__pTableView != null)
        {
+               __pEditFieldTitle = null;
+               __pEditFieldLocation = null;
+               __pEditDateStartDate = null;
+               __pEditTimeStartTime = null;
+               __pEditDateEndDate = null;
+               __pEditTimeEndTime = null;
+               __pExpandableEditAreaNote = null;
                __pTableView->UpdateTableView();
        }
 
@@ -1593,20 +1646,17 @@ EventEditorForm::SetStyle(EditEventFormStyle style)
        return E_SUCCESS;
 }
 
-//result
-//EventEditorForm::Update(void)
-//{
-//     UpdatePm();
-//
-//     if (__pPm->IsAllEventEditing() == false)
-//     {
-//             __pPm->RemoveEvent(false);
-//     }
-//
-//     __pPm->Update();
-//
-//     return E_SUCCESS;
-//}
+result
+EventEditorForm::SendAppControlResult(AppCtrlResult appControlResult)
+{
+       CalendarApp* pApp = static_cast<CalendarApp*>(UiApp::GetInstance());
+       TryReturn(pApp != null, E_FAILURE, "[E_FAILURE] Unable to get app instance.");
+
+       result r = AppControlProviderManager::GetInstance()->SendAppControlResult(pApp->GetRequestId(), appControlResult, null);
+       AppLogDebugIf(r != E_SUCCESS, "[%s] Unable to return result.", GetErrorMessage(r));
+
+       return r;
+}
 
 result
 EventEditorForm::UpdatePm(void)
index 4da0ac0..e0f7780 100644 (file)
@@ -26,6 +26,7 @@
 using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Locales;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 
@@ -37,41 +38,43 @@ enum EventItemElementId
        ID_EVENT_ITEM_ELEMENT_DATE_RANGE,
        ID_EVENT_ITEM_ELEMENT_REMINDER,
        ID_EVENT_ITEM_ELEMENT_REPEAT,
+       ID_EVENT_ITEM_ELEMENT_PRIORITY,
        ID_EVENT_ITEM_ELEMENT_FACEBOOK
 };
 
-static const int H_ITEM = 126;
+static const int H_ITEM = 140;
 static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
 static const int X_ITEM_MAIN_CONTENT = 26;
-static const int Y_ITEM_MAIN_CONTENT = 10;
+static const int Y_ITEM_MAIN_CONTENT = 17;
+static const int W_ITEM_MAIN_CONTENT_MARGIN = 16;
 static const int H_ITEM_MAIN_CONTENT = 54;
 static const int FONT_SIZE_ITEM_MAIN_CONTENT = 44;
 static const unsigned int COLOR_ITEM_MAIN_CONTENT = Color32<0, 0, 0>::Value;
 static const unsigned int COLOR_ITEM_MAIN_CONTENT_FOCUS = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_ITEM_MAIN_CONTENT_SEARCH_FOCUS = Color32<42, 137, 194>::Value;
 static const int X_ITEM_SUB_CONTENT = 26;
-static const int Y_ITEM_SUB_CONTENT = 78;
+static const int Y_ITEM_SUB_CONTENT = 85;
 static const int W_ITEM_SUB_CONTENT_MARGIN = 26;
 static const int H_ITEM_SUB_CONTENT = 38;
 static const int FONT_SIZE_ITEM_SUB_CONTENT = 32;
-static const unsigned int COLOR_ITEM_SUB_CONTENT = Color32<128, 128, 128>::Value;
+static const unsigned int COLOR_ITEM_SUB_CONTENT = Color32<59, 115, 182>::Value;
 static const unsigned int COLOR_ITEM_SUB_CONTENT_FOCUS = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_ITEM_SUB_CONTENT_SEARCH_FOCUS = Color32<42, 137, 194>::Value;
 static const int Y_EVENT_COLOR_BAR = 4;
-static const int W_EVENT_COLOR_BAR = 7;
-static const int H_EVENT_COLOR_BAR = 118;
-static const int W_ICON = 38;
-static const int H_ICON = 38;
-static const int W_RANGE_TO_LOCATION_MARGIN = 32;
+static const int W_EVENT_COLOR_BAR = 8;
+static const int H_EVENT_COLOR_BAR = 132;
+static const int W_ICON = 45;
+static const int H_ICON = 45;
+static const int W_RANGE_TO_LOCATION_MARGIN = 26;
 static const int LIST_ANNEX_MARGIN = 30;
 
 
-class TitleElement
+class EventTitleElement
        : public virtual ICustomElement
 {
 public:
-       TitleElement(const String& title, const String& searchText);
-       virtual ~TitleElement(void);
+       EventTitleElement(const String& title, const String& searchText);
+       virtual ~EventTitleElement(void);
 
        virtual bool OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status);
 
@@ -80,23 +83,24 @@ private:
        const String& __searchText;
 }; // TitleElement
 
-TitleElement::TitleElement(const String& title, const String& searchText)
+EventTitleElement::EventTitleElement(const String& title, const String& searchText)
        : __title(title)
        , __searchText(searchText)
 {
 }
 
-TitleElement::~TitleElement(void)
+EventTitleElement::~EventTitleElement(void)
 {
 }
 
 bool
-TitleElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status)
+EventTitleElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status)
 {
        EnrichedText text;
        text.Construct(Dimension(rect.width, rect.height));
        text.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
        text.SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
+       text.SetTextAbbreviationEnabled(true);
 
        String lowerTitle = __title;
        lowerTitle.ToLower();
@@ -165,12 +169,12 @@ TitleElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatu
        return true;
 }
 
-class LocationElement
+class EventLocationElement
        : public virtual ICustomElement
 {
 public:
-               LocationElement(const String& location, const String& searchText);
-       virtual ~LocationElement(void);
+               EventLocationElement(const String& location, const String& searchText);
+       virtual ~EventLocationElement(void);
 
        virtual bool OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status);
 
@@ -179,23 +183,24 @@ private:
        const String& __searchText;
 }; // TitleElement
 
-LocationElement::LocationElement(const String& location, const String& searchText)
+EventLocationElement::EventLocationElement(const String& location, const String& searchText)
        : __location(location)
        , __searchText(searchText)
 {
 }
 
-LocationElement::~LocationElement(void)
+EventLocationElement::~EventLocationElement(void)
 {
 }
 
 bool
-LocationElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status)
+EventLocationElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status)
 {
        EnrichedText text;
        text.Construct(Dimension(rect.width, rect.height));
        text.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
        text.SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
+       text.SetTextAbbreviationEnabled(true);
 
        String lowerLocation = __location;
        lowerLocation.ToLower();
@@ -270,6 +275,7 @@ EventItem::EventItem(void)
        , __width(0)
        , __pTitleElement(null)
        , __pLocationElement(null)
+       , __priority(EVENT_PRIORITY_NORMAL)
        , __hasReminder(false)
        , __isRepeated(false)
        , __isFacebook(false)
@@ -300,6 +306,12 @@ EventItem::GetLocation(void) const
        return __location;
 }
 
+EventPriority
+EventItem::GetPriority(void) const
+{
+       return __priority;
+}
+
 const String&
 EventItem::GetSearchText(void) const
 {
@@ -422,6 +434,12 @@ EventItem::SetLocation(const String& location)
 }
 
 void
+EventItem::SetPriority(EventPriority priority)
+{
+       __priority = priority;
+}
+
+void
 EventItem::SetReminder(bool hasReminder)
 {
        __hasReminder = hasReminder;
@@ -466,38 +484,61 @@ EventItem::UpdateElements(void)
        delete pBitmap;
 
        int titleWidth = __width - X_ITEM_MAIN_CONTENT;
-       if (__isFacebook == true)
+       if (__isRepeated == true)
        {
-               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_FACEBOOK);
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_REPEAT);
                if (pBitmap != null)
                {
                        AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
-                                       ID_EVENT_ITEM_ELEMENT_FACEBOOK, *pBitmap);
-                       titleWidth -= X_ITEM_MAIN_CONTENT + W_ICON;
+                                       ID_EVENT_ITEM_ELEMENT_REPEAT, *pBitmap);
+                       titleWidth -= W_ICON;
                        delete pBitmap;
                }
        }
 
        if (__hasReminder == true)
        {
-               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_REMINDER);
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_ALARM);
                if (pBitmap != null)
                {
                        AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
                                        ID_EVENT_ITEM_ELEMENT_REMINDER, *pBitmap);
-                       titleWidth -= X_ITEM_MAIN_CONTENT + W_ICON;
+                       titleWidth -= W_ICON;
                        delete pBitmap;
                }
        }
 
-       if (__isRepeated == true)
+       if (__priority == EVENT_PRIORITY_LOW)
        {
-               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_REPEAT);
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_PRIORITY_LOW);
                if (pBitmap != null)
                {
                        AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
-                                       ID_EVENT_ITEM_ELEMENT_REPEAT, *pBitmap);
-                       titleWidth -= X_ITEM_MAIN_CONTENT + W_ICON;
+                                       ID_EVENT_ITEM_ELEMENT_PRIORITY, *pBitmap);
+                       titleWidth -= W_ICON;
+                       delete pBitmap;
+               }
+       }
+       else if (__priority == EVENT_PRIORITY_HIGH)
+       {
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_PRIORITY);
+               if (pBitmap != null)
+               {
+                       AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
+                                       ID_EVENT_ITEM_ELEMENT_PRIORITY, *pBitmap);
+                       titleWidth -= W_ICON;
+                       delete pBitmap;
+               }
+       }
+
+       if (__isFacebook == true)
+       {
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_FACEBOOK);
+               if (pBitmap != null)
+               {
+                       AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
+                                       ID_EVENT_ITEM_ELEMENT_FACEBOOK, *pBitmap);
+                       titleWidth -= W_ICON;
                        delete pBitmap;
                }
        }
@@ -505,8 +546,14 @@ EventItem::UpdateElements(void)
        if (__title.IsEmpty() == false)
        {
                delete __pTitleElement;
-               __pTitleElement = new (std::nothrow) TitleElement(__title, __searchText);
-               AddElement(Rectangle(X_ITEM_MAIN_CONTENT, Y_ITEM_MAIN_CONTENT, titleWidth, H_ITEM_MAIN_CONTENT),
+               __pTitleElement = new (std::nothrow) EventTitleElement(__title, __searchText);
+
+               if (titleWidth < __width - X_ITEM_MAIN_CONTENT)
+               {
+                       titleWidth -= W_ITEM_MAIN_CONTENT_MARGIN;
+               }
+
+               AddElement(Rectangle(X_ITEM_MAIN_CONTENT, Y_ITEM_MAIN_CONTENT, titleWidth - X_ITEM_MAIN_CONTENT, H_ITEM_MAIN_CONTENT),
                                        ID_EVENT_ITEM_ELEMENT_TITLE, *__pTitleElement);
        }
 
@@ -549,22 +596,8 @@ EventItem::UpdateElements(void)
        if (__location.IsEmpty() == false && locationWidth > 0)
        {
                delete __pLocationElement;
-               __pLocationElement = new (std::nothrow) LocationElement(__location, __searchText);
+               __pLocationElement = new (std::nothrow) EventLocationElement(__location, __searchText);
                AddElement(Rectangle(__width - locationWidth - W_ITEM_SUB_CONTENT_MARGIN, Y_ITEM_SUB_CONTENT, locationWidth, H_ITEM_SUB_CONTENT),
                                        ID_EVENT_ITEM_ELEMENT_LOCATION, *__pLocationElement);
-
-//             Dimension extent;
-//             Font font;
-//             font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_ITEM_SUB_CONTENT);
-//             font.GetTextExtent(__location, __location.GetLength(), extent);
-//             if (locationWidth > extent.width)
-//             {
-//                     locationWidth = extent.width;
-//             }
-//
-//             AddElement(Rectangle(__width - locationWidth - W_ITEM_SUB_CONTENT_MARGIN, Y_ITEM_SUB_CONTENT, locationWidth, H_ITEM_SUB_CONTENT),
-//                             ID_EVENT_ITEM_ELEMENT_LOCATION, __location, FONT_SIZE_ITEM_SUB_CONTENT,
-//                             Color(COLOR_ITEM_SUB_CONTENT), Color(COLOR_ITEM_SUB_CONTENT_FOCUS), Color(COLOR_ITEM_SUB_CONTENT_FOCUS));
-//             SetElementTextHorizontalAlignment(ID_EVENT_ITEM_ELEMENT_LOCATION, ALIGNMENT_RIGHT);
        }
 }
index c345979..779b1bf 100644 (file)
@@ -41,6 +41,79 @@ using namespace Tizen::System;
 
 EventListPresentationModel* EventListPresentationModel::__pInstance = null;
 
+
+class CurrentDateChangeEventArg
+       : public virtual IEventArg
+{
+public:
+       const DateTime& GetCurrent(void) const;
+       const DateTime& GetPreview(void) const;
+
+       CurrentDateChangeEventArg(const DateTime& current, const DateTime& preview);
+       virtual ~CurrentDateChangeEventArg(void);
+
+private:
+       CurrentDateChangeEventArg(void);
+
+private:
+       DateTime __current;
+       DateTime __preview;
+};
+
+CurrentDateChangeEventArg::CurrentDateChangeEventArg(const DateTime& current, const DateTime& preview)
+       : __current(current), __preview(preview)
+{
+}
+
+CurrentDateChangeEventArg::~CurrentDateChangeEventArg(void)
+{
+}
+
+const DateTime&
+CurrentDateChangeEventArg::GetCurrent(void) const
+{
+       return __current;
+}
+
+const DateTime&
+CurrentDateChangeEventArg::GetPreview(void) const
+{
+       return __preview;
+}
+
+
+class CurrentDateChangeEvent
+       : public Event
+{
+public:
+       CurrentDateChangeEvent(void);
+       virtual ~CurrentDateChangeEvent(void);
+
+protected:
+       virtual void FireImpl(IEventListener& listener, const IEventArg& arg);
+};
+
+CurrentDateChangeEvent::CurrentDateChangeEvent(void)
+{
+}
+
+CurrentDateChangeEvent::~CurrentDateChangeEvent(void)
+{
+}
+
+void
+CurrentDateChangeEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
+{
+       ICurrentDateChangedEventListener* pListener = dynamic_cast<ICurrentDateChangedEventListener*>(&listener);
+       TryReturnVoid(pListener != null, "[E_FAILURE] Unable to get event listener.");
+
+       const CurrentDateChangeEventArg* pArg = dynamic_cast<const CurrentDateChangeEventArg*>(&arg);
+       TryReturnVoid(pArg != null, "[E_FAILURE] Unable to get event arguments.");
+
+       pListener->OnCurrentDateChanged(pArg->GetCurrent(), pArg->GetPreview());
+}
+
+
 EventListPresentationModel::EventListPresentationModel(void)
        : __pCalendar(null)
        , __pCalendarbook(null)
@@ -52,6 +125,7 @@ EventListPresentationModel::EventListPresentationModel(void)
        , __pMonthFormatter(null)
        , __pYearFormatter(null)
        , __pTimeFormatter(null)
+       , __pCurrentDateChangeEvent(null)
        , __isEmpty(false)
        , __isPendingCalendarEventChangedEvent(false)
 {
@@ -60,6 +134,10 @@ EventListPresentationModel::EventListPresentationModel(void)
 EventListPresentationModel::~EventListPresentationModel(void)
 {
        __timer.Cancel();
+       __eventChangedListeners.RemoveAll(false);
+
+       delete __pCurrentDateChangeEvent;
+       __pCurrentDateChangeEvent = null;
 
        delete __pCalendarbook;
 
@@ -79,9 +157,6 @@ EventListPresentationModel::~EventListPresentationModel(void)
        delete __pMonthFormatter;
        delete __pYearFormatter;
        delete __pTimeFormatter;
-
-       __dateChangedListeners.RemoveAll(false);
-       __eventChangedListeners.RemoveAll(false);
 }
 
 result
@@ -99,13 +174,13 @@ EventListPresentationModel::RemoveCalendarEventChangedEventListener(ICalendarEve
 result
 EventListPresentationModel::AddCurrentDateChangedEventListener(ICurrentDateChangedEventListener& listener)
 {
-       return __dateChangedListeners.Add(&listener);
+       return __pCurrentDateChangeEvent->AddListener(listener, true);
 }
 
 result
 EventListPresentationModel::RemoveCurrentDateChangedEventListener(ICurrentDateChangedEventListener& listener)
 {
-       return __dateChangedListeners.Remove(listener);
+       return __pCurrentDateChangeEvent->RemoveListener(listener);
 }
 
 DateTime
@@ -298,7 +373,7 @@ EventListPresentationModel::GetAllDayEventCount(int groupIndex) const
                return 0;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), 0, "[E_FAILURE] Unable to load node.");
 
        return pNode->GetAllDayEventCount();
@@ -330,7 +405,7 @@ EventListPresentationModel::GetEventCount(int groupIndex) const
                return 0;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), 0, "[E_FAILURE] Unable to load node.");
 
        return pNode->GetEventCount();
@@ -355,7 +430,7 @@ EventListPresentationModel::GetWholeEventCount(int groupIndex) const
                return 0;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), 0, "[E_FAILURE] Unable to load node.");
 
        return pNode->GetWholeEventCount();
@@ -374,7 +449,7 @@ EventListPresentationModel::GetDateTimeFromGroupIndex(int groupIndex) const
                groupIndex += __startNodeIndexOfView;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), DateTime(), "[E_FAILURE] Unable to load node.");
 
        return pNode->GetDate();
@@ -426,7 +501,7 @@ EventListPresentationModel::GetAllDayEvent(int groupIndex, int index) const
                return null;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), null, "[E_FAILURE] Unable to load node.");
 
        return pNode->GetAllDayEvent(index);
@@ -451,7 +526,7 @@ EventListPresentationModel::GetEvent(int groupIndex, int index) const
                return null;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), null, "[E_FAILURE] Unable to load node.");
 
        return pNode->GetEvent(index);
@@ -476,7 +551,7 @@ EventListPresentationModel::GetEventWithWholeIndex(int groupIndex, int index) co
                return null;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
+       const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), null, "[E_FAILURE] Unable to load node.");
 
        return pNode->GetEventWithWholeIndex(index);
@@ -494,7 +569,9 @@ EventListPresentationModel::AddCurrentYear(int year)
                {
                        AdjustEventsList();
                }
-               FireCurrentDateChangedEvent(current, prev);
+
+               CurrentDateChangeEventArg* pArg = new (std::nothrow) CurrentDateChangeEventArg(current, prev);
+               __pCurrentDateChangeEvent->Fire(*pArg);
        }
 }
 
@@ -510,7 +587,9 @@ EventListPresentationModel::AddCurrentMonth(int month)
                {
                        AdjustEventsList();
                }
-               FireCurrentDateChangedEvent(current, prev);
+
+               CurrentDateChangeEventArg* pArg = new (std::nothrow) CurrentDateChangeEventArg(current, prev);
+               __pCurrentDateChangeEvent->Fire(*pArg);
        }
 }
 
@@ -526,7 +605,9 @@ EventListPresentationModel::AddCurrentDay(int day)
                {
                        AdjustEventsList();
                }
-               FireCurrentDateChangedEvent(current, prev);
+
+               CurrentDateChangeEventArg* pArg = new (std::nothrow) CurrentDateChangeEventArg(current, prev);
+               __pCurrentDateChangeEvent->Fire(*pArg);
        }
 }
 
@@ -542,7 +623,9 @@ EventListPresentationModel::SetCurrentDate(const DateTime& current)
                {
                        AdjustEventsList();
                }
-               FireCurrentDateChangedEvent(currentDate, prev);
+
+               CurrentDateChangeEventArg* pArg = new (std::nothrow) CurrentDateChangeEventArg(current, prev);
+               __pCurrentDateChangeEvent->Fire(*pArg);
        }
 }
 
@@ -784,7 +867,7 @@ EventListPresentationModel::AdjustEventsList(void)
                {
                        while (pEnum->MoveNext() == E_SUCCESS)
                        {
-                               if (static_cast<EventListNode*>(pEnum->GetCurrent())->GetDate() >= __minRangeOfView)
+                               if (static_cast<EventInstanceListNode*>(pEnum->GetCurrent())->GetDate() >= __minRangeOfView)
                                {
                                        break;
                                }
@@ -798,7 +881,7 @@ EventListPresentationModel::AdjustEventsList(void)
                {
                        while (pEnum->MovePrevious() == E_SUCCESS)
                        {
-                               if (static_cast<EventListNode*>(pEnum->GetCurrent())->GetDate() < __maxRangeOfView)
+                               if (static_cast<EventInstanceListNode*>(pEnum->GetCurrent())->GetDate() < __maxRangeOfView)
                                {
                                        break;
                                }
@@ -871,7 +954,8 @@ EventListPresentationModel::Construct(void)
        __pCalendar->SetTime(current);
 
        __pCalendarbook = new (std::nothrow) Calendarbook();
-       __pCalendarbook->Construct(*this);
+       result r = __pCalendarbook->Construct(*this);
+       AppAssertf(r == E_SUCCESS, "[%s] Unable to construct Calendarbook.", GetErrorMessage(r));
 
        __isEmpty = GetAllOriginalEventCount() <= 0;
 
@@ -947,6 +1031,8 @@ EventListPresentationModel::Construct(void)
        __timer.Construct(*this);
        __timer.Start((60 - current.GetSecond()) * 1000);
 
+       __pCurrentDateChangeEvent = new (std::nothrow) CurrentDateChangeEvent();
+
        static_cast<CalendarApp*>(Tizen::App::UiApp::GetInstance())->AddCalendarAppStatusChangedEventListener(*this);
 
        return E_SUCCESS;
@@ -982,7 +1068,7 @@ EventListPresentationModel::FindGroupIndex(const DateTime& date, int start, int
        if (start < end)
        {
                int mid = (start + end) >> 1;
-               const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(mid));
+               const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(mid));
                if (IsSameDay(date, pNode->GetDate()) == true)
                {
                        return mid;
@@ -996,7 +1082,7 @@ EventListPresentationModel::FindGroupIndex(const DateTime& date, int start, int
        }
        else if (start == end)
        {
-               const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(start));
+               const EventInstanceListNode* pNode = static_cast<const EventInstanceListNode*>(__indexedEvents.GetAt(start));
                if (IsSameDay(date, pNode->GetDate()) == true)
                {
                        return start;
@@ -1021,21 +1107,6 @@ EventListPresentationModel::FireCalendarEventChangedEvent(void)
        }
 }
 
-void
-EventListPresentationModel::FireCurrentDateChangedEvent(const DateTime& current, const DateTime& preview)
-{
-       if (__dateChangedListeners.GetCount() > 0)
-       {
-
-               IEnumerator* pEnum = __dateChangedListeners.GetEnumeratorN();
-               while (pEnum->MoveNext() == E_SUCCESS)
-               {
-                       static_cast<ICurrentDateChangedEventListener*>(pEnum->GetCurrent())->OnCurrentDateChanged(current, preview);
-               }
-               delete pEnum;
-       }
-}
-
 result
 EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& end)
 {
@@ -1085,7 +1156,7 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
        LinkedList allDayEventNodes;
        while (pAllDayEventsEnum->MoveNext() == E_SUCCESS)
        {
-               allDayEventNodes.Add(new (std::nothrow) EventNode(*static_cast<CalEventInstance*>(pAllDayEventsEnum->GetCurrent())));
+               allDayEventNodes.Add(new (std::nothrow) EventInstanceNode(*static_cast<CalEventInstance*>(pAllDayEventsEnum->GetCurrent())));
        }
        delete pAllDayEventsEnum;
        pAllDayEvents->RemoveAll(false);
@@ -1099,7 +1170,7 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
        LinkedList eventNodes;
        while (pEventsEnum->MoveNext() == E_SUCCESS)
        {
-               eventNodes.Add(new (std::nothrow) EventNode(*static_cast<CalEventInstance*>(pEventsEnum->GetCurrent())));
+               eventNodes.Add(new (std::nothrow) EventInstanceNode(*static_cast<CalEventInstance*>(pEventsEnum->GetCurrent())));
        }
        delete pEventsEnum;
        pEvents->RemoveAll(false);
@@ -1119,7 +1190,7 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
                {
                        if (__isEmpty == false && startDate <= today && endDate >= today)
                        {
-                               nodeList.Add(new (std::nothrow) EventListNode(today));
+                               nodeList.Add(new (std::nothrow) EventInstanceListNode(today));
                        }
                        break;
                }
@@ -1129,11 +1200,11 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
                DateTime eventStartTime = DateTime::GetMaxValue();
                if (allDayEventNodes.GetCount() > 0)
                {
-                       allDayEventStartTime = static_cast<EventNode*>(allDayEventNodes.GetAt(0))->GetEvent()->GetStartTime();
+                       allDayEventStartTime = static_cast<EventInstanceNode*>(allDayEventNodes.GetAt(0))->GetEvent()->GetStartTime();
                }
                if (eventNodes.GetCount() > 0)
                {
-                       DateTime startUtcTime = static_cast<EventNode*>(eventNodes.GetAt(0))->GetEvent()->GetStartTime();
+                       DateTime startUtcTime = static_cast<EventInstanceNode*>(eventNodes.GetAt(0))->GetEvent()->GetStartTime();
                        eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(startUtcTime);
                }
                if (startDate < today && endDate > today)
@@ -1151,13 +1222,13 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
                }
 
                // Create node.
-               EventListNode* pNode = new (std::nothrow) EventListNode(startDate);
+               EventInstanceListNode* pNode = new (std::nothrow) EventInstanceListNode(startDate);
                startDate.AddDays(1);
 
                // Indexing All-day Event
                while (pAllDayEventNodesEnum->MoveNext() == E_SUCCESS)
                {
-                       EventNode* pAllDayEventNode = static_cast<EventNode*>(pAllDayEventNodesEnum->GetCurrent());
+                       EventInstanceNode* pAllDayEventNode = static_cast<EventInstanceNode*>(pAllDayEventNodesEnum->GetCurrent());
                        CalEventInstance* pAllDayEvent = pAllDayEventNode->GetEvent();
                        if (pAllDayEvent->GetStartTime() >= startDate)
                        {
@@ -1178,7 +1249,7 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
                {
                        do
                        {
-                               EventNode* pAllDayEventNode = static_cast<EventNode*>(removeList.GetAt(0));
+                               EventInstanceNode* pAllDayEventNode = static_cast<EventInstanceNode*>(removeList.GetAt(0));
                                allDayEventNodes.Remove(*pAllDayEventNode);
                                removeList.RemoveAt(0);
                        } while (removeList.GetCount() > 0);
@@ -1193,7 +1264,7 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
                // Indexing Non All-day Event
                while (pEventNodesEnum->MoveNext() == E_SUCCESS)
                {
-                       EventNode* pEventNode = static_cast<EventNode*>(pEventNodesEnum->GetCurrent());
+                       EventInstanceNode* pEventNode = static_cast<EventInstanceNode*>(pEventNodesEnum->GetCurrent());
                        CalEventInstance* pEvent = pEventNode->GetEvent();
                        if (ResourceManager::ConvertUtcTimeToWallTime(pEvent->GetStartTime()) >= startDate)
                        {
@@ -1214,7 +1285,7 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
                {
                        do
                        {
-                               EventNode* pEventNode = static_cast<EventNode*>(removeList.GetAt(0));
+                               EventInstanceNode* pEventNode = static_cast<EventInstanceNode*>(removeList.GetAt(0));
                                eventNodes.Remove(*pEventNode);
                                removeList.RemoveAt(0);
                        } while (removeList.GetCount() > 0);
@@ -1234,12 +1305,12 @@ EventListPresentationModel::LoadEvents(const DateTime& start, const DateTime& en
        // Remove useless instances
        while (allDayEventNodes.GetCount() > 0)
        {
-               static_cast<EventNode*>(allDayEventNodes.GetAt(0))->RemoveRef();
+               static_cast<EventInstanceNode*>(allDayEventNodes.GetAt(0))->RemoveRef();
                allDayEventNodes.RemoveAt(0);
        }
        while (eventNodes.GetCount() > 0)
        {
-               static_cast<EventNode*>(eventNodes.GetAt(0))->RemoveRef();
+               static_cast<EventInstanceNode*>(eventNodes.GetAt(0))->RemoveRef();
                eventNodes.RemoveAt(0);
        }
 
@@ -1283,18 +1354,18 @@ void
 EventListPresentationModel::UnloadEvents(const DateTime& start, const DateTime& end)
 {
        IBidirectionalEnumerator* pEnum = __indexedEvents.GetBidirectionalEnumeratorN();
-       EventListNode* pNode = null;
+       EventInstanceListNode* pNode = null;
        int count = 0;
        if (start <= __minRange)
        {
                while (pEnum->MoveNext() == E_SUCCESS)
                {
-                       pNode = static_cast<EventListNode*>(pEnum->GetCurrent());
+                       pNode = static_cast<EventInstanceListNode*>(pEnum->GetCurrent());
                        if (pNode->GetDate() > end)
                        {
                                delete pEnum;
                                __indexedEvents.RemoveItems(0, count, true);
-                               __minRange = static_cast<EventListNode*>(__indexedEvents.GetAt(0))->GetDate();
+                               __minRange = static_cast<EventInstanceListNode*>(__indexedEvents.GetAt(0))->GetDate();
                                return;
                        }
                        ++count;
@@ -1305,12 +1376,12 @@ EventListPresentationModel::UnloadEvents(const DateTime& start, const DateTime&
                pEnum->ResetLast();
                while (pEnum->MovePrevious() == E_SUCCESS)
                {
-                       pNode = static_cast<EventListNode*>(pEnum->GetCurrent());
+                       pNode = static_cast<EventInstanceListNode*>(pEnum->GetCurrent());
                        if (pNode->GetDate() < start)
                        {
                                delete pEnum;
                                __indexedEvents.RemoveItems(__indexedEvents.GetCount() - count, count, true);
-                               __maxRange = static_cast<EventListNode*>(__indexedEvents.GetAt(__indexedEvents.GetCount() - 1))->GetDate();
+                               __maxRange = static_cast<EventInstanceListNode*>(__indexedEvents.GetAt(__indexedEvents.GetCount() - 1))->GetDate();
                                __maxRange.AddDays(1);
                                __maxRange.AddSeconds(-1);
                                return;
index 985e96b..63d91e8 100644 (file)
@@ -34,6 +34,8 @@ using namespace Tizen::System;
 
 static const int HOUR_TO_HALF_MINUTE = 30;
 static const int HOUR_TO_MAX_MINUTE = 60;
+static const RecordId ID_DEFAULT_EVENT_CALENDAR = 1;
+static const RecordId ID_DEFAULT_BIRTHDAY_CALENDAR = 3;
 
 EventPresentationModel::EventPresentationModel(void)
        : __pCalendar(null)
@@ -72,6 +74,18 @@ EventPresentationModel::Construct(const RecordId eventId)
        return E_SUCCESS;
 }
 
+String
+EventPresentationModel::GetAccountName(void) const
+{
+       if (__pCalendar != null && __pCalendar->GetAccountId() != INVALID_ACCOUNT_ID)
+       {
+               Account account = AccountAccessor::GetInstance()->GetAccount(__pCalendar->GetAccountId());
+               return account.GetUserName();
+       }
+
+       return L"Phone";
+}
+
 Bitmap*
 EventPresentationModel::GetCalendarIconN(void) const
 {
@@ -80,8 +94,17 @@ EventPresentationModel::GetCalendarIconN(void) const
                return null;
        }
 
-       // Get calendar icon(Tizen 2.0 b1 RC1 APIs are not supported yet.)
-       return null;
+       Bitmap* pBitmapIcon = null;
+       if (__pCalendar->GetAccountId() != INVALID_ACCOUNT_ID)
+       {
+               Account account = AccountAccessor::GetInstance()->GetAccount(__pCalendar->GetAccountId());
+               pBitmapIcon = ResourceManager::GetBitmapN(account.GetAccountProvider().GetIconPath());
+       }
+       else
+       {
+               pBitmapIcon = ResourceManager::GetBitmapN(IDB_ICON_PHONE_CALENDAR);
+       }
+       return pBitmapIcon;
 }
 
 String
@@ -89,7 +112,7 @@ EventPresentationModel::GetCalendarName(void) const
 {
        if (__pCalendar == null)
        {
-               return L"Default calendar";
+               return L"";
        }
        return __pCalendar->GetName();
 }
@@ -257,6 +280,8 @@ EventPresentationModel::GetReminderString(int index) const
                format = ResourceManager::GetString(IDS_REMINDER_WEEK_BEFORE);
                result.Format(format.GetLength() + 2, format.GetPointer(), pReminder->GetTimeOffset());
                break;
+       default:
+               break;
        }
 
        return result;
@@ -415,6 +440,19 @@ EventPresentationModel::IsAllEventEditing(void) const
        return __allEventEditing;
 }
 
+bool
+EventPresentationModel::IsSaved(void) const
+{
+       return __pEventInstance != null || __pEvent->GetCalendarId() != INVALID_RECORD_ID;
+}
+
+bool
+EventPresentationModel::IsEditable(void) const
+{
+       return (__pEventInstance != null) ? (__pEventInstance->GetCalendarId() != ID_DEFAULT_BIRTHDAY_CALENDAR)
+                                                                       : (__pEvent->GetCalendarId() != ID_DEFAULT_BIRTHDAY_CALENDAR);
+}
+
 result
 EventPresentationModel::RemoveEvent(void)
 {
@@ -519,7 +557,9 @@ EventPresentationModel::SetEventId(const RecordId eventId)
                __pEvent = pEvent;
 
                delete __pCalendar;
-               __pCalendar = null;
+               Calendarbook calendarbook;
+               calendarbook.Construct();
+               __pCalendar = calendarbook.GetCalendarN(ID_DEFAULT_EVENT_CALENDAR);
        }
        else
        {
@@ -532,7 +572,14 @@ EventPresentationModel::SetEventId(const RecordId eventId)
                __pEvent = pEvent;
 
                delete __pCalendar;
-               __pCalendar = calendarbook.GetCalendarN(__pEvent->GetCalendarId());
+               if (__pEvent->GetCalendarId() != INVALID_RECORD_ID)
+               {
+                       __pCalendar = calendarbook.GetCalendarN(__pEvent->GetCalendarId());
+               }
+               else
+               {
+                       __pCalendar = calendarbook.GetCalendarN(ID_DEFAULT_EVENT_CALENDAR);
+               }
        }
 
        return E_SUCCESS;
@@ -561,6 +608,7 @@ EventPresentationModel::SetEventInstance(const CalEventInstance& event)
        Calendarbook calendarbook;
        calendarbook.Construct();
 
+       RecordId calendarId = INVALID_RECORD_ID;
        CalEvent* pOriginalEvent = null;
        pOriginalEvent = calendarbook.GetEventN(event.GetOriginalEventId());
        if (pOriginalEvent != null)
@@ -597,6 +645,8 @@ EventPresentationModel::SetEventInstance(const CalEventInstance& event)
                pOriginalEvent->GetCoordinates(latitude, longitude);
                pEvent->SetCoordinates(latitude, longitude);
 
+               calendarId = pOriginalEvent->GetCalendarId();
+
                delete pOriginalEvent;
        }
 
@@ -604,7 +654,14 @@ EventPresentationModel::SetEventInstance(const CalEventInstance& event)
        __pEvent = pEvent;
 
        delete __pCalendar;
-       __pCalendar = null;
+       if (calendarId != INVALID_RECORD_ID)
+       {
+               __pCalendar = calendarbook.GetCalendarN(calendarId);
+       }
+       else
+       {
+               __pCalendar = calendarbook.GetCalendarN(ID_DEFAULT_EVENT_CALENDAR);
+       }
 
        return E_SUCCESS;
 }
@@ -792,6 +849,7 @@ EventPresentationModel::SetDescription(const String& description)
 result
 EventPresentationModel::Update(void)
 {
+       AppLogDebug("Enter.");
        __pEventBackup = new (std::nothrow) CalEvent(*__pEvent);
        __pEventInstanceBackup = __pEventInstance;
        __pEventInstance = null;
@@ -820,33 +878,44 @@ EventPresentationModel::Update(void)
        Calendarbook calendarbook;
        calendarbook.Construct();
 
-       if (__pEvent->GetRecordId() == INVALID_RECORD_ID)
+       AppLogDebug("AddEvent before.");
+       RecordId eventId = (__pEventInstance != null) ? __pEventInstance->GetOriginalEventId() : __pEvent->GetRecordId();
+       if (__allEventEditing == true && eventId != INVALID_RECORD_ID)
        {
-               if (__pCalendar != null)
+               RecordId calendarId = (__pEventInstance != null) ? __pEventInstance->GetCalendarId() : __pEvent->GetCalendarId();
+               if (__pCalendar != null && calendarId != INVALID_RECORD_ID && __pCalendar->GetRecordId() != calendarId)
                {
+                       if (__pEvent->GetCalendarId() != INVALID_RECORD_ID)
+                       {
+                               calendarbook.RemoveEvent(*__pEvent);
+                       }
+                       else
+                       {
+                               calendarbook.RemoveEvent(eventId);
+                       }
+
                        r = calendarbook.AddEvent(*__pEvent, __pCalendar->GetRecordId());
                }
                else
                {
-                       r = calendarbook.AddEvent(*__pEvent);
+                       r = calendarbook.UpdateEvent(*__pEvent);
                }
        }
        else
        {
-               if (__pCalendar != null && __pCalendar->GetRecordId() != __pEvent->GetCalendarId())
+               if (__pCalendar != null)
                {
-                       // TBD... (Account selection is not possible in Tizen 2.0 a3 RC1.)
-
-                       // Temporary codes.
                        r = calendarbook.AddEvent(*__pEvent, __pCalendar->GetRecordId());
                }
                else
                {
-                       r = calendarbook.UpdateEvent(*__pEvent);
+                       r = calendarbook.AddEvent(*__pEvent);
                }
        }
+       AppLogDebug("AddEvent after.");
 
        AppLogDebugIf(r != E_SUCCESS, "[%s] Unable to update event.", GetErrorMessage(r));
+       AppLogDebug("Exit.");
        return r;
 }
 
@@ -906,15 +975,18 @@ EventPresentationModel::Rollback(void)
        Calendarbook calendarbook;
        calendarbook.Construct();
 
-       if (__allEventEditing == true)
+       RecordId eventId = (__pEventInstanceBackup != null) ? __pEventInstanceBackup->GetOriginalEventId() : __pEventBackup->GetRecordId();
+       if (__allEventEditing == true && eventId != INVALID_RECORD_ID)
        {
-               if (__pEventBackup->GetRecordId() != INVALID_RECORD_ID)
+               RecordId calendarId = (__pEventInstanceBackup != null) ? __pEventInstanceBackup->GetCalendarId() : __pEventBackup->GetCalendarId();
+               if (calendarId != __pEvent->GetCalendarId())
                {
-                       calendarbook.UpdateEvent(*__pEventBackup);
+                       calendarbook.RemoveEvent(*__pEvent);
+                       calendarbook.AddEvent(*__pEvent, calendarId);
                }
                else
                {
-                       calendarbook.RemoveEvent(*__pEvent);
+                       calendarbook.UpdateEvent(*__pEventBackup);
                }
        }
        else
index eb8864e..6e2a048 100644 (file)
@@ -145,46 +145,6 @@ EventSearchPresentationModel::GetWholeDayCount(void) const
 }
 
 int
-EventSearchPresentationModel::GetAllDayEventCount(const DateTime& date) const
-{
-       return GetAllDayEventCount(GetGroupIndex(date));
-}
-
-int
-EventSearchPresentationModel::GetAllDayEventCount(int groupIndex) const
-{
-       if (groupIndex < 0)
-       {
-               return -1;
-       }
-
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
-       TryReturn((pNode != null), -1, "[E_FAILURE] Unable to load node.");
-
-       return pNode->GetAllDayEventCount();
-}
-
-int
-EventSearchPresentationModel::GetEventCount(const DateTime& date) const
-{
-       return GetEventCount(GetGroupIndex(date));
-}
-
-int
-EventSearchPresentationModel::GetEventCount(int groupIndex) const
-{
-       if (groupIndex < 0)
-       {
-               return -1;
-       }
-
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
-       TryReturn((pNode != null), -1, "[E_FAILURE] Unable to load node.");
-
-       return pNode->GetEventCount();
-}
-
-int
 EventSearchPresentationModel::GetWholeEventCount(const DateTime& date) const
 {
        return GetWholeEventCount(GetGroupIndex(date));
@@ -201,7 +161,7 @@ EventSearchPresentationModel::GetWholeEventCount(int groupIndex) const
        const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
        TryReturn((pNode != null), -1, "[E_FAILURE] Unable to load node.");
 
-       return pNode->GetWholeEventCount();
+       return pNode->GetEventCount();
 }
 
 DateTime
@@ -219,33 +179,13 @@ EventSearchPresentationModel::GetGroupIndex(const DateTime& date) const
        return FindGroupIndex(date, 0, __indexedEvents.GetCount() - 1);
 }
 
-const CalEventInstance*
-EventSearchPresentationModel::GetAllDayEvent(const DateTime& date, int index) const
-{
-       return GetAllDayEvent(GetGroupIndex(date), index);
-}
-
-const CalEventInstance*
-EventSearchPresentationModel::GetAllDayEvent(int groupIndex, int index) const
-{
-       if (groupIndex < 0)
-       {
-               return null;
-       }
-
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
-       TryReturn((pNode != null), null, "[E_FAILURE] Unable to load node.");
-
-       return pNode->GetAllDayEvent(index);
-}
-
-const CalEventInstance*
+const CalEvent*
 EventSearchPresentationModel::GetEvent(const DateTime& date, int index) const
 {
        return GetEvent(GetGroupIndex(date), index);
 }
 
-const CalEventInstance*
+const CalEvent*
 EventSearchPresentationModel::GetEvent(int groupIndex, int index) const
 {
        if (groupIndex < 0)
@@ -259,24 +199,42 @@ EventSearchPresentationModel::GetEvent(int groupIndex, int index) const
        return pNode->GetEvent(index);
 }
 
-const CalEventInstance*
-EventSearchPresentationModel::GetEventWithWholeIndex(const DateTime& date, int index) const
-{
-       return GetEventWithWholeIndex(GetGroupIndex(date), index);
-}
-
-const CalEventInstance*
-EventSearchPresentationModel::GetEventWithWholeIndex(int groupIndex, int index) const
+CalEventInstance*
+EventSearchPresentationModel::GetEventInstanceN(int groupIndex, int index) const
 {
-       if (groupIndex < 0)
+       const CalEvent* pEvent = GetEvent(groupIndex, index);
+       if (pEvent == null)
        {
                return null;
        }
 
-       const EventListNode* pNode = static_cast<const EventListNode*>(__indexedEvents.GetAt(groupIndex));
-       TryReturn((pNode != null), null, "[E_FAILURE] Unable to load node.");
+       IList* pEvents = null;
+       if (pEvent->IsAllDayEvent() == true)
+       {
+               CalendarbookFilter filter(CB_FI_TYPE_ALL_DAY_EVENT_INSTANCE);
+               filter.AppendInt(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_ORIGINAL_EVENT_ID, FI_CMP_OP_EQUAL, pEvent->GetRecordId());
+               pEvents = __pCalendarbook->SearchN(filter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING, 0, 1);
+       }
+       else
+       {
+               CalendarbookFilter filter(CB_FI_TYPE_NON_ALL_DAY_EVENT_INSTANCE);
+               filter.AppendInt(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_ORIGINAL_EVENT_ID, FI_CMP_OP_EQUAL, pEvent->GetRecordId());
+               pEvents = __pCalendarbook->SearchN(filter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING, 0, 1);
+       }
+
+       CalEventInstance* pEventInstance = null;
+       if (pEvents != null)
+       {
+               if (pEvents->GetCount() > 0)
+               {
+                       pEventInstance = static_cast<CalEventInstance*>(pEvents->GetAt(0));
+                       pEvents->RemoveAt(0, false);
+                       pEvents->RemoveAll(true);
+               }
+               delete pEvents;
+       }
 
-       return pNode->GetEventWithWholeIndex(index);
+       return pEventInstance;
 }
 
 String
@@ -312,87 +270,55 @@ EventSearchPresentationModel::SearchEvent(const String& text)
 //     eventsFilter.AppendString(FI_CONJ_OP_OR, EVENT_FI_PR_DESCRIPTION, FI_STR_OP_CONTAIN, __searchText);
        eventsFilter.AppendString(FI_CONJ_OP_OR, EVENT_FI_PR_LOCATION, FI_STR_OP_CONTAIN, __searchText);
        IList* pEvents = __pCalendarbook->SearchN(eventsFilter);
-       LinkedList allDayEventNodes;
-       LinkedList eventNodes;
+       LinkedList allDayEventListNodes(SingleObjectDeleter);
+       LinkedList eventListNodes(SingleObjectDeleter);
        if (pEvents != null)
        {
                IEnumerator* pEnum = pEvents->GetEnumeratorN();
                while (pEnum->MoveNext() == E_SUCCESS)
                {
-                       CalEvent* pEvent = static_cast<CalEvent*>(pEnum->GetCurrent());
-                       LinkedList* pNodes = null;
-                       CalEventInstance* pEventInstance = null;
-                       if (pEvent->IsAllDayEvent() == true)
+                       EventPtr& eventPtr = *new (std::nothrow) EventPtr(*static_cast<CalEvent*>(pEnum->GetCurrent()));
+                       IEnumerator* pEnumNodes = (eventPtr->IsAllDayEvent() == true) ? allDayEventListNodes.GetEnumeratorN() : eventListNodes.GetEnumeratorN();
+                       int index = 0;
+                       while (pEnumNodes->MoveNext() == E_SUCCESS)
                        {
-                               CalendarbookFilter allDayEventInstanceFilter(CB_FI_TYPE_ALL_DAY_EVENT_INSTANCE);
-                               allDayEventInstanceFilter.AppendInt(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_ORIGINAL_EVENT_ID, FI_CMP_OP_EQUAL, pEvent->GetRecordId());
-                               IList* pEventInstances = __pCalendarbook->SearchN(allDayEventInstanceFilter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING, 0, 1);
-                               if (pEventInstances != null)
+                               if (static_cast<EventPtr&>(*pEnumNodes->GetCurrent())->GetStartTime() > eventPtr->GetStartTime())
                                {
-                                       pEventInstance = static_cast<CalEventInstance*>(pEventInstances->GetAt(0));
-                                       if (pEventInstance != null)
-                                       {
-                                               pEventInstances->RemoveAt(0, false);
-                                               pEventInstances->RemoveAll(true);
-                                       }
-                                       delete pEventInstances;
+                                       break;
                                }
-                               pNodes = &allDayEventNodes;
+                               ++index;
                        }
-                       else
+                       delete pEnumNodes;
+
+                       if (eventPtr->IsAllDayEvent() == true)
                        {
-                               CalendarbookFilter eventInstanceFilter(CB_FI_TYPE_NON_ALL_DAY_EVENT_INSTANCE);
-                               eventInstanceFilter.AppendInt(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_ORIGINAL_EVENT_ID, FI_CMP_OP_EQUAL, pEvent->GetRecordId());
-                               IList* pEventInstances = __pCalendarbook->SearchN(eventInstanceFilter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING, 0, 1);
-                               if (pEventInstances != null)
-                               {
-                                       pEventInstance = static_cast<CalEventInstance*>(pEventInstances->GetAt(0));
-                                       if (pEventInstance != null)
-                                       {
-                                               pEventInstances->RemoveAt(0, false);
-                                               pEventInstances->RemoveAll(true);
-                                       }
-                                       delete pEventInstances;
-                               }
-                               pNodes = &eventNodes;
+                               allDayEventListNodes.InsertAt(&eventPtr, index);
                        }
-
-                       if (pEventInstance != null)
+                       else
                        {
-                               int index = 0;
-                               IEnumerator* pEnumNodes = pNodes->GetEnumeratorN();
-                               while (pEnumNodes->MoveNext() == E_SUCCESS)
-                               {
-                                       if (pEventInstance->GetStartTime() < static_cast<EventNode*>(pEnumNodes->GetCurrent())->GetEvent()->GetStartTime())
-                                       {
-                                               break;
-                                       }
-                                       ++index;
-                               }
-                               delete pEnumNodes;
-                               pNodes->InsertAt(new (std::nothrow) EventNode(*pEventInstance), index);
+                               eventListNodes.InsertAt(&eventPtr, index);
                        }
                }
                delete pEnum;
-               pEvents->RemoveAll(true);
+               pEvents->RemoveAll(false);
                delete pEvents;
        }
 
        // Indexing
        DateTime date = DateTime::GetMinValue();
-       IEnumerator* pAllDayEventNodesEnum = allDayEventNodes.GetEnumeratorN();
-       IEnumerator* pEventNodesEnum = eventNodes.GetEnumeratorN();
+       IEnumerator* pAllDayEventListNodesEnum = allDayEventListNodes.GetEnumeratorN();
+       IEnumerator* pEventListNodesEnum = eventListNodes.GetEnumeratorN();
        LinkedList removeList;
-       while (allDayEventNodes.GetCount() > 0 || eventNodes.GetCount() > 0)
+       while (allDayEventListNodes.GetCount() > 0 || eventListNodes.GetCount() > 0)
        {
-               if (allDayEventNodes.GetCount() > 0)
+               if (allDayEventListNodes.GetCount() > 0)
                {
-                       if (eventNodes.GetCount() > 0)
+                       if (eventListNodes.GetCount() > 0)
                        {
-                               EventNode* pAllDayEventNode = static_cast<EventNode*>(allDayEventNodes.GetAt(0));
-                               EventNode* pEventNode = static_cast<EventNode*>(eventNodes.GetAt(0));
-                               DateTime eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(pAllDayEventNode->GetEvent()->GetStartTime());
-                               DateTime eventNodeStartTime = ResourceManager::ConvertUtcTimeToWallTime(pEventNode->GetEvent()->GetStartTime());
+                               EventPtr& allDayEventPtr = static_cast<EventPtr&>(*allDayEventListNodes.GetAt(0));
+                               EventPtr& eventPtr = static_cast<EventPtr&>(*eventListNodes.GetAt(0));
+                               DateTime eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(allDayEventPtr->GetStartTime());
+                               DateTime eventNodeStartTime = ResourceManager::ConvertUtcTimeToWallTime(eventPtr->GetStartTime());
                                if (eventStartTime > eventNodeStartTime)
                                {
                                        eventStartTime = eventNodeStartTime;
@@ -404,8 +330,8 @@ EventSearchPresentationModel::SearchEvent(const String& text)
                        }
                        else
                        {
-                               EventNode* pAllDayEventNode = static_cast<EventNode*>(allDayEventNodes.GetAt(0));
-                               DateTime eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(pAllDayEventNode->GetEvent()->GetStartTime());
+                               EventPtr& allDayEventPtr = static_cast<EventPtr&>(*allDayEventListNodes.GetAt(0));
+                               DateTime eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(allDayEventPtr->GetStartTime());
                                if (eventStartTime > date)
                                {
                                        date = eventStartTime;
@@ -415,8 +341,8 @@ EventSearchPresentationModel::SearchEvent(const String& text)
                }
                else
                {
-                       EventNode* pEventNode = static_cast<EventNode*>(eventNodes.GetAt(0));
-                       DateTime eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(pEventNode->GetEvent()->GetStartTime());
+                       EventPtr& eventPtr = static_cast<EventPtr&>(*eventListNodes.GetAt(0));
+                       DateTime eventStartTime = ResourceManager::ConvertUtcTimeToWallTime(eventPtr->GetStartTime());
                        if (eventStartTime > date)
                        {
                                date = eventStartTime;
@@ -428,81 +354,75 @@ EventSearchPresentationModel::SearchEvent(const String& text)
                date.AddDays(1);
 
                // Indexing All-day Event
-               while (pAllDayEventNodesEnum->MoveNext() == E_SUCCESS)
+               while (pAllDayEventListNodesEnum->MoveNext() == E_SUCCESS)
                {
-                       EventNode* pAllDayEventNode = static_cast<EventNode*>(pAllDayEventNodesEnum->GetCurrent());
-                       CalEventInstance* pAllDayEvent = pAllDayEventNode->GetEvent();
-                       if (ResourceManager::ConvertUtcTimeToWallTime(pAllDayEvent->GetStartTime()) >= date)
+                       EventPtr& allDayEventPtr = static_cast<EventPtr&>(*pAllDayEventListNodesEnum->GetCurrent());
+                       if (ResourceManager::ConvertUtcTimeToWallTime(allDayEventPtr->GetStartTime()) >= date)
                        {
                                break;
                        }
-                       else if (ResourceManager::ConvertUtcTimeToWallTime(pAllDayEvent->GetEndTime()) < date)                          // This expression differs from the Non-all-day event's.
+                       else if (ResourceManager::ConvertUtcTimeToWallTime(allDayEventPtr->GetEndTime()) < date)                                // This expression differs from the Non-all-day event's.
                        {
-                               pNode->Add(*pAllDayEventNode);
-                               removeList.Add(pAllDayEventNode);
+                               pNode->Add(allDayEventPtr);
+                               removeList.Add(&allDayEventPtr);
                        }
                        else
                        {
-                               pAllDayEventNode->AddRef();
-                               pNode->Add(*pAllDayEventNode);
+                               pNode->Add(allDayEventPtr);
                        }
                }
                if (removeList.GetCount() > 0)
                {
                        do
                        {
-                               EventNode* pAllDayEventNode = static_cast<EventNode*>(removeList.GetAt(0));
-                               allDayEventNodes.Remove(*pAllDayEventNode);
+                               allDayEventListNodes.Remove(*removeList.GetAt(0));
                                removeList.RemoveAt(0);
                        } while (removeList.GetCount() > 0);
-                       delete pAllDayEventNodesEnum;
-                       pAllDayEventNodesEnum = allDayEventNodes.GetEnumeratorN();
+                       delete pAllDayEventListNodesEnum;
+                       pAllDayEventListNodesEnum = allDayEventListNodes.GetEnumeratorN();
                }
                else
                {
-                       pAllDayEventNodesEnum->Reset();
+                       pAllDayEventListNodesEnum->Reset();
                }
 
                // Indexing Non All-day Event
-               while (pEventNodesEnum->MoveNext() == E_SUCCESS)
+               while (pEventListNodesEnum->MoveNext() == E_SUCCESS)
                {
-                       EventNode* pEventNode = static_cast<EventNode*>(pEventNodesEnum->GetCurrent());
-                       CalEventInstance* pEvent = pEventNode->GetEvent();
-                       if (ResourceManager::ConvertUtcTimeToWallTime(pEvent->GetStartTime()) >= date)
+                       EventPtr& eventPtr = static_cast<EventPtr&>(*pEventListNodesEnum->GetCurrent());
+                       if (ResourceManager::ConvertUtcTimeToWallTime(eventPtr->GetStartTime()) >= date)
                        {
                                break;
                        }
-                       else if (ResourceManager::ConvertUtcTimeToWallTime(pEvent->GetEndTime()) <= date)                                       // This expression differs from the All-day event's.
+                       else if (ResourceManager::ConvertUtcTimeToWallTime(eventPtr->GetEndTime()) <= date)                                     // This expression differs from the All-day event's.
                        {
-                               pNode->Add(*pEventNode);
-                               removeList.Add(pEventNode);
+                               pNode->Add(eventPtr);
+                               removeList.Add(&eventPtr);
                        }
                        else
                        {
-                               pEventNode->AddRef();
-                               pNode->Add(*pEventNode);
+                               pNode->Add(eventPtr);
                        }
                }
                if (removeList.GetCount() > 0)
                {
                        do
                        {
-                               EventNode* pEventNode = static_cast<EventNode*>(removeList.GetAt(0));
-                               eventNodes.Remove(*pEventNode);
+                               eventListNodes.Remove(*removeList.GetAt(0));
                                removeList.RemoveAt(0);
                        } while (removeList.GetCount() > 0);
-                       delete pEventNodesEnum;
-                       pEventNodesEnum = eventNodes.GetEnumeratorN();
+                       delete pEventListNodesEnum;
+                       pEventListNodesEnum = eventListNodes.GetEnumeratorN();
                }
                else
                {
-                       pEventNodesEnum->Reset();
+                       pEventListNodesEnum->Reset();
                }
 
                __indexedEvents.Add(pNode);
        }
-       delete pAllDayEventNodesEnum;
-       delete pEventNodesEnum;
+       delete pAllDayEventListNodesEnum;
+       delete pEventListNodesEnum;
 
        return E_SUCCESS;
 }
index 3eed2ac..7e72f6c 100644 (file)
@@ -40,14 +40,18 @@ using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
+static const RecordId ID_DEFAULT_BIRTHDAY_CALENDAR = 3;
+
 static const int IDA_EVENT_SEARCHER_CONTEXT_MENU_EDIT = 50101;
 static const int IDA_EVENT_SEARCHER_CONTEXT_MENU_SHARE = 50102;
 static const int IDA_EVENT_SEARCHER_CONTEXT_MENU_DELETE = 50103;
 
 static const int GROUP_ITEM_HEIGHT = 76;
-static const unsigned int COLOR_GROUP_ITEM_BACKGROUND = Color32<209, 227, 238>::Value;
-static const unsigned int COLOR_GROUP_ITEM_TODAY_BACKGROUND = Color32<117, 171, 204>::Value;
-static const unsigned int COLOR_GROUP_ITEM_TEXT = Color32<0, 94, 160>::Value;
+static const unsigned int COLOR_GROUP_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TODAY_BACKGROUND = Color32<239, 236, 224>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TEXT = Color32<128, 128, 128>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TODAY_TEXT = Color32<59, 115, 182>::Value;
+static const unsigned int COLOR_ITEM_TODAY_BACKGROUND = Color32<239, 236, 224>::Value;
 
 
 EventSearcherForm::EventSearcherForm(void)
@@ -55,6 +59,7 @@ EventSearcherForm::EventSearcherForm(void)
        , __pSearchBarInput(null)
        , __pGroupedListViewEvents(null)
        , __pContextItem(null)
+       , __pContextItemNoEdit(null)
        , __pSharePopup(null)
 {
 }
@@ -83,6 +88,8 @@ EventSearcherForm::OnInitializing(void)
 
        __pSearchBarInput->AddKeypadEventListener(*this);
        __pSearchBarInput->AddActionEventListener(*this);
+       __pSearchBarInput->AddTextEventListener(*this);
+       __pSearchBarInput->SetContentAreaVisible(false);
        __pSearchBarInput->SetMode(SEARCH_BAR_MODE_INPUT);
        __pGroupedListViewEvents->SetItemProvider(*this);
        __pGroupedListViewEvents->AddGroupedListViewItemEventListener(*this);
@@ -99,6 +106,8 @@ result
 EventSearcherForm::OnTerminating(void)
 {
        delete __pPm;
+       delete __pContextItem;
+       delete __pContextItemNoEdit;
        delete __pSharePopup;
        return E_SUCCESS;
 }
@@ -145,12 +154,38 @@ EventSearcherForm::OnActionPerformed(const Control& source, int actionId)
        {
                __pSearchBarInput->SetMode(SEARCH_BAR_MODE_NORMAL);
                __pSearchBarInput->Invalidate(false);
+               if (__pPm->GetSearchText() != __pSearchBarInput->GetText())
+               {
+                       __pPm->SearchEvent(__pSearchBarInput->GetText());
+                       __pGroupedListViewEvents->UpdateList();
+               }
+       }
+}
+
+void
+EventSearcherForm::OnTextValueChanged(const Control& source)
+{
+       if (__pPm->GetSearchText() != __pSearchBarInput->GetText())
+       {
+               __pPm->SearchEvent(__pSearchBarInput->GetText());
+               __pGroupedListViewEvents->UpdateList();
+       }
+}
+
+void
+EventSearcherForm::OnTextValueChangeCanceled(const Control& source)
+{
+       if (__pPm->GetSearchText() != __pSearchBarInput->GetText())
+       {
+               __pPm->SearchEvent(__pSearchBarInput->GetText());
+               __pGroupedListViewEvents->UpdateList();
        }
 }
 
 void
 EventSearcherForm::OnFormBackRequested(Form& source)
 {
+       SetFocus();
        SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
 }
 
@@ -178,14 +213,14 @@ EventSearcherForm::CreateGroupItem(int groupIndex, int itemWidth)
        if (EventSearchPresentationModel::IsToday(date) == true)
        {
                pItem->SetBackgroundColor(Color(COLOR_GROUP_ITEM_TODAY_BACKGROUND));
+               pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TODAY_TEXT));
        }
        else
        {
                pItem->SetBackgroundColor(Color(COLOR_GROUP_ITEM_BACKGROUND));
+               pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TEXT));
        }
 
-       pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TEXT));
-
        return pItem;
 }
 
@@ -199,7 +234,7 @@ EventSearcherForm::DeleteGroupItem(int groupIndex, GroupItem* pItem, int itemWid
 ListItemBase*
 EventSearcherForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 {
-       const CalEventInstance* pEvent = __pPm->GetEventWithWholeIndex(groupIndex, itemIndex);
+       const CalEvent* pEvent = __pPm->GetEvent(groupIndex, itemIndex);
        if (pEvent == null)
        {
                return null;
@@ -210,6 +245,10 @@ EventSearcherForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        EventItem* pItem = new (std::nothrow) EventItem();
        pItem->Initialize(EVENT_ITEM_STYLE_NORMAL, itemWidth);
+       if (EventSearchPresentationModel::IsToday(__pPm->GetDateTimeFromGroupIndex(groupIndex)) == true)
+       {
+               pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, Color(COLOR_ITEM_TODAY_BACKGROUND));
+       }
        pItem->SetTitle(pEvent->GetSubject());
        pItem->SetLocation(pEvent->GetLocation());
        pItem->SetSearchText(__pPm->GetSearchText());
@@ -223,8 +262,9 @@ EventSearcherForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                pItem->SetDateRange(startWallTime, endWallTime, __pPm->GetDateTimeFromGroupIndex(groupIndex), __pPm->GetTimeFormatter());
        }
 
-       pItem->SetReminder(pEvent->HasReminder());
+       pItem->SetReminder(pEvent->GetAllReminders().GetCount() > 0);
        pItem->SetRepeat(pEvent->IsRecurring());
+       pItem->SetPriority(pEvent->GetPriority());
 //     pItem->SetFacebookEvent(false);
 
        if (__pContextItem == null)
@@ -240,7 +280,16 @@ EventSearcherForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
                __pContextItem = pContextItem;
        }
-       pItem->SetContextItem(__pContextItem);
+       if (__pContextItemNoEdit == null)
+       {
+               ListContextItem* pContextItem = new (std::nothrow) ListContextItem();
+               pContextItem->Construct();
+               pContextItem->AddElement(IDA_EVENT_SEARCHER_CONTEXT_MENU_SHARE,
+                                                                ResourceManager::GetString(IDS_COM_SK4_SHARE), true);
+
+               __pContextItemNoEdit = pContextItem;
+       }
+       pItem->SetContextItem((pEvent->GetCalendarId() == ID_DEFAULT_BIRTHDAY_CALENDAR) ? __pContextItemNoEdit : __pContextItem);
 
        pItem->UpdateElements();
        return pItem;
@@ -260,7 +309,7 @@ EventSearcherForm::OnGroupedListViewItemStateChanged(GroupedListView& listView,
        if (status == LIST_ITEM_STATUS_SELECTED)
        {
                LinkedList* pList = new (std::nothrow) LinkedList();
-               pList->Add(*new (std::nothrow) CalEventInstance(*__pPm->GetEventWithWholeIndex(groupIndex, itemIndex)));
+               pList->Add(__pPm->GetEventInstanceN(groupIndex, itemIndex));
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_EVENT_DETAILS,
                                                                                                                                                  SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pList);
        }
@@ -275,7 +324,7 @@ void
 EventSearcherForm::OnGroupedListViewContextItemStateChanged(GroupedListView& listView, int groupIndex, int itemIndex,
                                                                                                                        int elementId, ListContextItemStatus status)
 {
-       const CalEventInstance* pEventInstance = __pPm->GetEventWithWholeIndex(groupIndex, itemIndex);
+       CalEventInstance* pEventInstance = __pPm->GetEventInstanceN(groupIndex, itemIndex);
        if (status == LIST_CONTEXT_ITEM_STATUS_SELECTED)
        {
                switch (elementId)
@@ -310,6 +359,7 @@ EventSearcherForm::OnGroupedListViewContextItemStateChanged(GroupedListView& lis
                        break;
                }
        }
+       delete pEventInstance;
 }
 
 void
@@ -347,7 +397,6 @@ EventSearcherForm::OnSceneDeactivated(const SceneId& currentSceneId, const Scene
 void
 EventSearcherForm::OnKeypadWillOpen(Control& source)
 {
-       GetFooter()->SetShowState(false);
 }
 
 void
@@ -359,13 +408,9 @@ EventSearcherForm::OnKeypadOpened(Control& source)
 void
 EventSearcherForm::OnKeypadClosed(Control& source)
 {
-       GetFooter()->SetShowState(true);
-
-       if (__pSearchBarInput->GetMode() == SEARCH_BAR_MODE_INPUT)
-       {
-               __pPm->SearchEvent(__pSearchBarInput->GetText());
-               __pGroupedListViewEvents->UpdateList();
-       }
+       String text = __pSearchBarInput->GetText();
+       __pSearchBarInput->SetMode(SEARCH_BAR_MODE_NORMAL);
+       __pSearchBarInput->SetText(text);
        Invalidate(true);
 }
 
@@ -376,8 +421,11 @@ EventSearcherForm::OnKeypadActionPerformed(Control& source, KeypadAction keypadA
        {
                SetFocus();
 
-               __pPm->SearchEvent(__pSearchBarInput->GetText());
-               __pGroupedListViewEvents->UpdateList();
+               if (__pPm->GetSearchText() != __pSearchBarInput->GetText())
+               {
+                       __pPm->SearchEvent(__pSearchBarInput->GetText());
+                       __pGroupedListViewEvents->UpdateList();
+               }
                String text = __pSearchBarInput->GetText();
                __pSearchBarInput->SetMode(SEARCH_BAR_MODE_NORMAL);
                __pSearchBarInput->SetText(text);
index 995441a..5d9d79b 100644 (file)
@@ -153,6 +153,7 @@ EventSelectorForm::CreateItem(int index, int itemWidth)
        pItem->SetDateRangeText(GetDateRangeText(startTime, endTime, pEvent->IsAllDayEvent()));
        pItem->SetReminder(pEvent->GetAllReminders().GetCount() > 0);
        pItem->SetRepeat(pEvent->IsRecurring());
+       pItem->SetPriority(pEvent->GetPriority());
 //     pItem->SetFacebookEvent(false);
        pItem->UpdateElements();
 
index a5e7014..f0d2c52 100644 (file)
 
 #include <new>
 #include <FLocales.h>
+#include <FSocial.h>
 
 #include "ClGoToDatePopup.h"
 #include "ClResourceManager.h"
 #include "ClTypes.h"
 
+using namespace Tizen;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
-using namespace Tizen::Locales;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 
@@ -49,9 +51,10 @@ GoToDatePopup::OnInitializing(void)
 {
        __pEditDate = dynamic_cast<EditDate*>(GetControl(L"IDC_EDITDATE"));
        AppAssertf(__pEditDate != null, "[E_FAILURE] Unable to get button.");
+       __pEditDate->SetYearRange(Calendarbook::GetMinDateTime().GetYear(), Calendarbook::GetMaxDateTime().GetYear());
        __pEditDate->SetDate(__date);
 
-       DateTimeFormatter* pDateFormatter = ResourceManager::CreateDateFormatterN(DATE_TIME_STYLE_DEFAULT);
+       Locales::DateTimeFormatter* pDateFormatter = ResourceManager::CreateDateFormatterN(Locales::DATE_TIME_STYLE_DEFAULT);
        String title;
        pDateFormatter->Format(__date, title);
        delete pDateFormatter;
index dcda89b..d4c75ec 100644 (file)
 #include <new>
 #include <FApp.h>
 #include <FSocial.h>
+#include "ClEventItem.h"
 #include "ClEventListPresentationModel.h"
+#include "ClGoToDatePopup.h"
+#include "ClListPanel.h"
 #include "ClMainForm.h"
 #include "ClResourceManager.h"
-#include "ClListPanel.h"
 #include "ClSharePopup.h"
-#include "ClTypes.h"
-#include "ClEventItem.h"
-#include "ClTwoButtonPopup.h"
 #include "ClThreeButtonPopup.h"
+#include "ClTwoButtonPopup.h"
+#include "ClTypes.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -42,6 +43,8 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Locales;
 
+static const RecordId ID_DEFAULT_BIRTHDAY_CALENDAR = 3;
+
 static const int IDA_LIST_PANEL_CONTEXT_MENU_EDIT = 11511;
 static const int IDA_LIST_PANEL_CONTEXT_MENU_SHARE = 11512;
 static const int IDA_LIST_PANEL_CONTEXT_MENU_DELETE = 11513;
@@ -59,17 +62,20 @@ static const int GROUP_ITEM_MINIMUM_HEIGHT = 0;
 static const int PREVIOUS_DATE = -1;
 static const int NEXT_DATE = 1;
 
-static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
-static const unsigned int COLOR_GROUP_ITEM_BACKGROUND = Color32<209, 227, 238>::Value;
-static const unsigned int COLOR_GROUP_ITEM_TODAY_BACKGROUND = Color32<117, 171, 204>::Value;
-static const unsigned int COLOR_GROUP_ITEM_TEXT = Color32<0, 94, 160>::Value;
+static const unsigned int COLOR_GROUP_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TODAY_BACKGROUND = Color32<239, 236, 224>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TEXT = Color32<128, 128, 128>::Value;
+static const unsigned int COLOR_GROUP_ITEM_TODAY_TEXT = Color32<59, 115, 182>::Value;
 static const unsigned int COLOR_TOP_BOTTOM_ITEM_TEXT = Color32<42, 137, 194>::Value;
-static const unsigned int COLOR_ITEM_TEXT_PRESSED = Color32<249, 249, 249>::Value;
+static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
+static const unsigned int COLOR_ITEM_TODAY_BACKGROUND = Color32<239, 236, 224>::Value;
+static const unsigned int COLOR_ITEM_TEXT_PRESSED = Color32<255, 255, 255>::Value;
 
 ListPanel::ListPanel(void)
        : __pPm(null)
        , __pGroupedListViewEventsList(null)
        , __pContextItem(null)
+       , __pContextItemNoEdit(null)
        , __pDateFormatter(null)
        , __pSharePopup(null)
 {
@@ -123,7 +129,11 @@ ListPanel::OnInitializing(void)
 result
 ListPanel::OnTerminating(void)
 {
+       __pPm->RemoveCalendarEventChangedEventListener(*this);
+       __pPm->RemoveCurrentDateChangedEventListener(*this);
+
        delete __pContextItem;
+       delete __pContextItemNoEdit;
        delete __pDateFormatter;
        delete __pSharePopup;
 
@@ -162,6 +172,9 @@ ListPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                break;
        }
                break;
+       case IDA_SUB_MENU_GO_TO_DATE:
+               GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
+               break;
        case IDA_SUB_MENU_DELETE:
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_EVENT_DELETER,
                                                                                                                                                                        SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
@@ -174,6 +187,10 @@ ListPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_CALENDAR_LIST,
                                                                                                                                                                        SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
                break;
+       case IDA_SUB_MENU_SETTING:
+               SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_SETTING,
+                                                                                                                                                                       SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+               break;
        case IDA_VIEW_MENU_YEAR:
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_YEAR,
                                                                                                                                                                        SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
@@ -189,6 +206,26 @@ ListPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                                                                                                                                                                        SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
                                                                                                                                                                        SCENE_HISTORY_OPTION_NO_HISTORY));
                break;
+       case IDA_GO_TO_DATE_POPUP_DONE:
+       {
+               DateTime selectedDate = *static_cast<DateTime*>(pArgs->GetAt(0));
+               DateTime currentDate = __pPm->GetCurrentDate();
+               currentDate.SetValue(selectedDate.GetYear(), selectedDate.GetMonth(), selectedDate.GetDay(), currentDate.GetHour(), currentDate.GetMinute());
+               __pPm->SetCurrentDate(currentDate);
+
+               minRange = __pPm->GetCurrentDate();
+               minRange.SetValue(minRange.GetYear(), minRange.GetMonth(), minRange.GetDay());
+
+               maxRange = minRange;
+               maxRange.AddMonths(NEXT_DATE);
+               maxRange.AddSeconds(PREVIOUS_DATE);
+
+               __pPm->SetViewType(VIEW_TYPE_LIST);
+               __pPm->SetViewRange(minRange, maxRange);
+
+               Update();
+               break;
+       }
        case IDA_EVENT_POPUP_DELETE:
                __pPm->RemoveEvent(*static_cast<const CalEventInstance*>(pArgs->GetAt(0)), true);
                break;
@@ -264,14 +301,14 @@ ListPanel::CreateGroupItem(int groupIndex, int itemWidth)
        if (EventListPresentationModel::IsToday(date) == true)
        {
                pItem->SetBackgroundColor(Color(COLOR_GROUP_ITEM_TODAY_BACKGROUND));
+               pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TODAY_TEXT));
        }
        else
        {
                pItem->SetBackgroundColor(Color(COLOR_GROUP_ITEM_BACKGROUND));
+               pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TEXT));
        }
 
-       pItem->SetTextColor(Color(COLOR_GROUP_ITEM_TEXT));
-
        return pItem;
 }
 
@@ -321,6 +358,10 @@ ListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        EventItem* pItem = new (std::nothrow) EventItem();
        pItem->Initialize(EVENT_ITEM_STYLE_NORMAL, itemWidth);
+       if (EventListPresentationModel::IsToday(__pPm->GetDateTimeFromGroupIndex(groupIndex - TOP_BOTTOM_ITEM_COUNT)) == true)
+       {
+               pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, Color(COLOR_ITEM_TODAY_BACKGROUND));
+       }
        pItem->SetTitle(pEvent->GetSubject());
        pItem->SetCalendarColor(__pPm->GetCalendarColor(pEvent->GetCalendarId()));
        if (pEvent->IsAllDayEvent() == true)
@@ -336,6 +377,7 @@ ListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        pItem->SetReminder(pEvent->HasReminder());
        pItem->SetRepeat(pEvent->IsRecurring());
+       pItem->SetPriority(pEvent->GetPriority());
 //     pItem->SetFacebookEvent(false);
 
        if (__pContextItem == null)
@@ -351,7 +393,16 @@ ListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
                __pContextItem = pContextItem;
        }
-       pItem->SetContextItem(__pContextItem);
+       if (__pContextItemNoEdit == null)
+       {
+               ListContextItem* pContextItem = new (std::nothrow) ListContextItem();
+               pContextItem->Construct();
+               pContextItem->AddElement(IDA_LIST_PANEL_CONTEXT_MENU_SHARE,
+                                                                ResourceManager::GetString(IDS_COM_SK4_SHARE), true);
+
+               __pContextItemNoEdit = pContextItem;
+       }
+       pItem->SetContextItem((pEvent->GetCalendarId() == ID_DEFAULT_BIRTHDAY_CALENDAR) ? __pContextItemNoEdit : __pContextItem);
 
        pItem->UpdateElements();
        return pItem;
@@ -476,6 +527,7 @@ ListPanel::OnGroupedListViewGroupItemSelected(GroupedListView& listView, int gro
 void
 ListPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
@@ -507,13 +559,16 @@ ListPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& curr
        }
 
        Update();
+       AppLogDebug("Exit.");
 }
 
 void
 ListPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
        __pPm->RemoveCalendarEventChangedEventListener(*this);
        __pPm->RemoveCurrentDateChangedEventListener(*this);
+       AppLogDebug("Exit.");
 }
 
 void
@@ -524,6 +579,7 @@ ListPanel::OnActionPerformed(const Control& source, int actionId)
 void
 ListPanel::OnCalendarEventChanged(void)
 {
+       AppLogDebug("Enter.");
        if (__pPm->GetViewType() != VIEW_TYPE_LIST)
        {
                DateTime minRange = __pPm->GetCurrentDate();
@@ -537,15 +593,18 @@ ListPanel::OnCalendarEventChanged(void)
        }
        
        Update();
+       AppLogDebug("Exit.");
 }
 
 void
 ListPanel::OnCurrentDateChanged(const DateTime& currentDate, const DateTime& prevDate)
 {
+       AppLogDebug("Enter.");
        if (EventListPresentationModel::IsSameDay(currentDate, prevDate) == false)
        {
                Update();
        }
+       AppLogDebug("Exit.");
 }
 
 result
index 1c7bda3..a69b03d 100644 (file)
@@ -37,12 +37,11 @@ using namespace Tizen::Ui::Scenes;
 
 static const int W_MENU_MARGIN = 64;
 static const int H_HALF_BUTTON = 36;
-static const int W_HEADER_TITLE_RIGHT_MARGIN = 198;
+
 
 MainForm::MainForm(void)
        : __pContextMenuView(null)
        , __pContextMenuSub(null)
-       , __isTitlePressed(false)
 {
 }
 
@@ -61,7 +60,6 @@ MainForm::OnInitializing(void)
 {
        SetFormBackEventListener(this);
 
-       GetHeader()->AddTouchEventListener(*this);
        GetHeader()->AddActionEventListener(*this);
        GetFooter()->AddActionEventListener(*this);
 
@@ -109,57 +107,6 @@ MainForm::OnActionPerformed(const Control& source, int actionId)
 }
 
 void
-MainForm::OnTouchPressed(const Control& source, const Point& currentPosition, const TouchEventInfo & touchInfo)
-{
-       Header* pHeader = GetHeader();
-       Rectangle titleBounds(0, 0, pHeader->GetWidth() - W_HEADER_TITLE_RIGHT_MARGIN, pHeader->GetHeight());
-       if (pHeader == &source && titleBounds.Contains(currentPosition) == true)
-       {
-               __isTitlePressed = true;
-       }
-}
-
-void
-MainForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
-{
-       if (__isTitlePressed == true)
-       {
-               Header* pHeader = GetHeader();
-               Rectangle titleBounds(0, 0, pHeader->GetWidth() - W_HEADER_TITLE_RIGHT_MARGIN, pHeader->GetHeight());
-               if (pHeader == &source && titleBounds.Contains(currentPosition) == true)
-               {
-                       Panel* pPanel = SceneManager::GetInstance()->GetCurrentScene()->GetPanel();
-                       if (pPanel != null)
-                       {
-                               pPanel->SendUserEvent(IDA_MAIN_FORM_HEADER_GO_TO_DATE, null);
-                       }
-               }
-               __isTitlePressed = false;
-       }
-}
-
-void
-MainForm::OnTouchMoved(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
-{
-}
-
-void
-MainForm::OnTouchFocusIn(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
-{
-}
-
-void
-MainForm::OnTouchFocusOut(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
-{
-}
-
-void
-MainForm::OnTouchCanceled(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
-{
-       __isTitlePressed = false;
-}
-
-void
 MainForm::InitializeViewMenu(void)
 {
        __pContextMenuView = new (std::nothrow) ContextMenu();
@@ -186,8 +133,10 @@ MainForm::InitializeSubMenu(void)
        Rectangle bounds = GetFooter()->GetBounds();
        __pContextMenuSub->SetAnchorPosition(Point(bounds.x + W_MENU_MARGIN, bounds.y + bounds.height / 2 - H_HALF_BUTTON));
 
+       __pContextMenuSub->AddItem(L"Go to date", IDA_SUB_MENU_GO_TO_DATE);
        __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_SK3_DELETE), IDA_SUB_MENU_DELETE);
        __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_CLD_BUTTON_SEARCH), IDA_SUB_MENU_SEARCH);
 //     __pContextMenuSub->AddItem(ResourceManager::GetString(IDS_SUB_MENU_CALENDARS), IDA_SUB_MENU_CALENDARS);
+       __pContextMenuSub->AddItem(L"Setting", IDA_SUB_MENU_SETTING);
        __pContextMenuSub->SetShowState(false);
 }
index 876e73a..bc3e5fd 100644 (file)
@@ -53,34 +53,39 @@ enum ItemElementId
        ID_ITEM_ELEMENT_ALARM_ICON
 };
 
+static const RecordId ID_DEFAULT_BIRTHDAY_CALENDAR = 3;
+
 static const int IDA_MONTH_PANEL_CONTEXT_MENU_EDIT = 11311;
 static const int IDA_MONTH_PANEL_CONTEXT_MENU_SHARE = 11312;
 static const int IDA_MONTH_PANEL_CONTEXT_MENU_DELETE = 11313;
 
-static const int Y_GRID_LINE = 46;
-static const int W_GRID_LINE = 1;
-static const int H_GRID_LINE = 1;
-static const unsigned int COLOR_GRID_LINE = Color32<171, 171, 171>::Value;
-static const int W_WEEK = 102;
-static const int H_WEEK = 46;
+static const int Y_CALENDAR = 18;
+static const int X_WEEK = 17;
+static const int Y_WEEK = 0;
+static const int W_WEEK = 98;
+static const int H_WEEK = 38;
 static const int FONT_SIZE_WEEK = 24;
-static const unsigned int COLOR_WEEK = Color32<45, 45, 45>::Value;
-static const unsigned int COLOR_WEEK_SUN = Color32<186, 53, 53>::Value;
-static const int Y_DAY = 47;
-static const int W_DAY = 102;
-static const int H_DAY = 109;
-static const int X_DAY_BITMAP = 1;
-static const int Y_DAY_BITMAP = 6;
-static const int FONT_SIZE_DAY = 52;
-static const unsigned int COLOR_DAY = Color32<45, 45, 45>::Value;
-static const unsigned int COLOR_DAY_DIM = Color32<219, 219, 219>::Value;
-static const unsigned int COLOR_DAY_SUN = Color32<186, 53, 53>::Value;
-static const unsigned int COLOR_DAY_SUN_DIM = Color32<186, 53, 53, 102>::Value;
+static const unsigned int COLOR_WEEK = Color32<57, 57, 57>::Value;
+static const unsigned int COLOR_WEEK_SUN = Color32<171, 60, 60>::Value;
+static const int X_DAY = 17;
+static const int Y_DAY = 38;
+static const int W_DAY = 98;
+static const int H_DAY = 107;
+static const int H_DAY_BUTTON = 100;
+static const int X_DAY_BITMAP = 0;
+static const int Y_DAY_BITMAP = 0;
+static const int FONT_SIZE_DAY = 45;
+static const unsigned int COLOR_DAY = Color32<57, 57, 57>::Value;
+static const unsigned int COLOR_DAY_DIM = Color32<186, 186, 186>::Value;
+static const unsigned int COLOR_DAY_SUN = Color32<171, 60, 60>::Value;
+static const unsigned int COLOR_DAY_SUN_DIM = Color32<224, 185, 180>::Value;
 static const unsigned int COLOR_DAY_FOCUS = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_EVENT_LIST_BACKGROUND = Color32<248, 246, 239>::Value;
 static const unsigned int COLOR_EVENT_LIST_DIVIDER = Color32<169, 169, 169>::Value;
 
 static const int WEEKDAY_COUNT = 7;
+static const int HALF_ALPHA = 128;
+static const int FULL_ALPHA = 255;
 
 class DayButton
        : public Button
@@ -88,7 +93,7 @@ class DayButton
 {
 public:
        const DateTime& GetDate(void) const;
-       void Initialize(const EventListPresentationModel& pm, Bitmap* pBitmapEvent, Bitmap* pBitmapDayFocus, Bitmap* pBitmapToday, Bitmap* pBitmapTodayFocus);
+       void Initialize(const EventListPresentationModel& pm, Bitmap* pBitmapEvent, Bitmap* pBitmapEventFocus, Bitmap* pBitmapFocus, Bitmap* pBitmapToday);
        void SetDate(const DateTime& date);
        void SetDateFocusEventListener(IDateFocusEventListener& listener);
        void SetDayFocus(bool focus);
@@ -107,9 +112,9 @@ private:
        DateTime __date;
        IDateFocusEventListener* __pDateFocusEventListener;
        Bitmap* __pBitmapEvent;
-       Bitmap* __pBitmapDayFocus;
+       Bitmap* __pBitmapEventFocus;
+       Bitmap* __pBitmapFocus;
        Bitmap* __pBitmapToday;
-       Bitmap* __pBitmapTodayFocus;
        bool __isFocused;
 };
 
@@ -117,9 +122,9 @@ DayButton::DayButton(void)
        : __pPm(null)
        , __pDateFocusEventListener(null)
        , __pBitmapEvent(null)
-       , __pBitmapDayFocus(null)
+       , __pBitmapEventFocus(null)
+       , __pBitmapFocus(null)
        , __pBitmapToday(null)
-       , __pBitmapTodayFocus(null)
        , __isFocused(false)
 {
 }
@@ -135,46 +140,63 @@ DayButton::GetDate(void) const
 }
 
 void
-DayButton::Initialize(const EventListPresentationModel& pm, Bitmap* pBitmapEvent, Bitmap* pBitmapDayFocus, Bitmap* pBitmapToday, Bitmap* pBitmapTodayFocus)
+DayButton::Initialize(const EventListPresentationModel& pm, Bitmap* pBitmapEvent, Bitmap* pBitmapEventFocus, Bitmap* pBitmapFocus, Bitmap* pBitmapToday)
 {
-       Construct(Rectangle(0, 0, W_DAY, H_DAY), L"");
+       Construct(Rectangle(0, 0, W_DAY, H_DAY_BUTTON), L"");
        __pPm = &pm;
        __pBitmapEvent = pBitmapEvent;
-       __pBitmapDayFocus = pBitmapDayFocus;
+       __pBitmapEventFocus = pBitmapEventFocus;
+       __pBitmapFocus = pBitmapFocus;
        __pBitmapToday = pBitmapToday;
-       __pBitmapTodayFocus = pBitmapTodayFocus;
 }
 
 void
 DayButton::SetDate(const DateTime& date)
 {
        __date = date;
-       if (EventListPresentationModel::IsToday(__date) == true)
+
+       Bitmap* pBitmap = null;
+       if (__isFocused == true)
        {
-               Point position(X_DAY_BITMAP, Y_DAY_BITMAP);
-               SetNormalBitmap(position, (__isFocused == true) ? *__pBitmapTodayFocus : *__pBitmapToday);
-               SetPressedBitmap(position, *__pBitmapTodayFocus);
-               SetDisabledBitmap(position, *__pBitmapToday);
+               if (__pPm->GetWholeEventCount(__date) > 0)
+               {
+                       pBitmap = __pBitmapEventFocus;
+               }
+               else
+               {
+                       pBitmap = __pBitmapFocus;
+               }
        }
        else
        {
-               Point position(X_DAY_BITMAP, Y_DAY_BITMAP);
-               if (__isFocused == true)
+               if (EventListPresentationModel::IsToday(__date) == true)
                {
-                       SetNormalBitmap(position, *__pBitmapDayFocus);
+                       pBitmap = __pBitmapToday;
                }
                else if (__pPm->GetWholeEventCount(__date) > 0)
                {
-                       SetNormalBitmap(position, *__pBitmapEvent);
-                       SetDisabledBitmap(position, *__pBitmapEvent);
+                       pBitmap = __pBitmapEvent;
                }
                else
                {
-                       SetNormalBitmap(position, *ResourceManager::GetBlankBitmap());
-                       SetDisabledBitmap(position, *ResourceManager::GetBlankBitmap());
+                       pBitmap = ResourceManager::GetBlankBitmap();
+               }
+       }
+       if (pBitmap != null)
+       {
+               Point position(X_DAY_BITMAP, Y_DAY_BITMAP);
+               if (pBitmap != ResourceManager::GetBlankBitmap())
+               {
+                       pBitmap->SetAlphaConstant(HALF_ALPHA);
+                       SetDisabledBitmap(position, *pBitmap);
+                       pBitmap->SetAlphaConstant(FULL_ALPHA);
+                       SetNormalBitmap(position, *pBitmap);
+               }
+               else
+               {
+                       SetNormalBitmap(position, *pBitmap);
+                       SetDisabledBitmap(position, *pBitmap);
                }
-
-               SetPressedBitmap(position, *__pBitmapDayFocus);
        }
 
        SetText(Integer::ToString(__date.GetDay()));
@@ -203,15 +225,37 @@ DayButton::SetDayFocus(bool focus)
        if (__isFocused != focus)
        {
                __isFocused = focus;
-               if (EventListPresentationModel::IsToday(__date) == true)
+               Bitmap* pBitmap = null;
+               if (__isFocused == true)
                {
-                       SetNormalBitmap(Point(X_DAY_BITMAP, Y_DAY_BITMAP), (__isFocused == true) ? *__pBitmapTodayFocus : *__pBitmapToday);
+                       if (__pPm->GetWholeEventCount(__date) > 0)
+                       {
+                               pBitmap = __pBitmapEventFocus;
+                       }
+                       else
+                       {
+                               pBitmap = __pBitmapFocus;
+                       }
                }
                else
                {
-                       SetNormalBitmap(Point(X_DAY_BITMAP, Y_DAY_BITMAP),
-                                                       (__isFocused == true) ? *__pBitmapDayFocus
-                                                                                                 : (__pPm->GetWholeEventCount(__date) > 0) ? *__pBitmapEvent : *ResourceManager::GetBlankBitmap());
+                       if (EventListPresentationModel::IsToday(__date) == true)
+                       {
+                               pBitmap = __pBitmapToday;
+                       }
+                       else if (__pPm->GetWholeEventCount(__date) > 0)
+                       {
+                               pBitmap = __pBitmapEvent;
+                       }
+                       else
+                       {
+                               pBitmap = ResourceManager::GetBlankBitmap();
+                       }
+               }
+               if (pBitmap != null)
+               {
+                       SetNormalBitmap(Point(X_DAY_BITMAP, Y_DAY_BITMAP), *pBitmap);
+                       SetDisabledBitmap(Point(X_DAY_BITMAP, Y_DAY_BITMAP), *pBitmap);
                }
        }
 
@@ -219,31 +263,62 @@ DayButton::SetDayFocus(bool focus)
        if (dayOfWeek == 0)
        {
                SetTextColor(Color((__isFocused == true) ? COLOR_DAY_FOCUS : COLOR_DAY_SUN));
+               SetDisabledTextColor(Color(COLOR_DAY_SUN_DIM));
        }
        else
        {
                SetTextColor(Color((__isFocused == true) ? COLOR_DAY_FOCUS : COLOR_DAY));
+               SetDisabledTextColor(Color(COLOR_DAY_DIM));
        }
 }
 
 void
 DayButton::UpdateEvent(void)
 {
-       if (EventListPresentationModel::IsToday(__date) == false && __isFocused == false)
+       Bitmap* pBitmap = null;
+       if (__isFocused == true)
        {
-               Point position(X_DAY_BITMAP, Y_DAY_BITMAP);
                if (__pPm->GetWholeEventCount(__date) > 0)
                {
-                       SetNormalBitmap(position, *__pBitmapEvent);
-                       SetDisabledBitmap(position, *__pBitmapEvent);
+                       pBitmap = __pBitmapEventFocus;
                }
                else
                {
-                       SetNormalBitmap(position, *ResourceManager::GetBlankBitmap());
-                       SetDisabledBitmap(position, *ResourceManager::GetBlankBitmap());
+                       pBitmap = __pBitmapFocus;
                }
-               Invalidate(false);
        }
+       else
+       {
+               if (EventListPresentationModel::IsToday(__date) == true)
+               {
+                       pBitmap = __pBitmapToday;
+               }
+               else if (__pPm->GetWholeEventCount(__date) > 0)
+               {
+                       pBitmap = __pBitmapEvent;
+               }
+               else
+               {
+                       pBitmap = ResourceManager::GetBlankBitmap();
+               }
+       }
+       if (pBitmap != null)
+       {
+               Point position(X_DAY_BITMAP, Y_DAY_BITMAP);
+               if (pBitmap != ResourceManager::GetBlankBitmap())
+               {
+                       pBitmap->SetAlphaConstant(HALF_ALPHA);
+                       SetDisabledBitmap(position, *pBitmap);
+                       pBitmap->SetAlphaConstant(FULL_ALPHA);
+                       SetNormalBitmap(position, *pBitmap);
+               }
+               else
+               {
+                       SetNormalBitmap(position, *pBitmap);
+                       SetDisabledBitmap(position, *pBitmap);
+               }
+       }
+       Invalidate(false);
 }
 
 result
@@ -252,6 +327,14 @@ DayButton::OnInitializing(void)
        SetNormalBackgroundBitmap(*ResourceManager::GetBlankBitmap());
        SetPressedBackgroundBitmap(*ResourceManager::GetBlankBitmap());
        SetHighlightedBackgroundBitmap(*ResourceManager::GetBlankBitmap());
+
+       Bitmap* pPressedBitmap = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_DAY_PRESS);
+       if (pPressedBitmap != null)
+       {
+               SetPressedBitmap(Point(X_DAY_BITMAP, Y_DAY_BITMAP), *pPressedBitmap);
+               delete pPressedBitmap;
+       }
+
        SetTextSize(FONT_SIZE_DAY);
        SetTextColor(Color(COLOR_DAY));
        SetPressedTextColor(Color(COLOR_DAY_FOCUS));
@@ -291,8 +374,6 @@ public:
        void SetFocusEnabled(bool enable = true);
        void UpdateEvent(void);
 
-       void SetPanningAnimationManager(PanningAnimationManager& manager);
-
        MonthCalendarPanel(void);
        virtual ~MonthCalendarPanel(void);
 
@@ -309,24 +390,26 @@ private:
        DateTime __date;
        const EventListPresentationModel* __pPm;
        IDateFocusEventListener* __pDateFocusEventListener;
-       PanningAnimationManager* __pPanningAnimationManager;
        int __firstDayOfWeek;
        int __startDayColumn;
        Label* __pLabelWeekText[MONTH_CALENDAR_WEEKDAY_COUNT];
        DayButton* __pDayCalendars[MONTH_CALENDAR_ROW_COUNT][MONTH_CALENDAR_WEEKDAY_COUNT];
        Bitmap* __pBitmapEvent;
-       Bitmap* __pBitmapDayFocus;
+       Bitmap* __pBitmapEventFocus;
+       Bitmap* __pBitmapFocus;
        Bitmap* __pBitmapToday;
-       Bitmap* __pBitmapTodayFocus;
        bool __focusEnabled;
 };
 
 MonthCalendarPanel::MonthCalendarPanel(void)
        : __pPm(null)
        , __pDateFocusEventListener(null)
-       , __pPanningAnimationManager(null)
        , __firstDayOfWeek(-1)
        , __startDayColumn(-1)
+       , __pBitmapEvent(null)
+       , __pBitmapEventFocus(null)
+       , __pBitmapFocus(null)
+       , __pBitmapToday(null)
        , __focusEnabled(false)
 {
        memset((void *)__pLabelWeekText, 0, sizeof(Label*) * MONTH_CALENDAR_WEEKDAY_COUNT);
@@ -335,19 +418,6 @@ MonthCalendarPanel::MonthCalendarPanel(void)
 
 MonthCalendarPanel::~MonthCalendarPanel(void)
 {
-       if (__pPanningAnimationManager != null)
-       {
-               RemoveTouchEventListener(*__pPanningAnimationManager);
-               RemoveGestureDetector(*__pPanningAnimationManager);
-               for (int row = 0; row < MONTH_CALENDAR_ROW_COUNT; ++row)
-               {
-                       for (int col = 0; col < MONTH_CALENDAR_WEEKDAY_COUNT; ++col)
-                       {
-                               __pDayCalendars[row][col]->RemoveTouchEventListener(*__pPanningAnimationManager);
-                               __pDayCalendars[row][col]->RemoveGestureDetector(*__pPanningAnimationManager);
-                       }
-               }
-       }
 }
 
 const DateTime&
@@ -369,17 +439,29 @@ MonthCalendarPanel::Initialize(const Rectangle& bounds, const DateTime& date, co
 
        int maxDay;
        DateTime::GetDaysInMonth(__date.GetYear(), __date.GetMonth(), maxDay);
-       int height = H_WEEK + H_GRID_LINE + ((maxDay + __startDayColumn - 1) / MONTH_CALENDAR_WEEKDAY_COUNT  + 1) * (H_DAY + H_GRID_LINE);
+       int height = Y_DAY + ((maxDay + __startDayColumn - 1) / MONTH_CALENDAR_WEEKDAY_COUNT  + 1) * H_DAY;
        return Construct(Rectangle(bounds.x, bounds.y, bounds.width, height));
 }
 
 void
 MonthCalendarPanel::SetDate(const DateTime& date)
 {
-       if (EventListPresentationModel::IsSameDay(__date, date) == false)
+       int firstDayOfWeek = EventListPresentationModel::GetFirstDayOfWeek();
+       if (EventListPresentationModel::IsSameDay(__date, date) == false || firstDayOfWeek != __firstDayOfWeek)
        {
-               if (date.GetYear() != __date.GetYear() || date.GetMonth() != __date.GetMonth())
+               if (date.GetYear() != __date.GetYear() || date.GetMonth() != __date.GetMonth() || firstDayOfWeek != __firstDayOfWeek)
                {
+                       if (firstDayOfWeek != __firstDayOfWeek)
+                       {
+                               __firstDayOfWeek = firstDayOfWeek;
+                               for (int col = 0; col < MONTH_CALENDAR_WEEKDAY_COUNT; ++col)
+                               {
+                                       int dayOfWeek = (col + firstDayOfWeek) % MONTH_CALENDAR_WEEKDAY_COUNT;
+                                       __pLabelWeekText[col]->SetText(ResourceManager::GetWeekShortString(dayOfWeek));
+                                       __pLabelWeekText[col]->SetTextColor(Color((dayOfWeek == 0) ? COLOR_WEEK_SUN : COLOR_WEEK));
+                                       __pLabelWeekText[col]->Invalidate(false);
+                               }
+                       }
                        __startDayColumn = __pPm->GetStartDayOfWeek(date.GetYear(), date.GetMonth()) - __firstDayOfWeek;
                        if (__startDayColumn < 0)
                        {
@@ -389,13 +471,13 @@ MonthCalendarPanel::SetDate(const DateTime& date)
                        int maxDay;
                        DateTime::GetDaysInMonth(date.GetYear(), date.GetMonth(), maxDay);
                        int maxRow = (maxDay + __startDayColumn - 1) / MONTH_CALENDAR_WEEKDAY_COUNT  + 1;
-                       int height = __pDayCalendars[maxRow - 1][0]->GetY() + H_DAY + H_GRID_LINE;
+                       int height = __pDayCalendars[maxRow - 1][0]->GetY() + H_DAY;
                        if (GetHeight() != height)
                        {
                                SetSize(GetWidth(), height);
                        }
                }
-               else if (__focusEnabled == true)
+               else
                {
                        int prevIndex = __date.GetDay() + __startDayColumn - 1;
                        int prevRow = prevIndex / MONTH_CALENDAR_WEEKDAY_COUNT;
@@ -422,16 +504,7 @@ MonthCalendarPanel::SetDateFocusEventListener(IDateFocusEventListener& listener)
 void
 MonthCalendarPanel::SetFocusEnabled(bool enable)
 {
-       if (__focusEnabled != enable)
-       {
-               __focusEnabled = enable;
-
-               int index = __date.GetDay() + __startDayColumn - 1;
-               int row = index / MONTH_CALENDAR_WEEKDAY_COUNT;
-               int col = index % MONTH_CALENDAR_WEEKDAY_COUNT;
-               __pDayCalendars[row][col]->SetDayFocus(__focusEnabled);
-               __pDayCalendars[row][col]->Invalidate(false);
-       }
+       __focusEnabled = enable;
 }
 
 void
@@ -450,24 +523,18 @@ MonthCalendarPanel::UpdateEvent(void)
 }
 
 void
-MonthCalendarPanel::SetPanningAnimationManager(PanningAnimationManager& manager)
+MonthCalendarPanel::OnClearBackground(void)
 {
-       __pPanningAnimationManager = &manager;
-       AddTouchEventListener(manager);
-       AddGestureDetector(manager);
-       for (int row = 0; row < MONTH_CALENDAR_ROW_COUNT; ++row)
+       // Draw background
+       Canvas* pCanvas = GetCanvasN();
+       Bitmap* pBitmapBackground = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_CALENDAR_BG);
+       if (pBitmapBackground != null)
        {
-               for (int col = 0; col < MONTH_CALENDAR_WEEKDAY_COUNT; ++col)
-               {
-                       __pDayCalendars[row][col]->AddTouchEventListener(manager);
-                       __pDayCalendars[row][col]->AddGestureDetector(manager);
-               }
+               pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, GetWidth(), GetHeight()), *pBitmapBackground);
+               delete pBitmapBackground;
        }
-}
+       delete pCanvas;
 
-void
-MonthCalendarPanel::OnClearBackground(void)
-{
        int firstDayOfWeek = EventListPresentationModel::GetFirstDayOfWeek();
        if (firstDayOfWeek != __firstDayOfWeek)
        {
@@ -492,7 +559,7 @@ MonthCalendarPanel::OnClearBackground(void)
                int maxDay;
                DateTime::GetDaysInMonth(__date.GetYear(), __date.GetMonth(), maxDay);
                int maxRow = (maxDay + __startDayColumn - 1) / MONTH_CALENDAR_WEEKDAY_COUNT  + 1;
-               int height = __pDayCalendars[maxRow - 1][0]->GetY() + H_DAY + H_GRID_LINE;
+               int height = __pDayCalendars[maxRow - 1][0]->GetY() + H_DAY;
                if (GetHeight() != height)
                {
                        SetSize(GetWidth(), height);
@@ -506,7 +573,7 @@ MonthCalendarPanel::OnClearBackground(void)
                        for (int col = 0; col < MONTH_CALENDAR_WEEKDAY_COUNT; ++col)
                        {
                                __pDayCalendars[row][col]->SetDate(date);
-                               __pDayCalendars[row][col]->SetDayFocus(__focusEnabled == true && EventListPresentationModel::IsSameDay(date, __date) == true);
+                               __pDayCalendars[row][col]->SetDayFocus(EventListPresentationModel::IsSameDay(date, __date) == true);
                                __pDayCalendars[row][col]->SetEnabled(date.GetMonth() == __date.GetMonth());
                                __pDayCalendars[row][col]->SetShowState(true);
                                __pDayCalendars[row][col]->Invalidate(false);
@@ -519,15 +586,22 @@ MonthCalendarPanel::OnClearBackground(void)
 result
 MonthCalendarPanel::OnInitializing(void)
 {
-       // Create background label
-       Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0, Y_GRID_LINE, GetWidth(), H_GRID_LINE), L"");
-       pLabel->SetBackgroundColor(Color(COLOR_GRID_LINE));
-       AddControl(*pLabel);
+       // Set background
+//     Bitmap* pBitmapBackground = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_CALENDAR_BG);
+//     if (pBitmapBackground != null)
+//     {
+//             Label* pLabel = new (std::nothrow) Label();
+//             pLabel->Construct(Rectangle(0, 0, GetWidth(), GetHeight()), L"");
+//             pLabel->SetBackgroundBitmap(*pBitmapBackground);
+//             AddControl(*pLabel);
+//             delete pBitmapBackground;
+//     }
+
+       // Create week label
        for (int week = 0; week < MONTH_CALENDAR_WEEKDAY_COUNT; ++week)
        {
-               pLabel = new (std::nothrow) Label();
-               pLabel->Construct(Rectangle((W_DAY + W_GRID_LINE) * week, 0, W_WEEK, H_WEEK), L"");
+               Label* pLabel = new (std::nothrow) Label();
+               pLabel->Construct(Rectangle(X_WEEK + W_DAY * week, Y_WEEK, W_WEEK, H_WEEK), L"");
                pLabel->SetTextConfig(FONT_SIZE_WEEK, LABEL_TEXT_STYLE_NORMAL);
                AddControl(*pLabel);
                __pLabelWeekText[week] = pLabel;
@@ -535,9 +609,9 @@ MonthCalendarPanel::OnInitializing(void)
 
        // Load day bitmaps
        __pBitmapEvent = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_DAY_EVENT);
-       __pBitmapDayFocus = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_DAY_FOCUS);
+       __pBitmapEventFocus = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_DAY_EVENT_FOCUS);
+       __pBitmapFocus = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_DAY_FOCUS);
        __pBitmapToday = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_TODAY);
-       __pBitmapTodayFocus = ResourceManager::GetBitmapN(IDB_MONTH_VIEW_TODAY_FOCUS);
 
        // Create day button
        for (int row = 0; row < MONTH_CALENDAR_ROW_COUNT; ++row)
@@ -545,8 +619,8 @@ MonthCalendarPanel::OnInitializing(void)
                for (int col = 0; col < MONTH_CALENDAR_WEEKDAY_COUNT; ++col)
                {
                        DayButton* pButtonDay = new (std::nothrow) DayButton();
-                       pButtonDay->Initialize(*__pPm, __pBitmapEvent, __pBitmapDayFocus, __pBitmapToday, __pBitmapTodayFocus);
-                       pButtonDay->SetPosition(col * (W_DAY + W_GRID_LINE), Y_DAY + row * (H_DAY + H_GRID_LINE));
+                       pButtonDay->Initialize(*__pPm, __pBitmapEvent, __pBitmapEventFocus, __pBitmapFocus, __pBitmapToday);
+                       pButtonDay->SetPosition(X_DAY + col * W_DAY, Y_DAY + row * H_DAY);
                        pButtonDay->SetDateFocusEventListener(*this);
                        AddControl(*pButtonDay);
                        __pDayCalendars[row][col] = pButtonDay;
@@ -560,9 +634,9 @@ result
 MonthCalendarPanel::OnTerminating(void)
 {
        delete __pBitmapEvent;
-       delete __pBitmapDayFocus;
+       delete __pBitmapEventFocus;
+       delete __pBitmapFocus;
        delete __pBitmapToday;
-       delete __pBitmapTodayFocus;
        return E_SUCCESS;
 }
 
@@ -571,19 +645,16 @@ MonthCalendarPanel::OnDateFocused(const DateTime& focusedDate)
 {
        if (EventListPresentationModel::IsSameDay(__date, focusedDate) == false)
        {
-               if (__focusEnabled == true)
+               int index = __date.GetDay() + __startDayColumn - 1;
+               int row = index / MONTH_CALENDAR_WEEKDAY_COUNT;
+               int col = index % MONTH_CALENDAR_WEEKDAY_COUNT;
+               __pDayCalendars[row][col]->SetDayFocus(false);
+               __pDayCalendars[row][col]->Invalidate(false);
+
+               __date = focusedDate;
+               if (__pDateFocusEventListener != null && __focusEnabled == true)
                {
-                       int index = __date.GetDay() + __startDayColumn - 1;
-                       int row = index / MONTH_CALENDAR_WEEKDAY_COUNT;
-                       int col = index % MONTH_CALENDAR_WEEKDAY_COUNT;
-                       __pDayCalendars[row][col]->SetDayFocus(false);
-                       __pDayCalendars[row][col]->Invalidate(false);
-
-                       __date = focusedDate;
-                       if (__pDateFocusEventListener != null)
-                       {
-                               __pDateFocusEventListener->OnDateFocused(focusedDate);
-                       }
+                       __pDateFocusEventListener->OnDateFocused(focusedDate);
                }
        }
 }
@@ -593,6 +664,7 @@ MonthPanel::MonthPanel(void)
        , __selectedIndex(0)
        , __pListViewEvent(null)
        , __pContextItem(null)
+       , __pContextItemNoEdit(null)
        , __pPanningAnimationManager(null)
        , __pSharePopup(null)
 {
@@ -625,14 +697,14 @@ MonthPanel::OnInitializing(void)
 
        // Create panning animation manager
        __pPanningAnimationManager = new (std::nothrow) PanningAnimationManager();
-       __pPanningAnimationManager->Initialize(*this);
-       __pPanningAnimationManager->SetControlAnimatorEventListener(*this);
+       __pPanningAnimationManager->Initialize(bounds, *this);
+       __pPanningAnimationManager->SetPanningAnimationEventListener(*this);
+       AddControl(*__pPanningAnimationManager);
 
        MonthCalendarPanel* pPanel = new (std::nothrow) MonthCalendarPanel();
-       pPanel->Initialize(bounds, __pPm->GetCurrentDate(), *__pPm);
-       AddControl(*pPanel);
+       pPanel->Initialize(Rectangle(0, Y_CALENDAR, bounds.width, bounds.height), __pPm->GetCurrentDate(), *__pPm);
+       __pPanningAnimationManager->AddView(*pPanel, VIEW_SCROLL_EFFECT_CURRENT);
        pPanel->SetDateFocusEventListener(*this);
-       pPanel->SetPanningAnimationManager(*__pPanningAnimationManager);
        pPanel->SetFocusEnabled(true);
        __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT] = pPanel;
 
@@ -645,7 +717,12 @@ MonthPanel::OnInitializing(void)
        __pContextItem->AddElement(IDA_MONTH_PANEL_CONTEXT_MENU_DELETE,
                                                         ResourceManager::GetString(IDS_CLD_SK3_DELETE), true);
 
-       bounds.y = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT]->GetHeight();
+       __pContextItemNoEdit = new (std::nothrow) ListContextItem();
+       __pContextItemNoEdit->Construct();
+       __pContextItemNoEdit->AddElement(IDA_MONTH_PANEL_CONTEXT_MENU_SHARE,
+                                                        ResourceManager::GetString(IDS_COM_SK4_SHARE), true);
+
+       bounds.y += __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT]->GetHeight();
        bounds.height -= bounds.y;
        __pListViewEvent = new (std::nothrow) ListView();
        __pListViewEvent->Construct(bounds, true, SCROLL_STYLE_FADE_OUT);
@@ -666,17 +743,11 @@ MonthPanel::OnInitializing(void)
 result
 MonthPanel::OnTerminating(void)
 {
-       RemoveControl(*__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT]);
-       if (__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] != null)
-       {
-               RemoveControl(*__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT]);
-       }
-       if (__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] != null)
-       {
-               RemoveControl(*__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
-       }
-       delete __pPanningAnimationManager;
+       __pPm->RemoveCalendarEventChangedEventListener(*this);
+       __pPm->RemoveCurrentDateChangedEventListener(*this);
+
        delete __pContextItem;
+       delete __pContextItemNoEdit;
        delete __pSharePopup;
        return E_SUCCESS;
 }
@@ -689,7 +760,7 @@ MonthPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
        case IDA_MAIN_FORM_HEADER_TODAY:
                __pPm->SetTodayToCurrentDate();
                break;
-       case IDA_MAIN_FORM_HEADER_GO_TO_DATE:
+       case IDA_SUB_MENU_GO_TO_DATE:
                GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
                break;
        case IDA_MAIN_FORM_FOOTER_CREATE:
@@ -712,6 +783,10 @@ MonthPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_CALENDAR_LIST,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
                break;
+       case IDA_SUB_MENU_SETTING:
+               SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_SETTING,
+                                                                                                                                         SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+               break;
        case IDA_VIEW_MENU_YEAR:
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_YEAR,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
@@ -770,67 +845,6 @@ MonthPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
 }
 
 void
-MonthPanel::OnControlAnimationStarted(ControlAnimator& source, Control& control)
-{
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_PREVIEW)
-       {
-               MonthCalendarPanel* pPanel = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT]);
-               pPanel->SetPosition(-GetWidth(), pPanel->GetY());
-
-               DateTime date = __pPm->GetCurrentDate();
-               date.AddMonths(-2);
-               pPanel->SetDate(date);
-               pPanel->RequestRedraw(false);
-       }
-       else if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_NEXT)
-       {
-               MonthCalendarPanel* pPanel = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
-               pPanel->SetPosition(GetWidth(), pPanel->GetY());
-
-               DateTime date = __pPm->GetCurrentDate();
-               date.AddMonths(2);
-               pPanel->SetDate(date);
-               pPanel->RequestRedraw(false);
-       }
-}
-
-void
-MonthPanel::OnControlAnimationFinished(ControlAnimator& source, Control& control)
-{
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_PREVIEW)
-       {
-               Panel* pPanel = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT];
-               __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT];
-               __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
-               __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = pPanel;
-
-               static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT])->SetFocusEnabled(false);
-               static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetFocusEnabled(true);
-
-               __pPm->AddCurrentMonth(-1);
-               __pListViewEvent->UpdateList();
-       }
-       else if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_NEXT)
-       {
-               Panel* pPanel = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
-               __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT];
-               __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT];
-               __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] = pPanel;
-
-               static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW])->SetFocusEnabled(false);
-               static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetFocusEnabled(true);
-
-               __pPm->AddCurrentMonth(1);
-               __pListViewEvent->UpdateList();
-       }
-}
-
-void
-MonthPanel::OnControlAnimationStopped(ControlAnimator& source, Control& control)
-{
-}
-
-void
 MonthPanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
 {
        if (status == LIST_ITEM_STATUS_SELECTED)
@@ -937,10 +951,11 @@ MonthPanel::CreateItem(int index, int itemWidth)
        }
        pItem->SetReminder(pEvent->HasReminder());
        pItem->SetRepeat(pEvent->IsRecurring());
+       pItem->SetPriority(pEvent->GetPriority());
 //     pItem->SetFacebookEvent(false);
        pItem->UpdateElements();
 
-       pItem->SetContextItem(__pContextItem);
+       pItem->SetContextItem((pEvent->GetCalendarId() == ID_DEFAULT_BIRTHDAY_CALENDAR) ? __pContextItemNoEdit : __pContextItem);
        return pItem;
 }
 
@@ -954,6 +969,7 @@ MonthPanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
 void
 MonthPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
@@ -976,51 +992,68 @@ MonthPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cur
                {
                case VIEW_SCROLL_EFFECT_NEXT:
                        date.AddMonths(1);
-                       pPanel->Initialize(Rectangle(GetWidth(), 0, GetWidth(), GetHeight()), date, *__pPm);
+                       if (date > Calendarbook::GetMaxDateTime())
+                       {
+                               DateTime minDate = Calendarbook::GetMinDateTime();
+                               date.SetValue(minDate.GetYear(), minDate.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->Initialize(Rectangle(0, Y_CALENDAR, GetWidth(), GetHeight()), date, *__pPm);
                        break;
                case VIEW_SCROLL_EFFECT_PREVIEW:
                        date.AddMonths(-1);
-                       pPanel->Initialize(Rectangle(-GetWidth(), 0, GetWidth(), GetHeight()), date, *__pPm);
+                       if (date < Calendarbook::GetMinDateTime())
+                       {
+                               DateTime maxDate = Calendarbook::GetMaxDateTime();
+                               date.SetValue(maxDate.GetYear(), maxDate.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->Initialize(Rectangle(0, Y_CALENDAR, GetWidth(), GetHeight()), date, *__pPm);
                        break;
                }
-               AddControl(*pPanel);
+               __pPanningAnimationManager->AddView(*pPanel, (ViewScrollEffect)i);
                pPanel->SetDateFocusEventListener(*this);
-               pPanel->SetPanningAnimationManager(*__pPanningAnimationManager);
                __pPanelMonthCalendar[i] = pPanel;
        }
 
+       __pPanningAnimationManager->ResetPosition();
        Update(true);
 
        __pPm->AddCalendarEventChangedEventListener(*this);
        __pPm->AddCurrentDateChangedEventListener(*this);
+       AppLogDebug("Exit.");
 }
 
 void
 MonthPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
        __pPm->RemoveCalendarEventChangedEventListener(*this);
        __pPm->RemoveCurrentDateChangedEventListener(*this);
 
-       RemoveControl(*__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT]);
+       __pPanningAnimationManager->RemoveView(VIEW_SCROLL_EFFECT_NEXT);
        __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] = null;
-       RemoveControl(*__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
+       __pPanningAnimationManager->RemoveView(VIEW_SCROLL_EFFECT_PREVIEW);
        __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = null;
+       AppLogDebug("Exit.");
 }
 
 void
 MonthPanel::OnCalendarEventChanged(void)
 {
+       AppLogDebug("Enter.");
        static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->UpdateEvent();
        static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT])->UpdateEvent();
        static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW])->UpdateEvent();
        __pListViewEvent->UpdateList();
+       AppLogDebug("Exit.");
 }
 
 void
 MonthPanel::OnCurrentDateChanged(const DateTime& currentDate, const DateTime& prevDate)
 {
+       AppLogDebug("Enter.");
        DateTime currentCalendarDate = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->GetDate();
        Update(currentDate.GetYear() != currentCalendarDate.GetYear() || currentDate.GetMonth() != currentCalendarDate.GetMonth());
+       AppLogDebug("Exit.");
 }
 
 void
@@ -1049,12 +1082,62 @@ MonthPanel::GetPreviewControl(void)
 }
 
 void
+MonthPanel::OnPanningAnimationEnded(ViewScrollEffect direction)
+{
+       if (__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] != null && __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] != null)
+       {
+               if (direction == VIEW_SCROLL_EFFECT_PREVIEW)
+               {
+                       MonthCalendarPanel* pPanel = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT]);
+                       DateTime date = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW])->GetDate();
+                       date.AddMonths(-1);
+                       if (date < Calendarbook::GetMinDateTime())
+                       {
+                               DateTime maxDate = Calendarbook::GetMaxDateTime();
+                               date.SetValue(maxDate.GetYear(), maxDate.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->SetDate(date);
+                       pPanel->RequestRedraw(false);
+
+                       __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT];
+                       __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
+                       __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = pPanel;
+
+                       static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT])->SetFocusEnabled(false);
+                       static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetFocusEnabled(true);
+               }
+               else if (direction == VIEW_SCROLL_EFFECT_NEXT)
+               {
+                       MonthCalendarPanel* pPanel = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
+                       DateTime date = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT])->GetDate();
+                       date.AddMonths(1);
+                       if (date > Calendarbook::GetMaxDateTime())
+                       {
+                               DateTime minDate = Calendarbook::GetMinDateTime();
+                               date.SetValue(minDate.GetYear(), minDate.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->SetDate(date);
+                       pPanel->RequestRedraw(false);
+
+                       __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT];
+                       __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT];
+                       __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_NEXT] = pPanel;
+
+                       static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_PREVIEW])->SetFocusEnabled(false);
+                       static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetFocusEnabled(true);
+               }
+               __pPm->SetCurrentDate(static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->GetDate());
+               __pListViewEvent->UpdateList();
+       }
+}
+
+void
 MonthPanel::DrawCalendar(void)
 {
        DateTime current = static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->GetDate();
        static_cast<MonthCalendarPanel*>(__pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetDate(__pPm->GetCurrentDate());
 
-       int height = GetHeight() - __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT]->GetHeight();
+       int height = GetHeight() - Y_CALENDAR - __pPanelMonthCalendar[VIEW_SCROLL_EFFECT_CURRENT]->GetHeight();
        if (__pListViewEvent->GetHeight() != height)
        {
                __pListViewEvent->SetBounds(0, GetHeight() - height, GetWidth(), height);
@@ -1069,6 +1152,11 @@ MonthPanel::DrawCalendar(void)
        {
                DateTime nextDate = __pPm->GetCurrentDate();
                nextDate.AddMonths(1);
+               if (nextDate > Calendarbook::GetMaxDateTime())
+               {
+                       DateTime minDate = Calendarbook::GetMinDateTime();
+                       nextDate.SetValue(minDate.GetYear(), minDate.GetMonth(), nextDate.GetDay(), nextDate.GetHour(), nextDate.GetMinute());
+               }
                pNextPanel->SetDate(nextDate);
        }
 
@@ -1077,6 +1165,11 @@ MonthPanel::DrawCalendar(void)
        {
                DateTime prevDate = __pPm->GetCurrentDate();
                prevDate.AddMonths(-1);
+               if (prevDate < Calendarbook::GetMinDateTime())
+               {
+                       DateTime maxDate = Calendarbook::GetMaxDateTime();
+                       prevDate.SetValue(maxDate.GetYear(), maxDate.GetMonth(), prevDate.GetDay(), prevDate.GetHour(), prevDate.GetMinute());
+               }
                pPrevPanel->SetDate(prevDate);
        }
 }
index 4fae7db..517384d 100644 (file)
@@ -16,7 +16,7 @@
 
 /**
  * @file       ClNodes.cpp
- * @brief      This is the implementation file for the EventNode class and EventListNode class.
+ * @brief      This is the implementation file for the EventInstanceNode class, EventInstanceListNode class, EventPtr class, and EventListNode class.
  */
 
 #include <new>
@@ -27,25 +27,25 @@ using namespace Tizen::Base::Collection;
 using namespace Tizen::Social;
 
 
-EventNode::EventNode(CalEventInstance& event)
+EventInstanceNode::EventInstanceNode(CalEventInstance& event)
        : __pEvent(&event)
        , __refCount(1)
 {
 }
 
-EventNode::~EventNode(void)
+EventInstanceNode::~EventInstanceNode(void)
 {
        delete __pEvent;
 }
 
 void
-EventNode::AddRef(void)
+EventInstanceNode::AddRef(void)
 {
        ++__refCount;
 }
 
 void
-EventNode::RemoveRef(void)
+EventInstanceNode::RemoveRef(void)
 {
        --__refCount;
        if (__refCount <= 0)
@@ -55,27 +55,27 @@ EventNode::RemoveRef(void)
 }
 
 CalEventInstance*
-EventNode::GetEvent(void)
+EventInstanceNode::GetEvent(void)
 {
        return __pEvent;
 }
 
 
-EventListNode::EventListNode(const DateTime& date)
+EventInstanceListNode::EventInstanceListNode(const DateTime& date)
        : __date(date)
        , __pAllDayEvents(null)
        , __pEvents(null)
 {
 }
 
-EventListNode::~EventListNode(void)
+EventInstanceListNode::~EventInstanceListNode(void)
 {
        if (__pAllDayEvents != null)
        {
                int count = __pAllDayEvents->GetCount();
                for (int i = 0; i < count; ++i)
                {
-                       static_cast<EventNode*>(__pAllDayEvents->GetAt(i))->RemoveRef();
+                       static_cast<EventInstanceNode*>(__pAllDayEvents->GetAt(i))->RemoveRef();
                }
                __pAllDayEvents->RemoveAll(false);
                delete __pAllDayEvents;
@@ -85,7 +85,7 @@ EventListNode::~EventListNode(void)
                int count = __pEvents->GetCount();
                for (int i = 0; i < count; ++i)
                {
-                       static_cast<EventNode*>(__pEvents->GetAt(i))->RemoveRef();
+                       static_cast<EventInstanceNode*>(__pEvents->GetAt(i))->RemoveRef();
                }
                __pEvents->RemoveAll(false);
                delete __pEvents;
@@ -93,7 +93,7 @@ EventListNode::~EventListNode(void)
 }
 
 void
-EventListNode::Add(EventNode& eventNode)
+EventInstanceListNode::Add(EventInstanceNode& eventNode)
 {
        if (eventNode.GetEvent()->IsAllDayEvent() == true)
        {
@@ -116,13 +116,13 @@ EventListNode::Add(EventNode& eventNode)
 }
 
 const DateTime&
-EventListNode::GetDate(void) const
+EventInstanceListNode::GetDate(void) const
 {
        return __date;
 }
 
 int
-EventListNode::GetAllDayEventCount(void) const
+EventInstanceListNode::GetAllDayEventCount(void) const
 {
        if (__pAllDayEvents == null)
        {
@@ -132,7 +132,7 @@ EventListNode::GetAllDayEventCount(void) const
 }
 
 int
-EventListNode::GetEventCount(void) const
+EventInstanceListNode::GetEventCount(void) const
 {
        if (__pEvents == null)
        {
@@ -142,33 +142,33 @@ EventListNode::GetEventCount(void) const
 }
 
 int
-EventListNode::GetWholeEventCount(void) const
+EventInstanceListNode::GetWholeEventCount(void) const
 {
        return GetAllDayEventCount() + GetEventCount();
 }
 
 CalEventInstance*
-EventListNode::GetAllDayEvent(int index) const
+EventInstanceListNode::GetAllDayEvent(int index) const
 {
        if (__pAllDayEvents == null)
        {
                return null;
        }
-       return static_cast<EventNode*>(__pAllDayEvents->GetAt(index))->GetEvent();
+       return static_cast<EventInstanceNode*>(__pAllDayEvents->GetAt(index))->GetEvent();
 }
 
 CalEventInstance*
-EventListNode::GetEvent(int index) const
+EventInstanceListNode::GetEvent(int index) const
 {
        if (__pEvents == null)
        {
                return null;
        }
-       return static_cast<EventNode*>(__pEvents->GetAt(index))->GetEvent();
+       return static_cast<EventInstanceNode*>(__pEvents->GetAt(index))->GetEvent();
 }
 
 CalEventInstance*
-EventListNode::GetEventWithWholeIndex(int index) const
+EventInstanceListNode::GetEventWithWholeIndex(int index) const
 {
        if (index < 0)
        {
@@ -178,13 +178,137 @@ EventListNode::GetEventWithWholeIndex(int index) const
        int allDayEventCount = GetAllDayEventCount();
        if (index < allDayEventCount)
        {
-               return static_cast<EventNode*>(__pAllDayEvents->GetAt(index))->GetEvent();
+               return static_cast<EventInstanceNode*>(__pAllDayEvents->GetAt(index))->GetEvent();
        }
 
        index -= allDayEventCount;
        if (index < GetEventCount())
        {
-               return static_cast<EventNode*>(__pEvents->GetAt(index))->GetEvent();
+               return static_cast<EventInstanceNode*>(__pEvents->GetAt(index))->GetEvent();
+       }
+
+       return null;
+}
+
+
+EventPtr::EventPtr(CalEvent& event)
+       : __pEvent(&event)
+       , __pRefCount(new (std::nothrow) int(1))
+{
+}
+
+EventPtr::EventPtr(const EventPtr& eventPtr)
+       : __pEvent(eventPtr.__pEvent)
+       , __pRefCount(eventPtr.__pRefCount)
+{
+       ++*__pRefCount;
+}
+
+EventPtr::~EventPtr(void)
+{
+       if (--*__pRefCount <= 0)
+       {
+               delete __pRefCount;
+               delete __pEvent;
+       }
+}
+
+EventPtr&
+EventPtr::operator=(const EventPtr& eventPtr)
+{
+       if (--*__pRefCount <= 0)
+       {
+               delete __pRefCount;
+               delete __pEvent;
+       }
+
+       __pEvent = eventPtr.__pEvent;
+       __pRefCount = eventPtr.__pRefCount;
+       ++*__pRefCount;
+       return *this;
+}
+
+CalEvent&
+EventPtr::operator*(void)
+{
+       return *__pEvent;
+}
+
+CalEvent*
+EventPtr::operator->(void)
+{
+       return __pEvent;
+}
+
+
+EventListNode::EventListNode(const DateTime& date)
+       : __date(date)
+       , __pAllDayEvents(null)
+       , __pEvents(null)
+{
+}
+
+EventListNode::~EventListNode(void)
+{
+       delete __pAllDayEvents;
+       delete __pEvents;
+}
+
+void
+EventListNode::Add(EventPtr& eventPtr)
+{
+       if (eventPtr->IsAllDayEvent() == true)
+       {
+               if (__pAllDayEvents == null)
+               {
+                       __pAllDayEvents = new (std::nothrow) ArrayList(SingleObjectDeleter);
+                       __pAllDayEvents->Construct();
+               }
+               __pAllDayEvents->Add(new (std::nothrow) EventPtr(eventPtr));
+       }
+       else
+       {
+               if (__pEvents == null)
+               {
+                       __pEvents = new (std::nothrow) ArrayList(SingleObjectDeleter);
+                       __pEvents->Construct();
+               }
+               __pEvents->Add(new (std::nothrow) EventPtr(eventPtr));
+       }
+}
+
+const DateTime&
+EventListNode::GetDate(void) const
+{
+       return __date;
+}
+
+int
+EventListNode::GetEventCount(void) const
+{
+       return ((__pAllDayEvents != null) ? __pAllDayEvents->GetCount() : 0) + ((__pEvents != null) ? __pEvents->GetCount() : 0);
+}
+
+CalEvent*
+EventListNode::GetEvent(int index) const
+{
+       if (index < 0)
+       {
+               return null;
+       }
+
+       if (__pAllDayEvents != null)
+       {
+               if (index < __pAllDayEvents->GetCount())
+               {
+                       return &**static_cast<EventPtr*>(__pAllDayEvents->GetAt(index));
+               }
+               index -= __pAllDayEvents->GetCount();
+       }
+
+       if (__pEvents != null && __pEvents->GetCount())
+       {
+               return &**static_cast<EventPtr*>(__pEvents->GetAt(index));
        }
 
        return null;
index c660ca1..c398b31 100644 (file)
 #include "ClPanningAnimationManager.h"
 
 using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
-using namespace Tizen::Ui::Animations;
 using namespace Tizen::Ui::Controls;
 
-static const int EFFECT_DURATION = 300;
-static const int GESTURE_THRESHOLD = 72;
-
 PanningAnimationManager::PanningAnimationManager(void)
        : __pProvider(null)
-       , __pControlAnimatorEventListener(null)
+       , __pPanningAnimationEventListener(null)
        , __pCurrent(null)
        , __pNext(null)
        , __pPreview(null)
-       , __effectDirection(VIEW_SCROLL_EFFECT_CURRENT)
-       , __isTouchPanningTriggered(false)
-       , __isPanningEffectRunning(false)
+       , __isInitialized(false)
 {
 }
 
 PanningAnimationManager::~PanningAnimationManager(void)
 {
-       RemovePanningGestureEventListener(*this);
-}
-
-ViewScrollEffect
-PanningAnimationManager::GetScrollDirection(void) const
-{
-       return __effectDirection;
 }
 
-void
-PanningAnimationManager::Initialize(IPanningAnimationControlProvider& provider)
+result
+PanningAnimationManager::AddView(Control& view, ViewScrollEffect position)
 {
-       Construct();
-       AddPanningGestureEventListener(*this);
-       SetDelayTouchEventEnabled(true);
+       TryReturn(position == VIEW_SCROLL_EFFECT_CURRENT || position == VIEW_SCROLL_EFFECT_NEXT || position == VIEW_SCROLL_EFFECT_PREVIEW,
+                       E_INVALID_ARG, "[E_INVALID_ARG] Position is not valid.");
 
-       __pProvider = &provider;
-}
+       result r = AddControl(view);
+       if (r != E_SUCCESS)
+       {
+               return r;
+       }
 
-result
-PanningAnimationManager::RunPanningAnimation(ViewScrollEffect scrollDirection)
-{
-       result r = E_SUCCESS;
-       __pCurrent = __pProvider->GetCurrentControl();
-       switch (scrollDirection)
+       switch (position)
        {
        case VIEW_SCROLL_EFFECT_CURRENT:
-               r = RunPanningAnimation(0);
+               if (__pCurrent != null)
+               {
+                       RemoveControl(*__pCurrent);
+               }
+               __pCurrent = &view;
+               __pCurrent->SetPosition(GetWidth(), __pCurrent->GetY());
                break;
        case VIEW_SCROLL_EFFECT_NEXT:
-               r = RunPanningAnimation(-__pCurrent->GetWidth());
+               if (__pNext != null)
+               {
+                       RemoveControl(*__pNext);
+               }
+               __pNext = &view;
+               __pNext->SetPosition(GetWidth() << 1, __pNext->GetY());
                break;
        case VIEW_SCROLL_EFFECT_PREVIEW:
-               r = RunPanningAnimation(__pCurrent->GetWidth());
+               if (__pPreview != null)
+               {
+                       RemoveControl(*__pPreview);
+               }
+               __pPreview = &view;
+               __pPreview->SetPosition(GetWidth() - __pPreview->GetWidth(), __pPreview->GetY());
                break;
        default:
-               r = E_INVALID_ARG;
                break;
        }
 
-       if (r == E_SUCCESS)
-       {
-               __effectDirection = scrollDirection;
-       }
        return r;
 }
 
 void
-PanningAnimationManager::SetControlAnimatorEventListener(IControlAnimatorEventListener& listener)
+PanningAnimationManager::Initialize(const Rectangle& bounds, IPanningAnimationControlProvider& provider)
 {
-       __pControlAnimatorEventListener = &listener;
+       __pProvider = &provider;
+       Construct(bounds, SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL, false);
 }
 
-void
-PanningAnimationManager::OnTouchMoved(Control& source, const TouchEventInfo& touchInfo)
+result
+PanningAnimationManager::RemoveView(ViewScrollEffect position)
 {
-       // Todo : Remove ITouchEventListener and validate below code.(In SDK 2.0.0 RC2, touchInfo has wrong value.)
-//     if (__isTouchPanningTriggered == true)
-//     {
-//             if (__isPanningEffectRunning == true)
-//             {
-//                     int dX = touchInfo.GetCurrentPosition().x - touchInfo.GetStartPosition().x;
-//                     RunPanningAnimation(dX, true);
-//             }
-//             else
-//             {
-//                     int dX = touchInfo.GetCurrentPosition().x - touchInfo.GetStartPosition().x;
-//                     int absdX = (dX >= 0) ? dX : -dX;
-//                     int dY = touchInfo.GetCurrentPosition().y - touchInfo.GetStartPosition().y;
-//                     {
-//                             dY = -dY;
-//                     }
-//
-//                     if (absdX > dY * 2 && absdX > GESTURE_THRESHOLD)
-//                     {
-//                             __isPanningEffectRunning = true;
-//                             RunPanningAnimation(dX, true);
-//                     }
-//             }
-//     }
-}
+       Control* pWillBeDeleted = null;
+       switch (position)
+       {
+       case VIEW_SCROLL_EFFECT_CURRENT:
+               pWillBeDeleted = __pCurrent;
+               __pCurrent = null;
+               break;
+       case VIEW_SCROLL_EFFECT_NEXT:
+               pWillBeDeleted = __pNext;
+               __pNext = null;
+               break;
+       case VIEW_SCROLL_EFFECT_PREVIEW:
+               pWillBeDeleted = __pPreview;
+               __pPreview = null;
+               break;
+       default:
+               break;
+       }
 
-void
-PanningAnimationManager::OnControlAnimationStarted(ControlAnimator& source, Control& control)
-{
-       if (__pControlAnimatorEventListener != null)
+       if (pWillBeDeleted != null)
        {
-               __pControlAnimatorEventListener->OnControlAnimationStarted(source, control);
+               return RemoveControl(*pWillBeDeleted);
        }
+       return E_SUCCESS;
 }
 
 void
-PanningAnimationManager::OnControlAnimationFinished(ControlAnimator& source, Control& control)
+PanningAnimationManager::ResetPosition(void)
 {
-       __isPanningEffectRunning = false;
-
-       __pCurrent->GetControlAnimator()->RemoveControlAnimatorEventListener(*this);
-       if (__pControlAnimatorEventListener != null)
+       Rectangle bounds = GetBounds();
+       __pPreview = __pProvider->GetPreviewControl();
+       if (__pPreview != null)
        {
-               __pControlAnimatorEventListener->OnControlAnimationFinished(source, control);
+               __pPreview->SetPosition(Point(bounds.width - __pPreview->GetWidth(), __pPreview->GetY()));
        }
 
-       if (__isTouchPanningTriggered == false)
+       __pCurrent = __pProvider->GetCurrentControl();
+       if (__pCurrent != null)
        {
-               __pCurrent = null;
-               __pPreview = null;
-               __pNext = null;
+               __pCurrent->SetPosition(Point(bounds.width, __pCurrent->GetY()));
        }
-}
 
-void
-PanningAnimationManager::OnControlAnimationStopped(ControlAnimator& source, Control& control)
-{
-       __pCurrent->GetControlAnimator()->RemoveControlAnimatorEventListener(*this);
-       if (__pControlAnimatorEventListener != null)
+       __pNext = __pProvider->GetNextControl();
+       if (__pNext != null)
        {
-               __pControlAnimatorEventListener->OnControlAnimationStopped(source, control);
+               __pNext->SetPosition(Point(bounds.width << 1, __pNext->GetY()));
        }
-}
 
-void
-PanningAnimationManager::OnTouchPressed(const Control& source, const Point& currentPosition, const TouchEventInfo & touchInfo)
-{
+       SetClientAreaWidth(bounds.width * 3);
+       SetScrollPosition(bounds.width);
 }
 
 void
-PanningAnimationManager::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+PanningAnimationManager::SetPanningAnimationEventListener(IPanningAnimationEventListener& listener)
 {
+       __pPanningAnimationEventListener = &listener;
 }
 
-void
-PanningAnimationManager::OnTouchMoved(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+result
+PanningAnimationManager::OnInitializing(void)
 {
-       if (__isTouchPanningTriggered == true)
-       {
-               if (__isPanningEffectRunning == true)
-               {
-                       int dX = currentPosition.x - touchInfo.GetStartPosition().x;
-                       RunPanningAnimation(dX, true);
-               }
-               else
-               {
-                       int dX = currentPosition.x - touchInfo.GetStartPosition().x;
-                       int absdX = (dX >= 0) ? dX : -dX;
-                       int dY = currentPosition.y - touchInfo.GetStartPosition().y;
-                       {
-                               dY = -dY;
-                       }
-
-                       if (absdX > dY * 2 && absdX > GESTURE_THRESHOLD)
-                       {
-                               __isPanningEffectRunning = true;
-                               RunPanningAnimation(dX, true);
-                       }
-               }
-       }
-}
+       SetPageScrollEnabled(true);
+       SetScrollBarVisible(false);
+       SetClientAreaWidth(GetWidth() * 3);
+       SetScrollPosition(GetWidth());
+       SetScrollInputMode(SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION);
+       AddScrollEventListener(*this);
+       __isInitialized = true;
 
-void
-PanningAnimationManager::OnTouchFocusIn(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
-{
+       return E_SUCCESS;
 }
 
-void
-PanningAnimationManager::OnTouchFocusOut(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+result
+PanningAnimationManager::OnTerminating(void)
 {
+       return E_SUCCESS;
 }
 
 void
-PanningAnimationManager::OnPanningGestureStarted(TouchPanningGestureDetector& gestureDetector)
+PanningAnimationManager::OnScrollEndReached(Control& source, ScrollEndEvent type)
 {
-       if (__isPanningEffectRunning == false)
+       if (__pProvider == null || (type != SCROLL_END_EVENT_END_LEFT && type != SCROLL_END_EVENT_END_RIGHT))
        {
-               __isTouchPanningTriggered = true;
-               __pCurrent = __pProvider->GetCurrentControl();
-               __effectDirection = VIEW_SCROLL_EFFECT_CURRENT;
+               // Do nothing
+               return;
        }
-}
-
-void
-PanningAnimationManager::OnPanningGestureChanged(TouchPanningGestureDetector& gestureDetector)
-{
-}
 
-void
-PanningAnimationManager::OnPanningGestureFinished(TouchPanningGestureDetector& gestureDetector)
-{
-       __isTouchPanningTriggered = false;
-       if (__isPanningEffectRunning == true)
+       if (__pPanningAnimationEventListener != null)
        {
-               if (__pCurrent->GetX() > (__pCurrent->GetWidth() / 2))
-               {
-                       // Go preview
-                       __effectDirection = VIEW_SCROLL_EFFECT_PREVIEW;
-                       RunPanningAnimation(__pCurrent->GetWidth(), true);
-               }
-               else if (__pCurrent->GetX() < -(__pCurrent->GetWidth() / 2))
+               if (type == SCROLL_END_EVENT_END_LEFT)
                {
-                       // Go next
-                       __effectDirection = VIEW_SCROLL_EFFECT_NEXT;
-                       RunPanningAnimation(-__pCurrent->GetWidth(), true);
+                       // Move to preview
+                       __pPanningAnimationEventListener->OnPanningAnimationEnded(VIEW_SCROLL_EFFECT_PREVIEW);
                }
                else
                {
-                       // Go current
-                       __effectDirection = VIEW_SCROLL_EFFECT_CURRENT;
-                       RunPanningAnimation(0, true);
-               }
-       }
-}
-
-void
-PanningAnimationManager::OnPanningGestureCanceled(TouchPanningGestureDetector& gestureDetector)
-{
-       OnPanningGestureFinished(gestureDetector);
-}
-
-result
-PanningAnimationManager::RunPanningAnimation(int endPosition, bool runForce)
-{
-       Point startPos = __pCurrent->GetPosition();
-       Point endPos(endPosition, startPos.y);
-
-       if (startPos.x > 0 || endPos.x > 0)
-       {
-               __pPreview = __pProvider->GetPreviewControl();
-               ControlAnimator* pPreviewAnimator = __pPreview->GetControlAnimator();
-               if (runForce == true)
-               {
-                       pPreviewAnimator->StopAllAnimations();
-               }
-               PointAnimation previewPointAnimation(Point(startPos.x - __pPreview->GetWidth(), startPos.y),
-                                                                                        Point(endPos.x - __pPreview->GetWidth(), endPos.y),
-                                                                                        EFFECT_DURATION, ANIMATION_INTERPOLATOR_EASE_IN_OUT);
-               pPreviewAnimator->StartUserAnimation(ANIMATION_TARGET_POSITION, previewPointAnimation);
-       }
-
-       if (startPos.x < 0 || endPos.x < 0)
-       {
-               __pNext = __pProvider->GetNextControl();
-               ControlAnimator* pNextAnimator = __pNext->GetControlAnimator();
-               if (runForce == true)
-               {
-                       pNextAnimator->StopAllAnimations();
+                       // Move to next
+                       __pPanningAnimationEventListener->OnPanningAnimationEnded(VIEW_SCROLL_EFFECT_NEXT);
                }
-               PointAnimation nextPointAnimation(Point(startPos.x + __pCurrent->GetWidth(), startPos.y),
-                                                                                 Point(endPos.x + __pCurrent->GetWidth(), endPos.y),
-                                                                                 EFFECT_DURATION, ANIMATION_INTERPOLATOR_EASE_IN_OUT);
-               pNextAnimator->StartUserAnimation(ANIMATION_TARGET_POSITION, nextPointAnimation);
-       }
-
-       ControlAnimator* pCurrentAnimator = __pCurrent->GetControlAnimator();
-       if (runForce == true)
-       {
-               pCurrentAnimator->StopAllAnimations();
        }
-       pCurrentAnimator->AddControlAnimatorEventListener(*this);
 
-       PointAnimation currentPointAnimation(startPos, endPos, EFFECT_DURATION, ANIMATION_INTERPOLATOR_EASE_IN_OUT);
-       return pCurrentAnimator->StartUserAnimation(ANIMATION_TARGET_POSITION, currentPointAnimation);
+       ResetPosition();
+       Invalidate(true);
 }
index de64d2b..a8bafb0 100644 (file)
@@ -37,7 +37,6 @@ using namespace Tizen::Ui::Scenes;
 static const int IDA_REMINDER_FORM_BACK = 29101;
 static const int IDA_REMINDER_FORM_TIME_UNIT = 29801;
 
-static const int H_GROUP_REMINDER_ITEM = 16;
 static const int H_REMINDER_ITEM = 112;
 static const int FONT_SIZE_REMINDER_TYPE_CUSTOM = 42;
 static const int X_REMINDER_TYPE_CUSTOM = 16;
@@ -47,6 +46,7 @@ static const int H_REMINDER_TYPE_CUSTOM_EDIT_FILED = 74;
 static const int Y_REMINDER_TYPE_BUTTON_TIME_UNIT = 19;
 static const int W_REMINDER_TYPE_BUTTON_TIME_UNIT = 130;
 static const int H_REMINDER_TYPE_BUTTON_TIME_UNIT = 74;
+static const unsigned int COLOR_ITEM_BACKGROUND = Color32<220, 218, 211>::Value;
 static const unsigned int COLOR_ITEM_TEXT = Color32<0, 0, 0>::Value;
 static const int X_TIME_UNIT_SELECTOR = 400;
 static const int Y_TIME_UNIT_SELECTOR = 1050;
@@ -83,10 +83,11 @@ ReminderForm::OnInitializing(void)
 
        SetFormBackEventListener(this);
 
-       __pTableView = dynamic_cast<GroupedTableView*>(GetControl(L"IDC_GROUPEDTABLEVIEW"));
-       TryReturn(__pTableView != null, E_FAILURE, "[E_FAILURE] Unable to get groupedtableview.");
+       __pTableView = dynamic_cast<SectionTableView*>(GetControl(L"IDC_SECTIONTABLEVIEW"));
+       TryReturn(__pTableView != null, E_FAILURE, "[E_FAILURE] Unable to get SectionTableView.");
        __pTableView->SetItemProvider(this);
-       __pTableView->AddGroupedTableViewItemEventListener(*this);
+       __pTableView->AddSectionTableViewItemEventListener(*this);
+       __pTableView->SetGroupedLookEnabled(true);
 
        ContextMenu* pTimeUnitSelector = new (std::nothrow) ContextMenu();
        pTimeUnitSelector->Construct(Point(X_TIME_UNIT_SELECTOR, Y_TIME_UNIT_SELECTOR), CONTEXT_MENU_STYLE_LIST);
@@ -111,11 +112,13 @@ ReminderForm::OnTerminating(void)
 void
 ReminderForm::OnFormBackRequested(Form& source)
 {
+       SetFocus();
        if (__reminderType == REMINDER_TYPE_OFF)
        {
                LinkedList* pList = new (std::nothrow) LinkedList();
                pList->Add(new (std::nothrow) Integer(__index));
                SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), pList);
+               return;
        }
 
        if(__pReminder != null)
@@ -140,48 +143,25 @@ ReminderForm::OnFormBackRequested(Form& source)
 }
 
 int
-ReminderForm::GetGroupCount(void)
+ReminderForm::GetSectionCount(void)
 {
        return 1;
 }
 
 int
-ReminderForm::GetItemCount(int groupIndex)
+ReminderForm::GetItemCount(int sectionIndex)
 {
        return REMINDER_TYPE_MAX;
 }
 
-TableViewGroupItem*
-ReminderForm::CreateGroupItem(int groupIndex, int itemWidth)
-{
-       TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
-
-       pItem->Construct(Dimension(itemWidth, H_GROUP_REMINDER_ITEM));
-
-       return pItem;
-}
-
-bool
-ReminderForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
-{
-       delete pItem;
-       return true;
-}
-
-void
-ReminderForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
-{
-}
-
 TableViewItem*
-ReminderForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+ReminderForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-
-       Label* pText = null;
        pItem->Construct(Dimension(itemWidth, H_REMINDER_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+       pItem->SetBackgroundColor(COLOR_ITEM_BACKGROUND, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
 
-       pText = new (std::nothrow) Label();
+       Label* pText = new (std::nothrow) Label();
        switch (itemIndex)
        {
        case REMINDER_TYPE_OFF:
@@ -272,7 +252,7 @@ CATCH:
 }
 
 bool
-ReminderForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+ReminderForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
 {
        if (itemIndex == REMINDER_TYPE_CUSTOM)
        {
@@ -287,7 +267,7 @@ ReminderForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
 }
 
 void
-ReminderForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+ReminderForm::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
 {
        if (itemIndex == REMINDER_TYPE_CUSTOM)
        {
@@ -316,25 +296,38 @@ ReminderForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
        }
 }
 
-int
-ReminderForm::GetDefaultGroupItemHeight(void)
+String
+ReminderForm::GetSectionHeader(int sectionIndex)
 {
-       return H_GROUP_REMINDER_ITEM;
+       return L"";
 }
 
-int
-ReminderForm::GetDefaultItemHeight(void)
+bool
+ReminderForm::HasSectionHeader(int sectionIndex)
 {
-       return H_REMINDER_ITEM;
+       return false;
 }
 
-void
-ReminderForm::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, TableViewGroupItem* pItem, TableViewItemStatus status)
+String
+ReminderForm::GetSectionFooter(int sectionIndex)
+{
+       return L"";
+}
+
+bool
+ReminderForm::HasSectionFooter(int sectionIndex)
 {
+       return false;
+}
+
+int
+ReminderForm::GetDefaultItemHeight(void)
+{
+       return H_REMINDER_ITEM;
 }
 
 void
-ReminderForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+ReminderForm::OnSectionTableViewItemStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
 {
        if (itemIndex != REMINDER_TYPE_CUSTOM)
        {
@@ -344,11 +337,11 @@ ReminderForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, in
 
        if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
        {
-               tableView.SetItemChecked(groupIndex, (int)__reminderType, false);
+               tableView.SetItemChecked(sectionIndex, (int)__reminderType, false);
                if (__reminderType == REMINDER_TYPE_CUSTOM)
                {
                        __reminderType = (ReminderType)itemIndex;
-                       tableView.RefreshItem(groupIndex, REMINDER_TYPE_CUSTOM, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                       tableView.RefreshItem(sectionIndex, REMINDER_TYPE_CUSTOM, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                }
                else
                {
@@ -382,7 +375,7 @@ ReminderForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, in
                        __pReminder->SetTimeOffset(REMINDER_TIME_UNIT_WEEK, 1);
                        break;
                case REMINDER_TYPE_CUSTOM:
-                       tableView.RefreshItem(groupIndex, REMINDER_TYPE_CUSTOM, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                       tableView.RefreshItem(sectionIndex, REMINDER_TYPE_CUSTOM, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                        __pEditFieldReminderTime->SetFocus();
                        break;
                default:
@@ -393,19 +386,20 @@ ReminderForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, in
        }
        else if (status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
        {
-               tableView.SetItemChecked(groupIndex, itemIndex, true);
+               tableView.SetItemChecked(sectionIndex, itemIndex, true);
                tableView.Invalidate(true);
        }
 }
 
 void
-ReminderForm::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated)
+ReminderForm::OnSectionTableViewContextItemActivationStateChanged(SectionTableView& tableView, int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated)
 {
 }
 
 void
 ReminderForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        Reminder* pReminder = null;
        Integer* pIndex = null;
        TryCatch(pArgs != null, , "Unable to get arguments.");
@@ -472,6 +466,8 @@ ReminderForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& c
                                __reminderType = REMINDER_TYPE_1_WEEK_BEFORE;
                        }
                        break;
+               default:
+                       break;
                }
 
                if (__reminderType == REMINDER_TYPE_CUSTOM)
@@ -492,6 +488,8 @@ ReminderForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& c
                        case REMINDER_TIME_UNIT_WEEK:
                                __reminderTimeUnitText = ResourceManager::GetString(IDS_REMINDER_CUSTOM_TIME_UNIT_WEEK);
                                break;
+                       default:
+                               break;
                        }
                }
 
@@ -505,11 +503,14 @@ CATCH:
        __pTableView->UpdateTableView();
        __pTableView->SetItemChecked(0, __reminderType, true);
        __pTableView->Invalidate(true);
+       AppLogDebug("Exit.");
 }
 
 void
 ReminderForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
+       AppLogDebug("Exit.");
 }
 
 void
@@ -583,29 +584,17 @@ ReminderForm::OnActionPerformed(const Control& source, int actionId)
 void
 ReminderForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 {
-       ButtonItem backItem;
-       backItem.Construct(BUTTON_ITEM_STYLE_ICON, IDA_REMINDER_FORM_BACK);
-       backItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, ResourceManager::GetBitmapN(IDB_FORM_BACK));
-       backItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, ResourceManager::GetBitmapN(IDB_FORM_BACK_PRESS));
-       GetHeader()->SetButton(BUTTON_POSITION_RIGHT, backItem);
-
-       GetHeader()->AddActionEventListener(*this);
-       GetFooter()->SetShowState(false);
-       Invalidate(true);
 }
 
 void
 ReminderForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-
+       Invalidate(true);
 }
 
 void
 ReminderForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-       GetHeader()->RemoveActionEventListener(*this);
-       GetHeader()->RemoveAllButtons();
-       GetFooter()->SetShowState(true);
        Invalidate(true);
 }
 
index 4aaab65..8bd952b 100644 (file)
@@ -44,9 +44,9 @@ enum
        GROUP_REPEAT_COUNT,
        GROUP_REPEAT_OFF_COUNT = GROUP_REPEAT_UNTIL_TYPE
 };
-static const int H_GROUP_REPEAT_ITEM = 76;
+
 static const int H_REPEAT_ITEM = 112;
-static const unsigned int COLOR_ITEM_BACKGROUND = Color32<0, 0, 0, 0>::Value;
+static const unsigned int COLOR_ITEM_BACKGROUND = Color32<220, 218, 211>::Value;
 static const int FONT_SIZE_REPEAT_UNTIL_TYPE = 44;
 static const int X_REPEAT_UNTIL = 148;
 static const int Y_REPEAT_UNTIL_TYPE_EDIT_FIELD = 16;
@@ -86,10 +86,11 @@ RepeatForm::OnInitializing(void)
 
        SetFormBackEventListener(this);
 
-       __pTableView = dynamic_cast<GroupedTableView*>(GetControl(L"IDC_GROUPEDTABLEVIEW"));
-       TryReturn(__pTableView != null, E_FAILURE, "[E_FAILURE] Unable to get groupedtableview.");
+       __pTableView = dynamic_cast<SectionTableView*>(GetControl(L"IDC_SECTIONTABLEVIEW"));
+       TryReturn(__pTableView != null, E_FAILURE, "[E_FAILURE] Unable to get SectionTableView.");
        __pTableView->SetItemProvider(this);
-       __pTableView->AddGroupedTableViewItemEventListener(*this);
+       __pTableView->AddSectionTableViewItemEventListener(*this);
+       __pTableView->SetGroupedLookEnabled(true);
 
        return E_SUCCESS;
 }
@@ -115,6 +116,7 @@ RepeatForm::OnDateChangeCanceled(const Control& source)
 void
 RepeatForm::OnFormBackRequested(Form& source)
 {
+       SetFocus();
        if (__repeatType == REPEAT_TYPE_OFF)
        {
                SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
@@ -181,8 +183,11 @@ RepeatForm::OnFormBackRequested(Form& source)
        }
        else if (__repeatUntilType == REPEAT_UNTIL_TYPE_COUNT)
        {
-               int count;
-               Integer::Parse(__pEditFieldRepeatCount->GetText(), count);
+               int count = 1;
+               if (__pEditFieldRepeatCount->GetText().IsEmpty() == false)
+               {
+                       Integer::Parse(__pEditFieldRepeatCount->GetText(), count);
+               }
                __pRepeat->SetCounts((count > 1) ? count : 1);
        }
        else
@@ -202,7 +207,7 @@ RepeatForm::OnFormBackRequested(Form& source)
 }
 
 int
-RepeatForm::GetGroupCount(void)
+RepeatForm::GetSectionCount(void)
 {
        if (__repeatType == REPEAT_TYPE_OFF)
        {
@@ -212,9 +217,9 @@ RepeatForm::GetGroupCount(void)
 }
 
 int
-RepeatForm::GetItemCount(int groupIndex)
+RepeatForm::GetItemCount(int sectionIndex)
 {
-       switch (groupIndex)
+       switch (sectionIndex)
        {
        case GROUP_REPEAT_TYPE:
                return REPEAT_TYPE_MAX;
@@ -224,65 +229,18 @@ RepeatForm::GetItemCount(int groupIndex)
        return 0;
 }
 
-TableViewGroupItem*
-RepeatForm::CreateGroupItem(int groupIndex, int itemWidth)
-{
-       TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
-
-       pItem->Construct(Dimension(itemWidth, H_GROUP_REPEAT_ITEM));
-       pItem->SetEnabled(false);
-
-       switch (groupIndex)
-       {
-       case GROUP_REPEAT_TYPE:
-       {
-               Label* pRepeat = new (std::nothrow) Label();
-
-               pRepeat->Construct(Rectangle(0, 0, itemWidth, H_GROUP_REPEAT_ITEM), ResourceManager::GetString(IDS_CLD_BODY_REPEAT));
-               pItem->AddControl(*pRepeat);
-
-               pRepeat->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-
-               break;
-       }
-       case GROUP_REPEAT_UNTIL_TYPE:
-       {
-               Label* pRepeatUntil = new (std::nothrow) Label();
-
-               pRepeatUntil->Construct(Rectangle(0, 0, itemWidth, H_GROUP_REPEAT_ITEM), ResourceManager::GetString(IDS_CLD_BODY_REPEAT_UNTIL));
-               pItem->AddControl(*pRepeatUntil);
-
-               pRepeatUntil->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-
-               if (__repeatType == REPEAT_TYPE_OFF)
-               {
-                       pItem->SetSize(itemWidth, 0);
-               }
-
-               break;
-       }
-       }
-
-       return pItem;
-}
-
-bool
-RepeatForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
-{
-       delete pItem;
-       return true;
-}
-
 TableViewItem*
-RepeatForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+RepeatForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, H_REPEAT_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
-       if (groupIndex == GROUP_REPEAT_UNTIL_TYPE && itemIndex == REPEAT_UNTIL_TYPE_UNTIL_DATE)
+       pItem->SetBackgroundColor(COLOR_ITEM_BACKGROUND, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+       if (sectionIndex == GROUP_REPEAT_UNTIL_TYPE && itemIndex == REPEAT_UNTIL_TYPE_UNTIL_DATE)
        {
                __pEditDateUntilDate = new (std::nothrow) EditDate();
                __pEditDateUntilDate->Construct(Point(X_REPEAT_UNTIL_TYPE_EDIT_DATE, Y_REPEAT_UNTIL_TYPE_EDIT_DATE));
                pItem->AddControl(*__pEditDateUntilDate);
+               __pEditDateUntilDate->SetYearRange(Calendarbook::GetMinDateTime().GetYear(), Calendarbook::GetMaxDateTime().GetYear());
                __pEditDateUntilDate->SetDate(__untilDate);
                __pEditDateUntilDate->SetEnabled(__repeatUntilType == REPEAT_UNTIL_TYPE_UNTIL_DATE);
                __pEditDateUntilDate->AddDateChangeEventListener(*this);
@@ -297,7 +255,7 @@ RepeatForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        Label* pContent = new (std::nothrow) Label();
        Rectangle itemBounds(0, 0, itemWidth - pItem->GetAnnexWidth(TABLE_VIEW_ANNEX_STYLE_RADIO), H_REPEAT_ITEM);
-       switch (groupIndex)
+       switch (sectionIndex)
        {
        case GROUP_REPEAT_TYPE:
                switch (itemIndex)
@@ -365,14 +323,21 @@ RepeatForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 }
 
 bool
-RepeatForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+RepeatForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
 {
-       if (groupIndex == GROUP_REPEAT_UNTIL_TYPE)
+       if (sectionIndex == GROUP_REPEAT_UNTIL_TYPE)
        {
                switch (itemIndex)
                {
                case REPEAT_UNTIL_TYPE_COUNT:
-                       Integer::Parse(__pEditFieldRepeatCount->GetText(), __repeatCount);
+                       if (__pEditFieldRepeatCount->GetText().IsEmpty() == true)
+                       {
+                               __repeatCount = 1;
+                       }
+                       else
+                       {
+                               Integer::Parse(__pEditFieldRepeatCount->GetText(), __repeatCount);
+                       }
                        __pEditFieldRepeatCount = null;
                        break;
                case REPEAT_UNTIL_TYPE_UNTIL_DATE:
@@ -386,14 +351,9 @@ RepeatForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
 }
 
 void
-RepeatForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
-{
-}
-
-void
-RepeatForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+RepeatForm::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
 {
-       if (groupIndex == GROUP_REPEAT_UNTIL_TYPE)
+       if (sectionIndex == GROUP_REPEAT_UNTIL_TYPE)
        {
                switch (itemIndex)
                {
@@ -410,29 +370,51 @@ RepeatForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
        }
 }
 
-int
-RepeatForm::GetDefaultGroupItemHeight(void)
+String
+RepeatForm::GetSectionHeader(int sectionIndex)
 {
-       return H_GROUP_REPEAT_ITEM;
+       switch (sectionIndex)
+       {
+       case GROUP_REPEAT_TYPE:
+               return ResourceManager::GetString(IDS_CLD_BODY_REPEAT);
+       case GROUP_REPEAT_UNTIL_TYPE:
+               return ResourceManager::GetString(IDS_CLD_BODY_REPEAT_UNTIL);
+       default:
+               break;
+       }
+       return L"";
 }
 
-int
-RepeatForm::GetDefaultItemHeight(void)
+bool
+RepeatForm::HasSectionHeader(int sectionIndex)
 {
-       return H_REPEAT_ITEM;
+       return true;
 }
 
-void
-RepeatForm::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, TableViewGroupItem* pItem, TableViewItemStatus status)
+String
+RepeatForm::GetSectionFooter(int sectionIndex)
+{
+       return L"";
+}
+
+bool
+RepeatForm::HasSectionFooter(int sectionIndex)
+{
+       return false;
+}
+
+int
+RepeatForm::GetDefaultItemHeight(void)
 {
+       return H_REPEAT_ITEM;
 }
 
 void
-RepeatForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+RepeatForm::OnSectionTableViewItemStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
 {
        if (__pEditFieldRepeatCount != null)
        {
-               if (groupIndex != GROUP_REPEAT_UNTIL_TYPE || itemIndex != REPEAT_UNTIL_TYPE_COUNT)
+               if (sectionIndex != GROUP_REPEAT_UNTIL_TYPE || itemIndex != REPEAT_UNTIL_TYPE_COUNT)
                {
                        // Close keypad.
                        pItem->SetFocus();
@@ -441,10 +423,10 @@ RepeatForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int
 
        if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
        {
-               switch (groupIndex)
+               switch (sectionIndex)
                {
                case GROUP_REPEAT_TYPE:
-                       tableView.SetItemChecked(groupIndex, (int)__repeatType, false);
+                       tableView.SetItemChecked(sectionIndex, (int)__repeatType, false);
                        if (__repeatType == REPEAT_TYPE_OFF && __repeatType != itemIndex)
                        {
                                __repeatType = (RepeatType)itemIndex;
@@ -536,14 +518,14 @@ RepeatForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int
                case GROUP_REPEAT_UNTIL_TYPE:
                        if (__repeatType != REPEAT_TYPE_OFF)
                        {
-                               tableView.SetItemChecked(groupIndex, (int)__repeatUntilType, false);
+                               tableView.SetItemChecked(sectionIndex, (int)__repeatUntilType, false);
                                __repeatUntilType = (RepeatUntilType)itemIndex;
                                tableView.RefreshItem(GROUP_REPEAT_UNTIL_TYPE, REPEAT_UNTIL_TYPE_COUNT, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                                tableView.RefreshItem(GROUP_REPEAT_UNTIL_TYPE, REPEAT_UNTIL_TYPE_UNTIL_DATE, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                        }
                        else
                        {
-                               tableView.SetItemChecked(groupIndex, itemIndex, __repeatUntilType == itemIndex);
+                               tableView.SetItemChecked(sectionIndex, itemIndex, __repeatUntilType == itemIndex);
                        }
                        break;
                }
@@ -552,19 +534,20 @@ RepeatForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int
        }
        else if (status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
        {
-               tableView.SetItemChecked(groupIndex, itemIndex, true);
+               tableView.SetItemChecked(sectionIndex, itemIndex, true);
                tableView.Invalidate(true);
        }
 }
 
 void
-RepeatForm::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated)
+RepeatForm::OnSectionTableViewContextItemActivationStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated)
 {
 }
 
 void
 RepeatForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        SystemTime::GetCurrentTime(TIME_MODE_WALL, __startDate);
        __untilDate = __startDate;
        __isRepeatUntilDefault = true;
@@ -681,11 +664,14 @@ CATCH:
                __pTableView->SetItemChecked(GROUP_REPEAT_UNTIL_TYPE, (int)__repeatUntilType, true);
        }
        __pTableView->Invalidate(true);
+       AppLogDebug("Exit.");
 }
 
 void
 RepeatForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
+       AppLogDebug("Exit.");
 }
 
 void
@@ -761,8 +747,11 @@ RepeatForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        }
                        else if (__repeatUntilType == REPEAT_UNTIL_TYPE_COUNT)
                        {
-                               int count;
-                               Integer::Parse(__pEditFieldRepeatCount->GetText(), count);
+                               int count = 1;
+                               if (__pEditFieldRepeatCount->GetText().IsEmpty() == false)
+                               {
+                                       Integer::Parse(__pEditFieldRepeatCount->GetText(), count);
+                               }
                                __pRepeat->SetCounts((count > 1) ? count : 1);
                        }
                        else
@@ -783,35 +772,22 @@ RepeatForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        break;
                }
        }
-
 }
 
 void
 RepeatForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 {
-       ButtonItem backItem;
-       backItem.Construct(BUTTON_ITEM_STYLE_ICON, IDA_REMINDER_FORM_BACK);
-       backItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, ResourceManager::GetBitmapN(IDB_FORM_BACK));
-       backItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, ResourceManager::GetBitmapN(IDB_FORM_BACK_PRESS));
-       GetHeader()->SetButton(BUTTON_POSITION_RIGHT, backItem);
-
-       GetHeader()->AddActionEventListener(*this);
-       GetFooter()->SetShowState(false);
-       Invalidate(true);
 }
 
 void
 RepeatForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-
+       Invalidate(true);
 }
 
 void
 RepeatForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-       GetHeader()->RemoveActionEventListener(*this);
-       GetHeader()->RemoveAllButtons();
-       GetFooter()->SetShowState(true);
        Invalidate(true);
 }
 
index 1740e10..258eb03 100644 (file)
@@ -23,6 +23,7 @@
 #include <FApp.h>
 #include <FGraphics.h>
 #include <FSystem.h>
+#include "ClCalendarApp.h"
 #include "ClResourceManager.h"
 #include "ClSettingForm.h"
 #include "ClTypes.h"
@@ -40,43 +41,51 @@ enum
 {
        GROUP_ITEM_INDEX = -1,
 //     GROUP_LOCK_TIME_ZONE = 0,
-//     GROUP_LOCK_TIME_ZONE_SELECTION,
-//     GROUP_LOCK_TIME_ZONE_DESCRIPTION,
        GROUP_FIRST_DAY_OF_WEEK,
-       GROUP_FIRST_DAY_OF_WEEK_SELECTION,
 //     GROUP_IMPORT_EXPORT,
        GROUP_COUNT,
 
 //     LOCK_TIME_ZONE_ITEM_ONOFF = 0,
-//     LOCK_TIME_ZONE_ITEM_COUNT,
-//
-//     LOCK_TIME_ZONE_SELECTION_ITEM_SELECTION = 0,
-//     LOCK_ITEM_ZONE_SELECTION_ITEM_COUNT,
+//     LOCK_TIME_ZONE_ITEM_SELECTION,
+//     LOCK_TIME_ZONE_ITEM_COUNT_ON,
+//     LOCK_TIME_ZONE_ITEM_COUNT_OFF = LOCK_TIME_ZONE_ITEM_SELECTION,
 
        FIRST_DAY_OF_WEEK_ITEM_EXPANDER = 0,
-       FIRST_DAY_OF_WEEK_ITEM_COUNT,
-
-       FIRST_DAY_OF_WEEK_SELECTION_ITEM_SUNDAY = 0,
-       FIRST_DAY_OF_WEEK_SELECTION_ITEM_MONDAY,
-       FIRST_DAY_OF_WEEK_SELECTION_ITEM_COUNT,
+       FIRST_DAY_OF_WEEK_ITEM_SUNDAY,
+       FIRST_DAY_OF_WEEK_ITEM_MONDAY,
+       FIRST_DAY_OF_WEEK_ITEM_COUNT_EXPANDED,
+       FIRST_DAY_OF_WEEK_ITEM_COUNT_COLLAPSED = FIRST_DAY_OF_WEEK_ITEM_SUNDAY,
 
 //     IMPORT_EXPORT_ITEM_IMPORT = 0,
 //     IMPORT_EXPORT_ITEM_EXPORT,
 //     IMPORT_EXPORT_ITEM_COUNT
 };
 
-static const int H_GROUP = 16;
-static const int H_ITEM = 128;
+static const int H_ITEM = 140;
 static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
-static const int W_LOCK_TIME_ZONE_DESCRIPTION_MARGIN = 32;
-static const int H_LOCK_TIME_ZONE_DESCRIPTION_MARGIN = 32;
-static const int FONT_SIZE_MAIN_CONTENT = 42;
-static const int FONT_SIZE_SUB_CONTENT = 28;
+static const unsigned int COLOR_EXPANDED_ITEM_BACKGROUND = Color32<220, 218, 211>::Value;
+static const int Y_LOCK_TIME_ZONE = 22;
+static const int H_LOCK_TIME_ZONE = 42;
+static const int Y_LOCK_TIME_ZONE_ITEM_CONTENT = 64;
+static const int H_LOCK_TIME_ZONE_ITEM_CONTENT = 54;
+static const int Y_FIRST_DAY_OF_WEEK = 22;
+static const int H_FIRST_DAY_OF_WEEK = 42;
+static const int Y_FIRST_DAY_OF_WEEK_ITEM_CONTENT = 64;
+static const int H_FIRST_DAY_OF_WEEK_ITEM_CONTENT = 54;
+static const int Y_FIRST_DAY_OF_WEEK_ITEM_ICON = 34;
+static const int W_FIRST_DAY_OF_WEEK_ITEM_ICON = 72;
+static const int W_FIRST_DAY_OF_WEEK_ITEM_ICON_MARGIN = 26;
+static const int H_FIRST_DAY_OF_WEEK_ITEM_ICON = 72;
+static const int FONT_SIZE_DETAIL02 = 44;
+static const unsigned int COLOR_DETAIL02 = Color32<0, 0, 0>::Value;
+static const int FONT_SIZE_DETAIL03 = 32;
+static const unsigned int COLOR_DETAIL03 = Color32<128, 128, 128>::Value;
 
 SettingForm::SettingForm(void)
-       : __pGroupedTableView(null)
+       : __pTableView(null)
        , __pLabelLockTimeZone(null)
        , __pLabelFirstDayOfWeek(null)
+       , __pLabelFirstDayOfWeekExpandIcon(null)
        , __descriptionItemHeight(-1)
        , __isLockTimeZoneSet(false)
        , __isFirstDayOfWeekSelectionItemExpanded(false)
@@ -99,11 +108,11 @@ SettingForm::OnInitializing(void)
 {
        this->SetFormBackEventListener(this);
 
-       __pGroupedTableView = dynamic_cast<GroupedTableView*>(GetControl(L"IDC_GROUPEDTABLEVIEW"));
-       TryReturn(__pGroupedTableView != null, E_FAILURE, "[E_FAILURE] Unable to get groupedtableview.");
-       __pGroupedTableView->SetItemProvider(this);
-       __pGroupedTableView->SetGroupedLookEnabled(true);
-       __pGroupedTableView->AddGroupedTableViewItemEventListener(*this);
+       __pTableView = dynamic_cast<SectionTableView*>(GetControl(L"IDC_SECTIONTABLEVIEW"));
+       TryReturn(__pTableView != null, E_FAILURE, "[E_FAILURE] Unable to get SectionTableView.");
+       __pTableView->SetItemProvider(this);
+       __pTableView->SetGroupedLookEnabled(true);
+       __pTableView->AddSectionTableViewItemEventListener(*this);
 
        return E_SUCCESS;
 }
@@ -117,97 +126,45 @@ SettingForm::OnTerminating(void)
 void
 SettingForm::OnFormBackRequested(Form& source)
 {
-       UiApp::GetInstance()->Terminate();
+       CalendarApp* pApp = static_cast<CalendarApp*>(UiApp::GetInstance());
+       if (pApp != null)
+       {
+               if (pApp->GetOperationType() == OPERATION_TYPE_APPCONTROL)
+               {
+                       pApp->Terminate();
+                       return;
+               }
+       }
+
+       SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
 }
 
 int
-SettingForm::GetGroupCount(void)
+SettingForm::GetSectionCount(void)
 {
        return GROUP_COUNT;
 }
 
 int
-SettingForm::GetItemCount(int groupIndex)
+SettingForm::GetItemCount(int sectionIndex)
 {
-       switch (groupIndex)
+       switch (sectionIndex)
        {
 //     case GROUP_LOCK_TIME_ZONE:
-//             return LOCK_TIME_ZONE_ITEM_COUNT;
-//     case GROUP_LOCK_TIME_ZONE_SELECTION:
-//             return LOCK_ITEM_ZONE_SELECTION_ITEM_COUNT;
-//     case GROUP_LOCK_TIME_ZONE_DESCRIPTION:
-//             return 0;
+//             return (__isLockTimeZoneSet == true) ? LOCK_TIME_ZONE_ITEM_COUNT_ON : LOCK_TIME_ZONE_ITEM_COUNT_OFF;
        case GROUP_FIRST_DAY_OF_WEEK:
-               return FIRST_DAY_OF_WEEK_ITEM_COUNT;
-       case GROUP_FIRST_DAY_OF_WEEK_SELECTION:
-               return FIRST_DAY_OF_WEEK_SELECTION_ITEM_COUNT;
+               return (__isFirstDayOfWeekSelectionItemExpanded == true) ? FIRST_DAY_OF_WEEK_ITEM_COUNT_EXPANDED : FIRST_DAY_OF_WEEK_ITEM_COUNT_COLLAPSED;
 //     case GROUP_IMPORT_EXPORT:
 //             return IMPORT_EXPORT_ITEM_COUNT;
        }
        return 0;
 }
 
-TableViewGroupItem*
-SettingForm::CreateGroupItem(int groupIndex, int itemWidth)
-{
-       TableViewGroupItem* pItem = null;
-       switch (groupIndex)
-       {
-//     case GROUP_LOCK_TIME_ZONE:
-//             pItem = CreateEmptyGroupItemN(itemWidth);
-//             break;
-//     case GROUP_LOCK_TIME_ZONE_SELECTION:
-//             pItem = new (std::nothrow) TableViewGroupItem();
-//             pItem->Construct(Dimension(itemWidth, 1));
-//             pItem->SetShowState(false);
-//             break;
-//     case GROUP_LOCK_TIME_ZONE_DESCRIPTION:
-//             pItem = CreateLockTimeZoneDescriptionItemN(itemWidth);
-//             break;
-       case GROUP_FIRST_DAY_OF_WEEK:
-               pItem = CreateEmptyGroupItemN(itemWidth);
-               break;
-       case GROUP_FIRST_DAY_OF_WEEK_SELECTION:
-               pItem = new (std::nothrow) TableViewGroupItem();
-               pItem->Construct(Dimension(itemWidth, 1));
-               pItem->SetShowState(false);
-               pItem->SetEnabled(false);
-               break;
-//     case GROUP_IMPORT_EXPORT:
-//             pItem = CreateEmptyGroupItemN(itemWidth);
-//             break;
-       }
-       return pItem;
-}
-
-bool
-SettingForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
-{
-       delete pItem;
-       return true;
-}
-
-void
-SettingForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
-{
-//     if (groupIndex == GROUP_LOCK_TIME_ZONE_DESCRIPTION)
-//     {
-//             if (__isLockTimeZoneSet == true)
-//             {
-//                     pItem->SetSize(pItem->GetWidth(), H_GROUP);
-//             }
-//             else
-//             {
-//                     pItem->SetSize(pItem->GetWidth(), __descriptionItemHeight);
-//             }
-//     }
-}
-
 TableViewItem*
-SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+SettingForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
 {
        TableViewItem* pItem = null;
-       switch (groupIndex)
+       switch (sectionIndex)
        {
 //     case GROUP_LOCK_TIME_ZONE:
 //             switch (itemIndex)
@@ -215,34 +172,22 @@ SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 //             case LOCK_TIME_ZONE_ITEM_ONOFF:
 //                     pItem = CreateLockTimeZoneOnOffItemN(itemWidth, __isLockTimeZoneSet);
 //                     break;
-//             }
-//             break;
-//     case GROUP_LOCK_TIME_ZONE_SELECTION:
-//             switch (itemIndex)
-//             {
-//             case LOCK_TIME_ZONE_SELECTION_ITEM_SELECTION:
+//             case LOCK_TIME_ZONE_ITEM_SELECTION:
 //                     pItem = CreateLockTimeZoneSelectionItemN(itemWidth);
 //                     break;
 //             }
 //             break;
-//     case GROUP_LOCK_TIME_ZONE_DESCRIPTION:
-//             break;
        case GROUP_FIRST_DAY_OF_WEEK:
                switch (itemIndex)
                {
                case FIRST_DAY_OF_WEEK_ITEM_EXPANDER:
                        pItem = CreateFirstDayOfWeekExpanderItemN(itemWidth, __isFirstDayOfWeekSunday);
                        break;
-               }
-               break;
-       case GROUP_FIRST_DAY_OF_WEEK_SELECTION:
-               switch (itemIndex)
-               {
-               case FIRST_DAY_OF_WEEK_SELECTION_ITEM_SUNDAY:
-                       pItem = CreateFirstDayOfWeekSundayItemN(itemWidth, __isFirstDayOfWeekSunday);
+               case FIRST_DAY_OF_WEEK_ITEM_SUNDAY:
+                       pItem = CreateFirstDayOfWeekSundayItemN(itemWidth);
                        break;
-               case FIRST_DAY_OF_WEEK_SELECTION_ITEM_MONDAY:
-                       pItem = CreateFirstDayOfWeekMondayItemN(itemWidth, !__isFirstDayOfWeekSunday);
+               case FIRST_DAY_OF_WEEK_ITEM_MONDAY:
+                       pItem = CreateFirstDayOfWeekMondayItemN(itemWidth);
                        break;
                }
                break;
@@ -259,23 +204,18 @@ SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 //             break;
        }
 
-       // TBD : Background color of item must be transparent.(will be in SDK 2.1)
-       if (pItem != null)
-       {
-               pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
-       }
        return pItem;
 }
 
 bool
-SettingForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+SettingForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
 {
-       switch (groupIndex)
+       switch (sectionIndex)
        {
-//     case GROUP_LOCK_TIME_ZONE_SELECTION:
+//     case GROUP_LOCK_TIME_ZONE:
 //             switch (itemIndex)
 //             {
-//             case LOCK_TIME_ZONE_SELECTION_ITEM_SELECTION:
+//             case LOCK_TIME_ZONE_ITEM_SELECTION:
 //                     __pLabelLockTimeZone = null;
 //                     break;
 //             }
@@ -285,6 +225,7 @@ SettingForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
                {
                case FIRST_DAY_OF_WEEK_ITEM_EXPANDER:
                        __pLabelFirstDayOfWeek = null;
+                       __pLabelFirstDayOfWeekExpandIcon = null;
                        break;
                }
                break;
@@ -294,14 +235,14 @@ SettingForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
 }
 
 void
-SettingForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+SettingForm::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
 {
-       switch (groupIndex)
+       switch (sectionIndex)
        {
-//     case GROUP_LOCK_TIME_ZONE_SELECTION:
+//     case GROUP_LOCK_TIME_ZONE:
 //             switch (itemIndex)
 //             {
-//             case LOCK_TIME_ZONE_SELECTION_ITEM_SELECTION:
+//             case LOCK_TIME_ZONE_ITEM_SELECTION:
 //                     __pLabelLockTimeZone->SetText(L"Paris, GMT +13");
 //                     break;
 //             }
@@ -312,103 +253,152 @@ SettingForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
                case FIRST_DAY_OF_WEEK_ITEM_EXPANDER:
                        __pLabelFirstDayOfWeek->SetText((__isFirstDayOfWeekSunday == true) ? ResourceManager::GetWeekString(0) : ResourceManager::GetWeekString(1));
                        __pLabelFirstDayOfWeek->Invalidate(false);
+
+                       if (__isFirstDayOfWeekSelectionItemExpanded == true)
+                       {
+                               Bitmap* pButtonIcon = ResourceManager::GetBitmapN(IDB_ALL_DAY_EVENT_LIST_EXPAND_OPENED);
+                               if (pButtonIcon != null)
+                               {
+                                       __pLabelFirstDayOfWeekExpandIcon->SetBackgroundBitmap(*pButtonIcon);
+                                       delete pButtonIcon;
+                               }
+                       }
+                       else
+                       {
+                               Bitmap* pButtonIcon = ResourceManager::GetBitmapN(IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED);
+                               if (pButtonIcon != null)
+                               {
+                                       __pLabelFirstDayOfWeekExpandIcon->SetBackgroundBitmap(*pButtonIcon);
+                                       delete pButtonIcon;
+                               }
+                       }
+                       __pLabelFirstDayOfWeekExpandIcon->Invalidate(false);
                        break;
                }
                break;
        }
 }
 
-int
-SettingForm::GetDefaultGroupItemHeight(void)
+String
+SettingForm::GetSectionHeader(int sectionIndex)
 {
-       return H_GROUP;
+       return L"";
 }
 
-int
-SettingForm::GetDefaultItemHeight(void)
+bool
+SettingForm::HasSectionHeader(int sectionIndex)
 {
-       return H_ITEM;
+       return true;
 }
 
-void
-SettingForm::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, TableViewGroupItem* pItem, TableViewItemStatus status)
+String
+SettingForm::GetSectionFooter(int sectionIndex)
 {
+       switch (sectionIndex)
+       {
+//     case GROUP_LOCK_TIME_ZONE:
+//             if (__isLockTimeZoneSet == false)
+//             {
+//                     return ResourceManager::GetString(IDS_CLD_BODY_LOCK_TIME_ZONE_DESCRIPTION_MSG);
+//             }
+//             break;
+       case GROUP_FIRST_DAY_OF_WEEK:
+               break;
+//     case GROUP_IMPORT_EXPORT:
+//             break;
+       }
+       return L"";
+}
+
+bool
+SettingForm::HasSectionFooter(int sectionIndex)
+{
+       switch (sectionIndex)
+       {
+//     case GROUP_LOCK_TIME_ZONE:
+//             return __isLockTimeZoneSet == false;
+       case GROUP_FIRST_DAY_OF_WEEK:
+               break;
+//     case GROUP_IMPORT_EXPORT:
+//             break;
+       }
+       return false;
+}
 
+int
+SettingForm::GetDefaultItemHeight(void)
+{
+       return H_ITEM;
 }
 
 void
-SettingForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+SettingForm::OnSectionTableViewItemStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
 {
        switch (status)
        {
        case TABLE_VIEW_ITEM_STATUS_SELECTED:
-               switch (groupIndex)
+               switch (sectionIndex)
                {
-//             case GROUP_LOCK_TIME_ZONE:
-//                     if (__isLockTimeZoneSet == true)
-//                     {
-//                             __isLockTimeZoneSet = false;
-//                             __pGroupedTableView->CollapseGroup(GROUP_LOCK_TIME_ZONE_SELECTION);
-//                     }
-//                     else
-//                     {
-//                             __isLockTimeZoneSet = true;
-//                             __pGroupedTableView->ExpandGroup(GROUP_LOCK_TIME_ZONE_SELECTION);
-//                     }
-//                     __pGroupedTableView->RefreshItem(GROUP_LOCK_TIME_ZONE_DESCRIPTION, GROUP_ITEM_INDEX, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-//                     break;
-//             case GROUP_LOCK_TIME_ZONE_SELECTION:
-//
-//                     break;
                case GROUP_FIRST_DAY_OF_WEEK:
-                       if (__isFirstDayOfWeekSelectionItemExpanded == true)
-                       {
-                               __pGroupedTableView->CollapseGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
-                               __isFirstDayOfWeekSelectionItemExpanded = false;
-                       }
-                       else
+                       if (itemIndex == FIRST_DAY_OF_WEEK_ITEM_EXPANDER)
                        {
-                               __pGroupedTableView->ExpandGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
-                               __isFirstDayOfWeekSelectionItemExpanded = true;
+                               if (__isFirstDayOfWeekSelectionItemExpanded == true)
+                               {
+                                       CollapseGroup(GROUP_FIRST_DAY_OF_WEEK);
+                                       __pTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               }
+                               else
+                               {
+                                       ExpandGroup(GROUP_FIRST_DAY_OF_WEEK);
+                                       __pTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+                               }
                        }
                        break;
                }
                break;
        case TABLE_VIEW_ITEM_STATUS_CHECKED:
-               switch (groupIndex)
+               switch (sectionIndex)
                {
-               case GROUP_FIRST_DAY_OF_WEEK_SELECTION:
+//             case GROUP_LOCK_TIME_ZONE:
+//                     if (itemIndex == LOCK_TIME_ZONE_ITEM_ONOFF)
+//                     {
+//                             ExpandGroup(GROUP_LOCK_TIME_ZONE);
+//                     }
+//                     break;
+               case GROUP_FIRST_DAY_OF_WEEK:
                        switch (itemIndex)
                        {
-                       case FIRST_DAY_OF_WEEK_SELECTION_ITEM_SUNDAY:
+                       case FIRST_DAY_OF_WEEK_ITEM_SUNDAY:
                                SettingInfo::SetValue(KEY_SYSTEM_FIRST_DAY_OF_WEEK, String(L"Sunday"));
                                __isFirstDayOfWeekSunday = true;
-                               __pGroupedTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                               __pGroupedTableView->SetItemChecked(groupIndex, FIRST_DAY_OF_WEEK_SELECTION_ITEM_MONDAY, false);
-                               __isFirstDayOfWeekSelectionItemExpanded = false;
-                               __pGroupedTableView->Invalidate(true);
-                               __pGroupedTableView->CollapseGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
+                               __pTableView->SetItemChecked(sectionIndex, FIRST_DAY_OF_WEEK_ITEM_MONDAY, false);
+                               CollapseGroup(GROUP_FIRST_DAY_OF_WEEK);
+                               __pTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                                break;
-                       case FIRST_DAY_OF_WEEK_SELECTION_ITEM_MONDAY:
+                       case FIRST_DAY_OF_WEEK_ITEM_MONDAY:
                                SettingInfo::SetValue(KEY_SYSTEM_FIRST_DAY_OF_WEEK, String(L"Monday"));
                                __isFirstDayOfWeekSunday = false;
-                               __pGroupedTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-                               __pGroupedTableView->SetItemChecked(groupIndex, FIRST_DAY_OF_WEEK_SELECTION_ITEM_SUNDAY, false);
-                               __isFirstDayOfWeekSelectionItemExpanded = false;
-                               __pGroupedTableView->Invalidate(true);
-                               __pGroupedTableView->CollapseGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
+                               __pTableView->SetItemChecked(sectionIndex, FIRST_DAY_OF_WEEK_ITEM_SUNDAY, false);
+                               CollapseGroup(GROUP_FIRST_DAY_OF_WEEK);
+                               __pTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                                break;
                        }
                        break;
                }
                break;
        case TABLE_VIEW_ITEM_STATUS_UNCHECKED:
-               switch (groupIndex)
+               switch (sectionIndex)
                {
-               case GROUP_FIRST_DAY_OF_WEEK_SELECTION:
-                       __pGroupedTableView->SetItemChecked(groupIndex, itemIndex, true);
-                       __pGroupedTableView->Invalidate(true);
-                       __pGroupedTableView->CollapseGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
+//             case GROUP_LOCK_TIME_ZONE:
+//                     if (itemIndex == LOCK_TIME_ZONE_ITEM_ONOFF)
+//                     {
+//                             CollapseGroup(GROUP_LOCK_TIME_ZONE);
+//                     }
+//                     break;
+               case GROUP_FIRST_DAY_OF_WEEK:
+                       __pTableView->SetItemChecked(sectionIndex, itemIndex, true);
+                       CollapseGroup(GROUP_FIRST_DAY_OF_WEEK);
+                       __pTableView->RefreshItem(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_EXPANDER, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                        break;
                }
                break;
@@ -418,9 +408,8 @@ SettingForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int
 }
 
 void
-SettingForm::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated)
+SettingForm::OnSectionTableViewContextItemActivationStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated)
 {
-
 }
 
 void
@@ -431,37 +420,23 @@ SettingForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cu
        __isFirstDayOfWeekSunday = firstDayOfWeek != L"Monday";
 
        // Load current setting
-       __pGroupedTableView->UpdateTableView();
+       __pTableView->UpdateTableView();
 
        // Check
-       if (__isFirstDayOfWeekSunday == true)
-       {
-               __pGroupedTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK_SELECTION, FIRST_DAY_OF_WEEK_SELECTION_ITEM_SUNDAY, true);
-               __pGroupedTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK_SELECTION, FIRST_DAY_OF_WEEK_SELECTION_ITEM_MONDAY, false);
-       }
-       else
-       {
-               __pGroupedTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK_SELECTION, FIRST_DAY_OF_WEEK_SELECTION_ITEM_SUNDAY, false);
-               __pGroupedTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK_SELECTION, FIRST_DAY_OF_WEEK_SELECTION_ITEM_MONDAY, true);
-       }
+//     __pTableView->SetItemChecked(GROUP_LOCK_TIME_ZONE, LOCK_TIME_ZONE_ITEM_ONOFF, __isLockTimeZoneSet);
 
-//     if (__isLockTimeZoneSet == true)
-//     {
-//             __pGroupedTableView->RefreshItem(GROUP_LOCK_TIME_ZONE_DESCRIPTION, GROUP_ITEM_INDEX, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-//             __pGroupedTableView->ExpandGroup(GROUP_LOCK_TIME_ZONE_SELECTION);
-//     }
-//     else
-//     {
-//             __pGroupedTableView->RefreshItem(GROUP_LOCK_TIME_ZONE_DESCRIPTION, GROUP_ITEM_INDEX, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
-//             __pGroupedTableView->CollapseGroup(GROUP_LOCK_TIME_ZONE_SELECTION);
-//     }
        if (__isFirstDayOfWeekSelectionItemExpanded == true)
        {
-               __pGroupedTableView->ExpandGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
-       }
-       else
-       {
-               __pGroupedTableView->CollapseGroup(GROUP_FIRST_DAY_OF_WEEK_SELECTION);
+               if (__isFirstDayOfWeekSunday == true)
+               {
+                       __pTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_SUNDAY, true);
+                       __pTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_MONDAY, false);
+               }
+               else
+               {
+                       __pTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_SUNDAY, false);
+                       __pTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_MONDAY, true);
+               }
        }
 }
 
@@ -471,14 +446,6 @@ SettingForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& ne
 
 }
 
-TableViewGroupItem*
-SettingForm::CreateEmptyGroupItemN(int itemWidth)
-{
-       TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
-       pItem->Construct(Dimension(itemWidth, H_GROUP));
-       return pItem;
-}
-
 TableViewItem*
 SettingForm::CreateLockTimeZoneOnOffItemN(int itemWidth, bool isOn)
 {
@@ -487,7 +454,8 @@ SettingForm::CreateLockTimeZoneOnOffItemN(int itemWidth, bool isOn)
 
        Label* pLabel = new (std::nothrow) Label();
        pLabel->Construct(Rectangle(0, 0, itemWidth, H_ITEM), ResourceManager::GetString(IDS_CLD_MBODY_LOCK_TIME_ZONE));
-       pLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL02));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
@@ -501,14 +469,18 @@ SettingForm::CreateLockTimeZoneSelectionItemN(int itemWidth)
        pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
 
        Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0, 10, itemWidth, 38), ResourceManager::GetString(IDS_CLD_BODY_TIME_ZONE));
-       pLabel->SetTextConfig(FONT_SIZE_SUB_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->Construct(Rectangle(0, Y_LOCK_TIME_ZONE, itemWidth, H_LOCK_TIME_ZONE),
+                                               ResourceManager::GetString(IDS_CLD_BODY_TIME_ZONE));
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL03));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
        Label* pTimeZoneLabel = new (std::nothrow) Label();
-       pTimeZoneLabel->Construct(Rectangle(0, 48, itemWidth, 70), L"Paris, GMT +13");
-       pTimeZoneLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pTimeZoneLabel->Construct(Rectangle(0, Y_LOCK_TIME_ZONE_ITEM_CONTENT, itemWidth, H_LOCK_TIME_ZONE_ITEM_CONTENT),
+                                                               L"Paris, GMT +13");
+       pTimeZoneLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pTimeZoneLabel->SetTextColor(Color(COLOR_DETAIL02));
        pTimeZoneLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pTimeZoneLabel);
        __pLabelLockTimeZone = pTimeZoneLabel;
@@ -516,72 +488,57 @@ SettingForm::CreateLockTimeZoneSelectionItemN(int itemWidth)
        return pItem;
 }
 
-TableViewGroupItem*
-SettingForm::CreateLockTimeZoneDescriptionItemN(int itemWidth)
-{
-       String str = ResourceManager::GetString(IDS_CLD_BODY_LOCK_TIME_ZONE_DESCRIPTION_MSG);
-       if (__descriptionItemHeight < 0)
-       {
-               EnrichedText text;
-               text.Construct(Dimension(itemWidth - W_LOCK_TIME_ZONE_DESCRIPTION_MARGIN, Integer::VALUE_MAX));
-
-               TextElement* pTextElement = new (std::nothrow) TextElement();
-               pTextElement->Construct(str);
-
-               Font font;
-               font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_SUB_CONTENT);
-               pTextElement->SetFont(font);
-
-               text.Add(*pTextElement);
-
-               __descriptionItemHeight = text.GetTextExtent().height + H_LOCK_TIME_ZONE_DESCRIPTION_MARGIN;
-               text.RemoveAll(true);
-       }
-
-       TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
-       pItem->Construct(Dimension(itemWidth, __descriptionItemHeight));
-
-       Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0, 0, itemWidth, __descriptionItemHeight), str);
-       pLabel->SetTextConfig(FONT_SIZE_SUB_CONTENT, LABEL_TEXT_STYLE_NORMAL);
-       pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       pItem->AddControl(*pLabel);
-
-       return pItem;
-}
-
 TableViewItem*
 SettingForm::CreateFirstDayOfWeekExpanderItemN(int itemWidth, bool isSundayFirst)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+       // TBD : Background color of item must be transparent.(will be in SDK 2.1)
+       pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
 
        Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0, 10, itemWidth, 38), L"First day of week");
-       pLabel->SetTextConfig(FONT_SIZE_SUB_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->Construct(Rectangle(0, Y_FIRST_DAY_OF_WEEK, itemWidth, H_FIRST_DAY_OF_WEEK), L"First day of week");
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL03));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
        Label* pFirstDayOfWeekLabel = new (std::nothrow) Label();
-       pFirstDayOfWeekLabel->Construct(Rectangle(0, 48, itemWidth, 70),
+       pFirstDayOfWeekLabel->Construct(Rectangle(0, Y_FIRST_DAY_OF_WEEK_ITEM_CONTENT, itemWidth, H_FIRST_DAY_OF_WEEK_ITEM_CONTENT),
                                                                        (isSundayFirst == true) ? ResourceManager::GetWeekString(0) : ResourceManager::GetWeekString(1));
-       pFirstDayOfWeekLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pFirstDayOfWeekLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pFirstDayOfWeekLabel->SetTextColor(Color(COLOR_DETAIL02));
        pFirstDayOfWeekLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pFirstDayOfWeekLabel);
        __pLabelFirstDayOfWeek = pFirstDayOfWeekLabel;
 
+       __pLabelFirstDayOfWeekExpandIcon = new (std::nothrow) Label();
+       __pLabelFirstDayOfWeekExpandIcon->Construct(Rectangle(itemWidth - W_FIRST_DAY_OF_WEEK_ITEM_ICON - W_FIRST_DAY_OF_WEEK_ITEM_ICON_MARGIN,
+                                                                                                                               Y_FIRST_DAY_OF_WEEK_ITEM_ICON,
+                                                                                                                               W_FIRST_DAY_OF_WEEK_ITEM_ICON,
+                                                                                                                               H_FIRST_DAY_OF_WEEK_ITEM_ICON), L"");
+       Bitmap* pButtonIcon = ResourceManager::GetBitmapN(IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED);
+       if (pButtonIcon != null)
+       {
+               __pLabelFirstDayOfWeekExpandIcon->SetBackgroundBitmap(*pButtonIcon);
+               delete pButtonIcon;
+       }
+       pItem->AddControl(*__pLabelFirstDayOfWeekExpandIcon);
+
        return pItem;
 }
 
 TableViewItem*
-SettingForm::CreateFirstDayOfWeekSundayItemN(int itemWidth, bool isSelected)
+SettingForm::CreateFirstDayOfWeekSundayItemN(int itemWidth)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+       pItem->SetBackgroundColor(Color(COLOR_EXPANDED_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
 
        Label* pLabel = new (std::nothrow) Label();
        pLabel->Construct(Rectangle(0, 0, itemWidth - pItem->GetAnnexWidth(TABLE_VIEW_ANNEX_STYLE_RADIO), H_ITEM), ResourceManager::GetWeekString(0));
-       pLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL02));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
@@ -589,14 +546,16 @@ SettingForm::CreateFirstDayOfWeekSundayItemN(int itemWidth, bool isSelected)
 }
 
 TableViewItem*
-SettingForm::CreateFirstDayOfWeekMondayItemN(int itemWidth, bool isSelected)
+SettingForm::CreateFirstDayOfWeekMondayItemN(int itemWidth)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
        pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+       pItem->SetBackgroundColor(Color(COLOR_EXPANDED_ITEM_BACKGROUND), TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
 
        Label* pLabel = new (std::nothrow) Label();
        pLabel->Construct(Rectangle(0, 0, itemWidth - pItem->GetAnnexWidth(TABLE_VIEW_ANNEX_STYLE_RADIO), H_ITEM), ResourceManager::GetWeekString(1));
-       pLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL02));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
@@ -610,8 +569,9 @@ SettingForm::CreateImportItemN(int itemWidth)
        pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
 
        Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0, 0, itemWidth, H_ITEM), ResourceManager::GetString(IDS_CLD_BODY_IMPORT_EVENTS_EVENTS_TASKS_ABB));
-       pLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->Construct(Rectangle(0, 0, itemWidth, H_ITEM), ResourceManager::GetString(IDS_CLD_BODY_IMPORT_EVENTS_TASKS_ABB));
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL02));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
@@ -625,10 +585,66 @@ SettingForm::CreateExportItemN(int itemWidth)
        pItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
 
        Label* pLabel = new (std::nothrow) Label();
-       pLabel->Construct(Rectangle(0, 0, itemWidth, H_ITEM), ResourceManager::GetString(IDS_CLD_BODY_EXPORT_EVENTS_EVENTS_TASKS_ABB));
-       pLabel->SetTextConfig(FONT_SIZE_MAIN_CONTENT, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->Construct(Rectangle(0, 0, itemWidth, H_ITEM), ResourceManager::GetString(IDS_CLD_BODY_EXPORT_EVENTS_TASKS_ABB));
+       pLabel->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabel->SetTextColor(Color(COLOR_DETAIL02));
        pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pItem->AddControl(*pLabel);
 
        return pItem;
 }
+
+void
+SettingForm::CollapseGroup(int sectionIndex)
+{
+       switch (sectionIndex)
+       {
+//     case GROUP_LOCK_TIME_ZONE:
+//             if (__isLockTimeZoneSet == true)
+//             {
+//                     __isLockTimeZoneSet = false;
+//                     __pTableView->SetItemChecked(GROUP_LOCK_TIME_ZONE, LOCK_TIME_ZONE_ITEM_ONOFF, false);
+//                     __pTableView->UpdateTableView();
+//             }
+//             break;
+       case GROUP_FIRST_DAY_OF_WEEK:
+               if (__isFirstDayOfWeekSelectionItemExpanded == true)
+               {
+                       __isFirstDayOfWeekSelectionItemExpanded = false;
+                       for (int i = FIRST_DAY_OF_WEEK_ITEM_COUNT_EXPANDED - 1; i >= FIRST_DAY_OF_WEEK_ITEM_COUNT_COLLAPSED; --i)
+                       {
+                               __pTableView->RefreshItem(sectionIndex, i, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE);
+                       }
+               }
+               break;
+       }
+}
+
+void
+SettingForm::ExpandGroup(int sectionIndex)
+{
+       switch (sectionIndex)
+       {
+//     case GROUP_LOCK_TIME_ZONE:
+//             if (__isLockTimeZoneSet == false)
+//             {
+//                     __isLockTimeZoneSet = true;
+//                     __pTableView->SetItemChecked(GROUP_LOCK_TIME_ZONE, LOCK_TIME_ZONE_ITEM_ONOFF, true);
+//                     __pTableView->UpdateTableView();
+//             }
+//             break;
+       case GROUP_FIRST_DAY_OF_WEEK:
+               if (__isFirstDayOfWeekSelectionItemExpanded == false)
+               {
+                       __isFirstDayOfWeekSelectionItemExpanded = true;
+                       for (int i = FIRST_DAY_OF_WEEK_ITEM_COUNT_COLLAPSED; i < FIRST_DAY_OF_WEEK_ITEM_COUNT_EXPANDED; ++i)
+                       {
+                               __pTableView->RefreshItem(sectionIndex, i, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD);
+                       }
+                       __pTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_SUNDAY, __isFirstDayOfWeekSunday);
+                       __pTableView->SetItemChecked(GROUP_FIRST_DAY_OF_WEEK, FIRST_DAY_OF_WEEK_ITEM_MONDAY, !__isFirstDayOfWeekSunday);
+                       __pTableView->Invalidate(true);
+               }
+               break;
+       }
+}
index 7407394..f8a3257 100644 (file)
@@ -52,59 +52,62 @@ enum
        INFORMATION_CONTENT_ITEM_LOCATION,
        INFORMATION_CONTENT_ITEM_COUNT,
 
-       ADDITIONAL_CONTENT_ITEM_COUNT = 2,
+       ADDITIONAL_CONTENT_ITEM_REMINDER = 0,
+       ADDITIONAL_CONTENT_ITEM_PRIORITY,
+       ADDITIONAL_CONTENT_ITEM_COUNT,
 
-//     SAVE_TO_ITEM_SAVE_TO = 0,
-//     SAVE_TO_ITEM_COUNT
+       SAVE_TO_ITEM_SAVE_TO = 0,
+       SAVE_TO_ITEM_COUNT
 };
 
 static const int IDA_TASK_DETAILS_FORM_ADD_TO_CALENDAR = 80001;
 
 static const unsigned int COLOR_ITEM_BACKGROUND = Color32<232, 232, 232>::Value;
-static const int H_ITEM = 112;
-static const int H_MAIN_ITEM = 264;
-static const int Y_MAIN_ITEM_SUBJECT = 16;
-static const int H_MAIN_ITEM_SUBJECT = 120;
+static const int H_ITEM = 140;
+static const int H_MAIN_ITEM = 313;
+static const int Y_MAIN_ITEM_SUBJECT = 18;
+static const int H_MAIN_ITEM_SUBJECT = 136;
 static const int W_MAIN_ITEM_SUBJECT_MARGIN = 40;
 static const int H_MAIN_ITEM_SUBJECT_MARGIN = 32;
-static const int X_MAIN_ITEM_ALARM_ICON = 16;
-static const int Y_MAIN_ITEM_ALARM_ICON = 36;
-static const int W_MAIN_ITEM_ALARM_ICON = 64;
-static const int H_MAIN_ITEM_ALARM_ICON = 64;
-static const int X_MAIN_ITEM_ALARM = 96;
-static const int Y_MAIN_ITEM_ALARM01 = 16;
-static const int Y_MAIN_ITEM_ALARM02 = 58;
-static const int H_MAIN_ITEM_ALARM01 = 42;
-static const int H_MAIN_ITEM_ALARM02 = 60;
+static const int X_MAIN_ITEM_ALARM = 0;
+static const int H_MAIN_ITEM_ALARM = 159;
+static const int Y_MAIN_ITEM_ALARM01 = 19;
+static const int Y_MAIN_ITEM_ALARM02 = 73;
+static const int H_MAIN_ITEM_ALARM01 = 54;
+static const int H_MAIN_ITEM_ALARM02 = 54;
 static const int W_COMPLETED_ICON_MARGIN = 36;
-static const int H_ADDTIONAL_ITEM = 112;
-static const int Y_REMINDER_ITEM_REMINDER = 32;
+static const int W_REMINDER_ITEM_MARGIN = 16;
+static const int H_REMINDER_ITEM = 112;
 static const int H_REMINDER_ITEM_REMINDER = 48;
-static const int Y_REMINDER_ITEM_REPEAT = 32;
-static const int H_REMINDER_ITEM_REPEAT = 48;
-static const int W_DESCRIPTION_ITEM_MARGIN = 16;
-static const int H_DESCRIPTION_ITEM_MARGIN = 38;
-//static const int H_SAVE_TO_ITEM = 112;
-//static const int Y_SAVE_TO_ITEM_SAVE_TO = 8;
-//static const int H_SAVE_TO_ITEM_SAVE_TO = 48;
-//static const int Y_SAVE_TO_ITEM_CALENDAR_NAME = 56;
-//static const int H_SAVE_TO_ITEM_CALENDAR_NAME = 48;
+static const int H_REMINDER_ITEM_MARGIN = 40;
+static const int W_PRIORITY_ITEM_MARGIN = 16;
+static const int H_PRIORITY_ITEM = 112;
+static const int Y_DESCRIPTION_ITEM_DESCRIPTION = 22;
+static const int H_DESCRIPTION_ITEM_DESCRIPTION = 42;
+static const int Y_DESCRIPTION_ITEM_CONTENT = 64;
+static const int H_DESCRIPTION_ITEM_CONTENT = 54;
+static const int W_DESCRIPTION_ITEM_MARGIN = 32;
+static const int H_DESCRIPTION_ITEM_MARGIN = 44;
+static const int Y_LOCATION_ITEM_LOCATION = 22;
+static const int H_LOCATION_ITEM_LOCATION = 42;
+static const int Y_LOCATION_ITEM_CONTENT = 54;
+static const int H_LOCATION_ITEM_CONTENT = 54;
+static const int H_SAVE_TO_ITEM = 140;
+static const int Y_SAVE_TO_ITEM_CALENDAR_NAME = 22;
+static const int H_SAVE_TO_ITEM_CALENDAR_NAME = 42;
+static const int Y_SAVE_TO_ITEM_CALENDAR_ADDRESS = 64;
+static const int H_SAVE_TO_ITEM_CALENDAR_ADDRESS = 54;
 static const int FONT_SIZE_DETAIL01 = 56;
-static const unsigned int COLOR_DETAIL01 = Color32<0, 0, 0>::Value;
-static const int FONT_SIZE_DETAIL02 = 32;
-static const unsigned int COLOR_DETAIL02 = Color32<128, 128, 128>::Value;
-static const int FONT_SIZE_DETAIL03 = 44;
-static const unsigned int COLOR_DETAIL03 = Color32<0, 0, 0>::Value;
-//static const int X_ITEM_SAVE_TO_ICON = 16;
-//static const int Y_ITEM_SAVE_TO_ICON = 66;
-//static const int W_ITEM_SAVE_TO_ICON = 32;
-//static const int H_ITEM_SAVE_TO_ICON = 32;
-//static const unsigned int COLOR_SAVE_TO_ICON = Color32<100, 100, 100>::Value;
+static const unsigned int COLOR_DETAIL01 = Color32<59, 115, 182>::Value;
+static const int FONT_SIZE_DETAIL02 = 44;
+static const unsigned int COLOR_DETAIL02 = Color32<0, 0, 0>::Value;
+static const int FONT_SIZE_DETAIL03 = 32;
+static const unsigned int COLOR_DETAIL03 = Color32<128, 128, 128>::Value;
+static const int X_ITEM_SAVE_TO_ICON = 16;
+static const int Y_ITEM_SAVE_TO_ICON = 38;
+static const int W_ITEM_SAVE_TO_ICON = 64;
+static const int H_ITEM_SAVE_TO_ICON = 64;
 static const int MAX_TITLE_TEXT = 20;
-static const int X_ITEM_ICON = 20;
-static const int Y_ITEM_ICON = 19;
-static const int W_ITEM_ICON = 74;
-static const int H_ITEM_ICON = 74;
 
 TaskDetailsForm::TaskDetailsForm(void)
        : __pTask(null)
@@ -158,6 +161,10 @@ TaskDetailsForm::OnFormBackRequested(Form& source)
 int
 TaskDetailsForm::GetSectionCount(void)
 {
+       if (__pTask->GetCalendarId() == INVALID_RECORD_ID)
+       {
+               return GROUP_COUNT - 1;
+       }
        return GROUP_COUNT;
 }
 
@@ -176,13 +183,9 @@ TaskDetailsForm::GetItemCount(int sectionIndex)
        case GROUP_INFORMATION_CONTENT:
                return INFORMATION_CONTENT_ITEM_COUNT;
        case GROUP_ADDITIONAL_CONTENT:
-               if (__pTask->GetAllReminders().GetCount() <= 0)
-               {
-                       return ADDITIONAL_CONTENT_ITEM_COUNT;
-               }
-               return __pTask->GetAllReminders().GetCount() + 1;
-//     case GROUP_SAVE_TO:
-//             return SAVE_TO_ITEM_COUNT;
+               return ADDITIONAL_CONTENT_ITEM_COUNT;
+       case GROUP_SAVE_TO:
+               return SAVE_TO_ITEM_COUNT;
        }
 
        return 0;
@@ -214,17 +217,12 @@ TaskDetailsForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
                break;
        case GROUP_ADDITIONAL_CONTENT:
        {
-               const IList& reminders = __pTask->GetAllReminders();
-               if (reminders.GetCount() <= 0 && itemIndex == 0)
-               {
-                       pItem = CreateReminderItemN(itemWidth, GetReminderString());
-               }
-               else if (itemIndex < reminders.GetCount())
-               {
-                       pItem = CreateReminderItemN(itemWidth, GetReminderString(static_cast<const Reminder*>(reminders.GetAt(itemIndex))));
-               }
-               else
+               switch (itemIndex)
                {
+               case ADDITIONAL_CONTENT_ITEM_REMINDER:
+                       pItem = CreateReminderItemN(itemWidth);
+                       break;
+               case ADDITIONAL_CONTENT_ITEM_PRIORITY:
                        switch (__pTask->GetPriority())
                        {
                        case TODO_PRIORITY_LOW:
@@ -240,17 +238,18 @@ TaskDetailsForm::CreateItem(int sectionIndex, int itemIndex, int itemWidth)
                                pItem = CreatePriorityItemN(itemWidth, ResourceManager::GetString(IDS_TASK_PRIORITY_MIDDLE));
                                break;
                        }
+                       break;
                }
                break;
        }
-//     case GROUP_SAVE_TO:
-//             if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
-//             {
-//                     const Bitmap* pIcon = __pPm->GetCalendarIconN();
-//                     pItem = CreateSaveToItemN(itemWidth, __pPm->GetCalendarName(), pIcon);
-//                     delete pIcon;
-//             }
-//             break;
+       case GROUP_SAVE_TO:
+               if (itemIndex == SAVE_TO_ITEM_SAVE_TO)
+               {
+                       const Bitmap* pIcon = GetCalendarIconN(__pTask->GetCalendarId());
+                       pItem = CreateSaveToItemN(itemWidth, GetAccountName(__pTask->GetCalendarId()), GetCalendarName(__pTask->GetCalendarId()), pIcon);
+                       delete pIcon;
+               }
+               break;
        }
 
        return pItem;
@@ -394,6 +393,7 @@ TaskDetailsForm::OnActionPerformed(const Control& source, int actionId)
                {
                        GetFooter()->RemoveAllItems();
                }
+               __pTableView->UpdateTableView();
                break;
        }
 }
@@ -412,7 +412,7 @@ TaskDetailsForm::CreateMainItemN(int itemWidth, const String& title, const DateT
                EnrichedText titleText;
                titleText.Construct(Dimension(itemWidth - W_MAIN_ITEM_SUBJECT_MARGIN, Integer::VALUE_MAX));
                titleText.SetTextWrapStyle(TEXT_WRAP_WORD_WRAP);
-               titleText.SetTextAbbreviationEnabled(true);
+               titleText.SetTextAbbreviationEnabled(false);
 
                TextElement* pElement = new (std::nothrow) TextElement();
                pElement->Construct(title);
@@ -430,6 +430,7 @@ TaskDetailsForm::CreateMainItemN(int itemWidth, const String& title, const DateT
                pLabelSubject->SetTextColor(Color(COLOR_DETAIL01));
                pLabelSubject->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                y = actualHeight;
+               pItem->SetSize(itemWidth, y + H_MAIN_ITEM_ALARM);
        }
        else
        {
@@ -442,17 +443,6 @@ TaskDetailsForm::CreateMainItemN(int itemWidth, const String& title, const DateT
                y += H_MAIN_ITEM_SUBJECT;
        }
 
-       Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_ICON_ALARM_64X64);
-       if (pIcon != null)
-       {
-               Label* pLabelIcon = new (std::nothrow) Label();
-               pLabelIcon->Construct(Rectangle(X_MAIN_ITEM_ALARM_ICON, y + Y_MAIN_ITEM_ALARM_ICON,
-                                                                               W_MAIN_ITEM_ALARM_ICON, H_MAIN_ITEM_ALARM_ICON), L"");
-               pItem->AddControl(*pLabelIcon);
-               pLabelIcon->SetBackgroundBitmap(*pIcon);
-               delete pIcon;
-       }
-
        String dateString;
        Locales::DateTimeFormatter* pDateFormatter = ResourceManager::CreateDateFormatterN(Locales::DATE_TIME_STYLE_LONG);
        pDateFormatter->Format(dueDate, dateString);
@@ -494,9 +484,6 @@ TaskDetailsForm::CreateMainItemN(int itemWidth, const String& title, const DateT
                }
        }
 
-       y += Y_MAIN_ITEM_ALARM02 + H_MAIN_ITEM_ALARM02;
-       pItem->SetSize(itemWidth, y);
-
        return pItem;
 }
 
@@ -507,9 +494,9 @@ TaskDetailsForm::CreateDescriptionItemN(int itemWidth, const String& description
        if (description.IsEmpty() == false)
        {
                EnrichedText text;
-               text.Construct(Dimension(itemWidth - W_DESCRIPTION_ITEM_MARGIN * 2, Integer::VALUE_MAX));
+               text.Construct(Dimension(itemWidth - W_DESCRIPTION_ITEM_MARGIN, Integer::VALUE_MAX));
                text.SetTextWrapStyle(TEXT_WRAP_WORD_WRAP);
-               text.SetTextAbbreviationEnabled(true);
+               text.SetTextAbbreviationEnabled(false);
 
                TextElement* pElement = new (std::nothrow) TextElement();
                pElement->Construct(description);
@@ -518,35 +505,37 @@ TaskDetailsForm::CreateDescriptionItemN(int itemWidth, const String& description
                pElement->SetFont(font);
                text.Add(*pElement);
 
-               int actualHeight = text.GetTextExtent().height;
+               int descriptionHeight = text.GetTextExtent().height;
                text.RemoveAll(true);
 
-               actualHeight += H_DESCRIPTION_ITEM_MARGIN * 2;
-               if (actualHeight < H_ITEM)
+               int itemHeight = descriptionHeight + H_DESCRIPTION_ITEM_MARGIN + H_DESCRIPTION_ITEM_DESCRIPTION;
+               if (itemHeight < H_ITEM)
+               {
+                       itemHeight = H_ITEM;
+               }
+               if (descriptionHeight < H_DESCRIPTION_ITEM_CONTENT)
                {
-                       actualHeight = H_ITEM;
+                       descriptionHeight = H_DESCRIPTION_ITEM_CONTENT;
                }
 
-               pItem->Construct(Dimension(itemWidth, actualHeight));
+               pItem->Construct(Dimension(itemWidth, itemHeight));
                pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
                pItem->SetEnabled(false);
 
-               Label* pLabelIcon = new (std::nothrow) Label();
-               pLabelIcon->Construct(Rectangle(X_ITEM_ICON, Y_ITEM_ICON, W_ITEM_ICON, H_ITEM_ICON), L"");
-               Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_LIST_ICON_DESCRIPTION);
-               if (pIcon != null)
-               {
-                       pLabelIcon->SetBackgroundBitmap(*pIcon);
-                       delete pIcon;
-               }
-               pItem->AddControl(*pLabelIcon);
-
                Label* pLabelDescription = new (std::nothrow) Label();
-               pLabelDescription->Construct(Rectangle(X_ITEM_ICON + W_ITEM_ICON, 0, itemWidth - X_ITEM_ICON - W_ITEM_ICON, actualHeight), description);
+               pLabelDescription->Construct(Rectangle(0, Y_DESCRIPTION_ITEM_DESCRIPTION, itemWidth, H_DESCRIPTION_ITEM_DESCRIPTION),
+                                                                               ResourceManager::GetString(IDS_CLD_BODY_CREATE_DESCRIPTION));
                pItem->AddControl(*pLabelDescription);
-               pLabelDescription->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-               pLabelDescription->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelDescription->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+               pLabelDescription->SetTextColor(Color(COLOR_DETAIL03));
                pLabelDescription->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+               Label* pLabelContent = new (std::nothrow) Label();
+               pLabelContent->Construct(Rectangle(0, Y_DESCRIPTION_ITEM_CONTENT, itemWidth, descriptionHeight), description);
+               pItem->AddControl(*pLabelContent);
+               pLabelContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+               pLabelContent->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelContent->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        }
        else
        {
@@ -566,22 +555,20 @@ TaskDetailsForm::CreateLocationItemN(int itemWidth, const String& location)
                pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
                pItem->SetEnabled(false);
 
-               Label* pLabelIcon = new (std::nothrow) Label();
-               pLabelIcon->Construct(Rectangle(X_ITEM_ICON, Y_ITEM_ICON, W_ITEM_ICON, H_ITEM_ICON), L"");
-               Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_LIST_ICON_MAP);
-               if (pIcon != null)
-               {
-                       pLabelIcon->SetBackgroundBitmap(*pIcon);
-                       delete pIcon;
-               }
-               pItem->AddControl(*pLabelIcon);
-
                Label* pLabelLocation = new (std::nothrow) Label();
-               pLabelLocation->Construct(Rectangle(X_ITEM_ICON + W_ITEM_ICON, 0, itemWidth - X_ITEM_ICON - W_ITEM_ICON, H_ITEM), location);
+               pLabelLocation->Construct(Rectangle(0, Y_LOCATION_ITEM_LOCATION, itemWidth, H_LOCATION_ITEM_LOCATION),
+                                                                       ResourceManager::GetString(IDS_CLD_BODY_LOCATION));
                pLabelLocation->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
                pLabelLocation->SetTextColor(Color(COLOR_DETAIL03));
                pLabelLocation->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                pItem->AddControl(*pLabelLocation);
+
+               Label* pLabelContent = new (std::nothrow) Label();
+               pLabelContent->Construct(Rectangle(0, Y_LOCATION_ITEM_CONTENT, itemWidth, H_LOCATION_ITEM_CONTENT), location);
+               pLabelContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+               pLabelContent->SetTextColor(Color(COLOR_DETAIL02));
+               pLabelContent->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+               pItem->AddControl(*pLabelContent);
        }
        else
        {
@@ -592,29 +579,39 @@ TaskDetailsForm::CreateLocationItemN(int itemWidth, const String& location)
 }
 
 TableViewItem*
-TaskDetailsForm::CreateReminderItemN(int itemWidth, const String& reminder)
+TaskDetailsForm::CreateReminderItemN(int itemWidth)
 {
+       const IList& reminders = __pTask->GetAllReminders();
+       int countReminder = (reminders.GetCount() > 1) ? reminders.GetCount() : 1;
+       int height = (countReminder > 1) ? H_REMINDER_ITEM_REMINDER * countReminder + H_REMINDER_ITEM_MARGIN : H_REMINDER_ITEM;
+
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, H_ADDTIONAL_ITEM));
+       pItem->Construct(Dimension(itemWidth, height));
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
        pItem->SetEnabled(false);
 
        Label* pLabelReminder = new (std::nothrow) Label();
-       pLabelReminder->Construct(Rectangle(0, Y_REMINDER_ITEM_REMINDER, itemWidth, H_REMINDER_ITEM_REMINDER),
+       pLabelReminder->Construct(Rectangle(0, 0, itemWidth, height),
                                                          ResourceManager::GetString(IDS_CLD_BODY_REMINDER));
        pItem->AddControl(*pLabelReminder);
-       pLabelReminder->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-       pLabelReminder->SetTextColor(Color(COLOR_DETAIL03));
+       pLabelReminder->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabelReminder->SetTextColor(Color(COLOR_DETAIL02));
        pLabelReminder->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pLabelReminder->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
 
-       Label* pLabelReminderContent = new (std::nothrow) Label();
-       pLabelReminderContent->Construct(Rectangle(0, Y_REMINDER_ITEM_REMINDER, itemWidth-16, H_REMINDER_ITEM_REMINDER), reminder);
-       pItem->AddControl(*pLabelReminderContent);
-       pLabelReminderContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-       pLabelReminderContent->SetTextColor(Color(COLOR_DETAIL02));
-       pLabelReminderContent->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
-       pLabelReminderContent->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+       int yPos = (height - (H_REMINDER_ITEM_REMINDER * countReminder)) / 2;
+       for (int i = 0; i < countReminder; i++)
+       {
+               Label* pLabelReminderContent = new (std::nothrow) Label();
+               pLabelReminderContent->Construct(Rectangle(0, yPos, itemWidth - W_REMINDER_ITEM_MARGIN, H_REMINDER_ITEM_REMINDER), L"");
+               pLabelReminderContent->SetText(GetReminderString(static_cast<const Reminder*>(reminders.GetAt(i))));
+               pLabelReminderContent->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+               pLabelReminderContent->SetTextColor(Color(COLOR_DETAIL03));
+               pLabelReminderContent->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+               pLabelReminderContent->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+               pItem->AddControl(*pLabelReminderContent);
+               yPos += H_REMINDER_ITEM_REMINDER;
+       }
 
        return pItem;
 }
@@ -623,30 +620,136 @@ TableViewItem*
 TaskDetailsForm::CreatePriorityItemN(int itemWidth, const String& priority)
 {
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
-       pItem->Construct(Dimension(itemWidth, H_ADDTIONAL_ITEM));
+       pItem->Construct(Dimension(itemWidth, H_PRIORITY_ITEM));
        pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
        pItem->SetEnabled(false);
 
        Label* pLabelPriority = new (std::nothrow) Label();
-       pLabelPriority->Construct(Rectangle(0, Y_REMINDER_ITEM_REPEAT, itemWidth, H_REMINDER_ITEM_REPEAT),
+       pLabelPriority->Construct(Rectangle(0, 0, itemWidth, H_PRIORITY_ITEM),
                                                          ResourceManager::GetString(IDS_CLD_BODY_PRIORITY));
        pItem->AddControl(*pLabelPriority);
-       pLabelPriority->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
-       pLabelPriority->SetTextColor(Color(COLOR_DETAIL03));
+       pLabelPriority->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabelPriority->SetTextColor(Color(COLOR_DETAIL02));
        pLabelPriority->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        pLabelPriority->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
 
        Label* pLabelPriorityContent = new (std::nothrow) Label();
-       pLabelPriorityContent->Construct(Rectangle(0, Y_REMINDER_ITEM_REPEAT, itemWidth-16, H_REMINDER_ITEM_REPEAT), priority);
+       pLabelPriorityContent->Construct(Rectangle(0, 0, itemWidth - W_PRIORITY_ITEM_MARGIN, H_PRIORITY_ITEM), priority);
        pItem->AddControl(*pLabelPriorityContent);
-       pLabelPriorityContent->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
-       pLabelPriorityContent->SetTextColor(Color(COLOR_DETAIL02));
+       pLabelPriorityContent->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pLabelPriorityContent->SetTextColor(Color(COLOR_DETAIL03));
        pLabelPriorityContent->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
        pLabelPriorityContent->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
 
        return pItem;
 }
 
+TableViewItem*
+TaskDetailsForm::CreateSaveToItemN(int itemWidth, const String& accountName, const String& calendarName, const Bitmap* pCalendarIcon)
+{
+       TableViewItem* pItem = new (std::nothrow) TableViewItem();
+       pItem->Construct(Dimension(itemWidth, H_SAVE_TO_ITEM));
+       pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));
+       pItem->SetEnabled(false);
+
+       int x = 0;
+       if (pCalendarIcon != null)
+       {
+               Label* pIconLabel = new (std::nothrow) Label();
+               pIconLabel->Construct(Rectangle(X_ITEM_SAVE_TO_ICON, Y_ITEM_SAVE_TO_ICON,
+                                                                                                       W_ITEM_SAVE_TO_ICON, H_ITEM_SAVE_TO_ICON), L"");
+               pIconLabel->SetBackgroundBitmap(*pCalendarIcon);
+               pItem->AddControl(*pIconLabel);
+               x += X_ITEM_SAVE_TO_ICON + W_ITEM_SAVE_TO_ICON;
+       }
+
+       Label* pLabelCalendarName = new (std::nothrow) Label();
+       pLabelCalendarName->Construct(Rectangle(x, Y_SAVE_TO_ITEM_CALENDAR_NAME, itemWidth - x, H_SAVE_TO_ITEM_CALENDAR_NAME), accountName);
+       pItem->AddControl(*pLabelCalendarName);
+       pLabelCalendarName->SetTextConfig(FONT_SIZE_DETAIL03, LABEL_TEXT_STYLE_NORMAL);
+       pLabelCalendarName->SetTextColor(Color(COLOR_DETAIL03));
+       pLabelCalendarName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+       Label* pLabelCalendarAddress = new (std::nothrow) Label();
+       pLabelCalendarAddress->Construct(Rectangle(x, Y_SAVE_TO_ITEM_CALENDAR_ADDRESS, itemWidth - x, H_SAVE_TO_ITEM_CALENDAR_ADDRESS), calendarName);
+       pItem->AddControl(*pLabelCalendarAddress);
+       pLabelCalendarAddress->SetTextConfig(FONT_SIZE_DETAIL02, LABEL_TEXT_STYLE_NORMAL);
+       pLabelCalendarAddress->SetTextColor(Color(COLOR_DETAIL02));
+       pLabelCalendarAddress->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+       return pItem;
+}
+
+String
+TaskDetailsForm::GetAccountName(RecordId calendarId) const
+{
+       if (calendarId == INVALID_RECORD_ID)
+       {
+               return L"";
+       }
+
+       Calendarbook calendarbook;
+       calendarbook.Construct();
+
+       Calendar* pCalendar = calendarbook.GetCalendarN(calendarId);
+       TryReturn(pCalendar != null, L"", "[E_FAILURE] Unable to get calendar(id = %d).", calendarId);
+
+       if (pCalendar->GetAccountId() != INVALID_ACCOUNT_ID)
+       {
+               Account account = AccountAccessor::GetInstance()->GetAccount(pCalendar->GetAccountId());
+               return account.GetUserName();
+       }
+
+       return L"Phone";
+}
+
+Bitmap*
+TaskDetailsForm::GetCalendarIconN(RecordId calendarId) const
+{
+       if (calendarId == INVALID_RECORD_ID)
+       {
+               return null;
+       }
+
+       Calendarbook calendarbook;
+       calendarbook.Construct();
+
+       Calendar* pCalendar = calendarbook.GetCalendarN(calendarId);
+       TryReturn(pCalendar != null, null, "[E_FAILURE] Unable to get calendar(id = %d).", calendarId);
+
+       Bitmap* pBitmapIcon = null;
+       if (pCalendar->GetAccountId() != INVALID_ACCOUNT_ID)
+       {
+               Account account = AccountAccessor::GetInstance()->GetAccount(pCalendar->GetAccountId());
+               pBitmapIcon = ResourceManager::GetBitmapN(account.GetAccountProvider().GetIconPath());
+       }
+       else
+       {
+               pBitmapIcon = ResourceManager::GetBitmapN(IDB_ICON_PHONE_CALENDAR);
+       }
+       delete pCalendar;
+       return pBitmapIcon;
+}
+
+String
+TaskDetailsForm::GetCalendarName(RecordId calendarId) const
+{
+       if (calendarId == INVALID_RECORD_ID)
+       {
+               return L"";
+       }
+
+       Calendarbook calendarbook;
+       calendarbook.Construct();
+
+       Calendar* pCalendar = calendarbook.GetCalendarN(calendarId);
+       TryReturn(pCalendar != null, L"", "[E_FAILURE] Unable to get calendar(id = %d).", calendarId);
+
+       String name = pCalendar->GetName();
+       delete pCalendar;
+       return name;
+}
+
 String
 TaskDetailsForm::GetReminderString(const Reminder* pReminder) const
 {
@@ -701,6 +804,8 @@ TaskDetailsForm::GetReminderString(const Reminder* pReminder) const
                format = ResourceManager::GetString(IDS_REMINDER_WEEK_BEFORE);
                result.Format(format.GetLength() + 2, format.GetPointer(), pReminder->GetTimeOffset());
                break;
+       default:
+               break;
        }
 
        return result;
index 606a6e1..8275ec7 100644 (file)
@@ -39,34 +39,107 @@ enum TaskItemElementId
        ID_TASK_ITEM_ELEMENT_FACEBOOK
 };
 
-static const int H_ITEM = 126;
+static const int H_ITEM = 140;
 static const unsigned int COLOR_ITEM_BACKGROUND = Color32<248, 246, 239>::Value;
 static const int X_ITEM_MAIN_CONTENT = 26;
-static const int Y_ITEM_MAIN_CONTENT = 10;
+static const int Y_ITEM_MAIN_CONTENT = 17;
+static const int W_ITEM_MAIN_CONTENT_MARGIN = 16;
 static const int H_ITEM_MAIN_CONTENT = 54;
 static const int FONT_SIZE_ITEM_MAIN_CONTENT = 44;
 static const unsigned int COLOR_ITEM_MAIN_CONTENT = Color32<0, 0, 0>::Value;
+static const unsigned int COLOR_ITEM_MAIN_CONTENT_HIGH_PRIORITY = Color32<194, 71, 71>::Value;
 static const unsigned int COLOR_ITEM_MAIN_CONTENT_FOCUS = Color32<255, 255, 255>::Value;
 static const int X_ITEM_SUB_CONTENT = 26;
-static const int Y_ITEM_SUB_CONTENT = 78;
+static const int Y_ITEM_SUB_CONTENT = 85;
 static const int W_ITEM_SUB_CONTENT_MARGIN = 26;
 static const int H_ITEM_SUB_CONTENT = 38;
 static const int FONT_SIZE_ITEM_SUB_CONTENT = 32;
 static const unsigned int COLOR_ITEM_SUB_CONTENT = Color32<128, 128, 128>::Value;
 static const unsigned int COLOR_ITEM_SUB_CONTENT_FOCUS = Color32<255, 255, 255>::Value;
 static const int Y_EVENT_COLOR_BAR = 4;
-static const int W_EVENT_COLOR_BAR = 7;
-static const int H_EVENT_COLOR_BAR = 118;
-static const int W_ICON = 38;
-static const int H_ICON = 38;
-static const int W_RANGE_TO_LOCATION_MARGIN = 32;
+static const int W_EVENT_COLOR_BAR = 8;
+static const int H_EVENT_COLOR_BAR = 132;
+static const int W_ICON = 45;
+static const int H_ICON = 45;
+static const int W_RANGE_TO_LOCATION_MARGIN = 26;
 static const int LIST_ANNEX_MARGIN = 30;
-static const byte COLOR_COMPLETE_TASK_ALPHA = 0x4D;
+static const byte COLOR_COMPLETE_TASK_ALPHA = 77;                      // 30% alpha
+
+
+class TaskTitleElement
+       : public virtual ICustomElement
+{
+public:
+       TaskTitleElement(const String& title, TaskPriority priority, bool isCompleted = false);
+       virtual ~TaskTitleElement(void);
+
+       virtual bool OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status);
+
+private:
+       const String& __title;
+       TaskPriority __priority;
+       bool __isCompleted;
+}; // TitleElement
+
+TaskTitleElement::TaskTitleElement(const String& title, TaskPriority priority, bool isCompleted)
+       : __title(title)
+       , __priority(priority)
+       , __isCompleted(isCompleted)
+{
+}
+
+TaskTitleElement::~TaskTitleElement(void)
+{
+}
+
+bool
+TaskTitleElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus status)
+{
+       EnrichedText text;
+       text.Construct(Dimension(rect.width, rect.height));
+       text.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+       text.SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
+       text.SetTextAbbreviationEnabled(true);
+
+       Color titleColor;
+       if (status == LIST_ITEM_DRAWING_STATUS_PRESSED || status == LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED)
+       {
+               titleColor = Color(COLOR_ITEM_MAIN_CONTENT_FOCUS);
+       }
+       else if (__priority == TASK_PRIORITY_HIGH)
+       {
+               titleColor = Color(COLOR_ITEM_MAIN_CONTENT_HIGH_PRIORITY);
+       }
+       else
+       {
+               titleColor = Color(COLOR_ITEM_MAIN_CONTENT);
+       }
+
+       Font font;
+       font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_ITEM_MAIN_CONTENT);
+
+       if (__isCompleted == true)
+       {
+               font.SetStrikeOut(true);
+               titleColor.SetAlpha(COLOR_COMPLETE_TASK_ALPHA);
+       }
+
+       TextElement* pTextElement = new (std::nothrow) TextElement();
+       pTextElement->Construct(__title);
+       pTextElement->SetFont(font);
+       pTextElement->SetTextColor(Color(titleColor));
+       text.Add(*pTextElement);
+
+       canvas.DrawText(Point(rect.x, rect.y), text);
+       text.RemoveAll(true);
+       return true;
+}
 
 
 TaskItem::TaskItem(void)
        : __style()
        , __width(-1)
+       , __pTitleElement(null)
        , __priority(TASK_PRIORITY_LOW)
        , __hasReminder(false)
        , __isCanceled(false)
@@ -77,6 +150,7 @@ TaskItem::TaskItem(void)
 
 TaskItem::~TaskItem(void)
 {
+       delete __pTitleElement;
 }
 
 const Color
@@ -245,68 +319,65 @@ TaskItem::UpdateElements(void)
        delete pBitmap;
 
        int titleWidth = __width - X_ITEM_MAIN_CONTENT;
-       if (__isFacebook == true)
+       if (__hasReminder == true)
        {
-               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_FACEBOOK);
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_REMINDER);
                if (pBitmap != null)
                {
                        AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
-                                       ID_TASK_ITEM_ELEMENT_FACEBOOK, *pBitmap);
-                       titleWidth -= X_ITEM_MAIN_CONTENT + W_ICON;
+                                       ID_TASK_ITEM_ELEMENT_REMINDER, *pBitmap);
+                       titleWidth -= W_ICON;
                        delete pBitmap;
                }
        }
 
-       if (__hasReminder == true)
+       if (__priority == TASK_PRIORITY_LOW)
        {
-               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_REMINDER);
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_PRIORITY_LOW);
                if (pBitmap != null)
                {
                        AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
-                                       ID_TASK_ITEM_ELEMENT_REMINDER, *pBitmap);
-                       titleWidth -= X_ITEM_MAIN_CONTENT + W_ICON;
+                                       ID_TASK_ITEM_ELEMENT_PRIORITY, *pBitmap);
+                       titleWidth -= W_ICON;
                        delete pBitmap;
                }
        }
-
-       pBitmap = null;
-       switch (__priority)
-       {
-       case TASK_PRIORITY_LOW:
-               pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_PRIORITY_LOW);
-               break;
-       default:
-               pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_PRIORITY);
-               break;
-       }
-       if (pBitmap != null)
+       else if (__priority == TASK_PRIORITY_HIGH)
        {
-               AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
-                               ID_TASK_ITEM_ELEMENT_PRIORITY, *pBitmap);
-               titleWidth -= X_ITEM_MAIN_CONTENT + W_ICON;
-               delete pBitmap;
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_PRIORITY);
+               if (pBitmap != null)
+               {
+                       AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
+                                       ID_TASK_ITEM_ELEMENT_PRIORITY, *pBitmap);
+                       titleWidth -= W_ICON;
+                       delete pBitmap;
+               }
        }
 
-       Color colorMain(COLOR_ITEM_MAIN_CONTENT);
-       Color colorMainFocus(COLOR_ITEM_MAIN_CONTENT_FOCUS);
-       if (__isCompleted == true)
+       if (__isFacebook == true)
        {
-               colorMain.SetAlpha(COLOR_COMPLETE_TASK_ALPHA);
-               colorMainFocus.SetAlpha(COLOR_COMPLETE_TASK_ALPHA);
+               Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LIST_ICON_FACEBOOK);
+               if (pBitmap != null)
+               {
+                       AddElement(Rectangle(titleWidth - W_ICON, Y_ITEM_MAIN_CONTENT + ((H_ITEM_MAIN_CONTENT - H_ICON) / 2), W_ICON, H_ICON),
+                                       ID_TASK_ITEM_ELEMENT_FACEBOOK, *pBitmap);
+                       titleWidth -= W_ICON;
+                       delete pBitmap;
+               }
        }
+
        if (__title.IsEmpty() == false)
        {
-               AddElement(Rectangle(X_ITEM_MAIN_CONTENT, Y_ITEM_MAIN_CONTENT, titleWidth, H_ITEM_MAIN_CONTENT),
-                               ID_TASK_ITEM_ELEMENT_TITLE, __title, FONT_SIZE_ITEM_MAIN_CONTENT,
-                               colorMain, colorMainFocus, colorMainFocus);
-       }
+               delete __pTitleElement;
+               __pTitleElement = new (std::nothrow) TaskTitleElement(__title, __priority, __isCompleted);
 
-       Color colorSub(COLOR_ITEM_SUB_CONTENT);
-       Color colorSubFocus(COLOR_ITEM_SUB_CONTENT_FOCUS);
-       if (__isCompleted == true)
-       {
-               colorSub.SetAlpha(COLOR_COMPLETE_TASK_ALPHA);
-               colorSubFocus.SetAlpha(COLOR_COMPLETE_TASK_ALPHA);
+               if (titleWidth < __width - X_ITEM_MAIN_CONTENT)
+               {
+                       titleWidth -= W_ITEM_MAIN_CONTENT_MARGIN;
+               }
+
+               AddElement(Rectangle(X_ITEM_MAIN_CONTENT, Y_ITEM_MAIN_CONTENT, titleWidth - X_ITEM_MAIN_CONTENT, H_ITEM_MAIN_CONTENT),
+                               ID_TASK_ITEM_ELEMENT_TITLE, *__pTitleElement);
        }
 
        int dueDateWidth = 0;
@@ -320,7 +391,7 @@ TaskItem::UpdateElements(void)
 
                AddElement(Rectangle(X_ITEM_SUB_CONTENT, Y_ITEM_SUB_CONTENT, dueDateWidth, H_ITEM_SUB_CONTENT),
                                ID_TASK_ITEM_ELEMENT_DUE_DATE, __dueDate, FONT_SIZE_ITEM_SUB_CONTENT,
-                               colorSub, colorSubFocus, colorSubFocus);
+                               Color(COLOR_ITEM_SUB_CONTENT), Color(COLOR_ITEM_SUB_CONTENT_FOCUS), Color(COLOR_ITEM_SUB_CONTENT_FOCUS));
        }
 
        int locationWidth = __width - X_ITEM_SUB_CONTENT - W_ITEM_SUB_CONTENT_MARGIN - W_RANGE_TO_LOCATION_MARGIN - dueDateWidth;
@@ -337,7 +408,7 @@ TaskItem::UpdateElements(void)
 
                AddElement(Rectangle(__width - locationWidth - W_ITEM_SUB_CONTENT_MARGIN, Y_ITEM_SUB_CONTENT, locationWidth, H_ITEM_SUB_CONTENT),
                                ID_TASK_ITEM_ELEMENT_LOCATION, __location, FONT_SIZE_ITEM_SUB_CONTENT,
-                               colorSub, colorSubFocus, colorSubFocus);
+                               Color(COLOR_ITEM_SUB_CONTENT), Color(COLOR_ITEM_SUB_CONTENT_FOCUS), Color(COLOR_ITEM_SUB_CONTENT_FOCUS));
                SetElementTextHorizontalAlignment(ID_TASK_ITEM_ELEMENT_LOCATION, ALIGNMENT_RIGHT);
        }
 }
index bd38c42..66d0dc4 100755 (executable)
@@ -96,7 +96,7 @@ ThreeButtonPopup::OnActionPerformed(const Control& source, int actionId)
                if (__pEvent != null)
                {
                        pArgs = new (std::nothrow) LinkedList();
-                       pArgs->Add(new (std::nothrow) CalEventInstance(*__pEvent));
+                       pArgs->Add(__pEvent);
                }
                __pTarget->SendUserEvent(actionId, pArgs);
        }
@@ -109,7 +109,7 @@ ThreeButtonPopup::RequestThreeButtonPopup(ThreeButtonPopupStyle style, Control*
 {
        ThreeButtonPopup* pPopup = new (std::nothrow) ThreeButtonPopup(style);
        pPopup->__pTarget = pTarget;
-       pPopup->__pEvent = pEvent;
+       pPopup->__pEvent = (pEvent != null) ? new (std::nothrow) CalEventInstance(*pEvent) : null;
        pPopup->Construct(L"IDL_THREE_BUTTON_POPUP");
        pPopup->Show();
 }
index 68b87f3..41341af 100644 (file)
@@ -88,7 +88,7 @@ TwoButtonPopup::OnActionPerformed(const Control& source, int actionId)
                if (__pEvent != null)
                {
                        pArgs = new (std::nothrow) LinkedList();
-                       pArgs->Add(new (std::nothrow) CalEventInstance(*__pEvent));
+                       pArgs->Add(__pEvent);
                }
                __pTarget->SendUserEvent(actionId, pArgs);
        }
@@ -101,7 +101,7 @@ TwoButtonPopup::RequestTwoButtonPopup(TwoButtonPopupStyle style, Control* pTarge
 {
        TwoButtonPopup* pPopup = new (std::nothrow) TwoButtonPopup(style);
        pPopup->__pTarget = pTarget;
-       pPopup->__pEvent = pEvent;
+       pPopup->__pEvent = (pEvent != null) ? new (std::nothrow) CalEventInstance(*pEvent) : null;
        pPopup->Construct(L"IDL_TWO_BUTTON_POPUP");
        pPopup->Show();
 }
index ddaddfc..461731f 100644 (file)
@@ -129,8 +129,8 @@ const wchar_t* IDS_COM_POP_AM_M_ABB = L"IDS_COM_POP_AM_M_ABB";
 const wchar_t* IDS_COM_POP_PM_M_ABB = L"IDS_COM_POP_PM_M_ABB";
 const wchar_t* IDS_CLD_MBODY_LOCK_TIME_ZONE = L"IDS_CLD_MBODY_LOCK_TIME_ZONE";
 const wchar_t* IDS_CLD_BODY_LOCK_TIME_ZONE_DESCRIPTION_MSG = L"IDS_CLD_BODY_LOCK_TIME_ZONE_DESCRIPTION_MSG";
-const wchar_t* IDS_CLD_BODY_IMPORT_EVENTS_EVENTS_TASKS_ABB = L"IDS_CLD_BODY_IMPORT_EVENTS_EVENTS_TASKS_ABB";
-const wchar_t* IDS_CLD_BODY_EXPORT_EVENTS_EVENTS_TASKS_ABB = L"IDS_CLD_BODY_EXPORT_EVENTS_EVENTS_TASKS_ABB";
+const wchar_t* IDS_CLD_BODY_IMPORT_EVENTS_TASKS_ABB = L"IDS_CLD_BODY_IMPORT_EVENTS_TASKS_ABB";
+const wchar_t* IDS_CLD_BODY_EXPORT_EVENTS_TASKS_ABB = L"IDS_CLD_BODY_EXPORT_EVENTS_TASKS_ABB";
 const wchar_t* IDS_COM_POP_SAVING_FAILED = L"IDS_COM_POP_SAVING_FAILED";
 
 const wchar_t* IDS_MONTH_VIEW_LIST_TO = L"IDS_MONTH_VIEW_LIST_TO";
@@ -165,10 +165,10 @@ const wchar_t* IDS_POPUP_DELETE_MULTIPLE_REPEATED_EVENT = L"IDS_POPUP_DELETE_MUL
 const wchar_t* IDS_POPUP_EDIT_EVENT_QUESTION = L"IDS_POPUP_EDIT_EVENT_QUESTION";
 
 //bitmap ID
-const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED = L"P01_all_day_event_list_expand_closed.png";
-const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED_PRESS = L"P01_all_day_event_list_expand_closed_press.png";
-const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_OPENED = L"P01_all_day_event_list_expand_opened.png";
-const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_OPENED_PRESS = L"P01_all_day_event_list_expand_opened_press.png";
+const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED = L"P01_month view_expanded_down.png";
+const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED_PRESS = L"P01_month view_expanded_down_press.png";
+const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_OPENED = L"P01_month view_expanded_up.png";
+const wchar_t* IDB_ALL_DAY_EVENT_LIST_EXPAND_OPENED_PRESS = L"P01_month view_expanded_up_press.png";
 const wchar_t* IDB_DAY_CURRENT_TIME = L"P01_day_current_time.png";
 const wchar_t* IDB_DAY_EVENT_MORE = L"P01_day_event_bg_more.png";
 const wchar_t* IDB_DAY_EVENT_MORE_ARROW = L"P01_day_event_bg_more_arrow.png";
@@ -176,21 +176,26 @@ const wchar_t* IDB_DAY_VIEW_TIME_LINE = L"P01_day_view_time_line.png";
 const wchar_t* IDB_DAY_VIEW_TIME_LINE_PRESS = L"P01_day_view_time_line_press.png";
 
 const wchar_t* IDB_LIST_ICON_ALARM = L"P01_list_icon_alarm.png";
-const wchar_t* IDB_LIST_ICON_DESCRIPTION = L"P01_list_icon_description.png";
 const wchar_t* IDB_LIST_ICON_FACEBOOK = L"P01_list_icon_facebook.png";
-const wchar_t* IDB_LIST_ICON_MAP = L"P01_list_icon_map.png";
 const wchar_t* IDB_LIST_ICON_PRIORITY = L"P01_list_icon_priority.png";
 const wchar_t* IDB_LIST_ICON_PRIORITY_LOW = L"P01_list_icon_priority_low.png";
 const wchar_t* IDB_LIST_ICON_REMINDER = L"P01_list_icon_reminder.png";
 const wchar_t* IDB_LIST_ICON_REPEAT = L"P01_list_icon_repeat.png";
+const wchar_t* IDB_LIST_ICON_SAVE_TO = L"P01_list_icon_save to.png";
 
 const wchar_t* IDB_TASK_EVENT_COMPLETION_PRESS = L"P01_Task_event_completion_press.png";
 
-const wchar_t* IDB_ICON_ALARM_64X64 = L"P01_icon_alarm_64x64.png";
+const wchar_t* IDB_MONTH_VIEW_CALENDAR_BG = L"P01_calendar_bg.png";
 const wchar_t* IDB_MONTH_VIEW_DAY_EVENT = L"P01_month view_day_event.png";
+const wchar_t* IDB_MONTH_VIEW_DAY_EVENT_FOCUS = L"P01_month view_day_focus.png";
 const wchar_t* IDB_MONTH_VIEW_DAY_FOCUS = L"P01_month view_day_focus.png";
+const wchar_t* IDB_MONTH_VIEW_DAY_PRESS = L"P01_month view_day_press.png";
 const wchar_t* IDB_MONTH_VIEW_TODAY = L"P01_month view_Today.png";
-const wchar_t* IDB_MONTH_VIEW_TODAY_FOCUS = L"P01_month view_Today_focus.png";
+const wchar_t* IDB_MONTH_VIEW_BUBBLE_EVENT = L"P01_month view_event_bubble_bg_daily.png";
+const wchar_t* IDB_MONTH_VIEW_BUBBLE_EVENT_FOCUS = L"P01_month view_event_bubble_bg_event_focus.png";
+const wchar_t* IDB_MONTH_VIEW_BUBBLE_FOCUS = L"P01_month view_event_bubble_bg_focus.png";
+const wchar_t* IDB_MONTH_VIEW_BUBBLE_PRESS = L"P01_month view_event_bubble_bg_press.png";
+const wchar_t* IDB_MONTH_VIEW_BUBBLE_TODAY = L"P01_month-view_event_bubble_bg_today.png";
 
 const wchar_t* IDB_YEAR_DAY_FOCUS = L"P01_year_day_focus.png";
 const wchar_t* IDB_YEAR_MONTH_FOCUS = L"P01_year_month_focus.png";
@@ -212,7 +217,10 @@ const wchar_t* IDB_LIST_VIEW_NO_CONTENTS_TEXT = L"00_Nocontents_text.png";
 const wchar_t* IDB_FORM_BACK = L"00_icon_Back_02.png";
 const wchar_t* IDB_FORM_BACK_PRESS = L"00_icon_Back_02_press.png";
 
+const wchar_t* IDB_ICON_PHONE_CALENDAR = L"P01_icon_phoneCalendar.png";
+
 //etc
+const wchar_t* ID_OPERATION_ADD = L"http://tizen.org/appcontrol/operation/add";
 const wchar_t* ID_OPERATION_CONFIG = L"http://tizen.org/appcontrol/operation/configure";
 const wchar_t* ID_OPERATION_MAIN = L"http://tizen.org/appcontrol/operation/main";
 const wchar_t* ID_OPERATION_PICK = L"http://tizen.org/appcontrol/operation/pick";
index 648bcc1..be7510f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <new>
 #include <FLocales.h>
+#include <FSocial.h>
 #include "ClEventListPresentationModel.h"
 #include "ClGoToDatePopup.h"
 #include "ClMainForm.h"
 #include "ClTypes.h"
 #include "ClYearPanel.h"
 
+using namespace Tizen;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Graphics;
-using namespace Tizen::Locales;
+using namespace Tizen::Social;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Animations;
 using namespace Tizen::Ui::Controls;
@@ -52,6 +54,7 @@ static const int W_MONTH_TITLE = 208;
 static const int H_MONTH_TITLE = 28;
 static const int FONT_SIZE_MONTH_TITLE = 22;
 static const unsigned int COLOR_MONTH_TITLE = Color32<94, 93, 93>::Value;
+static const unsigned int COLOR_MONTH_TITLE_FOCUS = Color32<255, 255, 255>::Value;
 static const int X_MONTH_TITLE_DIVIDER = 11;
 static const int Y_MONTH_TITLE_DIVIDER = 32;
 static const int W_MONTH_TITLE_DIVIDER = 208;
@@ -73,7 +76,7 @@ static const int H_DAY = 26;
 static const int FONT_SIZE_DAY = 18;
 static const unsigned int COLOR_DAY = Color32<0, 0, 0>::Value;
 static const unsigned int COLOR_DAY_SUN = Color32<156, 11, 11>::Value;
-static const unsigned int COLOR_DAY_FOCUS = Color32<189, 215, 231>::Value;
+static const unsigned int COLOR_DAY_FOCUS = Color32<255, 255, 255>::Value;
 
 static const int COUNT_OF_MONTH = 12;
 static const int COUNT_OF_WEEK = 7;
@@ -85,12 +88,9 @@ class CalendarPanel
 public:
        const DateTime& GetDate(void) const;
        result Initialize(const Rectangle& bounds, const DateTime& date,
-                                               Bitmap** pWeekText, Bitmap** pWeekdayText, Bitmap** pHolidayText, Bitmap* pFocus);
+                                               Bitmap** pWeekText, Bitmap** pWeekdayText, Bitmap** pHolidayText, Bitmap** pTodayText, Bitmap* pFocus);
        void SetDate(const DateTime& date);
        void SetDateFocusEventListener(IDateFocusEventListener& listener);
-       void SetFocusEnabled(bool enable = true);
-
-       void SetPanningAnimationManager(PanningAnimationManager& manager);
 
        CalendarPanel(void);
        virtual ~CalendarPanel(void);
@@ -104,38 +104,26 @@ public:
 private:
        DateTime __date;
        IDateFocusEventListener* __pDateFocusEventListener;
-       PanningAnimationManager* __pPanningAnimationManager;
        Button* __pMonthCalendars[COUNT_OF_MONTH];
        Bitmap** __pBitmapWeekText;
        Bitmap** __pBitmapWeekdayText;
        Bitmap** __pBitmapHolidayText;
+       Bitmap** __pBitmapTodayText;
        Bitmap* __pBitmapFocus;
-       bool __focusEnabled;
 };
 
 CalendarPanel::CalendarPanel(void)
        : __pDateFocusEventListener(null)
-       , __pPanningAnimationManager(null)
        , __pBitmapWeekText(null)
        , __pBitmapWeekdayText(null)
        , __pBitmapHolidayText(null)
+       , __pBitmapTodayText(null)
        , __pBitmapFocus(null)
-       , __focusEnabled(false)
 {
 }
 
 CalendarPanel::~CalendarPanel(void)
 {
-       if (__pPanningAnimationManager != null)
-       {
-               RemoveTouchEventListener(*__pPanningAnimationManager);
-               RemoveGestureDetector(*__pPanningAnimationManager);
-               for (int month = 0; month < COUNT_OF_MONTH; ++month)
-               {
-                       __pMonthCalendars[month]->RemoveTouchEventListener(*__pPanningAnimationManager);
-                       __pMonthCalendars[month]->RemoveGestureDetector(*__pPanningAnimationManager);
-               }
-       }
 }
 
 const DateTime&
@@ -146,12 +134,13 @@ CalendarPanel::GetDate(void) const
 
 result
 CalendarPanel::Initialize(const Rectangle& bounds, const DateTime& date,
-                                                       Bitmap** pWeekText, Bitmap** pWeekdayText, Bitmap** pHolidayText, Bitmap* pFocus)
+                                                       Bitmap** pWeekText, Bitmap** pWeekdayText, Bitmap** pHolidayText, Bitmap** pTodayText, Bitmap* pFocus)
 {
        __date = date;
        __pBitmapWeekText = pWeekText;
        __pBitmapWeekdayText = pWeekdayText;
        __pBitmapHolidayText = pHolidayText;
+       __pBitmapTodayText = pTodayText;
        __pBitmapFocus = pFocus;
 
        return Construct(bounds);
@@ -160,13 +149,6 @@ CalendarPanel::Initialize(const Rectangle& bounds, const DateTime& date,
 void
 CalendarPanel::SetDate(const DateTime& date)
 {
-       if (__focusEnabled == true && (date.GetYear() != __date.GetYear() || date.GetMonth() != __date.GetMonth()))
-       {
-               __pMonthCalendars[__date.GetMonth() - 1]->SetNormalBackgroundBitmap(*ResourceManager::GetBlankBitmap());
-               __pMonthCalendars[__date.GetMonth() - 1]->Invalidate(false);
-               __pMonthCalendars[date.GetMonth() - 1]->SetNormalBackgroundBitmap(*__pBitmapFocus);
-               __pMonthCalendars[date.GetMonth() - 1]->Invalidate(false);
-       }
        __date = date;
 }
 
@@ -177,37 +159,6 @@ CalendarPanel::SetDateFocusEventListener(IDateFocusEventListener& listener)
 }
 
 void
-CalendarPanel::SetFocusEnabled(bool enable)
-{
-       if (__focusEnabled != enable)
-       {
-               __focusEnabled = enable;
-               if (__focusEnabled == true)
-               {
-                       __pMonthCalendars[__date.GetMonth() - 1]->SetNormalBackgroundBitmap(*__pBitmapFocus);
-               }
-               else
-               {
-                       __pMonthCalendars[__date.GetMonth() - 1]->SetNormalBackgroundBitmap(*ResourceManager::GetBlankBitmap());
-               }
-               __pMonthCalendars[__date.GetMonth() - 1]->Invalidate(false);
-       }
-}
-
-void
-CalendarPanel::SetPanningAnimationManager(PanningAnimationManager& manager)
-{
-       __pPanningAnimationManager = &manager;
-       AddTouchEventListener(manager);
-       AddGestureDetector(manager);
-       for (int month = 0; month < COUNT_OF_MONTH; ++month)
-       {
-               __pMonthCalendars[month]->AddTouchEventListener(manager);
-               __pMonthCalendars[month]->AddGestureDetector(manager);
-       }
-}
-
-void
 CalendarPanel::OnClearBackground(void)
 {
        Canvas* pCanvas = GetCanvasN();
@@ -226,6 +177,25 @@ CalendarPanel::OnClearBackground(void)
                                                                          hMargin + (month - 1) / COUNT_CALENDAR_COL * H_MONTH_CALENDAR,
                                                                          W_MONTH_CALENDAR, H_MONTH_CALENDAR);
 
+               Color titleColor;
+               if (pointer.GetYear() == today.GetYear() && pointer.GetMonth() == today.GetMonth())
+               {
+                       // Draw current month
+                       if (__pBitmapFocus != null)
+                       {
+                               pCanvas->DrawBitmap(monthCalendarBounds, *__pBitmapFocus);
+                       }
+                       titleColor = Color(COLOR_MONTH_TITLE_FOCUS);
+               }
+               else
+               {
+                       // Draw lines
+                       pCanvas->FillRectangle(Color(COLOR_MONTH_TITLE_DIVIDER),
+                                                                Rectangle(monthCalendarBounds.x + X_MONTH_TITLE_DIVIDER,
+                                                                                  monthCalendarBounds.y + Y_MONTH_TITLE_DIVIDER, W_MONTH_TITLE_DIVIDER, H_MONTH_TITLE_DIVIDER));
+                       titleColor = Color(COLOR_MONTH_TITLE);
+               }
+
                // Draw month title
                EnrichedText* pTextMonthTitle = new (std::nothrow) EnrichedText();
                pTextMonthTitle->Construct(Dimension(W_MONTH_TITLE, H_MONTH_TITLE));
@@ -238,7 +208,7 @@ CalendarPanel::OnClearBackground(void)
                Font font;
                font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_MONTH_TITLE);
                pTextElement->SetFont(font);
-               pTextElement->SetTextColor(Color(COLOR_MONTH_TITLE));
+               pTextElement->SetTextColor(titleColor);
 
                pTextMonthTitle->Add(*pTextElement);
                pCanvas->DrawText(Point(monthCalendarBounds.x + X_MONTH_TITLE, monthCalendarBounds.y + Y_MONTH_TITLE), *pTextMonthTitle);
@@ -258,16 +228,11 @@ CalendarPanel::OnClearBackground(void)
                        }
                }
 
-               // Draw lines
-               pCanvas->FillRectangle(Color(COLOR_MONTH_TITLE_DIVIDER),
-                                                        Rectangle(monthCalendarBounds.x + X_MONTH_TITLE_DIVIDER,
-                                                                          monthCalendarBounds.y + Y_MONTH_TITLE_DIVIDER, W_MONTH_TITLE_DIVIDER, H_MONTH_TITLE_DIVIDER));
-
                // Draw days
                int row = 0;
-               Calendar* pCalendar = Calendar::CreateInstanceN();
+               Locales::Calendar* pCalendar = Locales::Calendar::CreateInstanceN();
                pCalendar->SetTime(__date.GetYear(), month, 1);
-               int col = pCalendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK) - 1 - firstDayOfWeek;
+               int col = pCalendar->GetTimeField(Locales::TIME_FIELD_DAY_OF_WEEK) - 1 - firstDayOfWeek;
                delete pCalendar;
                if (col < 0)
                {
@@ -298,6 +263,7 @@ CalendarPanel::OnClearBackground(void)
                                        Bitmap* pBitmapFocus = ResourceManager::GetBitmapN(IDB_YEAR_DAY_FOCUS);
                                        pCanvas->DrawBitmap(drawRect, *pBitmapFocus);
                                        delete pBitmapFocus;
+                                       pTextDay = __pBitmapTodayText[pointer.GetDay() - 1];
                                }
                                if (pTextDay != null)
                                {
@@ -326,8 +292,8 @@ CalendarPanel::OnInitializing(void)
                                  W_MONTH_CALENDAR, H_MONTH_CALENDAR), L"");
 
                __pMonthCalendars[month]->SetNormalBackgroundBitmap(*ResourceManager::GetBlankBitmap());
-               __pMonthCalendars[month]->SetPressedBackgroundBitmap(*__pBitmapFocus);
-               __pMonthCalendars[month]->SetHighlightedBackgroundBitmap(*__pBitmapFocus);
+               __pMonthCalendars[month]->SetPressedBackgroundBitmap(*ResourceManager::GetBlankBitmap());
+               __pMonthCalendars[month]->SetHighlightedBackgroundBitmap(*ResourceManager::GetBlankBitmap());
                __pMonthCalendars[month]->SetActionId(month + 1);
                __pMonthCalendars[month]->AddActionEventListener(*this);
                AddControl(*__pMonthCalendars[month]);
@@ -362,6 +328,7 @@ YearPanel::YearPanel(void)
        memset((void *)__pBitmapWeekText, 0, sizeof(Bitmap*) * YEAR_PANEL_COUNT_OF_WEEK);
        memset((void *)__pBitmapWeekdayText, 0, sizeof(Bitmap*) * YEAR_PANEL_COUNT_OF_DAY);
        memset((void *)__pBitmapHolidayText, 0, sizeof(Bitmap*) * YEAR_PANEL_COUNT_OF_DAY);
+       memset((void *)__pBitmapTodayText, 0, sizeof(Bitmap*) * YEAR_PANEL_COUNT_OF_DAY);
 }
 
 YearPanel::~YearPanel(void)
@@ -393,16 +360,16 @@ YearPanel::OnInitializing(void)
 
        // Create panning animation manager
        __pPanningAnimationManager = new (std::nothrow) PanningAnimationManager();
-       __pPanningAnimationManager->Initialize(*this);
-       __pPanningAnimationManager->SetControlAnimatorEventListener(*this);
+       __pPanningAnimationManager->Initialize(bounds, *this);
+       __pPanningAnimationManager->SetPanningAnimationEventListener(*this);
+       AddControl(*__pPanningAnimationManager);
 
        // Create month calendars.
        CalendarPanel* pCalendarPanel = new (std::nothrow) CalendarPanel();
-       pCalendarPanel->Initialize(bounds, __pPm->GetCurrentDate(), __pBitmapWeekText, __pBitmapWeekdayText, __pBitmapHolidayText, __pBitmapFocus);
-       AddControl(*pCalendarPanel);
+       pCalendarPanel->Initialize(bounds, __pPm->GetCurrentDate(),
+                                                               __pBitmapWeekText, __pBitmapWeekdayText, __pBitmapHolidayText, __pBitmapTodayText, __pBitmapFocus);
+       __pPanningAnimationManager->AddView(*pCalendarPanel, VIEW_SCROLL_EFFECT_CURRENT);
        pCalendarPanel->SetDateFocusEventListener(*this);
-       pCalendarPanel->SetPanningAnimationManager(*__pPanningAnimationManager);
-       pCalendarPanel->SetFocusEnabled(true);
        __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT] = pCalendarPanel;
 
        return E_SUCCESS;
@@ -411,16 +378,7 @@ YearPanel::OnInitializing(void)
 result
 YearPanel::OnTerminating(void)
 {
-       RemoveControl(*__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT]);
-       if (__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] != null)
-       {
-               RemoveControl(*__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT]);
-       }
-       if (__pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] != null)
-       {
-               RemoveControl(*__pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
-       }
-       delete __pPanningAnimationManager;
+       __pPm->RemoveCurrentDateChangedEventListener(*this);
 
        for (int i = 0; i < YEAR_PANEL_COUNT_OF_WEEK; ++i)
        {
@@ -430,6 +388,7 @@ YearPanel::OnTerminating(void)
        {
                delete __pBitmapWeekdayText[i];
                delete __pBitmapHolidayText[i];
+               delete __pBitmapTodayText[i];
        }
        delete __pBitmapFocus;
 
@@ -444,13 +403,13 @@ YearPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
        case IDA_MAIN_FORM_HEADER_TODAY:
                __pPm->SetTodayToCurrentDate();
                break;
-       case IDA_MAIN_FORM_HEADER_GO_TO_DATE:
+       case IDA_SUB_MENU_GO_TO_DATE:
                GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
                break;
        case IDA_MAIN_FORM_FOOTER_CREATE:
        {
                LinkedList* pArgs = new (std::nothrow) LinkedList();
-               pArgs->Add(new (std::nothrow) DateTime(__pPm->GetCurrentDate()));
+               pArgs->Add(new (std::nothrow) DateTime(EventListPresentationModel::GetToday()));
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_EVENT_EDITOR,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pArgs);
                break;
@@ -467,6 +426,10 @@ YearPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_CALENDAR_LIST,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
                break;
+       case IDA_SUB_MENU_SETTING:
+               SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_SETTING,
+                                                                                                                                         SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+               break;
        case IDA_VIEW_MENU_MONTH:
                SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_MONTH,
                                                                                                                                          SCENE_TRANSITION_ANIMATION_TYPE_LEFT,
@@ -500,67 +463,9 @@ YearPanel::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
 }
 
 void
-YearPanel::OnControlAnimationStarted(ControlAnimator& source, Control& control)
-{
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_PREVIEW)
-       {
-               CalendarPanel* pPanel = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT]);
-               pPanel->SetPosition(-GetWidth(), pPanel->GetY());
-
-               DateTime date = __pPm->GetCurrentDate();
-               date.AddYears(-2);
-               pPanel->SetDate(date);
-               pPanel->RequestRedraw(false);
-       }
-       else if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_NEXT)
-       {
-               CalendarPanel* pPanel = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
-               pPanel->SetPosition(GetWidth(), pPanel->GetY());
-
-               DateTime date = __pPm->GetCurrentDate();
-               date.AddYears(2);
-               pPanel->SetDate(date);
-               pPanel->RequestRedraw(false);
-       }
-}
-
-void
-YearPanel::OnControlAnimationFinished(ControlAnimator& source, Control& control)
-{
-       if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_PREVIEW)
-       {
-               Panel* pPanel = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT];
-               __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT];
-               __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
-               __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = pPanel;
-
-               static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT])->SetFocusEnabled(false);
-               static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetFocusEnabled(true);
-
-               __pPm->AddCurrentYear(-1);
-       }
-       else if (__pPanningAnimationManager->GetScrollDirection() == VIEW_SCROLL_EFFECT_NEXT)
-       {
-               Panel* pPanel = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
-               __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT];
-               __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT];
-               __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] = pPanel;
-
-               static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW])->SetFocusEnabled(false);
-               static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT])->SetFocusEnabled(true);
-
-               __pPm->AddCurrentYear(1);
-       }
-}
-
-void
-YearPanel::OnControlAnimationStopped(ControlAnimator& source, Control& control)
-{
-}
-
-void
 YearPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
@@ -578,42 +483,57 @@ YearPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& curr
                {
                case VIEW_SCROLL_EFFECT_NEXT:
                        date.AddYears(1);
-                       pCalendarPanel->Initialize(Rectangle(GetWidth(), 0, GetWidth(), GetHeight()), date,
-                                                                               __pBitmapWeekText, __pBitmapWeekdayText, __pBitmapHolidayText, __pBitmapFocus);
+                       if (date > Calendarbook::GetMaxDateTime())
+                       {
+                               DateTime minDate = Calendarbook::GetMinDateTime();
+                               date.SetValue(minDate.GetYear(), date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pCalendarPanel->Initialize(Rectangle(0, 0, GetWidth(), GetHeight()), date,
+                                                                               __pBitmapWeekText, __pBitmapWeekdayText, __pBitmapHolidayText, __pBitmapTodayText, __pBitmapFocus);
                        break;
                case VIEW_SCROLL_EFFECT_PREVIEW:
                        date.AddYears(-1);
-                       pCalendarPanel->Initialize(Rectangle(-GetWidth(), 0, GetWidth(), GetHeight()), date,
-                                                                               __pBitmapWeekText, __pBitmapWeekdayText, __pBitmapHolidayText, __pBitmapFocus);
+                       if (date < Calendarbook::GetMinDateTime())
+                       {
+                               DateTime maxDate = Calendarbook::GetMaxDateTime();
+                               date.SetValue(maxDate.GetYear(), date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pCalendarPanel->Initialize(Rectangle(0, 0, GetWidth(), GetHeight()), date,
+                                                                               __pBitmapWeekText, __pBitmapWeekdayText, __pBitmapHolidayText, __pBitmapTodayText, __pBitmapFocus);
                        break;
                }
-               AddControl(*pCalendarPanel);
+               __pPanningAnimationManager->AddView(*pCalendarPanel, (ViewScrollEffect)i);
                pCalendarPanel->SetDateFocusEventListener(*this);
-               pCalendarPanel->SetPanningAnimationManager(*__pPanningAnimationManager);
                __pPanelYearCalendar[i] = pCalendarPanel;
        }
 
+       __pPanningAnimationManager->ResetPosition();
        Update(true);
 
        __pPm->AddCurrentDateChangedEventListener(*this);
+       AppLogDebug("Exit.");
 }
 
 void
 YearPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
        __pPm->RemoveCurrentDateChangedEventListener(*this);
 
-       RemoveControl(*__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT]);
+       __pPanningAnimationManager->RemoveView(VIEW_SCROLL_EFFECT_NEXT);
        __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] = null;
-       RemoveControl(*__pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
+       __pPanningAnimationManager->RemoveView(VIEW_SCROLL_EFFECT_PREVIEW);
        __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = null;
+       AppLogDebug("Exit.");
 }
 
 void
 YearPanel::OnCurrentDateChanged(const DateTime& currentDate, const DateTime& prevDate)
 {
+       AppLogDebug("Enter.");
        DateTime currentCalendarDate = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT])->GetDate();
        Update(currentDate.GetYear() != currentCalendarDate.GetYear());
+       AppLogDebug("Exit.");
 }
 
 void
@@ -644,6 +564,49 @@ YearPanel::GetPreviewControl(void)
        return __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
 }
 
+void
+YearPanel::OnPanningAnimationEnded(ViewScrollEffect direction)
+{
+       if (__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] != null && __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] != null)
+       {
+               if (direction == VIEW_SCROLL_EFFECT_PREVIEW)
+               {
+                       CalendarPanel* pPanel = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT]);
+                       DateTime date = __pPm->GetCurrentDate();
+                       date.AddYears(-2);
+                       if (date < Calendarbook::GetMinDateTime())
+                       {
+                               DateTime maxDate = Calendarbook::GetMaxDateTime();
+                               date.SetValue(maxDate.GetYear(), date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->SetDate(date);
+                       pPanel->RequestRedraw(false);
+
+                       __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT];
+                       __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW];
+                       __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = pPanel;
+               }
+               else if (direction == VIEW_SCROLL_EFFECT_NEXT)
+               {
+                       CalendarPanel* pPanel = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW]);
+                       DateTime date = __pPm->GetCurrentDate();
+                       date.AddYears(2);
+                       if (date > Calendarbook::GetMaxDateTime())
+                       {
+                               DateTime minDate = Calendarbook::GetMinDateTime();
+                               date.SetValue(minDate.GetYear(), date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+                       }
+                       pPanel->SetDate(date);
+                       pPanel->RequestRedraw(false);
+
+                       __pPanelYearCalendar[VIEW_SCROLL_EFFECT_PREVIEW] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT];
+                       __pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT] = __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT];
+                       __pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT] = pPanel;
+               }
+               __pPm->SetCurrentDate(static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT])->GetDate());
+       }
+}
+
 result
 YearPanel::CreateBitmapElements(void)
 {
@@ -761,6 +724,43 @@ YearPanel::CreateBitmapElements(void)
                __pBitmapHolidayText[day] = pBitmapDay;
        }
 
+       // Create text of todays
+       for (int day = 0; day < YearPanel::YEAR_PANEL_COUNT_OF_DAY; ++day)
+       {
+               Bitmap* pBitmapDay = new (std::nothrow) Bitmap();
+               pBitmapDay->Construct(dayTextSize, BITMAP_PIXEL_FORMAT_ARGB8888);
+
+               EnrichedText* pTextDay = new (std::nothrow) EnrichedText();
+               pTextDay->Construct(dayTextSize);
+               pTextDay->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
+               pTextDay->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+
+               TextElement* pTextElement = new (std::nothrow) TextElement();
+               pTextElement->Construct(Integer::ToString(day + 1));
+
+               Font font;
+               font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_DAY);
+               pTextElement->SetFont(font);
+               pTextElement->SetTextColor(Color(COLOR_DAY_FOCUS));
+
+               pTextDay->Add(*pTextElement);
+
+               BufferInfo bufferinfo;
+               pBitmapDay->Lock(bufferinfo);
+
+               Canvas canvas;
+               canvas.Construct(bufferinfo);
+               canvas.SetBackgroundColor(Color(COLOR_BLANK_BACKGROUND));
+               canvas.Clear();
+               canvas.DrawText(Point(0, 0), *pTextDay);
+
+               pBitmapDay->Unlock();
+               pTextDay->RemoveAll(true);
+               delete pTextDay;
+               delete __pBitmapTodayText[day];
+               __pBitmapTodayText[day] = pBitmapDay;
+       }
+
        __pBitmapFocus = ResourceManager::GetBitmapN(IDB_YEAR_MONTH_FOCUS);
 
        return E_SUCCESS;
@@ -788,14 +788,17 @@ YearPanel::Update(bool draw)
 
        DateTime date = __pPm->GetCurrentDate();
        CalendarPanel* pCurrent = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT]);
-       pCurrent->SetFocusEnabled(true);
        pCurrent->SetDate(date);
 
        CalendarPanel* pNext = static_cast<CalendarPanel*>(__pPanelYearCalendar[VIEW_SCROLL_EFFECT_NEXT]);
        if (pNext != null)
        {
                date.AddYears(1);
-               pNext->SetFocusEnabled(false);
+               if (date > Calendarbook::GetMaxDateTime())
+               {
+                       DateTime minDate = Calendarbook::GetMinDateTime();
+                       date.SetValue(minDate.GetYear(), date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+               }
                pNext->SetDate(date);
        }
 
@@ -804,7 +807,11 @@ YearPanel::Update(bool draw)
        {
                date = __pPm->GetCurrentDate();
                date.AddYears(-1);
-               pPreview->SetFocusEnabled(false);
+               if (date < Calendarbook::GetMinDateTime())
+               {
+                       DateTime maxDate = Calendarbook::GetMaxDateTime();
+                       date.SetValue(maxDate.GetYear(), date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute());
+               }
                pPreview->SetDate(date);
        }