LeviLamina
Loading...
Searching...
No Matches
ButtonComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/ComponentReceiveActionType.h"
7#include "mc/client/gui/controls/UIComponent.h"
8
9// auto generated forward declare list
10// clang-format off
13class UIControl;
14class VisualTree;
15struct ScreenEvent;
16// clang-format on
17
18class ButtonComponent : public ::UIComponent {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mDefaultStateControl;
23 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mHoverStateControl;
24 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mPressedStateControl;
25 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mLockedStateControl;
26 ::ll::TypedStorage<1, 1, bool> mPressed;
27 ::ll::TypedStorage<1, 1, bool> mHover;
28 ::ll::TypedStorage<1, 1, bool> mConsumeEvents;
29 // NOLINTEND
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ~ButtonComponent() /*override*/ = default;
35
36 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
37
38 virtual void reset() /*override*/;
39
40 virtual void reload(::UIComponent const& rhs) /*override*/;
41
42 virtual ::ComponentReceiveActionType receive(
43 ::VisualTree& visualTree,
44 ::ScreenInputContext& context,
45 ::UIAnimationController& animationController,
46 ::ScreenEvent const& screenEvent
47 ) /*override*/;
48
49 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
50
51 virtual void onVisibilityChanged(bool visible) /*override*/;
52
53 virtual void onEnabledChanged(bool enabled) /*override*/;
54 // NOLINTEND
55
56public:
57 // member functions
58 // NOLINTBEGIN
59 MCAPI void _updateControlVisibility();
60
61 MCFOLD void setVisible(::std::weak_ptr<::UIControl> const& control, bool visible);
62 // NOLINTEND
63
64public:
65 // virtual function thunks
66 // NOLINTBEGIN
67 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
68
69 MCAPI void $reset();
70
71 MCAPI void $reload(::UIComponent const& rhs);
72
73 MCAPI ::ComponentReceiveActionType $receive(
74 ::VisualTree& visualTree,
75 ::ScreenInputContext& context,
76 ::UIAnimationController& animationController,
77 ::ScreenEvent const& screenEvent
78 );
79
80 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
81
82 MCAPI void $onVisibilityChanged(bool visible);
83
84 MCAPI void $onEnabledChanged(bool enabled);
85 // NOLINTEND
86
87public:
88 // vftables
89 // NOLINTBEGIN
90 MCNAPI static void** $vftable();
91 // NOLINTEND
92};
Definition ButtonComponent.h:5
static MCAPI void ** $vftable()
Definition ScreenInputContext.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5