Skip to content

Commit

Permalink
Applying some of the changes that came out of the API review meetings: (
Browse files Browse the repository at this point in the history
#200)

- Renaming enumerations
    ScrollerScrollMode --> ScrollMode
    ScrollerZoomMode --> ZoomMode
    ScrollerChainingMode --> ChainingMode
    ScrollerRailingMode --> RailingMode
    ScrollerInputKind --> InputKind
- Removing the ScrollMode.Auto enum value and make ScrollMode.Enabled the new default. I am preserving the old code with #ifdef USE_SCROLLMODE_AUTO since the Auto value may be re-introduced later.
  • Loading branch information
RBrid authored Jan 22, 2019
1 parent 0e052f1 commit 3d47b60
Show file tree
Hide file tree
Showing 42 changed files with 670 additions and 616 deletions.
18 changes: 9 additions & 9 deletions dev/Generated/ScrollBar2.properties.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
Expand Down Expand Up @@ -120,10 +120,10 @@ void ScrollBar2Properties::EnsureProperties()
s_ScrollModeProperty =
InitializeDependencyProperty(
L"ScrollMode",
winrt::name_of<winrt::ScrollerScrollMode>(),
winrt::name_of<winrt::ScrollMode>(),
winrt::name_of<winrt::ScrollBar2>(),
false /* isAttached */,
ValueHelper<winrt::ScrollerScrollMode>::BoxValueIfNecessary(ScrollBar2::s_defaultScrollMode),
ValueHelper<winrt::ScrollMode>::BoxValueIfNecessary(ScrollBar2::s_defaultScrollMode),
&OnPropertyChanged_ValidateScrollMode);
}
if (!s_SmallChangeProperty)
Expand Down Expand Up @@ -178,12 +178,12 @@ void ScrollBar2Properties::OnPropertyChanged_ValidateScrollMode(
{
auto owner = sender.as<winrt::ScrollBar2>();

auto value = winrt::unbox_value<winrt::ScrollerScrollMode>(args.NewValue());
auto value = winrt::unbox_value<winrt::ScrollMode>(args.NewValue());
auto coercedValue = value;
winrt::get_self<ScrollBar2>(owner)->ValidateScrollMode(coercedValue);
if (value != coercedValue)
{
sender.SetValue(args.Property(), winrt::box_value<winrt::ScrollerScrollMode>(coercedValue));
sender.SetValue(args.Property(), winrt::box_value<winrt::ScrollMode>(coercedValue));
return;
}

Expand Down Expand Up @@ -270,15 +270,15 @@ winrt::Style ScrollBar2Properties::ScrollBarStyle()
return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<ScrollBar2*>(this)->GetValue(s_ScrollBarStyleProperty));
}

void ScrollBar2Properties::ScrollMode(winrt::ScrollerScrollMode const& value)
void ScrollBar2Properties::ScrollMode(winrt::ScrollMode const& value)
{
static_cast<ScrollBar2*>(this)->ValidateScrollMode(value);
static_cast<ScrollBar2*>(this)->SetValue(s_ScrollModeProperty, ValueHelper<winrt::ScrollerScrollMode>::BoxValueIfNecessary(value));
static_cast<ScrollBar2*>(this)->SetValue(s_ScrollModeProperty, ValueHelper<winrt::ScrollMode>::BoxValueIfNecessary(value));
}

winrt::ScrollerScrollMode ScrollBar2Properties::ScrollMode()
winrt::ScrollMode ScrollBar2Properties::ScrollMode()
{
return ValueHelper<winrt::ScrollerScrollMode>::CastOrUnbox(static_cast<ScrollBar2*>(this)->GetValue(s_ScrollModeProperty));
return ValueHelper<winrt::ScrollMode>::CastOrUnbox(static_cast<ScrollBar2*>(this)->GetValue(s_ScrollModeProperty));
}

void ScrollBar2Properties::SmallChange(double value)
Expand Down
6 changes: 3 additions & 3 deletions dev/Generated/ScrollBar2.properties.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
Expand Down Expand Up @@ -33,8 +33,8 @@ class ScrollBar2Properties
void ScrollBarStyle(winrt::Style const& value);
winrt::Style ScrollBarStyle();

void ScrollMode(winrt::ScrollerScrollMode const& value);
winrt::ScrollerScrollMode ScrollMode();
void ScrollMode(winrt::ScrollMode const& value);
winrt::ScrollMode ScrollMode();

void SmallChange(double value);
double SmallChange();
Expand Down
132 changes: 66 additions & 66 deletions dev/Generated/ScrollViewer.properties.cpp

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions dev/Generated/ScrollViewer.properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class ScrollViewerProperties
public:
ScrollViewerProperties();

void ComputedHorizontalScrollMode(winrt::ScrollerScrollMode const& value);
winrt::ScrollerScrollMode ComputedHorizontalScrollMode();
void ComputedHorizontalScrollMode(winrt::ScrollMode const& value);
winrt::ScrollMode ComputedHorizontalScrollMode();

void ComputedVerticalScrollMode(winrt::ScrollerScrollMode const& value);
winrt::ScrollerScrollMode ComputedVerticalScrollMode();
void ComputedVerticalScrollMode(winrt::ScrollMode const& value);
winrt::ScrollMode ComputedVerticalScrollMode();

void Content(winrt::UIElement const& value);
winrt::UIElement Content();
Expand All @@ -24,20 +24,20 @@ class ScrollViewerProperties
void HorizontalScrollBarVisibility(winrt::ScrollBarVisibility const& value);
winrt::ScrollBarVisibility HorizontalScrollBarVisibility();

void HorizontalScrollChainingMode(winrt::ScrollerChainingMode const& value);
winrt::ScrollerChainingMode HorizontalScrollChainingMode();
void HorizontalScrollChainingMode(winrt::ChainingMode const& value);
winrt::ChainingMode HorizontalScrollChainingMode();

void HorizontalScrollController(winrt::IScrollController const& value);
winrt::IScrollController HorizontalScrollController();

void HorizontalScrollMode(winrt::ScrollerScrollMode const& value);
winrt::ScrollerScrollMode HorizontalScrollMode();
void HorizontalScrollMode(winrt::ScrollMode const& value);
winrt::ScrollMode HorizontalScrollMode();

void HorizontalScrollRailingMode(winrt::ScrollerRailingMode const& value);
winrt::ScrollerRailingMode HorizontalScrollRailingMode();
void HorizontalScrollRailingMode(winrt::RailingMode const& value);
winrt::RailingMode HorizontalScrollRailingMode();

void InputKind(winrt::ScrollerInputKind const& value);
winrt::ScrollerInputKind InputKind();
void InputKind(winrt::InputKind const& value);
winrt::InputKind InputKind();

void IsAnchoredAtHorizontalExtent(bool value);
bool IsAnchoredAtHorizontalExtent();
Expand All @@ -63,23 +63,23 @@ class ScrollViewerProperties
void VerticalScrollBarVisibility(winrt::ScrollBarVisibility const& value);
winrt::ScrollBarVisibility VerticalScrollBarVisibility();

void VerticalScrollChainingMode(winrt::ScrollerChainingMode const& value);
winrt::ScrollerChainingMode VerticalScrollChainingMode();
void VerticalScrollChainingMode(winrt::ChainingMode const& value);
winrt::ChainingMode VerticalScrollChainingMode();

void VerticalScrollController(winrt::IScrollController const& value);
winrt::IScrollController VerticalScrollController();

void VerticalScrollMode(winrt::ScrollerScrollMode const& value);
winrt::ScrollerScrollMode VerticalScrollMode();
void VerticalScrollMode(winrt::ScrollMode const& value);
winrt::ScrollMode VerticalScrollMode();

void VerticalScrollRailingMode(winrt::ScrollerRailingMode const& value);
winrt::ScrollerRailingMode VerticalScrollRailingMode();
void VerticalScrollRailingMode(winrt::RailingMode const& value);
winrt::RailingMode VerticalScrollRailingMode();

void ZoomChainingMode(winrt::ScrollerChainingMode const& value);
winrt::ScrollerChainingMode ZoomChainingMode();
void ZoomChainingMode(winrt::ChainingMode const& value);
winrt::ChainingMode ZoomChainingMode();

void ZoomMode(winrt::ScrollerZoomMode const& value);
winrt::ScrollerZoomMode ZoomMode();
void ZoomMode(winrt::ZoomMode const& value);
winrt::ZoomMode ZoomMode();

static winrt::DependencyProperty ComputedHorizontalScrollModeProperty() { return s_ComputedHorizontalScrollModeProperty; }
static winrt::DependencyProperty ComputedVerticalScrollModeProperty() { return s_ComputedVerticalScrollModeProperty; }
Expand Down
Loading

0 comments on commit 3d47b60

Please sign in to comment.