Skip to content

Commit

Permalink
Renaming Scroller.Child to Scroller.Content (#212)
Browse files Browse the repository at this point in the history
* Scroller.Child renamed to Scroller.Content.

* Merging with master.
  • Loading branch information
RBrid authored Jan 22, 2019
1 parent df346a6 commit a34e01c
Show file tree
Hide file tree
Showing 35 changed files with 1,395 additions and 1,396 deletions.
2 changes: 1 addition & 1 deletion dev/Generated/MetadataSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ public MetadataSummary()
IncludedTypesMetadata["Scroller"] = true;
// Scroller -- NeedsPropChangedCallbackMetadata
NeedsPropChangedCallbackMetadata["Scroller.Background"] = true;
NeedsPropChangedCallbackMetadata["Scroller.Child"] = true;
NeedsPropChangedCallbackMetadata["Scroller.ComputedHorizontalScrollMode"] = true;
NeedsPropChangedCallbackMetadata["Scroller.ComputedVerticalScrollMode"] = true;
NeedsPropChangedCallbackMetadata["Scroller.Content"] = true;
NeedsPropChangedCallbackMetadata["Scroller.HorizontalAnchorRatio"] = true;
PropValidationCallbackMetadata["Scroller.HorizontalAnchorRatio"] = "ValidateAnchorRatio";
NeedsPropChangedCallbackMetadata["Scroller.HorizontalScrollChainingMode"] = true;
Expand Down
46 changes: 23 additions & 23 deletions dev/Generated/Scroller.properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
CppWinRTActivatableClassWithDPFactory(Scroller)

GlobalDependencyProperty ScrollerProperties::s_BackgroundProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_ChildProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_ComputedHorizontalScrollModeProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_ComputedVerticalScrollModeProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_ContentProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_HorizontalAnchorRatioProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_HorizontalScrollChainingModeProperty{ nullptr };
GlobalDependencyProperty ScrollerProperties::s_HorizontalScrollModeProperty{ nullptr };
Expand Down Expand Up @@ -56,17 +56,6 @@ void ScrollerProperties::EnsureProperties()
ValueHelper<winrt::Brush>::BoxedDefaultValue(),
winrt::PropertyChangedCallback(&OnPropertyChanged));
}
if (!s_ChildProperty)
{
s_ChildProperty =
InitializeDependencyProperty(
L"Child",
winrt::name_of<winrt::UIElement>(),
winrt::name_of<winrt::Scroller>(),
false /* isAttached */,
ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
winrt::PropertyChangedCallback(&OnPropertyChanged));
}
if (!s_ComputedHorizontalScrollModeProperty)
{
s_ComputedHorizontalScrollModeProperty =
Expand All @@ -89,6 +78,17 @@ void ScrollerProperties::EnsureProperties()
ValueHelper<winrt::ScrollMode>::BoxValueIfNecessary(Scroller::s_defaultComputedVerticalScrollMode),
winrt::PropertyChangedCallback(&OnPropertyChanged));
}
if (!s_ContentProperty)
{
s_ContentProperty =
InitializeDependencyProperty(
L"Content",
winrt::name_of<winrt::UIElement>(),
winrt::name_of<winrt::Scroller>(),
false /* isAttached */,
ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
winrt::PropertyChangedCallback(&OnPropertyChanged));
}
if (!s_HorizontalAnchorRatioProperty)
{
s_HorizontalAnchorRatioProperty =
Expand Down Expand Up @@ -281,9 +281,9 @@ void ScrollerProperties::EnsureProperties()
void ScrollerProperties::ClearProperties()
{
s_BackgroundProperty = nullptr;
s_ChildProperty = nullptr;
s_ComputedHorizontalScrollModeProperty = nullptr;
s_ComputedVerticalScrollModeProperty = nullptr;
s_ContentProperty = nullptr;
s_HorizontalAnchorRatioProperty = nullptr;
s_HorizontalScrollChainingModeProperty = nullptr;
s_HorizontalScrollModeProperty = nullptr;
Expand Down Expand Up @@ -355,16 +355,6 @@ winrt::Brush ScrollerProperties::Background()
return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<Scroller*>(this)->GetValue(s_BackgroundProperty));
}

void ScrollerProperties::Child(winrt::UIElement const& value)
{
static_cast<Scroller*>(this)->SetValue(s_ChildProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
}

winrt::UIElement ScrollerProperties::Child()
{
return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<Scroller*>(this)->GetValue(s_ChildProperty));
}

void ScrollerProperties::ComputedHorizontalScrollMode(winrt::ScrollMode const& value)
{
static_cast<Scroller*>(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper<winrt::ScrollMode>::BoxValueIfNecessary(value));
Expand All @@ -385,6 +375,16 @@ winrt::ScrollMode ScrollerProperties::ComputedVerticalScrollMode()
return ValueHelper<winrt::ScrollMode>::CastOrUnbox(static_cast<Scroller*>(this)->GetValue(s_ComputedVerticalScrollModeProperty));
}

void ScrollerProperties::Content(winrt::UIElement const& value)
{
static_cast<Scroller*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
}

winrt::UIElement ScrollerProperties::Content()
{
return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<Scroller*>(this)->GetValue(s_ContentProperty));
}

void ScrollerProperties::HorizontalAnchorRatio(double value)
{
static_cast<Scroller*>(this)->ValidateAnchorRatio(value);
Expand Down
10 changes: 5 additions & 5 deletions dev/Generated/Scroller.properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class ScrollerProperties
void Background(winrt::Brush const& value);
winrt::Brush Background();

void Child(winrt::UIElement const& value);
winrt::UIElement Child();

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

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

void Content(winrt::UIElement const& value);
winrt::UIElement Content();

void HorizontalAnchorRatio(double value);
double HorizontalAnchorRatio();

Expand Down Expand Up @@ -73,9 +73,9 @@ class ScrollerProperties
winrt::ZoomMode ZoomMode();

static winrt::DependencyProperty BackgroundProperty() { return s_BackgroundProperty; }
static winrt::DependencyProperty ChildProperty() { return s_ChildProperty; }
static winrt::DependencyProperty ComputedHorizontalScrollModeProperty() { return s_ComputedHorizontalScrollModeProperty; }
static winrt::DependencyProperty ComputedVerticalScrollModeProperty() { return s_ComputedVerticalScrollModeProperty; }
static winrt::DependencyProperty ContentProperty() { return s_ContentProperty; }
static winrt::DependencyProperty HorizontalAnchorRatioProperty() { return s_HorizontalAnchorRatioProperty; }
static winrt::DependencyProperty HorizontalScrollChainingModeProperty() { return s_HorizontalScrollChainingModeProperty; }
static winrt::DependencyProperty HorizontalScrollModeProperty() { return s_HorizontalScrollModeProperty; }
Expand All @@ -95,9 +95,9 @@ class ScrollerProperties
static winrt::DependencyProperty ZoomModeProperty() { return s_ZoomModeProperty; }

static GlobalDependencyProperty s_BackgroundProperty;
static GlobalDependencyProperty s_ChildProperty;
static GlobalDependencyProperty s_ComputedHorizontalScrollModeProperty;
static GlobalDependencyProperty s_ComputedVerticalScrollModeProperty;
static GlobalDependencyProperty s_ContentProperty;
static GlobalDependencyProperty s_HorizontalAnchorRatioProperty;
static GlobalDependencyProperty s_HorizontalScrollChainingModeProperty;
static GlobalDependencyProperty s_HorizontalScrollModeProperty;
Expand Down
20 changes: 10 additions & 10 deletions dev/Generated/ScrollerTestHooks.properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ CppWinRTActivatableClassWithBasicFactory(ScrollerTestHooks)

ScrollerTestHooksProperties::ScrollerTestHooksProperties()
: m_anchorEvaluatedEventSource{static_cast<ScrollerTestHooks*>(this)}
, m_childLayoutOffsetXChangedEventSource{static_cast<ScrollerTestHooks*>(this)}
, m_childLayoutOffsetYChangedEventSource{static_cast<ScrollerTestHooks*>(this)}
, m_contentLayoutOffsetXChangedEventSource{static_cast<ScrollerTestHooks*>(this)}
, m_contentLayoutOffsetYChangedEventSource{static_cast<ScrollerTestHooks*>(this)}
, m_interactionSourcesChangedEventSource{static_cast<ScrollerTestHooks*>(this)}
{
}
Expand All @@ -35,24 +35,24 @@ void ScrollerTestHooksProperties::AnchorEvaluated(winrt::event_token const& toke
m_anchorEvaluatedEventSource.remove(token);
}

winrt::event_token ScrollerTestHooksProperties::ChildLayoutOffsetXChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value)
winrt::event_token ScrollerTestHooksProperties::ContentLayoutOffsetXChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value)
{
return m_childLayoutOffsetXChangedEventSource.add(value);
return m_contentLayoutOffsetXChangedEventSource.add(value);
}

void ScrollerTestHooksProperties::ChildLayoutOffsetXChanged(winrt::event_token const& token)
void ScrollerTestHooksProperties::ContentLayoutOffsetXChanged(winrt::event_token const& token)
{
m_childLayoutOffsetXChangedEventSource.remove(token);
m_contentLayoutOffsetXChangedEventSource.remove(token);
}

winrt::event_token ScrollerTestHooksProperties::ChildLayoutOffsetYChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value)
winrt::event_token ScrollerTestHooksProperties::ContentLayoutOffsetYChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value)
{
return m_childLayoutOffsetYChangedEventSource.add(value);
return m_contentLayoutOffsetYChangedEventSource.add(value);
}

void ScrollerTestHooksProperties::ChildLayoutOffsetYChanged(winrt::event_token const& token)
void ScrollerTestHooksProperties::ContentLayoutOffsetYChanged(winrt::event_token const& token)
{
m_childLayoutOffsetYChangedEventSource.remove(token);
m_contentLayoutOffsetYChangedEventSource.remove(token);
}

winrt::event_token ScrollerTestHooksProperties::InteractionSourcesChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::ScrollerTestHooksInteractionSourcesChangedEventArgs> const& value)
Expand Down
12 changes: 6 additions & 6 deletions dev/Generated/ScrollerTestHooks.properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class ScrollerTestHooksProperties

winrt::event_token AnchorEvaluated(winrt::TypedEventHandler<winrt::Scroller, winrt::ScrollerTestHooksAnchorEvaluatedEventArgs> const& value);
void AnchorEvaluated(winrt::event_token const& token);
winrt::event_token ChildLayoutOffsetXChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value);
void ChildLayoutOffsetXChanged(winrt::event_token const& token);
winrt::event_token ChildLayoutOffsetYChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value);
void ChildLayoutOffsetYChanged(winrt::event_token const& token);
winrt::event_token ContentLayoutOffsetXChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value);
void ContentLayoutOffsetXChanged(winrt::event_token const& token);
winrt::event_token ContentLayoutOffsetYChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable> const& value);
void ContentLayoutOffsetYChanged(winrt::event_token const& token);
winrt::event_token InteractionSourcesChanged(winrt::TypedEventHandler<winrt::Scroller, winrt::ScrollerTestHooksInteractionSourcesChangedEventArgs> const& value);
void InteractionSourcesChanged(winrt::event_token const& token);

event_source<winrt::TypedEventHandler<winrt::Scroller, winrt::ScrollerTestHooksAnchorEvaluatedEventArgs>> m_anchorEvaluatedEventSource;
event_source<winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable>> m_childLayoutOffsetXChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable>> m_childLayoutOffsetYChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable>> m_contentLayoutOffsetXChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::Scroller, winrt::IInspectable>> m_contentLayoutOffsetYChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::Scroller, winrt::ScrollerTestHooksInteractionSourcesChangedEventArgs>> m_interactionSourcesChangedEventSource;

static void EnsureProperties();
Expand Down
Loading

0 comments on commit a34e01c

Please sign in to comment.