OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 virtual int scrollbarMargin() const { return 0; } | 55 virtual int scrollbarMargin() const { return 0; } |
56 | 56 |
57 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba
rButtonsPlacementSingle; } | 57 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba
rButtonsPlacementSingle; } |
58 | 58 |
59 virtual bool supportsControlTints() const { return false; } | 59 virtual bool supportsControlTints() const { return false; } |
60 virtual bool usesOverlayScrollbars() const { return false; } | 60 virtual bool usesOverlayScrollbars() const { return false; } |
61 virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) { } | 61 virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) { } |
62 | 62 |
63 virtual bool invalidateOnMouseEnterExit() { return false; } | 63 virtual bool invalidateOnMouseEnterExit() { return false; } |
64 | 64 |
65 void invalidateParts(ScrollbarThemeClient* scrollbar, ScrollbarControlPartMa
sk mask) | |
66 { | |
67 if (mask & BackButtonStartPart) | |
68 invalidatePart(scrollbar, BackButtonStartPart); | |
69 if (mask & ForwardButtonStartPart) | |
70 invalidatePart(scrollbar, ForwardButtonStartPart); | |
71 if (mask & BackTrackPart) | |
72 invalidatePart(scrollbar, BackTrackPart); | |
73 if (mask & ThumbPart) | |
74 invalidatePart(scrollbar, ThumbPart); | |
75 if (mask & ForwardTrackPart) | |
76 invalidatePart(scrollbar, ForwardTrackPart); | |
77 if (mask & BackButtonEndPart) | |
78 invalidatePart(scrollbar, BackButtonEndPart); | |
79 if (mask & ForwardButtonEndPart) | |
80 invalidatePart(scrollbar, ForwardButtonEndPart); | |
81 } | |
82 | |
83 virtual void invalidatePart(ScrollbarThemeClient*, ScrollbarPart); | |
84 | |
85 virtual void paintScrollCorner(GraphicsContext*, const DisplayItemClientWrap
per&, const IntRect& cornerRect); | 65 virtual void paintScrollCorner(GraphicsContext*, const DisplayItemClientWrap
per&, const IntRect& cornerRect); |
86 virtual void paintTickmarks(GraphicsContext*, const ScrollbarThemeClient*, c
onst IntRect&) { } | 66 virtual void paintTickmarks(GraphicsContext*, const ScrollbarThemeClient*, c
onst IntRect&) { } |
87 | 67 |
88 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient*, const Platform
MouseEvent&); | 68 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient*, const Platform
MouseEvent&); |
89 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient*, const P
latformMouseEvent&); | 69 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient*, const P
latformMouseEvent&); |
90 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient*, c
onst PlatformMouseEvent&) { return false; } | 70 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient*, c
onst PlatformMouseEvent&) { return false; } |
91 | 71 |
92 // The position of the thumb relative to the track. | 72 // The position of the thumb relative to the track. |
93 virtual int thumbPosition(const ScrollbarThemeClient*); | 73 virtual int thumbPosition(const ScrollbarThemeClient*); |
94 // The length of the thumb along the axis of the scrollbar. | 74 // The length of the thumb along the axis of the scrollbar. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); | 118 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); |
139 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); | 119 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); |
140 | 120 |
141 private: | 121 private: |
142 static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
orrect theme subclass. | 122 static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
orrect theme subclass. |
143 static bool gMockScrollbarsEnabled; | 123 static bool gMockScrollbarsEnabled; |
144 }; | 124 }; |
145 | 125 |
146 } | 126 } |
147 #endif | 127 #endif |
OLD | NEW |