ScrollViewProps.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #pragma once
  8. #include <react/components/scrollview/primitives.h>
  9. #include <react/components/view/ViewProps.h>
  10. namespace facebook {
  11. namespace react {
  12. // TODO (T28334063): Consider for codegen.
  13. class ScrollViewProps final : public ViewProps {
  14. public:
  15. ScrollViewProps() = default;
  16. ScrollViewProps(const ScrollViewProps &sourceProps, const RawProps &rawProps);
  17. #pragma mark - Props
  18. const bool alwaysBounceHorizontal{};
  19. const bool alwaysBounceVertical{};
  20. const bool bounces{true};
  21. const bool bouncesZoom{true};
  22. const bool canCancelContentTouches{true};
  23. const bool centerContent{};
  24. const bool automaticallyAdjustContentInsets{};
  25. const Float decelerationRate{0.998};
  26. const bool directionalLockEnabled{};
  27. const ScrollViewIndicatorStyle indicatorStyle{};
  28. const ScrollViewKeyboardDismissMode keyboardDismissMode{};
  29. const Float maximumZoomScale{1.0};
  30. const Float minimumZoomScale{1.0};
  31. const bool scrollEnabled{true};
  32. const bool pagingEnabled{};
  33. const bool pinchGestureEnabled{true};
  34. const bool scrollsToTop{true};
  35. const bool showsHorizontalScrollIndicator{true};
  36. const bool showsVerticalScrollIndicator{true};
  37. const Float scrollEventThrottle{};
  38. const Float zoomScale{1.0};
  39. const EdgeInsets contentInset{};
  40. const EdgeInsets scrollIndicatorInsets{};
  41. const Float snapToInterval{};
  42. const ScrollViewSnapToAlignment snapToAlignment{};
  43. #pragma mark - DebugStringConvertible
  44. #if RN_DEBUG_STRING_CONVERTIBLE
  45. SharedDebugStringConvertibleList getDebugProps() const override;
  46. #endif
  47. };
  48. } // namespace react
  49. } // namespace facebook