OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 , unusedScrollDelta(0) { } | 186 , unusedScrollDelta(0) { } |
187 ScrollResultOneDimensional(bool didScroll, float unusedScrollDelta) | 187 ScrollResultOneDimensional(bool didScroll, float unusedScrollDelta) |
188 : didScroll(didScroll) | 188 : didScroll(didScroll) |
189 , unusedScrollDelta(unusedScrollDelta) { } | 189 , unusedScrollDelta(unusedScrollDelta) { } |
190 | 190 |
191 bool didScroll; | 191 bool didScroll; |
192 float unusedScrollDelta; | 192 float unusedScrollDelta; |
193 }; | 193 }; |
194 | 194 |
195 struct ScrollResult { | 195 struct ScrollResult { |
196 explicit ScrollResult(bool didScroll) | 196 explicit ScrollResult() |
197 : didScroll(didScroll) | 197 : didScrollX(false) |
| 198 , didScrollY(false) |
198 , unusedScrollDeltaX(0) | 199 , unusedScrollDeltaX(0) |
199 , unusedScrollDeltaY(0) { } | 200 , unusedScrollDeltaY(0) { } |
200 ScrollResult(bool didScroll, float unusedScrollDeltaX, float unusedScrollDel
taY) | 201 ScrollResult(bool didScrollX, bool didScrollY, float unusedScrollDeltaX, flo
at unusedScrollDeltaY) |
201 : didScroll(didScroll) | 202 : didScrollX(didScrollX) |
| 203 , didScrollY(didScrollY) |
202 , unusedScrollDeltaX(unusedScrollDeltaX) | 204 , unusedScrollDeltaX(unusedScrollDeltaX) |
203 , unusedScrollDeltaY(unusedScrollDeltaY) { } | 205 , unusedScrollDeltaY(unusedScrollDeltaY) { } |
204 | 206 |
205 bool didScroll; | 207 bool didScroll() { return didScrollX || didScrollY; } |
| 208 |
| 209 bool didScrollX; |
| 210 bool didScrollY; |
206 float unusedScrollDeltaX; | 211 float unusedScrollDeltaX; |
207 float unusedScrollDeltaY; | 212 float unusedScrollDeltaY; |
208 }; | 213 }; |
209 | 214 |
210 typedef unsigned ScrollbarControlPartMask; | 215 typedef unsigned ScrollbarControlPartMask; |
211 | 216 |
212 } | 217 } |
213 | 218 |
214 #endif | 219 #endif |
OLD | NEW |