javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp
changeset 23 98ccebc37403
parent 21 2a9601315dfc
child 34 71c436fe3ce0
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
   202         }
   202         }
   203         if (aSbFrame->ScrollBarExists(CEikScrollBar::EVertical)
   203         if (aSbFrame->ScrollBarExists(CEikScrollBar::EVertical)
   204                 && aSbFrame->ScrollBarVisibility(CEikScrollBar::EVertical)
   204                 && aSbFrame->ScrollBarVisibility(CEikScrollBar::EVertical)
   205                 != CEikScrollBarFrame::EOff)
   205                 != CEikScrollBarFrame::EOff)
   206         {
   206         {
       
   207             TInt breadth(0);
       
   208             if (iListObserver)
       
   209             {
       
   210                 breadth = iListObserver->Utils().ScrollBarBreadth(
       
   211                               aSbFrame->VerticalScrollBar());
       
   212             }
       
   213             else
       
   214             {
       
   215                 breadth = aSbFrame->ScrollBarBreadth(CEikScrollBar::EVertical);
       
   216             }
       
   217 
   207             if (!AknLayoutUtils::LayoutMirrored())
   218             if (!AknLayoutUtils::LayoutMirrored())
   208             {
   219             {
   209                 TInt breadth(0);
       
   210                 if (iListObserver)
       
   211                 {
       
   212                     breadth = iListObserver->Utils().ScrollBarBreadth(
       
   213                                   aSbFrame->VerticalScrollBar());
       
   214                 }
       
   215                 else
       
   216                 {
       
   217                     breadth = aSbFrame->ScrollBarBreadth(CEikScrollBar::EVertical);
       
   218                 }
       
   219                 clientRect.iBr.iX -= breadth;
   220                 clientRect.iBr.iX -= breadth;
       
   221             }
       
   222             else
       
   223             {
       
   224                 clientRect.iTl.iX += breadth;
   220             }
   225             }
   221         }
   226         }
   222     }
   227     }
   223 
   228 
   224     return clientRect;
   229     return clientRect;
   469     default:
   474     default:
   470         break;
   475         break;
   471     }
   476     }
   472 }
   477 }
   473 
   478 
       
   479 // ---------------------------------------------------------------------------
       
   480 // CSwtListBoxLists::EnableStretching
       
   481 // ---------------------------------------------------------------------------
       
   482 //
       
   483 void CSwtListBoxLists::EnableStretching(TInt aListType, CEikTextListBox* aList,
       
   484                                         TBool aEnabled)
       
   485 {
       
   486     ASSERT(IsListType(aListType));
       
   487 
       
   488     switch (aListType)
       
   489     {
       
   490     case ESwtLbDouble:
       
   491         STATIC_CAST(CSwtListBoxDouble*, aList)
       
   492         ->EnableStretching(aEnabled);
       
   493         break;
       
   494     case ESwtLbDoubleGraphic:
       
   495         STATIC_CAST(CSwtListBoxDoubleGraphic*, aList)
       
   496         ->EnableStretching(aEnabled);
       
   497         break;
       
   498     case ESwtLbDoubleLarge:
       
   499         STATIC_CAST(CSwtListBoxDoubleLarge*, aList)
       
   500         ->EnableStretching(aEnabled);
       
   501         break;
       
   502     default:
       
   503         // Other list types are not supported
       
   504         break;
       
   505     }
       
   506 }
   474 
   507 
   475 // The compiler does not automatically instantiate templates defined in other
   508 // The compiler does not automatically instantiate templates defined in other
   476 // files. Because of this, code written will often produce undefined symbol
   509 // files. Because of this, code written will often produce undefined symbol
   477 // errors when compiled with the compiler. You need to tell the compiler which
   510 // errors when compiled with the compiler. You need to tell the compiler which
   478 // template instances you want, by explicitly instantiating them in the file
   511 // template instances you want, by explicitly instantiating them in the file