javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp
branchRCL_3
changeset 24 0fd27995241b
parent 19 04becd199f91
child 25 9ac0a0a7da70
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
   255     }
   255     }
   256     else
   256     else
   257     {
   257     {
   258         iBgColorIsCustom = EFalse;
   258         iBgColorIsCustom = EFalse;
   259     }
   259     }
   260     
   260 
   261     Redraw();
   261     Redraw();
   262 }
   262 }
   263 
   263 
   264 // ---------------------------------------------------------------------------------------------
   264 // ---------------------------------------------------------------------------------------------
   265 // CSwtDateEditor::SetForegroundL
   265 // CSwtDateEditor::SetForegroundL
   266 // ---------------------------------------------------------------------------------------------
   266 // ---------------------------------------------------------------------------------------------
   267 //
   267 //
   268 void CSwtDateEditor::SetForegroundL(const MSwtColor* aColor)
   268 void CSwtDateEditor::SetForegroundL(const MSwtColor* aColor)
   269 {
   269 {
   270     ASwtControlBase::DoSetForegroundL(aColor);
   270     ASwtControlBase::DoSetForegroundL(aColor);
   271     
   271 
   272     TRgb color((aColor) ? aColor->RgbValue() : iEikonEnv->Color(EColorControlText));
   272     TRgb color((aColor) ? aColor->RgbValue() : iEikonEnv->Color(EColorControlText));
   273     iEditor->OverrideColorL(EColorControlText, color);
   273     iEditor->OverrideColorL(EColorControlText, color);
   274 
   274 
   275     // If a back color has been set, cannot go back to skin colors yet.
   275     // If a back color has been set, cannot go back to skin colors yet.
   276     if (!iBgColorIsCustom)
   276     if (!iBgColorIsCustom)
   291     }
   291     }
   292     else
   292     else
   293     {
   293     {
   294         iFgColorIsCustom = EFalse;
   294         iFgColorIsCustom = EFalse;
   295     }
   295     }
   296     
   296 
   297     Redraw();
   297     Redraw();
   298 }
   298 }
   299 
   299 
   300 // ---------------------------------------------------------------------------------------------
   300 // ---------------------------------------------------------------------------------------------
   301 // CSwtDateEditor::OfferKeyEventL
   301 // CSwtDateEditor::OfferKeyEventL
  1105 //
  1105 //
  1106 #if defined( RD_SCALABLE_UI_V2 )
  1106 #if defined( RD_SCALABLE_UI_V2 )
  1107 void CSwtDateEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent)
  1107 void CSwtDateEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent)
  1108 {
  1108 {
  1109     TBool hit = ETrue;
  1109     TBool hit = ETrue;
  1110     
  1110 
  1111 #ifdef RD_JAVA_S60_RELEASE_9_2
  1111 #ifdef RD_JAVA_S60_RELEASE_9_2
  1112     TBool pressed = iPressed;
  1112     TBool pressed = iPressed;
  1113     hit = Rect().Contains(aPointerEvent.iPosition);
  1113     hit = Rect().Contains(aPointerEvent.iPosition);
  1114 
  1114 
  1115     if (aPointerEvent.iType == TPointerEvent::EButton1Down)
  1115     if (aPointerEvent.iType == TPointerEvent::EButton1Down)
  1117     else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
  1117     else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
  1118         iPressed = EFalse;
  1118         iPressed = EFalse;
  1119     else if (aPointerEvent.iType == TPointerEvent::EDrag)
  1119     else if (aPointerEvent.iType == TPointerEvent::EDrag)
  1120         iPressed = hit;
  1120         iPressed = hit;
  1121 #endif
  1121 #endif
  1122     
  1122 
  1123     if (!(aPointerEvent.iType == TPointerEvent::EButton1Up 
  1123     if (!(aPointerEvent.iType == TPointerEvent::EButton1Up
  1124         && (iDisplay.RevertPointerEvent() || !hit)))
  1124             && (iDisplay.RevertPointerEvent() || !hit)))
  1125     {
  1125     {
  1126         iEditor->HandlePointerEventL(aPointerEvent);
  1126         iEditor->HandlePointerEventL(aPointerEvent);
  1127 
  1127 
  1128         //MSK label update may be needed.
  1128         //MSK label update may be needed.
  1129         if (AknLayoutUtils::MSKEnabled())
  1129         if (AknLayoutUtils::MSKEnabled())
  1139 
  1139 
  1140     //Selected field might changed
  1140     //Selected field might changed
  1141     iCurrentFieldLength = 0;
  1141     iCurrentFieldLength = 0;
  1142     iCurrentFieldDecimalPlacesCount = 0;
  1142     iCurrentFieldDecimalPlacesCount = 0;
  1143     iLastField = iEditor->CurrentField();
  1143     iLastField = iEditor->CurrentField();
  1144     
  1144 
  1145 #ifdef RD_JAVA_S60_RELEASE_9_2
  1145 #ifdef RD_JAVA_S60_RELEASE_9_2
  1146     if (pressed != iPressed)
  1146     if (pressed != iPressed)
  1147         Redraw();
  1147         Redraw();
  1148 #endif
  1148 #endif
  1149 }
  1149 }