3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/settings/Component.h"
7#include "mc/client/settings/ComponentState.h"
8#include "mc/client/settings/ConfirmationRequest.h"
9#include "mc/client/settings/SettingsActionType.h"
18class ActionComponent :
public ::Settings::Component<::Settings::ActionComponent> {
21 using DataProvider = ::Settings::IActionDataProvider;
23 using ActionLabelOverrideProvider =
24 ::std::function<::std::optional<::std::string>(::Settings::ActionComponent
const&)>;
29 ::ll::TypedStorage<8, 32, ::std::string> mActionLabel;
30 ::ll::TypedStorage<4, 8, ::std::optional<::Settings::SettingsActionType>> mActionType;
31 ::ll::TypedStorage<8, 136, ::std::optional<::Settings::ConfirmationRequest>> mConfirmationRequest;
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Settings::IActionDataProvider>> mDataProvider;
33 ::ll::TypedStorage<8, 64, ::std::function<void()>> mActionCallback;
34 ::ll::TypedStorage<8, 64, ::std::function<::std::optional<::std::string>(::Settings::ActionComponent
const&)>>
35 mActionLabelOverrideProvider;
45 virtual ~ActionComponent() ;
47 virtual ::Settings::ComponentState getDefaultState() const ;
53 MCAPI ActionComponent(
54 ::std::string_view
id,
55 ::std::string_view name,
56 ::std::optional<::std::
string> description,
57 ::std::string_view actionLabel,
58 ::std::function<
void()> actionCallback,
59 ::std::optional<::Settings::ConfirmationRequest> confirmationRequest,
60 ::std::unique_ptr<::Settings::IActionDataProvider> dataProvider
63 MCAPI ::std::
string getActionLabel() const;
70 ::std::string_view
id,
71 ::std::string_view name,
72 ::std::optional<::std::
string> description,
73 ::std::string_view actionLabel,
74 ::std::function<
void()> actionCallback,
75 ::std::optional<::Settings::ConfirmationRequest> confirmationRequest,
76 ::std::unique_ptr<::Settings::IActionDataProvider> dataProvider
89 MCAPI ::Settings::ComponentState $getDefaultState() const;
Definition ActionComponent.h:7
static MCAPI void ** $vftable()
Definition IActionDataProvider.h:7