3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/settings/AsyncProgressInfo.h"
7#include "mc/client/settings/Component.h"
8#include "mc/client/settings/ComponentState.h"
9#include "mc/client/settings/ConfirmationRequest.h"
10#include "mc/client/settings/SettingsActionType.h"
19class ActionComponent :
public ::Settings::Component<::Settings::ActionComponent> {
22 using DataProvider = ::Settings::IActionDataProvider;
24 using ActionLabelOverrideProvider =
25 ::std::function<::std::optional<::std::string>(::Settings::ActionComponent
const&)>;
27 using ActionCallback = ::std::function<void(::std::function<
void(
bool)>)>;
32 ::ll::TypedStorage<8, 32, ::std::string> mActionLabel;
33 ::ll::TypedStorage<4, 8, ::std::optional<::Settings::SettingsActionType>> mActionType;
34 ::ll::TypedStorage<8, 136, ::std::optional<::Settings::ConfirmationRequest>> mConfirmationRequest;
35 ::ll::TypedStorage<8, 176, ::std::optional<::Settings::AsyncProgressInfo>> mAsyncProgressInfo;
36 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Settings::IActionDataProvider>> mDataProvider;
37 ::ll::TypedStorage<8, 64, ::std::function<void(::std::function<
void(
bool)>)>> mActionCallback;
38 ::ll::TypedStorage<8, 64, ::std::function<::std::optional<::std::string>(::Settings::ActionComponent
const&)>>
39 mActionLabelOverrideProvider;
49 virtual ~ActionComponent() =
default;
51 virtual ::Settings::ComponentState getDefaultState() const ;
57 MCNAPI ActionComponent(
58 ::
std::string_view
id,
59 ::
std::string_view name,
60 ::
std::optional<::
std::
string> description,
61 ::
std::string_view actionLabel,
62 ::
std::function<
void(::
std::function<
void(
bool)>)> actionCallback,
77 ::
std::string_view
id,
78 ::
std::string_view name,
79 ::
std::optional<::
std::
string> description,
80 ::
std::string_view actionLabel,
81 ::
std::function<
void(::
std::function<
void(
bool)>)> actionCallback,
Definition ActionComponent.h:7
MCAPI void * $ctor(::std::string_view id, ::std::string_view name, ::std::optional<::std::string > description, ::std::string_view actionLabel, ::std::function< void(::std::function< void(bool)>)> actionCallback, ::std::optional<::Settings::ConfirmationRequest > confirmationRequest, ::std::optional<::Settings::AsyncProgressInfo > asyncProgressInfo, ::std::unique_ptr<::Settings::IActionDataProvider > dataProvider)
MCAPI bool invokeClickCallback(::std::function< void(bool)> statusCallback)
MCAPI::std::string getActionLabel() const
MCAPI::Settings::ComponentState $getDefaultState() const
Definition IActionDataProvider.h:7
Definition AsyncProgressInfo.h:7
Definition ConfirmationRequest.h:7