13 #include "PointerInteractions.h" 25 bool mCentreHorizontal{
false};
26 bool mCentreVertical{
false};
28 std::unique_ptr<ButtonSemantics> mButtonSemantics{};
46 static constexpr std::string_view
id =
"ButtonFrame";
47 std::string_view nodeId()
const noexcept
override {
57 mButtonSemantics->setButtonCommandCallback(commandId, std::move(buttonCommandCallback));
97 mButtonSemantics->setButtonStateChangeCallback(std::move(stateChangeCB));
102 mButtonSemantics->setButtonStateChangeCallback(std::move(stateChangeCB));
107 mButtonSemantics->setButtonStateChangeCallback(std::move(stateChangeCB));
112 mButtonSemantics->setButtonStateChangeCallback(std::move(stateChangeCB));
115 static constexpr std::string_view
id =
"TextButton";
116 std::string_view nodeId()
const noexcept
override {
156 explicit TextLabel(
const std::string_view& text)
161 static constexpr std::string_view
id =
"TextLabel";
162 std::string_view nodeId()
const noexcept
override {
179 LayoutManager::Itr last)
override;
188 ImageId mImageId{ImageId::ThreeDots};
190 Size mRequestedSize{};
209 static constexpr std::string_view
id =
"ImageButton";
210 std::string_view nodeId()
const noexcept
override {
234 void setImage(ImageId imageId);
237 mRenderFlip = renderFlip;
257 static constexpr std::string_view
id =
"ImageLabel";
258 std::string_view nodeId()
const noexcept
override {
276 LayoutManager::Itr last)
override;
A pure virtual base class for layout managers.
Definition: Visual.h:392
When pressed and released signals an action.
std::function< void(ButtonStateChange buttonStateChange, uint commandId)> ButtonCommandCallback
Button command callback.
Definition: Callbacks.h:82
std::function< void(ButtonStateChange buttonStateChange)> ButtonStateChangeCallback
Button state change callback.
Definition: Callbacks.h:75
void draw(gm::Context &context, const Position< int > &containerPosition) override
Draw the visual.
Definition: Frame.h:252
Rectangle layout(gm::Context &context, const Rectangle &screenRect) override
Layout the visual.
Definition: Frame.cpp:425
Context
Definition: GraphicsModel.h:76
Encapsulation of code for rendering Text.
Definition: Text.h:42
std::function< void(ButtonDisplayState buttonDisplayState)> ButtonDisplayCallback
Button display state callback.
Definition: Callbacks.h:69
ButtonType
The button type.
Definition: PointerInteractions.h:21
A composite of a Position and a Size.
Definition: Types.h:307
A type to specify an Id value.
Definition: StructuredTypes.h:148
A size in integer dimensions.
Definition: Types.h:230
A Widget manipulator to indicate if and how rendering a texture should be flipped.
Definition: GraphicsModel.h:62
ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Wid...
Definition: CelestialOverlay.cpp:13
A button without any button semantics but can be inverted and animated.