LeviLamina
Loading...
Searching...
No Matches
ActionComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
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"
11
12// auto generated forward declare list
13// clang-format off
14namespace Settings { class IActionDataProvider; }
15// clang-format on
16
17namespace Settings {
18
19class ActionComponent : public ::Settings::Component<::Settings::ActionComponent> {
20public:
21 // ActionComponent inner types define
22 using DataProvider = ::Settings::IActionDataProvider;
23
24 using ActionLabelOverrideProvider =
25 ::std::function<::std::optional<::std::string>(::Settings::ActionComponent const&)>;
26
27 using ActionCallback = ::std::function<void(::std::function<void(bool)>)>;
28
29public:
30 // member variables
31 // NOLINTBEGIN
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;
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
44 ActionComponent();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual ~ActionComponent() /*override*/ = default;
50
51 virtual ::Settings::ComponentState getDefaultState() const /*override*/;
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI 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,
63 ::std::optional<::Settings::ConfirmationRequest> confirmationRequest,
64 ::std::optional<::Settings::AsyncProgressInfo> asyncProgressInfo,
65 ::std::unique_ptr<::Settings::IActionDataProvider> dataProvider
66 );
67
68 MCAPI ::std::string getActionLabel() const;
69
70 MCAPI bool invokeClickCallback(::std::function<void(bool)> statusCallback);
71 // NOLINTEND
72
73public:
74 // constructor thunks
75 // NOLINTBEGIN
76 MCAPI void* $ctor(
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,
82 ::std::optional<::Settings::ConfirmationRequest> confirmationRequest,
83 ::std::optional<::Settings::AsyncProgressInfo> asyncProgressInfo,
84 ::std::unique_ptr<::Settings::IActionDataProvider> dataProvider
85 );
86 // NOLINTEND
87
88public:
89 // virtual function thunks
90 // NOLINTBEGIN
91 MCAPI ::Settings::ComponentState $getDefaultState() const;
92 // NOLINTEND
93};
94
95} // namespace Settings
Definition ActionComponent.h:7
Definition IActionDataProvider.h:7