@@ -170,8 +170,7 @@ namespace ControlUnitTests
170
170
171
171
// The mouse location and buttons don't matter here.
172
172
interactivity->MouseWheel (modifiers,
173
- false ,
174
- 30 ,
173
+ Core::Point{ 30 , 0 },
175
174
Core::Point{ 0 , 0 },
176
175
buttonState);
177
176
}
@@ -189,8 +188,7 @@ namespace ControlUnitTests
189
188
190
189
// The mouse location and buttons don't matter here.
191
190
interactivity->MouseWheel (modifiers,
192
- false ,
193
- -30 ,
191
+ Core::Point{ -30 , 0 },
194
192
Core::Point{ 0 , 0 },
195
193
buttonState);
196
194
}
@@ -247,8 +245,7 @@ namespace ControlUnitTests
247
245
expectedTop = 20 ;
248
246
249
247
interactivity->MouseWheel (modifiers,
250
- false ,
251
- WHEEL_DELTA,
248
+ Core::Point{ WHEEL_DELTA, 0 },
252
249
Core::Point{ 0 , 0 },
253
250
buttonState);
254
251
@@ -257,21 +254,18 @@ namespace ControlUnitTests
257
254
{
258
255
expectedTop--;
259
256
interactivity->MouseWheel (modifiers,
260
- false ,
261
- WHEEL_DELTA,
257
+ Core::Point{ WHEEL_DELTA, 0 },
262
258
Core::Point{ 0 , 0 },
263
259
buttonState);
264
260
}
265
261
Log::Comment (L" Scrolling up more should do nothing" );
266
262
expectedTop = 0 ;
267
263
interactivity->MouseWheel (modifiers,
268
- false ,
269
- WHEEL_DELTA,
264
+ Core::Point{ WHEEL_DELTA, 0 },
270
265
Core::Point{ 0 , 0 },
271
266
buttonState);
272
267
interactivity->MouseWheel (modifiers,
273
- false ,
274
- WHEEL_DELTA,
268
+ Core::Point{ WHEEL_DELTA, 0 },
275
269
Core::Point{ 0 , 0 },
276
270
buttonState);
277
271
@@ -281,22 +275,19 @@ namespace ControlUnitTests
281
275
Log::Comment (NoThrowString ().Format (L" ---scroll down #%d---" , i));
282
276
expectedTop++;
283
277
interactivity->MouseWheel (modifiers,
284
- false ,
285
- -WHEEL_DELTA,
278
+ Core::Point{ -WHEEL_DELTA, 0 },
286
279
Core::Point{ 0 , 0 },
287
280
buttonState);
288
281
Log::Comment (NoThrowString ().Format (L" internal scrollbar pos:%f" , interactivity->_internalScrollbarPosition ));
289
282
}
290
283
Log::Comment (L" Scrolling down more should do nothing" );
291
284
expectedTop = 21 ;
292
285
interactivity->MouseWheel (modifiers,
293
- false ,
294
- -WHEEL_DELTA,
286
+ Core::Point{ -WHEEL_DELTA, 0 },
295
287
Core::Point{ 0 , 0 },
296
288
buttonState);
297
289
interactivity->MouseWheel (modifiers,
298
- false ,
299
- -WHEEL_DELTA,
290
+ Core::Point{ -WHEEL_DELTA, 0 },
300
291
Core::Point{ 0 , 0 },
301
292
buttonState);
302
293
}
@@ -453,8 +444,7 @@ namespace ControlUnitTests
453
444
454
445
Log::Comment (L" Scroll up a line, with the left mouse button selected" );
455
446
interactivity->MouseWheel (modifiers,
456
- false ,
457
- WHEEL_DELTA,
447
+ Core::Point{ WHEEL_DELTA, 0 },
458
448
cursorPosition1.to_core_point (),
459
449
leftMouseDown);
460
450
@@ -502,55 +492,55 @@ namespace ControlUnitTests
502
492
const Core::Point mousePos{ 0 , 0 };
503
493
Control::MouseButtonState state{};
504
494
505
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 1/5
495
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 1/5
506
496
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
507
497
508
498
Log::Comment (L" Scroll up 4 more times. Once we're at 3/5 scrolls, "
509
499
L" we'll round the internal scrollbar position to scrolling to the next row." );
510
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 2/5
500
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 2/5
511
501
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
512
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 3/5
502
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 3/5
513
503
VERIFY_ARE_EQUAL (20 , core->ScrollOffset ());
514
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 4/5
504
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 4/5
515
505
VERIFY_ARE_EQUAL (20 , core->ScrollOffset ());
516
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 5/5
506
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 5/5
517
507
VERIFY_ARE_EQUAL (20 , core->ScrollOffset ());
518
508
519
509
Log::Comment (L" Jump to line 5, so we can scroll down from there." );
520
510
interactivity->UpdateScrollbar (5 );
521
511
VERIFY_ARE_EQUAL (5 , core->ScrollOffset ());
522
512
Log::Comment (L" Scroll down 5 times, at which point we should accumulate a whole row of delta." );
523
- interactivity->MouseWheel (modifiers, false , -delta, mousePos, state); // 1/5
513
+ interactivity->MouseWheel (modifiers, Core::Point{ -delta, 0 } , mousePos, state); // 1/5
524
514
VERIFY_ARE_EQUAL (5 , core->ScrollOffset ());
525
- interactivity->MouseWheel (modifiers, false , -delta, mousePos, state); // 2/5
515
+ interactivity->MouseWheel (modifiers, Core::Point{ -delta, 0 } , mousePos, state); // 2/5
526
516
VERIFY_ARE_EQUAL (5 , core->ScrollOffset ());
527
- interactivity->MouseWheel (modifiers, false , -delta, mousePos, state); // 3/5
517
+ interactivity->MouseWheel (modifiers, Core::Point{ -delta, 0 } , mousePos, state); // 3/5
528
518
VERIFY_ARE_EQUAL (6 , core->ScrollOffset ());
529
- interactivity->MouseWheel (modifiers, false , -delta, mousePos, state); // 4/5
519
+ interactivity->MouseWheel (modifiers, Core::Point{ -delta, 0 } , mousePos, state); // 4/5
530
520
VERIFY_ARE_EQUAL (6 , core->ScrollOffset ());
531
- interactivity->MouseWheel (modifiers, false , -delta, mousePos, state); // 5/5
521
+ interactivity->MouseWheel (modifiers, Core::Point{ -delta, 0 } , mousePos, state); // 5/5
532
522
VERIFY_ARE_EQUAL (6 , core->ScrollOffset ());
533
523
534
524
Log::Comment (L" Jump to the bottom." );
535
525
interactivity->UpdateScrollbar (21 );
536
526
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
537
527
Log::Comment (L" Scroll a bit, then emit a line of text. We should reset our internal scroll position." );
538
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 1/5
528
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 1/5
539
529
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
540
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 2/5
530
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 2/5
541
531
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
542
532
543
533
conn->WriteInput (winrt_wstring_to_array_view (L" Foo\r\n " ));
544
534
VERIFY_ARE_EQUAL (22 , core->ScrollOffset ());
545
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 1/5
535
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 1/5
546
536
VERIFY_ARE_EQUAL (22 , core->ScrollOffset ());
547
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 2/5
537
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 2/5
548
538
VERIFY_ARE_EQUAL (22 , core->ScrollOffset ());
549
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 3/5
539
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 3/5
550
540
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
551
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 4/5
541
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 4/5
552
542
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
553
- interactivity->MouseWheel (modifiers, false , delta, mousePos, state); // 5/5
543
+ interactivity->MouseWheel (modifiers, Core::Point{ delta, 0 } , mousePos, state); // 5/5
554
544
VERIFY_ARE_EQUAL (21 , core->ScrollOffset ());
555
545
}
556
546
@@ -719,8 +709,7 @@ namespace ControlUnitTests
719
709
{
720
710
expectedTop--;
721
711
interactivity->MouseWheel (modifiers,
722
- false ,
723
- WHEEL_DELTA,
712
+ Core::Point{ WHEEL_DELTA, 0 },
724
713
Core::Point{ 0 , 0 },
725
714
noMouseDown);
726
715
}
0 commit comments