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 // prevent constructor by default
33 ButtonComponent();
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual ~ButtonComponent() /*override*/ = default;
39
40 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
41
42 virtual void reset() /*override*/;
43
44 virtual void reload(::UIComponent const& rhs) /*override*/;
45
46 virtual ::ComponentReceiveActionType receive(
47 ::VisualTree& screenEvent,
48 ::ScreenInputContext&,
49 ::UIAnimationController&,
50 ::ScreenEvent const&
51 ) /*override*/;
52
53 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
54
55 virtual void onVisibilityChanged(bool visible) /*override*/;
56
57 virtual void onEnabledChanged(bool enabled) /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI explicit ButtonComponent(::UIControl& owner);
64
65 MCAPI void _updateControlVisibility();
66
67 MCFOLD ::std::weak_ptr<::UIControl> getDefaultStateControl() const;
68
69 MCFOLD ::std::weak_ptr<::UIControl> getHoverStateControl() const;
70
71 MCFOLD ::std::weak_ptr<::UIControl> getLockedStateControl() const;
72
73 MCFOLD ::std::weak_ptr<::UIControl> getPressedStateControl() const;
74
75 MCFOLD void setConsumeEvents(bool consumeEvents);
76
77 MCAPI void setDefaultStateControl(::std::weak_ptr<::UIControl> control);
78
79 MCAPI void setHoverStateControl(::std::weak_ptr<::UIControl> control);
80
81 MCAPI void setLockedStateControl(::std::weak_ptr<::UIControl> control);
82
83 MCAPI void setPressedStateControl(::std::weak_ptr<::UIControl> control);
84 // NOLINTEND
85
86public:
87 // constructor thunks
88 // NOLINTBEGIN
89 MCAPI void* $ctor(::UIControl& owner);
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
96
97 MCAPI void $reset();
98
99 MCAPI void $reload(::UIComponent const& rhs);
100
101 MCAPI ::ComponentReceiveActionType
102 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent const&);
103
104 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
105
106 MCAPI void $onVisibilityChanged(bool visible);
107
108 MCAPI void $onEnabledChanged(bool enabled);
109 // NOLINTEND
110
111public:
112 // vftables
113 // NOLINTBEGIN
114 MCNAPI static void** $vftable();
115 // NOLINTEND
116};
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