212 ECbaParentAsControl, // cba's parent window group is treated as CCoeControl |
212 ECbaParentAsControl, // cba's parent window group is treated as CCoeControl |
213 ECbaActivationDelayed, // activation delayed |
213 ECbaActivationDelayed, // activation delayed |
214 ECbaSingleClickEnabled, // single click enabled in appUi |
214 ECbaSingleClickEnabled, // single click enabled in appUi |
215 ECbaItemSoftkeyDisabled, // item specific softkey disabled |
215 ECbaItemSoftkeyDisabled, // item specific softkey disabled |
216 ECbaItemSpecificSoftkeyInUse, // item specific softkey is in use |
216 ECbaItemSpecificSoftkeyInUse, // item specific softkey is in use |
217 ECbaItemSoftkeyDisabledByClient, // client disabled item specific softkey |
217 ECbaItemSoftkeyDisabledByClient, // client has disabled item specific softkey |
218 ECbaMultipleMarkingActive // multiple marking has changed RSK |
218 ECbaMultipleMarkingActive, // multiple marking has changed RSK |
|
219 ECbaCombinePaneUncovered // The combine pane in status pane is invisible. |
219 }; |
220 }; |
220 |
221 |
221 enum TCbaLayers |
222 enum TCbaLayers |
222 { |
223 { |
223 ECbaLayerWallpaper, |
224 ECbaLayerWallpaper, |
1778 CFbsBitmap *bitmap = NULL; |
1779 CFbsBitmap *bitmap = NULL; |
1779 CFbsBitmap *mask = NULL; |
1780 CFbsBitmap *mask = NULL; |
1780 |
1781 |
1781 TAknLayoutRect qgn_graf_sk_msk; |
1782 TAknLayoutRect qgn_graf_sk_msk; |
1782 TRect rect; |
1783 TRect rect; |
|
1784 TInt graphicMSKVariety = 1; |
|
1785 if ( iCbaFlags & EEikCbaFlagAppMskIcon ) |
|
1786 { |
|
1787 graphicMSKVariety = 0 ; |
|
1788 } |
1783 qgn_graf_sk_msk.LayoutRect( |
1789 qgn_graf_sk_msk.LayoutRect( |
1784 rect, |
1790 rect, |
1785 AknLayoutScalable_Avkon::control_pane_g4( 1 ).LayoutLine() ); |
1791 AknLayoutScalable_Avkon::control_pane_g4( graphicMSKVariety ).LayoutLine() ); |
1786 |
1792 |
1787 TSize iconSize( qgn_graf_sk_msk.Rect().Width(), |
1793 TSize iconSize( qgn_graf_sk_msk.Rect().Width(), |
1788 qgn_graf_sk_msk.Rect().Height() ); |
1794 qgn_graf_sk_msk.Rect().Height() ); |
1789 TInt leftId = (*iControlArray)[KControlArrayCBAButton1Posn].iId; |
1795 TInt leftId = (*iControlArray)[KControlArrayCBAButton1Posn].iId; |
1790 |
1796 |
2950 SetMSKVisibility( ETrue ); |
2956 SetMSKVisibility( ETrue ); |
2951 TRAP_IGNORE( SetMSKIconL() ); |
2957 TRAP_IGNORE( SetMSKIconL() ); |
2952 } |
2958 } |
2953 |
2959 |
2954 // We must check for landscape mode bottom sks |
2960 // We must check for landscape mode bottom sks |
|
2961 TBool isLandscapeOrient = Layout_Meta_Data::IsLandscapeOrientation(); |
2955 TInt bottomPaneVariety = 1; |
2962 TInt bottomPaneVariety = 1; |
2956 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
2963 if ( isLandscapeOrient ) |
2957 { |
2964 { |
2958 bottomPaneVariety = 6; |
2965 bottomPaneVariety = 6; |
2959 } |
2966 } |
2960 |
2967 |
|
2968 // SetBoundingRect is always called by status pane when it is changing visibility. |
|
2969 // If the status pane is invisible in landscape, softkey need to draw frame to cover |
|
2970 // the area of combine pane. |
|
2971 CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current(); |
|
2972 if (statusPane && !statusPane->IsVisible() && isLandscapeOrient && |
|
2973 statusPane->PaneCapabilities(TUid::Uid(EEikStatusPaneUidCombined)).IsInCurrentLayout()) |
|
2974 { |
|
2975 iFlags.Set( ECbaCombinePaneUncovered ); |
|
2976 } |
|
2977 else |
|
2978 { |
|
2979 iFlags.Clear( ECbaCombinePaneUncovered ); |
|
2980 } |
|
2981 |
2961 TAknWindowLineLayout controlPane( DoCompose( |
2982 TAknWindowLineLayout controlPane( DoCompose( |
2962 AknLayoutScalable_Avkon::application_window( 0 ), |
2983 AknLayoutScalable_Avkon::application_window( 0 ), |
2963 DoCompose( AknLayoutScalable_Avkon::area_bottom_pane( bottomPaneVariety ), |
2984 DoCompose( AknLayoutScalable_Avkon::area_bottom_pane( bottomPaneVariety ), |
2964 AknLayoutScalable_Avkon::control_pane() ) ).LayoutLine() ); |
2985 AknLayoutScalable_Avkon::control_pane() ) ).LayoutLine() ); |
2965 |
2986 |
2969 SetRect( cbarect.Rect() ); |
2990 SetRect( cbarect.Rect() ); |
2970 |
2991 |
2971 // Set correct window region incase we have been in stacon mode. |
2992 // Set correct window region incase we have been in stacon mode. |
2972 RRegion region; |
2993 RRegion region; |
2973 region.AddRect( Rect() ); |
2994 region.AddRect( Rect() ); |
2974 |
|
2975 CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current(); |
|
2976 |
2995 |
2977 // If status indicators and clock are shown in control pane area, |
2996 // If status indicators and clock are shown in control pane area, |
2978 // then remove those areas from cba window region. |
2997 // then remove those areas from cba window region. |
2979 // |
2998 // |
2980 // NOTE: MSK is not supported in landscape. |
2999 // NOTE: MSK is not supported in landscape. |
4620 CEikCbaButton* button1 = static_cast<CEikCbaButton*>( |
4639 CEikCbaButton* button1 = static_cast<CEikCbaButton*>( |
4621 (*iControlArray)[KControlArrayCBAButton1Posn].iControl ); |
4640 (*iControlArray)[KControlArrayCBAButton1Posn].iControl ); |
4622 CEikCbaButton* button2 = static_cast<CEikCbaButton*>( |
4641 CEikCbaButton* button2 = static_cast<CEikCbaButton*>( |
4623 (*iControlArray)[KControlArrayCBAButton2Posn].iControl ); |
4642 (*iControlArray)[KControlArrayCBAButton2Posn].iControl ); |
4624 |
4643 |
4625 if ( IsMskEnabledLayoutActive() ) |
4644 if ( IsMskEnabledLayoutActive() || iFlags.IsSet( ECbaCombinePaneUncovered ) ) |
4626 { |
4645 { |
4627 CEikCbaButton* buttonMSK = static_cast<CEikCbaButton*>( |
4646 CEikCbaButton* buttonMSK = static_cast<CEikCbaButton*>( |
4628 (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl ); |
4647 (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl ); |
4629 |
4648 |
4630 CFbsBitmap* middleMask = |
4649 CFbsBitmap* middleMask = |
5286 layoutRect.LayoutRect( iExtension->iRightFrameOuterRect, |
5305 layoutRect.LayoutRect( iExtension->iRightFrameOuterRect, |
5287 AknLayoutScalable_Avkon::bg_sctrl_sk_pane_g1() |
5306 AknLayoutScalable_Avkon::bg_sctrl_sk_pane_g1() |
5288 .LayoutLine() ); |
5307 .LayoutLine() ); |
5289 iExtension->iRightFrameInnerRect = layoutRect.Rect(); |
5308 iExtension->iRightFrameInnerRect = layoutRect.Rect(); |
5290 |
5309 |
5291 if ( mskEnabledInPlatform ) |
5310 if ( mskEnabledInPlatform || ( isLandscape && iFlags.IsSet( ECbaCombinePaneUncovered ) ) ) |
5292 { |
5311 { |
5293 layoutRect.LayoutRect( |
5312 layoutRect.LayoutRect( |
5294 rect, |
5313 rect, |
5295 AknLayoutScalable_Avkon::control_pane_g7( 0 ).LayoutLine() ); |
5314 AknLayoutScalable_Avkon::control_pane_g7( 0 ).LayoutLine() ); |
5296 frameSizeChanged = frameSizeChanged || layoutRect.Rect() != iExtension->iMiddleFrameOuterRect; |
5315 frameSizeChanged = frameSizeChanged || layoutRect.Rect() != iExtension->iMiddleFrameOuterRect; |
5486 } |
5505 } |
5487 |
5506 |
5488 TInt textMSKVariety = 3; |
5507 TInt textMSKVariety = 3; |
5489 TInt graphicMSKVariety = 1; |
5508 TInt graphicMSKVariety = 1; |
5490 |
5509 |
|
5510 if ( iCbaFlags & EEikCbaFlagAppMskIcon ) |
|
5511 { |
|
5512 graphicMSKVariety = 0 ; |
|
5513 } |
5491 if ( mskEnabledInApplication && mskEnabledInPlatform ) |
5514 if ( mskEnabledInApplication && mskEnabledInPlatform ) |
5492 { |
5515 { |
5493 MSKSoftkey = (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl; |
5516 MSKSoftkey = (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl; |
5494 MSKButton = static_cast<CEikCbaButton*>( MSKSoftkey ); |
5517 MSKButton = static_cast<CEikCbaButton*>( MSKSoftkey ); |
5495 |
5518 |
7655 } |
7678 } |
7656 |
7679 |
7657 CFbsBitmap *bitmap = NULL; |
7680 CFbsBitmap *bitmap = NULL; |
7658 CFbsBitmap *mask = NULL; |
7681 CFbsBitmap *mask = NULL; |
7659 |
7682 |
|
7683 TInt graphicMSKVariety = 1; |
|
7684 if ( iCbaFlags & EEikCbaFlagAppMskIcon ) |
|
7685 { |
|
7686 graphicMSKVariety = 0 ; |
|
7687 } |
7660 TAknLayoutRect qgn_graf_sk_msk; |
7688 TAknLayoutRect qgn_graf_sk_msk; |
7661 TRect rect; |
7689 TRect rect; |
7662 qgn_graf_sk_msk.LayoutRect( |
7690 qgn_graf_sk_msk.LayoutRect( |
7663 rect, |
7691 rect, |
7664 AknLayoutScalable_Avkon::control_pane_g4( 1 ).LayoutLine() ); |
7692 AknLayoutScalable_Avkon::control_pane_g4( graphicMSKVariety ).LayoutLine() ); |
7665 |
7693 |
7666 TSize iconSize( qgn_graf_sk_msk.Rect().Width(), |
7694 TSize iconSize( qgn_graf_sk_msk.Rect().Width(), |
7667 qgn_graf_sk_msk.Rect().Height() ); |
7695 qgn_graf_sk_msk.Rect().Height() ); |
7668 |
7696 |
7669 AknsUtils::CreateIconL( |
7697 AknsUtils::CreateIconL( |
7879 } |
7907 } |
7880 |
7908 |
7881 |
7909 |
7882 // --------------------------------------------------------------------------- |
7910 // --------------------------------------------------------------------------- |
7883 // CEikCba::CommandChangeAllowed |
7911 // CEikCba::CommandChangeAllowed |
7884 // |
|
7885 // --------------------------------------------------------------------------- |
7912 // --------------------------------------------------------------------------- |
7886 // |
7913 // |
7887 TBool CEikCba::CommandChangeAllowed() |
7914 TBool CEikCba::CommandChangeAllowed() const |
7888 { |
7915 { |
7889 if ( iFlags.IsSet( ECbaSingleClickEnabled ) |
7916 return ( !( iFlags.IsSet( ECbaSingleClickEnabled ) |
7890 && iFlags.IsSet( ECbaMultipleMarkingActive ) ) |
7917 && iFlags.IsSet( ECbaMultipleMarkingActive ) ) ); |
7891 { |
|
7892 return EFalse; |
|
7893 } |
|
7894 return ETrue; |
|
7895 } |
7918 } |
7896 |
7919 |
7897 |
7920 |
7898 // |
7921 // |
7899 // class CEikCbaButton |
7922 // class CEikCbaButton |