3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/settings/Component.h"
7#include "mc/client/settings/ComponentState.h"
16class StringComponent :
public ::Settings::Component<::Settings::StringComponent> {
19 using DataProvider = ::Settings::IStringDataProvider;
21 using FormatValidationCallback = ::std::function<::std::optional<::std::string>(::std::string)>;
26 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Settings::IStringDataProvider>> mDataProvider;
27 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mPlaceholder;
28 ::ll::TypedStorage<4, 8, ::std::optional<int>> mMaxLength;
29 ::ll::TypedStorage<8, 72, ::std::optional<::std::function<::std::optional<::std::string>(::std::string)>>>
31 ::ll::TypedStorage<1, 1, bool> mIsFormatValid;
32 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFallbackValue;
38 virtual ~StringComponent() =
default;
40 virtual ::Settings::ComponentState getDefaultState() const ;
46 MCAPI ::std::optional<::std::
string> getPlaceholder() const;
48 MCAPI
bool updateValue(::std::
string const& value);
54 MCFOLD ::Settings::ComponentState $getDefaultState() const;
Definition IStringDataProvider.h:7
Definition StringComponent.h:7