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/Component.h"
7#include "mc/client/settings/ComponentState.h"
8#include "mc/client/settings/ConfirmationRequest.h"
9#include "mc/client/settings/SettingsActionType.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace Settings { class IActionDataProvider; }
14// clang-format on
15
16namespace Settings {
17
18class ActionComponent : public ::Settings::Component<::Settings::ActionComponent> {
19public:
20 // ActionComponent inner types define
21 using DataProvider = ::Settings::IActionDataProvider;
22
23 using ActionLabelOverrideProvider =
24 ::std::function<::std::optional<::std::string>(::Settings::ActionComponent const&)>;
25
26public:
27 // member variables
28 // NOLINTBEGIN
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;
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 ActionComponent();
41
42public:
43 // virtual functions
44 // NOLINTBEGIN
45 virtual ~ActionComponent() /*override*/;
46
47 virtual ::Settings::ComponentState getDefaultState() const /*override*/;
48 // NOLINTEND
49
50public:
51 // member functions
52 // NOLINTBEGIN
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
61 );
62
63 MCAPI bool flush();
64
65 MCAPI ::std::string getActionLabel() const;
66
67 MCAPI ::std::optional<::Settings::SettingsActionType> getActionType() const;
68
69 MCFOLD ::std::optional<::Settings::ConfirmationRequest> const& getConfirmationRequest() const;
70
71 MCAPI bool invokeClickCallback();
72 // NOLINTEND
73
74public:
75 // constructor thunks
76 // NOLINTBEGIN
77 MCAPI void* $ctor(
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
85 );
86 // NOLINTEND
87
88public:
89 // destructor thunk
90 // NOLINTBEGIN
91 MCAPI void $dtor();
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCAPI ::Settings::ComponentState $getDefaultState() const;
98 // NOLINTEND
99
100public:
101 // vftables
102 // NOLINTBEGIN
103 MCNAPI static void** $vftable();
104 // NOLINTEND
105};
106
107} // namespace Settings
Definition ActionComponent.h:7
static MCAPI void ** $vftable()
Definition IActionDataProvider.h:7