3#include "structure/design_pattern/spk_contract_provider.hpp"
4#include "structure/math/spk_vector2.hpp"
5#include "structure/widget/components/spk_icon_region.hpp"
6#include "structure/widget/components/spk_nine_slice_background.hpp"
7#include "structure/widget/spk_widget.hpp"
50 spk::Vector2UInt iconPadding{0, 0};
51 bool iconVisible =
true;
58 bool _isPressed =
false;
59 bool _isHovered =
false;
61 spk::TContractProvider<> _onClick;
63 Visual &_visualForState(
State p_state);
64 const Visual &_visualForState(
State p_state)
const;
65 void _applyGeometry();
117 IconButton(
const std::wstring &p_name, spk::Widget *p_parent);
147 void setTexture(
const spk::SpriteSheet *p_spriteSheet,
State p_state = State::Both);
153 void setCornerSize(
const spk::Vector2UInt &p_cornerSize,
State p_state = State::Both);
185 const spk::SpriteSheet *
texture(
State p_state = State::Both)
const;
void toggle()
Toggles between activated and deactivated states.
Definition spk_activable_object.hpp:68
Renders a textured sprite region within a given geometry.
Definition spk_icon_region.hpp:24
Renders a scalable nine-slice background using a sprite sheet.
Definition spk_nine_slice_background.hpp:25
Handle to a subscribed job that can be resigned or triggered.
Definition spk_contract_provider.hpp:42
typename Contract::Job Job
Alias to the subscribed callback signature.
Definition spk_contract_provider.hpp:267