OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007-2009 Torch Mobile Inc. | 3 * Copyright (C) 2007-2009 Torch Mobile Inc. |
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 m_scrollbar->paint(&context, damageRect); | 657 m_scrollbar->paint(&context, damageRect); |
658 | 658 |
659 HDC localDC = hdc ? hdc : ::GetDC(m_popup); | 659 HDC localDC = hdc ? hdc : ::GetDC(m_popup); |
660 | 660 |
661 ::BitBlt(localDC, damageRect.x(), damageRect.y(), damageRect.width(), damage
Rect.height(), m_DC, damageRect.x(), damageRect.y(), SRCCOPY); | 661 ::BitBlt(localDC, damageRect.x(), damageRect.y(), damageRect.width(), damage
Rect.height(), m_DC, damageRect.x(), damageRect.y(), SRCCOPY); |
662 | 662 |
663 if (!hdc) | 663 if (!hdc) |
664 ::ReleaseDC(m_popup, localDC); | 664 ::ReleaseDC(m_popup, localDC); |
665 } | 665 } |
666 | 666 |
| 667 int PopupMenuWin::scrollSize(ScrollbarOrientation orientation) const |
| 668 { |
| 669 return ((orientation == VerticallScrollbar) && m_scrollbar) ? (m_scrollbar->
totalSize() - m_scrollbar->visibleSize()) : 0; |
| 670 } |
| 671 |
| 672 void PopupMenuWin::setScrollOffsetFromAnimation(const IntPoint& offset) |
| 673 { |
| 674 if (m_scrollbar) |
| 675 m_scrollbar->setValue(offset.y(), Scrollbar::FromScrollAnimator); |
| 676 } |
| 677 |
667 void PopupMenuWin::valueChanged(Scrollbar* scrollBar) | 678 void PopupMenuWin::valueChanged(Scrollbar* scrollBar) |
668 { | 679 { |
669 ASSERT(m_scrollbar); | 680 ASSERT(m_scrollbar); |
670 | 681 |
671 if (!m_popup) | 682 if (!m_popup) |
672 return; | 683 return; |
673 | 684 |
674 int offset = scrollBar->value(); | 685 int offset = scrollBar->value(); |
675 | 686 |
676 if (m_scrollOffset == offset) | 687 if (m_scrollOffset == offset) |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 break; | 1008 break; |
998 #endif | 1009 #endif |
999 default: | 1010 default: |
1000 lResult = DefWindowProc(hWnd, message, wParam, lParam); | 1011 lResult = DefWindowProc(hWnd, message, wParam, lParam); |
1001 } | 1012 } |
1002 | 1013 |
1003 return lResult; | 1014 return lResult; |
1004 } | 1015 } |
1005 | 1016 |
1006 } | 1017 } |
OLD | NEW |