| 374 | } |
| 375 | |
| 376 | void PiuScrollerScrollBy(PiuScroller* self, PiuCoordinate dx, PiuCoordinate dy) |
| 377 | { |
| 378 | PiuContent* content = (*self)->first; |
| 379 | if (content) { |
| 380 | PiuFlags flags = 0; |
| 381 | if (((*content)->coordinates.horizontal & piuLeftRightWidth) == piuLeftRight) dx = 0; |
| 382 | if (((*content)->coordinates.vertical & piuTopBottomHeight) == piuTopBottom) dy = 0; |
| 383 | if (dx || dy) { |
| 384 | if ((*self)->flags & (piuClip | piuLooping)) |
| 385 | PiuContentInvalidate(self, NULL); |
| 386 | else |
| 387 | PiuContentInvalidate(content, NULL); |
| 388 | if (dx) { |
| 389 | flags |= piuXChanged; |
| 390 | (*self)->delta.x += dx; |
| 391 | } |
| 392 | if (dy) { |
| 393 | flags |= piuYChanged; |
| 394 | (*self)->delta.y += dy; |
| 395 | } |
| 396 | if (flags) |
| 397 | PiuContentReflow(content, flags); |
| 398 | } |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | void PiuScrollerUpdate(void* it, PiuView* view, PiuRectangle area) |
| 403 | { |
no test coverage detected