textinput/peninputcommonctrls/src/peninputdropdownlist/peninputdropdownlist.cpp
branchRCL_3
changeset 5 a47de9135b21
parent 0 eb1f2e154e89
child 11 c8fb4cf7b3ae
equal deleted inserted replaced
3:f5a1e66df979 5:a47de9135b21
   506 	        
   506 	        
   507         case EListExpandableMultiRowWithoutIcon:
   507         case EListExpandableMultiRowWithoutIcon:
   508             {
   508             {
   509             ChangeActiveList(iListManager->ListExpandableMultiRowWithoutIcon());
   509             ChangeActiveList(iListManager->ListExpandableMultiRowWithoutIcon());
   510             }
   510             }
   511             break;            
   511             break;
       
   512         case EListExpandableMultiRowWithoutIconWithBubble:
       
   513         	{
       
   514         	ChangeActiveList(iListManager->ListMultiRowWithoutIconWithBubble());
       
   515         	}  
       
   516         	break;                
   512 	    default:
   517 	    default:
   513 	    	__ASSERT_DEBUG( EFalse, 
   518 	    	__ASSERT_DEBUG( EFalse, 
   514 	    			User::Panic( _L("TListType Error::SizeChanged()"), 0 ) );
   519 	    			User::Panic( _L("TListType Error::SizeChanged()"), 0 ) );
   515 	    	break;
   520 	    	break;
   516 		}
   521 		}
   671 	        
   676 	        
   672 		case EListExpandableMultiRowWithoutIcon:
   677 		case EListExpandableMultiRowWithoutIcon:
   673 		    {
   678 		    {
   674             ChangeActiveList( iListManager->ListExpandableMultiRowWithoutIcon() );
   679             ChangeActiveList( iListManager->ListExpandableMultiRowWithoutIcon() );
   675 		    }
   680 		    }
   676             break;        
   681             break;
       
   682             
       
   683         case EListExpandableMultiRowWithoutIconWithBubble:
       
   684       	    {
       
   685       	    ChangeActiveList(iListManager->ListMultiRowWithoutIconWithBubble());
       
   686       	    }  
       
   687       	    break;
       
   688         	                
   677 	    default:
   689 	    default:
   678 	    	__ASSERT_DEBUG( EFalse, 
   690 	    	__ASSERT_DEBUG( EFalse, 
   679 	    			User::Panic( _L("TListType Error::SetCandidatesL()"), 0 ) );
   691 	    			User::Panic( _L("TListType Error::SetCandidatesL()"), 0 ) );
   680 	    	break;
   692 	    	break;
   681 		}
   693 		}
   820 		    {
   832 		    {
   821             ChangeActiveList(iListManager->ListExpandableMultiRowWithoutIcon());
   833             ChangeActiveList(iListManager->ListExpandableMultiRowWithoutIcon());
   822             NotifyClosePage();		    
   834             NotifyClosePage();		    
   823 		    }
   835 		    }
   824 		    break;
   836 		    break;
       
   837 		    
       
   838 		case EListExpandableMultiRowWithoutIconWithBubble:
       
   839       	    {
       
   840       	    ChangeActiveList(iListManager->ListMultiRowWithoutIconWithBubble());
       
   841       	    NotifyClosePage();
       
   842       	    }  
       
   843       	  break;
   825 	    default:
   844 	    default:
   826 	    	__ASSERT_DEBUG( EFalse, 
   845 	    	__ASSERT_DEBUG( EFalse, 
   827 	    			User::Panic( _L("TListType Error::ResetAndClear()"), 0 ) );
   846 	    			User::Panic( _L("TListType Error::ResetAndClear()"), 0 ) );
   828 	    	break;
   847 	    	break;
   829 		}
   848 		}
  1229 			    break;
  1248 			    break;
  1230 			case EListExpandableMultiRowWithoutIcon:
  1249 			case EListExpandableMultiRowWithoutIcon:
  1231 			    {
  1250 			    {
  1232                 ChangeActiveList( iListManager->ListExpandableMultiRowWithoutIcon() );
  1251                 ChangeActiveList( iListManager->ListExpandableMultiRowWithoutIcon() );
  1233 			    }
  1252 			    }
  1234                 break;			    
  1253                 break;
       
  1254 			case EListExpandableMultiRowWithoutIconWithBubble:
       
  1255 			  	{
       
  1256 			  	ChangeActiveList(iListManager->ListMultiRowWithoutIconWithBubble());
       
  1257 			  	}
       
  1258 			  	break;
       
  1259         	            			    
  1235 		    default:
  1260 		    default:
  1236 		    	__ASSERT_DEBUG( EFalse, 
  1261 		    	__ASSERT_DEBUG( EFalse, 
  1237 		    			User::Panic( _L("TListType Error::SetFont()"), 0 ) );
  1262 		    			User::Panic( _L("TListType Error::SetFont()"), 0 ) );
  1238 		    	break;
  1263 		    	break;
  1239 			}
  1264 			}
  1678 		case EListExpandableRollWithIconWithBubble:
  1703 		case EListExpandableRollWithIconWithBubble:
  1679 		// end
  1704 		// end
  1680 	        EnableSecondary(EFalse);
  1705 	        EnableSecondary(EFalse);
  1681 	        break;
  1706 	        break;
  1682 		case EListExpandableMultiRowWithoutIcon:
  1707 		case EListExpandableMultiRowWithoutIcon:
       
  1708 		case EListExpandableMultiRowWithoutIconWithBubble:	
  1683 		    break;
  1709 		    break;
  1684 	    default:
  1710 	    default:
  1685 	    	__ASSERT_DEBUG( EFalse, 
  1711 	    	__ASSERT_DEBUG( EFalse, 
  1686 	    			User::Panic( _L("TListType Error::ChangeActiveList()"), 0 ) );
  1712 	    			User::Panic( _L("TListType Error::ChangeActiveList()"), 0 ) );
  1687 	    	break;
  1713 	    	break;
  1717 	     || ( ( ( beforeList == iListManager->ListExpandableMultiRowWithoutIcon() )
  1743 	     || ( ( ( beforeList == iListManager->ListExpandableMultiRowWithoutIcon() )
  1718 	     && ( aList != iListManager->ListExpandableMultiRowWithoutIcon() ) ) )
  1744 	     && ( aList != iListManager->ListExpandableMultiRowWithoutIcon() ) ) )
  1719 	     || ( ( ( beforeList == iListManager->ListMultiRowWithIconWithBubble() ))
  1745 	     || ( ( ( beforeList == iListManager->ListMultiRowWithIconWithBubble() ))
  1720 	     && (aList != iListManager->ListMultiRowWithIconWithBubble() ) )
  1746 	     && (aList != iListManager->ListMultiRowWithIconWithBubble() ) )
  1721 	     || ( ( ( beforeList == iListManager->ListMultiRowRollWithIconWithBubble() ))
  1747 	     || ( ( ( beforeList == iListManager->ListMultiRowRollWithIconWithBubble() ))
  1722 	     && (aList != iListManager->ListMultiRowRollWithIconWithBubble() ) ) )
  1748 	     && (aList != iListManager->ListMultiRowRollWithIconWithBubble() ) ) 
       
  1749 	     || ( ( ( beforeList == iListManager->ListMultiRowWithoutIconWithBubble() ))
       
  1750 	     && (aList != iListManager->ListMultiRowWithoutIconWithBubble() ) ))
  1723 		{
  1751 		{
  1724 	    rect.Shrink(TSize(0,-1));
  1752 	    rect.Shrink(TSize(0,-1));
  1725 	    RootControl()->ReDrawRect(rect);
  1753 	    RootControl()->ReDrawRect(rect);
  1726 	    Invalidate(rect,ETrue);			
  1754 	    Invalidate(rect,ETrue);			
  1727 		}
  1755 		}
  1917 				ChangeActiveList( iListManager->ListOneRowWithIconWithBubble(), aLastIndex );
  1945 				ChangeActiveList( iListManager->ListOneRowWithIconWithBubble(), aLastIndex );
  1918 				NotifyClosePage();
  1946 				NotifyClosePage();
  1919 				}
  1947 				}
  1920 		    }
  1948 		    }
  1921 		    break;
  1949 		    break;
  1922         case EListExpandableMultiRowWithoutIcon:
  1950 		case EListExpandableMultiRowWithoutIcon:
  1923             break;              
  1951 		case EListExpandableMultiRowWithoutIconWithBubble:	
       
  1952 			break;              
  1924 		case EListNoExpandable:
  1953 		case EListNoExpandable:
  1925 		case EListNoExpandableWithBubble:
  1954 		case EListNoExpandableWithBubble:
  1926 			break;
  1955 			break;
  1927 	    default:
  1956 	    default:
  1928 	    	__ASSERT_DEBUG( EFalse, 
  1957 	    	__ASSERT_DEBUG( EFalse, 
  2078 	iListManager->ListMultiRowRollWithIcon()->SetDropdownListImgID(aDropdownListDrawInfo);
  2107 	iListManager->ListMultiRowRollWithIcon()->SetDropdownListImgID(aDropdownListDrawInfo);
  2079 	
  2108 	
  2080 	iListManager->ListMultiRowRollWithIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo);
  2109 	iListManager->ListMultiRowRollWithIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo);
  2081 	
  2110 	
  2082 	iListManager->ListExpandableMultiRowWithoutIcon()->SetDropdownListImgID(aDropdownListDrawInfo);
  2111 	iListManager->ListExpandableMultiRowWithoutIcon()->SetDropdownListImgID(aDropdownListDrawInfo);
       
  2112 	iListManager->ListMultiRowWithoutIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo);
  2083 	}
  2113 	}
  2084 
  2114 
  2085 CFepUiLayout* CFepCtrlDropdownList::UiLayout()
  2115 CFepUiLayout* CFepCtrlDropdownList::UiLayout()
  2086     {
  2116     {
  2087     return CFepUiBaseCtrl::UiLayout();
  2117     return CFepUiBaseCtrl::UiLayout();
  2231             rect.iBr.iX = x2;                 
  2261             rect.iBr.iX = x2;                 
  2232             }
  2262             }
  2233         
  2263         
  2234         rect.iTl.iY = iBubbleVerticalMargin + aRect.iTl.iY - 
  2264         rect.iTl.iY = iBubbleVerticalMargin + aRect.iTl.iY - 
  2235                       iBubbleSize.iHeight;
  2265                       iBubbleSize.iHeight;
  2236         rect.iBr.iY = iBubbleVerticalMargin + aRect.iTl.iY;
  2266         if ( rect.iTl.iY < 0 )
  2237 		
  2267         	{
  2238 		TRAP_IGNORE(iBubbleCtrl->SetTextL(aText));		
  2268         	rect.iTl.iY = iBubbleVerticalMargin;
  2239 	
  2269         	}
       
  2270         
       
  2271         rect.iBr.iY = rect.iTl.iY + iBubbleSize.iHeight;
       
  2272 		    
       
  2273         if((TBidiText::TextDirectionality(aText) == TBidiText:: ERightToLeft) && (aText.Length() > 1))
       
  2274           {
       
  2275           HBufC* displayStr = aText.AllocLC();
       
  2276          
       
  2277           TInt i = 0;
       
  2278           TInt charNum = displayStr->Length();
       
  2279          
       
  2280           while(i < charNum)
       
  2281               {
       
  2282               displayStr->Des()[i] = aText[(charNum-1)-i];
       
  2283               ++i;
       
  2284               }
       
  2285            TRAP_IGNORE(iBubbleCtrl->SetTextL(*displayStr));     
       
  2286            CleanupStack::PopAndDestroy(displayStr);
       
  2287           }
       
  2288        else
       
  2289           {
       
  2290           TRAP_IGNORE(iBubbleCtrl->SetTextL(aText));
       
  2291           }
       
  2292 	          
  2240         iBubbleCtrl->Popup(rect);
  2293         iBubbleCtrl->Popup(rect);
  2241         }
  2294         }
  2242     }
  2295     }
  2243 
  2296 
  2244 // -----------------------------------------------------------------------------
  2297 // -----------------------------------------------------------------------------