equal
deleted
inserted
replaced
1609 const TInt code=aKeyEvent.iCode; |
1609 const TInt code=aKeyEvent.iCode; |
1610 |
1610 |
1611 if ( !ConsumesUpAndDownKeys() && (code==EKeyDownArrow || code==EKeyUpArrow)) |
1611 if ( !ConsumesUpAndDownKeys() && (code==EKeyDownArrow || code==EKeyUpArrow)) |
1612 return EKeyWasNotConsumed; |
1612 return EKeyWasNotConsumed; |
1613 |
1613 |
1614 if ((aType==EEventKey) && (iCurrentField!=ENullIndex) && |
1614 if ((aType==EEventKey) && (iCurrentField!=ENullIndex) && iExtension && |
1615 ( aKeyEvent.iRepeats == 0 || code == EKeyLeftArrow || |
1615 ( aKeyEvent.iRepeats == 0 || code == EKeyLeftArrow || |
1616 code == EKeyRightArrow || code == EKeyDownArrow || code == EKeyUpArrow ) ) |
1616 code == EKeyRightArrow || code == EKeyDownArrow || code == EKeyUpArrow ) ) |
1617 { |
1617 { |
1618 iExtension->iHighlightAll = EFalse; |
1618 iExtension->iHighlightAll = EFalse; |
1619 const CFont& font=*Font(); |
1619 const CFont& font=*Font(); |
1739 EXPORT_C void CEikMfne::HandleInteraction(TBool aHandleDeHighlight, TInt aNewCurrentField, TInt aOldWidthInPixelsOfOldCurrentField, |
1739 EXPORT_C void CEikMfne::HandleInteraction(TBool aHandleDeHighlight, TInt aNewCurrentField, TInt aOldWidthInPixelsOfOldCurrentField, |
1740 CEikMfneField::THighlightType aOldHighlightTypeOfOldCurrentField, TBool& aDataAltered, TBool& aError) |
1740 CEikMfneField::THighlightType aOldHighlightTypeOfOldCurrentField, TBool& aDataAltered, TBool& aError) |
1741 { |
1741 { |
1742 const CFont& font=*Font(); |
1742 const CFont& font=*Font(); |
1743 TBool drawAllFields = ETrue; |
1743 TBool drawAllFields = ETrue; |
1744 if (aHandleDeHighlight) |
1744 if ( aHandleDeHighlight && iExtension ) |
1745 { |
1745 { |
1746 iFields[iCurrentField]->HandleDeHighlight(font, *iEikonEnv, aDataAltered, aError); |
1746 iFields[iCurrentField]->HandleDeHighlight(font, *iEikonEnv, aDataAltered, aError); |
1747 iExtension->iValidateValueCallBack.CallBack(); |
1747 iExtension->iValidateValueCallBack.CallBack(); |
1748 if (aError) |
1748 if (aError) |
1749 aNewCurrentField=iCurrentField; |
1749 aNewCurrentField=iCurrentField; |
1841 if ( err != KErrNone ) |
1841 if ( err != KErrNone ) |
1842 { |
1842 { |
1843 return; |
1843 return; |
1844 } |
1844 } |
1845 } |
1845 } |
1846 if ( aAlignment >= ELayoutAlignNone && iExtension ) |
1846 if ( aAlignment >= ELayoutAlignNone ) |
1847 { |
1847 { |
1848 iAlignment = aAlignment; |
1848 iAlignment = aAlignment; |
1849 TUint capabilities = iExtension-> |
1849 TUint capabilities = iExtension-> |
1850 iExtendedInputCapabilities->Capabilities(); |
1850 iExtendedInputCapabilities->Capabilities(); |
1851 capabilities &= |
1851 capabilities &= |
2437 TBool focused = IsFocused(); |
2437 TBool focused = IsFocused(); |
2438 for (TInt i=0; i<=aLastField; ++i) |
2438 for (TInt i=0; i<=aLastField; ++i) |
2439 { |
2439 { |
2440 if (i>=aFirstField) |
2440 if (i>=aFirstField) |
2441 { |
2441 { |
2442 if (focused && ( iExtension->iHighlightAll || ( i == iCurrentField |
2442 if (focused && iExtension && ( iExtension->iHighlightAll || ( i == iCurrentField |
2443 && iFields[i]->HighlightType() == CEikMfneField::EInverseVideo |
2443 && iFields[i]->HighlightType() == CEikMfneField::EInverseVideo |
2444 && iFields[i]->FieldText().Length() > 0 ) ) && !isEmpty ) |
2444 && iFields[i]->FieldText().Length() > 0 ) ) && !isEmpty ) |
2445 { |
2445 { |
2446 // Currently no skin effect for the highlighted field drawing |
2446 // Currently no skin effect for the highlighted field drawing |
2447 SetGcToInverseVideo(aGc); |
2447 SetGcToInverseVideo(aGc); |
2694 TPoint cursorPosition( 0, 0 ); |
2694 TPoint cursorPosition( 0, 0 ); |
2695 |
2695 |
2696 GetCursorInfo( cursorPosition, cursorHeight, cursorWidth, cursorAscent ); |
2696 GetCursorInfo( cursorPosition, cursorHeight, cursorWidth, cursorAscent ); |
2697 |
2697 |
2698 iEikonEnv->DrawCursor(this, cursorPosition, cursorWidth, cursorAscent, cursorHeight); |
2698 iEikonEnv->DrawCursor(this, cursorPosition, cursorWidth, cursorAscent, cursorHeight); |
2699 iExtension->iCursorShown = ETrue; |
2699 if ( iExtension ) |
|
2700 { |
|
2701 iExtension->iCursorShown = ETrue; |
|
2702 } |
2700 } |
2703 } |
2701 |
2704 |
2702 void CEikMfne::HideCursor() |
2705 void CEikMfne::HideCursor() |
2703 { |
2706 { |
2704 if ( iExtension->iCursorShown ) |
2707 if ( iExtension && iExtension->iCursorShown ) |
2705 { |
2708 { |
2706 iEikonEnv->HideCursor(this); |
2709 iEikonEnv->HideCursor(this); |
2707 iExtension->iCursorShown = EFalse; |
2710 iExtension->iCursorShown = EFalse; |
2708 } |
2711 } |
2709 } |
2712 } |
4575 } |
4578 } |
4576 |
4579 |
4577 EXPORT_C void CEikMfne::MakeVisible( TBool aVisible ) |
4580 EXPORT_C void CEikMfne::MakeVisible( TBool aVisible ) |
4578 { |
4581 { |
4579 CEikBorderedControl::MakeVisible( aVisible ); |
4582 CEikBorderedControl::MakeVisible( aVisible ); |
4580 if ( !aVisible && iExtension->iCursorShown ) |
4583 if ( !aVisible && iExtension && iExtension->iCursorShown ) |
4581 { |
4584 { |
4582 HideCursor(); |
4585 HideCursor(); |
4583 } |
4586 } |
4584 } |
4587 } |
4585 |
4588 |