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
65 MCAPI ::std::
string getActionLabel() const;
67 MCAPI ::std::optional<::Settings::SettingsActionType> getActionType() const;
69 MCFOLD ::std::optional<::Settings::ConfirmationRequest> const& getConfirmationRequest() const;
71 MCAPI
bool invokeClickCallback();
78 ::std::string_view
id,
79 ::std::string_view name,
80 ::std::optional<::std::
string> description,
81 ::std::string_view actionLabel,
82 ::std::function<
void()> actionCallback,
83 ::std::optional<::Settings::ConfirmationRequest> confirmationRequest,
84 ::std::unique_ptr<::Settings::IActionDataProvider> dataProvider
97 MCAPI ::Settings::ComponentState $getDefaultState() const;
Definition ActionComponent.h:7
static MCAPI void ** $vftable()
Definition IActionDataProvider.h:7