Files
react-native/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h
T
Kevin Gozali fb39d45ed5 C++ - better => butter
Summary:
Renaming the `better` utilities to `butter`:
- to prevent claims that this library is superior to others - it really depends on use cases
- to indicate ease of use throughout the codebase, easily spread like butter

Changelog: [C++][Changed] Renaming C++ better util to butter, used by Fabric internals

Reviewed By: JoshuaGross

Differential Revision: D33242764

fbshipit-source-id: 26dc95d9597c61ce8e66708e44ed545e0fc5cff5
2021-12-20 22:25:14 -08:00

76 lines
2.0 KiB
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/renderer/attributedstring/ParagraphAttributes.h>
#include <react/renderer/attributedstring/TextAttributes.h>
#include <react/renderer/components/iostextinput/conversions.h>
#include <react/renderer/components/iostextinput/primitives.h>
#include <react/renderer/components/text/BaseTextProps.h>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/Props.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/propsConversions.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/imagemanager/primitives.h>
#include <vector>
namespace facebook {
namespace react {
class TextInputProps final : public ViewProps, public BaseTextProps {
public:
TextInputProps() = default;
TextInputProps(
const PropsParserContext &context,
TextInputProps const &sourceProps,
RawProps const &rawProps);
#pragma mark - Props
TextInputTraits const traits{};
ParagraphAttributes const paragraphAttributes{};
std::string const defaultValue{};
std::string const placeholder{};
SharedColor const placeholderTextColor{};
int maxLength{};
/*
* Tint colors
*/
SharedColor const cursorColor{};
SharedColor const selectionColor{};
// TODO: Rename to `tintColor` and make universal.
SharedColor const underlineColorAndroid{};
/*
* "Private" (only used by TextInput.js) props
*/
std::string const text{};
int const mostRecentEventCount{0};
bool autoFocus{false};
butter::optional<Selection> selection{};
std::string const inputAccessoryViewID{};
bool onKeyPressSync{false};
/*
* Accessors
*/
TextAttributes getEffectiveTextAttributes(Float fontSizeMultiplier) const;
ParagraphAttributes getEffectiveParagraphAttributes() const;
};
} // namespace react
} // namespace facebook