25 #include <aknnotewrappers.h> |
25 #include <aknnotewrappers.h> |
26 #include <AknsConstants.h> |
26 #include <AknsConstants.h> |
27 #include <aifwdefs.h> |
27 #include <aifwdefs.h> |
28 #include <gfxtranseffect/gfxtranseffect.h> |
28 #include <gfxtranseffect/gfxtranseffect.h> |
29 #include <akntransitionutils.h> |
29 #include <akntransitionutils.h> |
|
30 #include <layoutmetadata.cdl.h> |
30 |
31 |
31 // User includes |
32 // User includes |
32 #include "xnapplication.h" |
33 #include "xnapplication.h" |
33 #include "xnuiengine.h" |
34 #include "xnuiengine.h" |
34 #include "xnproperty.h" |
35 #include "xnproperty.h" |
323 |
324 |
324 iHspsWrapper = &iEditor->HspsWrapper(); |
325 iHspsWrapper = &iEditor->HspsWrapper(); |
325 |
326 |
326 iComposer = CXnComposer::NewL( *iHspsWrapper ); |
327 iComposer = CXnComposer::NewL( *iHspsWrapper ); |
327 |
328 |
|
329 iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); |
|
330 |
328 DoRobustnessCheckL(); |
331 DoRobustnessCheckL(); |
329 } |
332 } |
330 |
333 |
331 // ----------------------------------------------------------------------------- |
334 // ----------------------------------------------------------------------------- |
332 // CXnViewManager::LoadUiL() |
335 // CXnViewManager::LoadUiL() |
883 GfxTransEffect::Register( thisView, KGfxContextActivateNextView ); |
885 GfxTransEffect::Register( thisView, KGfxContextActivateNextView ); |
884 GfxTransEffect::Register( nextView, KGfxContextActivateNextView ); |
886 GfxTransEffect::Register( nextView, KGfxContextActivateNextView ); |
885 |
887 |
886 TInt ret( GfxTransEffect::BeginGroup() ); |
888 TInt ret( GfxTransEffect::BeginGroup() ); |
887 |
889 |
888 CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); |
890 CFbsBitmap* currentBg( ActiveViewData().WallpaperImage() ); |
889 |
891 CFbsBitmap* nextBg( next.WallpaperImage() ); |
890 GfxTransEffect::Begin( bg, KGfxControlActionAppear ); |
892 |
891 |
893 if ( currentBg || nextBg ) |
892 GfxTransEffect::SetDemarcation( bg, bg->Position() ); |
894 { |
893 GfxTransEffect::End( bg ); |
895 CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); |
894 |
896 |
895 GfxTransEffect::Begin( thisView, KGfxControlActionDisappear ); |
897 if ( !currentBg && nextBg ) |
896 |
898 { |
897 iAppUiAdapter.ViewAdapter().ActivateContainerL( next ); |
899 GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear ); |
|
900 } |
|
901 else |
|
902 { |
|
903 GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear ); |
|
904 } |
|
905 |
|
906 GfxTransEffect::SetDemarcation( bg, bg->Position() ); |
|
907 GfxTransEffect::End( bg ); |
|
908 } |
|
909 |
|
910 if ( iIsLandscapeOrientation ) |
|
911 { |
|
912 GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc ); |
|
913 GfxTransEffect::Begin( nextView, KGfxControlActionAppearLsc ); |
|
914 } |
|
915 else |
|
916 { |
|
917 GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt ); |
|
918 GfxTransEffect::Begin( nextView, KGfxControlActionAppearPrt ); |
|
919 } |
|
920 |
|
921 TRAP_IGNORE( iAppUiAdapter.ViewAdapter().ActivateContainerL( next ) ); |
898 |
922 |
899 GfxTransEffect::SetDemarcation( thisView, thisView->Position() ); |
923 GfxTransEffect::SetDemarcation( thisView, thisView->Position() ); |
900 GfxTransEffect::End( thisView ); |
924 GfxTransEffect::End( thisView ); |
901 |
925 |
902 GfxTransEffect::Begin( nextView, KGfxControlActionAppear ); |
|
903 GfxTransEffect::SetDemarcation( nextView, nextView->Position() ); |
926 GfxTransEffect::SetDemarcation( nextView, nextView->Position() ); |
904 GfxTransEffect::End( nextView ); |
927 GfxTransEffect::End( nextView ); |
905 |
928 |
906 GfxTransEffect::EndGroup( ret ); |
929 GfxTransEffect::EndGroup( ret ); |
907 |
930 |
940 |
962 |
941 GfxTransEffect::Register( thisView, KGfxContextActivatePrevView ); |
963 GfxTransEffect::Register( thisView, KGfxContextActivatePrevView ); |
942 GfxTransEffect::Register( prevView, KGfxContextActivatePrevView ); |
964 GfxTransEffect::Register( prevView, KGfxContextActivatePrevView ); |
943 |
965 |
944 TInt ret( GfxTransEffect::BeginGroup() ); |
966 TInt ret( GfxTransEffect::BeginGroup() ); |
945 |
967 |
946 CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); |
968 CFbsBitmap* currentBg( ActiveViewData().WallpaperImage() ); |
947 |
969 CFbsBitmap* prevBg( prev.WallpaperImage() ); |
948 GfxTransEffect::Begin( bg, KGfxControlActionAppear ); |
970 |
949 |
971 if ( currentBg || prevBg ) |
950 GfxTransEffect::SetDemarcation( bg, bg->Position() ); |
972 { |
951 GfxTransEffect::End( bg ); |
973 CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() ); |
952 |
974 |
953 GfxTransEffect::Begin( thisView, KGfxControlActionDisappear ); |
975 if ( !currentBg && prevBg ) |
954 |
976 { |
955 iAppUiAdapter.ViewAdapter().ActivateContainerL( prev ); |
977 GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear ); |
|
978 } |
|
979 else |
|
980 { |
|
981 GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear ); |
|
982 } |
|
983 |
|
984 GfxTransEffect::SetDemarcation( bg, bg->Position() ); |
|
985 GfxTransEffect::End( bg ); |
|
986 } |
|
987 |
|
988 if ( iIsLandscapeOrientation ) |
|
989 { |
|
990 GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc ); |
|
991 GfxTransEffect::Begin( prevView, KGfxControlActionAppearLsc ); |
|
992 } |
|
993 else |
|
994 { |
|
995 GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt ); |
|
996 GfxTransEffect::Begin( prevView, KGfxControlActionAppearPrt ); |
|
997 } |
|
998 |
|
999 TRAP_IGNORE( iAppUiAdapter.ViewAdapter().ActivateContainerL( prev ) ); |
956 |
1000 |
957 GfxTransEffect::SetDemarcation( thisView, thisView->Position() ); |
1001 GfxTransEffect::SetDemarcation( thisView, thisView->Position() ); |
958 GfxTransEffect::End( thisView ); |
1002 GfxTransEffect::End( thisView ); |
959 |
1003 |
960 GfxTransEffect::Begin( prevView, KGfxControlActionAppear ); |
|
961 |
|
962 GfxTransEffect::SetDemarcation( prevView, prevView->Position() ); |
1004 GfxTransEffect::SetDemarcation( prevView, prevView->Position() ); |
963 GfxTransEffect::End( prevView ); |
1005 GfxTransEffect::End( prevView ); |
964 |
1006 |
965 GfxTransEffect::EndGroup( ret ); |
1007 GfxTransEffect::EndGroup( ret ); |
966 |
1008 |