equal
deleted
inserted
replaced
513 TInt CEikScrollBarExtension::ScrollBarType() |
513 TInt CEikScrollBarExtension::ScrollBarType() |
514 { |
514 { |
515 return CEikScrollBar::EArrowHead; |
515 return CEikScrollBar::EArrowHead; |
516 } |
516 } |
517 |
517 |
518 void CEikScrollBarExtension::CreateButtonL(CAknScrollButton*& /*aButton*/,CAknScrollButton::TType /*aType*/) |
|
519 { |
|
520 } |
|
521 |
518 |
522 void CEikScrollBarExtension::DoSetModel(const TEikScrollBarModel* aModel) |
519 void CEikScrollBarExtension::DoSetModel(const TEikScrollBarModel* aModel) |
523 { |
520 { |
524 iParent->iModel=(*aModel); |
521 iParent->iModel=(*aModel); |
525 iParent->iModel.CheckBounds(); |
522 iParent->iModel.CheckBounds(); |
704 } |
701 } |
705 |
702 |
706 if (aWindowOwning) |
703 if (aWindowOwning) |
707 { |
704 { |
708 CreateWindowL(aParent); |
705 CreateWindowL(aParent); |
709 if ( CAknEnv::Static()->TransparencyEnabled() ) |
706 EnableWindowTransparency(); |
710 { |
707 Window().SetPointerGrab( ETrue ); |
711 Window().SetRequiredDisplayMode( EColor16MA ); |
708 EnableDragEvents(); |
712 if ( Window().SetTransparencyAlphaChannel() == KErrNone ) |
|
713 { |
|
714 Window().SetBackgroundColor( ~0 ); |
|
715 } |
|
716 } |
|
717 } |
709 } |
718 else if(aParent) |
710 else if(aParent) |
719 { |
711 { |
720 SetContainerWindowL(*aParent); |
712 SetContainerWindowL(*aParent); |
721 } |
713 } |
729 else |
721 else |
730 SetObserver(NULL); |
722 SetObserver(NULL); |
731 |
723 |
732 iOrientation=aOrientation; |
724 iOrientation=aOrientation; |
733 CreateRequiredComponentsL(); |
725 CreateRequiredComponentsL(); |
734 |
|
735 if (aWindowOwning) |
|
736 { |
|
737 Window().SetPointerGrab(ETrue); |
|
738 EnableDragEvents(); |
|
739 if (extension->iScrollIndicator) |
|
740 extension->iScrollIndicator->SetAsWindowOwning(ETrue); |
|
741 |
|
742 |
|
743 // By default set background to transparent |
|
744 SetTransparentBackground(ETrue); |
|
745 } |
|
746 |
726 |
747 SetComponentsToInheritVisibility(ETrue); |
727 SetComponentsToInheritVisibility(ETrue); |
748 MakeVisible(EFalse); |
728 MakeVisible(EFalse); |
749 ActivateL(); |
729 ActivateL(); |
750 } |
730 } |
1088 if(aPointerEvent.iType == TPointerEvent::EButton1Down ) |
1068 if(aPointerEvent.iType == TPointerEvent::EButton1Down ) |
1089 { |
1069 { |
1090 indicator->SetBackgroudHighlight( ETrue ); |
1070 indicator->SetBackgroudHighlight( ETrue ); |
1091 |
1071 |
1092 extension->iPointerDownPosition = position; |
1072 extension->iPointerDownPosition = position; |
1093 |
1073 |
1094 if(iButtons.iIncreaseNudge && |
1074 if(iButtons.iIncreaseNudge && |
1095 iButtons.iIncreaseNudge->Rect().Contains(aPointerEvent.iPosition)) |
1075 iButtons.iIncreaseNudge->Rect().Contains(aPointerEvent.iPosition)) |
1096 { |
1076 { |
1097 extension->iPointerDownOn = CEikScrollBar::EIncreaseNudgeButton; |
1077 extension->iPointerDownOn = CEikScrollBar::EIncreaseNudgeButton; |
1098 } |
1078 } |
1734 TInt CAknDoubleSpanScrollBarExtension::ScrollBarType() |
1714 TInt CAknDoubleSpanScrollBarExtension::ScrollBarType() |
1735 { |
1715 { |
1736 return CEikScrollBarFrame::EDoubleSpan; |
1716 return CEikScrollBarFrame::EDoubleSpan; |
1737 } |
1717 } |
1738 |
1718 |
1739 void CAknDoubleSpanScrollBarExtension::CreateButtonL(CAknScrollButton*& /*aButton*/,CAknScrollButton::TType /*aType*/) |
|
1740 { |
|
1741 } |
|
1742 |
1719 |
1743 void CAknDoubleSpanScrollBarExtension::DoSetModel(const TEikScrollBarModel* aModel) |
1720 void CAknDoubleSpanScrollBarExtension::DoSetModel(const TEikScrollBarModel* aModel) |
1744 { |
1721 { |
1745 iParent->iModel=(*aModel); |
1722 iParent->iModel=(*aModel); |
1746 if (iScrollIndicator) |
1723 if (iScrollIndicator) |
1768 aModel->iThumbSpan, |
1745 aModel->iThumbSpan, |
1769 0, |
1746 0, |
1770 0); |
1747 0); |
1771 } |
1748 } |
1772 |
1749 |
1773 if (iParent->OwnsWindow() && iScrollIndicator->TransparentBackground()) |
|
1774 { |
|
1775 iParent->Window().HandleTransparencyUpdate(); |
|
1776 } |
|
1777 if(iScrollIndicator->IsVisible()) |
1750 if(iScrollIndicator->IsVisible()) |
1778 { |
1751 { |
1779 if(iScrollIndicator->DrawBackgroundState() && !iParent->OwnsWindow()) |
1752 if(iScrollIndicator->DrawBackgroundState() && !iParent->OwnsWindow()) |
1780 { |
1753 { |
1781 if(HasModelChanged(aModel)) |
1754 if(HasModelChanged(aModel)) |
1902 { |
1875 { |
1903 iScrollIndicator = CAknDoubleSpanScrollIndicator::NewL( iParent->iOrientation ); |
1876 iScrollIndicator = CAknDoubleSpanScrollIndicator::NewL( iParent->iOrientation ); |
1904 iScrollIndicator->SetContainerWindowL( *iParent ); |
1877 iScrollIndicator->SetContainerWindowL( *iParent ); |
1905 iScrollIndicator->SetRect( iParent->Rect() ); |
1878 iScrollIndicator->SetRect( iParent->Rect() ); |
1906 iScrollIndicator->SetComponentsToInheritVisibility(ETrue); |
1879 iScrollIndicator->SetComponentsToInheritVisibility(ETrue); |
|
1880 iScrollIndicator->SetAsWindowOwning( iParent->OwnsWindow() ); |
1907 } |
1881 } |
1908 |
1882 |
1909 if ( AknLayoutUtils::PenEnabled() && |
1883 if ( AknLayoutUtils::PenEnabled() && |
1910 ( iScrollBarFlags & CEikScrollBar::EEnableNudgeButtons ) ) |
1884 ( iScrollBarFlags & CEikScrollBar::EEnableNudgeButtons ) ) |
1911 { |
1885 { |