A layout container that groups, positions, and draws a set of child components. More...
#include <Malena/Graphics/Layouts/Panel.h>
Public Types | |
| using | Flag |
| using | Flag |
| using | manifest_type |
The manifest type, used by GatherFlags and GatherStates to locate this class's flag and state declarations. | |
| using | manifest_type |
The manifest type, used by GatherFlags and GatherStates to locate this class's flag and state declarations. | |
| using | manifest_type |
The manifest type, used by GatherFlags and GatherStates to locate this class's flag and state declarations. | |
| using | State |
| The enum type this manager stores flags for. | |
| using | State |
| The enum type this manager stores flags for. | |
| using | State |
| using | State |
Public Member Functions | |
| Panel () | |
| void | addComponent (Core &child) |
| Add a child component to this panel. | |
| void | center (T &obj) |
Center this object within obj (both axes). | |
| void | center (ml::RoundedRectangle &obj) |
Center this object within obj (both axes). | |
| void | center (ml::RoundedRectangle &obj) |
Center this object within obj (both axes). | |
| template<class T> | |
| void | center (T &obj) |
Center this object within obj (both axes). | |
| void | centerHorizonally (T &obj) |
Center this object horizontally within obj. | |
| void | centerHorizonally (ml::RoundedRectangle &obj) |
Center this object horizontally within obj. | |
| void | centerHorizonally (ml::RoundedRectangle &obj) |
Center this object horizontally within obj. | |
| template<class T> | |
| void | centerHorizonally (T &obj) |
Center this object horizontally within obj. | |
| void | centerText (sf::Text &obj) |
Center an sf::Text object within this object's bounds. | |
| void | centerText (sf::Text &obj) |
Center an sf::Text object within this object's bounds. | |
| void | centerVertically (T &obj) |
Center this object vertically within obj. | |
| void | centerVertically (ml::RoundedRectangle &obj) |
Center this object vertically within obj. | |
| void | centerVertically (ml::RoundedRectangle &obj) |
Center this object vertically within obj. | |
| template<class T> | |
| void | centerVertically (T &obj) |
Center this object vertically within obj. | |
| bool | checkFlag (State state) const |
| Return the current value of a flag. | |
| bool | checkFlag (State state) const |
| Return the current value of a flag. | |
| bool | checkFlag (State state) const |
| Return the current value of a flag. | |
| void | clear () |
| Remove all registered objects. | |
| void | clearDragBounds () |
| Remove any previously set drag bounds. | |
| void | clearDragBounds () |
| Remove any previously set drag bounds. | |
| void | disableFlag (State state) |
Set a flag to false. | |
| void | disableFlag (State state) |
Set a flag to false. | |
| void | disableFlag (State state) |
Set a flag to false. | |
| void | draw (sf::RenderTarget &target, sf::RenderStates states) const override |
| Draw this graphic to an SFML render target. | |
| void | enableFlag (State state) |
Set a flag to true. | |
| void | enableFlag (State state) |
Set a flag to true. | |
| void | enableFlag (State state) |
Set a flag to true. | |
| const std::vector< Core * > & | getComponents () const |
| Return a read-only view of all currently registered objects. | |
| unsigned int | getCornerPointCount () const |
| Return the current per-corner vertex count. | |
| Color | getFillColor () const |
| virtual Vector2f | getGeometricCenter () const |
| sf::FloatRect | getGlobalBounds () const override |
| Return the axis-aligned bounding box in world space. | |
| const Transform & | getInverseTransform () const |
| FloatRect | getLocalBounds () const |
| Vector2f | getOrigin () const |
| Color | getOutlineColor () const |
| float | getOutlineThickness () const |
| virtual sf::Vector2f | getPoint (std::size_t index) const override |
| Return the position of a single vertex. | |
| virtual std::size_t | getPointCount () const override |
| Return the total number of shape vertices. | |
| sf::Vector2f | getPosition () const override |
| Return the current world-space position. | |
| float | getRadius () const |
| Return the current corner arc radius. | |
| virtual sf::RenderStates | getRenderStates () const |
| Returns the SFML render states to use when drawing this object. | |
| virtual sf::RenderStates | getRenderStates () const |
| Returns the SFML render states to use when drawing this object. | |
| Angle | getRotation () const |
| Vector2f | getScale () const |
| const sf::Vector2f & | getSize () const |
| Return the current size of the rectangle. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle >, ml::RoundedRectangle > | getState () const |
| Return the current state value. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle >, ml::RoundedRectangle > | getState () const |
| Return the current state value. | |
| std::enable_if_t<!std::is_void_v< T >, T > | getState () const |
| Return the current state value. | |
| const Texture * | getTexture () const |
| const IntRect & | getTextureRect () const |
| const Transform & | getTransform () const |
| Graphic () | |
| template<typename U> | |
| Graphic (const U &obj) | |
Construct from an existing SFML object of type U. | |
| bool | isScrolling () |
Return true while a moveTo or moveDistance animation is in progress. | |
| bool | isScrolling () |
Return true while a moveTo or moveDistance animation is in progress. | |
| bool | isSettingsLocked () const |
Return true if applySettings() is currently blocked. | |
| std::enable_if_t<!std::is_void_v< T >, bool > | isState (T state) const |
Return true if currently in state. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle >, bool > | isState (ml::RoundedRectangle state) const |
Return true if currently in state. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle >, bool > | isState (ml::RoundedRectangle state) const |
Return true if currently in state. | |
| std::enable_if_t<!std::is_void_v< T >, bool > | isState (T state) const |
Return true if currently in state. | |
| std::enable_if_t<!std::is_void_v< T >, bool > | isState (T state) const |
Return true if currently in state. | |
| bool | isThemeLocked () const |
Return true if this component ignores theme changes. | |
| void | lockSettings () |
Prevent applySettings() from taking effect. | |
| void | lockTheme () |
| Prevent automatic re-styling when the global theme changes. | |
| void | move (Vector2f offset) |
| void | moveDistance (sf::Vector2f distance, float seconds=1.f) |
| Animate by a relative offset from the current position. | |
| void | moveDistance (sf::Vector2f distance, float seconds=1.f) |
| Animate by a relative offset from the current position. | |
| void | moveTo (sf::FloatRect position, float seconds=1.f) |
Animate to a position defined by a FloatRect origin. | |
| void | moveTo (sf::FloatRect position, float seconds=1.f) |
Animate to a position defined by a FloatRect origin. | |
| void | moveTo (sf::Vector2f position, float seconds=1.f) |
| Animate to an absolute world-space position. | |
| void | moveTo (sf::Vector2f position, float seconds=1.f) |
| Animate to an absolute world-space position. | |
| void | onBlur (std::function< void()> callback) |
| Register a no-argument callback invoked when this component loses keyboard focus. | |
| void | onBlur (std::function< void()> callback) |
| Register a no-argument callback invoked when this component loses keyboard focus. | |
| void | onBlur (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when this component loses keyboard focus, receiving the raw SFML event. | |
| void | onBlur (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when this component loses keyboard focus, receiving the raw SFML event. | |
| void | onClick (std::function< void()> callback) |
| Register a no-argument callback invoked when this component is clicked. | |
| void | onClick (std::function< void()> callback) |
| Register a no-argument callback invoked when this component is clicked. | |
| void | onClick (std::function< void(const std::optional< sf::Event > &event)> callback) |
| Register a callback invoked when this component is clicked, receiving the raw SFML event. | |
| void | onClick (std::function< void(const std::optional< sf::Event > &event)> callback) |
| Register a callback invoked when this component is clicked, receiving the raw SFML event. | |
| void | onFocus (std::function< void()> callback) |
| Register a no-argument callback invoked when this component gains keyboard focus. | |
| void | onFocus (std::function< void()> callback) |
| Register a no-argument callback invoked when this component gains keyboard focus. | |
| void | onFocus (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when this component gains keyboard focus, receiving the raw SFML event. | |
| void | onFocus (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when this component gains keyboard focus, receiving the raw SFML event. | |
| void | onHover (std::function< void()> callback) |
| Register a no-argument callback invoked when the mouse enters this component's bounds. | |
| void | onHover (std::function< void()> callback) |
| Register a no-argument callback invoked when the mouse enters this component's bounds. | |
| void | onHover (std::function< void(const std::optional< sf::Event > &event)> callback) |
| Register a callback invoked when the mouse enters this component's bounds, receiving the raw SFML event. | |
| void | onHover (std::function< void(const std::optional< sf::Event > &event)> callback) |
| Register a callback invoked when the mouse enters this component's bounds, receiving the raw SFML event. | |
| void | onKeypress (std::function< void()> callback) |
| Register a no-argument callback invoked when a key is pressed while this component has focus. | |
| void | onKeypress (std::function< void()> callback) |
| Register a no-argument callback invoked when a key is pressed while this component has focus. | |
| void | onKeypress (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a key is pressed while this component has focus, receiving the raw SFML event. | |
| void | onKeypress (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a key is pressed while this component has focus, receiving the raw SFML event. | |
| void | onKeyRelease (std::function< void()> callback) |
| Register a no-argument callback invoked when a key is released while this component has focus. | |
| void | onKeyRelease (std::function< void()> callback) |
| Register a no-argument callback invoked when a key is released while this component has focus. | |
| void | onKeyRelease (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a key is released while this component has focus, receiving the raw SFML event. | |
| void | onKeyRelease (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a key is released while this component has focus, receiving the raw SFML event. | |
| void | onMouseMoved (std::function< void()> callback) |
| Register a no-argument callback invoked whenever the mouse moves anywhere in the window. | |
| void | onMouseMoved (std::function< void()> callback) |
| Register a no-argument callback invoked whenever the mouse moves anywhere in the window. | |
| void | onMouseMoved (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked whenever the mouse moves anywhere in the window, receiving the raw SFML event. | |
| void | onMouseMoved (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked whenever the mouse moves anywhere in the window, receiving the raw SFML event. | |
| void | onMousePressed (std::function< void()> callback) |
| Register a no-argument callback invoked when a mouse button is pressed anywhere in the window. | |
| void | onMousePressed (std::function< void()> callback) |
| Register a no-argument callback invoked when a mouse button is pressed anywhere in the window. | |
| void | onMousePressed (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a mouse button is pressed, receiving the raw SFML event. | |
| void | onMousePressed (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a mouse button is pressed, receiving the raw SFML event. | |
| void | onMouseReleased (std::function< void()> callback) |
| Register a no-argument callback invoked when a mouse button is released anywhere in the window. | |
| void | onMouseReleased (std::function< void()> callback) |
| Register a no-argument callback invoked when a mouse button is released anywhere in the window. | |
| void | onMouseReleased (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a mouse button is released, receiving the raw SFML event. | |
| void | onMouseReleased (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a mouse button is released, receiving the raw SFML event. | |
| void | onScroll (std::function< void()> callback) |
| Register a no-argument callback invoked when the mouse wheel is scrolled while the cursor is over this component. | |
| void | onScroll (std::function< void()> callback) |
| Register a no-argument callback invoked when the mouse wheel is scrolled while the cursor is over this component. | |
| void | onScroll (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the mouse wheel is scrolled while the cursor is over this component, receiving the SFML event. | |
| void | onScroll (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the mouse wheel is scrolled while the cursor is over this component, receiving the SFML event. | |
| std::enable_if_t<!std::is_void_v< T > > | onStateEnter (std::function< void(T)> callback) |
| Register a callback invoked after each state transition. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle > > | onStateEnter (std::function< void(ml::RoundedRectangle)> callback) |
| Register a callback invoked after each state transition. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle > > | onStateEnter (std::function< void(ml::RoundedRectangle)> callback) |
| Register a callback invoked after each state transition. | |
| std::enable_if_t<!std::is_void_v< T > > | onStateEnter (std::function< void(T)> callback) |
| Register a callback invoked after each state transition. | |
| std::enable_if_t<!std::is_void_v< T > > | onStateEnter (std::function< void(T)> callback) |
| Register a callback invoked after each state transition. | |
| std::enable_if_t<!std::is_void_v< T > > | onStateExit (std::function< void(T)> callback) |
| Register a callback invoked before each state transition. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle > > | onStateExit (std::function< void(ml::RoundedRectangle)> callback) |
| Register a callback invoked before each state transition. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle > > | onStateExit (std::function< void(ml::RoundedRectangle)> callback) |
| Register a callback invoked before each state transition. | |
| std::enable_if_t<!std::is_void_v< T > > | onStateExit (std::function< void(T)> callback) |
| Register a callback invoked before each state transition. | |
| std::enable_if_t<!std::is_void_v< T > > | onStateExit (std::function< void(T)> callback) |
| Register a callback invoked before each state transition. | |
| void | onTextEntered (std::function< void()> callback) |
| Register a no-argument callback invoked when a unicode character is entered while this component has focus. | |
| void | onTextEntered (std::function< void()> callback) |
| Register a no-argument callback invoked when a unicode character is entered while this component has focus. | |
| void | onTextEntered (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a unicode character is entered while this component has focus, receiving the raw SFML event. | |
| void | onTextEntered (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when a unicode character is entered while this component has focus, receiving the raw SFML event. | |
| void | onUnhover (std::function< void()> callback) |
| Register a no-argument callback invoked when the mouse leaves this component's bounds. | |
| void | onUnhover (std::function< void()> callback) |
| Register a no-argument callback invoked when the mouse leaves this component's bounds. | |
| void | onUnhover (std::function< void(const std::optional< sf::Event > &event)> callback) |
| Register a callback invoked when the mouse leaves this component's bounds, receiving the raw SFML event. | |
| void | onUnhover (std::function< void(const std::optional< sf::Event > &event)> callback) |
| Register a callback invoked when the mouse leaves this component's bounds, receiving the raw SFML event. | |
| void | onUpdate (std::function< void()> callback) |
| Register a no-argument callback invoked every frame. | |
| void | onUpdate (std::function< void()> callback) |
| Register a no-argument callback invoked every frame. | |
| void | onUpdate (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked every frame, receiving the SFML event. | |
| void | onUpdate (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked every frame, receiving the SFML event. | |
| void | onWindowFocusGained (std::function< void()> callback) |
| Register a no-argument callback invoked when the application window gains OS focus. | |
| void | onWindowFocusGained (std::function< void()> callback) |
| Register a no-argument callback invoked when the application window gains OS focus. | |
| void | onWindowFocusGained (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the application window gains OS focus, receiving the raw SFML event. | |
| void | onWindowFocusGained (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the application window gains OS focus, receiving the raw SFML event. | |
| void | onWindowFocusLost (std::function< void()> callback) |
| Register a no-argument callback invoked when the application window loses OS focus. | |
| void | onWindowFocusLost (std::function< void()> callback) |
| Register a no-argument callback invoked when the application window loses OS focus. | |
| void | onWindowFocusLost (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the application window loses OS focus, receiving the raw SFML event. | |
| void | onWindowFocusLost (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the application window loses OS focus, receiving the raw SFML event. | |
| void | onWindowResized (std::function< void()> callback) |
| Register a no-argument callback invoked when the application window is resized. | |
| void | onWindowResized (std::function< void()> callback) |
| Register a no-argument callback invoked when the application window is resized. | |
| void | onWindowResized (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the application window is resized, receiving the raw SFML event. | |
| void | onWindowResized (std::function< void(const std::optional< sf::Event > &)> callback) |
| Register a callback invoked when the application window is resized, receiving the raw SFML event. | |
| operator const sf::Drawable & () const | |
Implicit conversion to a const sf::Drawable reference. | |
| virtual void | process (const std::string &key, const std::optional< sf::Event > &event) |
Invoke all callbacks registered for key. | |
| virtual void | process (const std::string &key, const std::optional< sf::Event > &event) |
Invoke all callbacks registered for key. | |
| void | process (ENUM_TYPE eventName, const std::optional< sf::Event > &event) |
Invoke all callbacks registered for eventName. | |
| void | process (ENUM_TYPE eventName, const std::optional< sf::Event > &event) |
Invoke all callbacks registered for eventName. | |
| void | process (ENUM_TYPE eventName, const std::optional< sf::Event > &event) |
Invoke all callbacks registered for eventName. | |
| void | process (ENUM_TYPE eventName, const std::optional< sf::Event > &event) |
Invoke all callbacks registered for eventName. | |
| void | publish (ENUM_TYPE event, FilterCallback filter=[](EventReceiver &){ return true;}, SystemCallback resolve=nullptr, SystemCallback reject=nullptr) |
| Fire an enum-keyed event to all matching subscribers. | |
| void | publish (ENUM_TYPE event, FilterCallback filter=[](EventReceiver &){ return true;}, SystemCallback resolve=nullptr, SystemCallback reject=nullptr) |
| Fire an enum-keyed event to all matching subscribers. | |
| bool | removeComponent (Core &child) |
| Remove a child component from this panel. | |
| void | rotate (Angle angle) |
| void | scale (Vector2f factor) |
| void | setAbove (T &obj, float spacing=0) |
Position this object immediately above obj. | |
| void | setAbove (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately above obj. | |
| void | setAbove (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately above obj. | |
| template<class T> | |
| void | setAbove (T &obj, float spacing=0) |
Position this object immediately above obj. | |
| void | setBelow (T &obj, float spacing=0) |
Position this object immediately below obj. | |
| void | setBelow (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately below obj. | |
| void | setBelow (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately below obj. | |
| template<class T> | |
| void | setBelow (T &obj, float spacing=0) |
Position this object immediately below obj. | |
| void | setCornerPointCount (unsigned int count) |
| Set the number of vertices per corner arc. | |
| void | setDragBounds (const sf::FloatRect &bounds) |
| Constrain drag movement to an axis-aligned bounding rectangle. | |
| void | setDragBounds (const sf::FloatRect &bounds) |
| Constrain drag movement to an axis-aligned bounding rectangle. | |
| void | setFillColor (Color color) |
| void | setFlag (State state, bool status) |
| Set a flag to an explicit value. | |
| void | setFlag (State state, bool status) |
| Set a flag to an explicit value. | |
| void | setFlag (State state, bool status) |
| Set a flag to an explicit value. | |
| void | setFramerate (float framerate) |
| Set the assumed framerate for movement interpolation. | |
| void | setFramerate (float framerate) |
| Set the assumed framerate for movement interpolation. | |
| void | setLeftOf (T &obj, float spacing=0) |
Position this object immediately to the left of obj. | |
| void | setLeftOf (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately to the left of obj. | |
| void | setLeftOf (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately to the left of obj. | |
| template<class T> | |
| void | setLeftOf (T &obj, float spacing=0) |
Position this object immediately to the left of obj. | |
| void | setOrigin (Vector2f origin) |
| void | setOutlineColor (Color color) |
| void | setOutlineThickness (float thickness) |
| void | setPosition (const sf::Vector2f &position) override |
| Move the panel and shift all children by the same delta. | |
| void | setPosition (Vector2f position) |
| void | setRadius (float radius) |
| Set the corner arc radius. | |
| void | setRightOf (T &obj, float spacing=0) |
Position this object immediately to the right of obj. | |
| void | setRightOf (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately to the right of obj. | |
| void | setRightOf (ml::RoundedRectangle &obj, float spacing=0) |
Position this object immediately to the right of obj. | |
| template<class T> | |
| void | setRightOf (T &obj, float spacing=0) |
Position this object immediately to the right of obj. | |
| void | setRotation (Angle angle) |
| void | setScale (Vector2f factors) |
| void | setSize (const sf::Vector2f &size) |
| Set the width and height of the rectangle. | |
| std::enable_if_t<!std::is_void_v< T > > | setState (T newState) |
| Transition to a new state. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle > > | setState (ml::RoundedRectangle newState) |
| Transition to a new state. | |
| std::enable_if_t<!std::is_void_v< ml::RoundedRectangle > > | setState (ml::RoundedRectangle newState) |
| Transition to a new state. | |
| std::enable_if_t<!std::is_void_v< T > > | setState (T newState) |
| Transition to a new state. | |
| std::enable_if_t<!std::is_void_v< T > > | setState (T newState) |
| Transition to a new state. | |
| void | setTexture (const Texture *texture, bool resetRect=false) |
| void | setTextureRect (const IntRect &rect) |
| void | subscribe (ENUM_TYPE event, Callback callback) |
| Subscribe to an enum-keyed event with a no-argument callback. | |
| void | subscribe (ENUM_TYPE event, Callback callback) |
| Subscribe to an enum-keyed event with a no-argument callback. | |
| void | subscribe (ENUM_TYPE event, EventCallback callback) |
| Subscribe to an enum-keyed event with a full SFML event callback. | |
| void | subscribe (ENUM_TYPE event, EventCallback callback) |
| Subscribe to an enum-keyed event with a full SFML event callback. | |
| void | toggleFlag (State state) |
Flip a flag between true and false. | |
| void | toggleFlag (State state) |
Flip a flag between true and false. | |
| void | toggleFlag (State state) |
Flip a flag between true and false. | |
| void | unlockSettings () |
Allow applySettings() to take effect again. | |
| void | unlockTheme () |
| Resume reacting to global theme changes. | |
| void | unsubscribe (EnumType event) |
| Unsubscribe from a single event by enum value. | |
| void | unsubscribe (EnumType event) |
| Unsubscribe from a single event by enum value. | |
| void | unsubscribeAll () |
| Remove all event subscriptions for this component. | |
| void | unsubscribeAll () |
| Remove all event subscriptions for this component. | |
Static Public Member Functions | |
| static void | clearPending () |
| Discard all pending operations without executing them. | |
| static void | clearPending () |
| Discard all pending operations without executing them. | |
| static bool | isBusy () |
Return true if the manager is currently iterating. | |
| static bool | isBusy () |
Return true if the manager is currently iterating. | |
| static void | processPending () |
| Flush all pending operations immediately. | |
| static void | processPending () |
| Flush all pending operations immediately. | |
Protected Member Functions | |
| void | onThemeApplied (const Theme &theme) override |
Called by ThemeManager when the active theme changes. | |
| void | update () |
Static Protected Member Functions | |
| static void | beginBusy () |
| Signal that iteration has begun. | |
| static void | beginBusy () |
| Signal that iteration has begun. | |
| static void | deferOrExecute (std::function< void()> operation) |
Execute operation now if safe, otherwise queue it. | |
| static void | deferOrExecute (std::function< void()> operation) |
Execute operation now if safe, otherwise queue it. | |
| static void | endBusy () |
| Signal that iteration has ended; flush pending operations. | |
| static void | endBusy () |
| Signal that iteration has ended; flush pending operations. | |
Static Protected Attributes | |
| static int | busyDepth |
| Iteration nesting depth. Operations are deferred while this is > 0. | |
| static int | busyDepth |
| Iteration nesting depth. Operations are deferred while this is > 0. | |
| static std::vector< std::function< void()> > | pendingOperations |
| Queue of operations pending until the current iteration completes. | |
| static std::vector< std::function< void()> > | pendingOperations |
| Queue of operations pending until the current iteration completes. | |
A layout container that groups, positions, and draws a set of child components.
Children are added via addComponent(). The Panel is responsible for:
draw() pass.SplitPanel can move an entire pane by repositioning its Panel.surface color as its fill.Children receive framework events (update, click, hover) automatically via the Fireable system — no separate Application::addComponent() call is needed.
|
inherited |
Definition at line 73 of file Draggable.h.
|
inherited |
Definition at line 73 of file Draggable.h.
|
inherited |
The manifest type, used by GatherFlags and GatherStates to locate this class's flag and state declarations.
Definition at line 65 of file Customizable.h.
|
inherited |
The manifest type, used by GatherFlags and GatherStates to locate this class's flag and state declarations.
Definition at line 65 of file Customizable.h.
|
inherited |
The manifest type, used by GatherFlags and GatherStates to locate this class's flag and state declarations.
Definition at line 65 of file Customizable.h.
|
inherited |
The enum type this manager stores flags for.
Definition at line 63 of file FlagManager.h.
|
inherited |
The enum type this manager stores flags for.
Definition at line 63 of file FlagManager.h.
|
inherited |
Definition at line 74 of file Draggable.h.
|
inherited |
Definition at line 74 of file Draggable.h.
| ml::Panel::Panel | ( | ) |
| void ml::Panel::addComponent | ( | Core & | child | ) |
Add a child component to this panel.
The child's current absolute position is recorded relative to the panel's current position. Subsequent setPosition() calls will keep the child at the same relative offset.
|
staticprotectedinherited |
Signal that iteration has begun.
Increments the busy-depth counter. Multiple nested calls are safe — operations remain deferred until the outermost endBusy() is reached.
|
staticprotectedinherited |
Signal that iteration has begun.
Increments the busy-depth counter. Multiple nested calls are safe — operations remain deferred until the outermost endBusy() is reached.
|
inherited |
Center this object within obj (both axes).
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object within obj (both axes).
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object within obj (both axes).
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object within obj (both axes).
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object horizontally within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object horizontally within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object horizontally within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object horizontally within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
|
inherited |
|
inherited |
Center this object vertically within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object vertically within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object vertically within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Center this object vertically within obj.
| T | Any type with getGlobalBounds(). |
| obj | Container to center within. |
|
inherited |
Return the current value of a flag.
Returns false for any flag that has never been explicitly set.
| state | The flag to query. |
true if the flag is enabled; false otherwise.
|
inherited |
Return the current value of a flag.
Returns false for any flag that has never been explicitly set.
| state | The flag to query. |
true if the flag is enabled; false otherwise.
|
inherited |
Return the current value of a flag.
Returns false for any flag that has never been explicitly set.
| state | The flag to query. |
true if the flag is enabled; false otherwise.
|
inherited |
Remove all registered objects.
If the collection is currently being iterated, the clear is deferred. After this call (or after the deferred clear executes), getComponents() returns an empty vector.
|
inherited |
Remove any previously set drag bounds.
After this call the component can be dragged freely across the window with no position clamping. Has no effect if no bounds were set.
|
inherited |
Remove any previously set drag bounds.
After this call the component can be dragged freely across the window with no position clamping. Has no effect if no bounds were set.
|
staticinherited |
Discard all pending operations without executing them.
Use during application shutdown or full reset when executing the queued operations would be unsafe (e.g., the objects they reference have already been destroyed).
|
staticinherited |
Discard all pending operations without executing them.
Use during application shutdown or full reset when executing the queued operations would be unsafe (e.g., the objects they reference have already been destroyed).
|
staticprotectedinherited |
Execute operation now if safe, otherwise queue it.
If busyDepth > 0 the operation is appended to pendingOperations and will run when the current iteration completes. If the manager is idle the operation executes immediately.
| operation | The callable to execute or defer. |
|
staticprotectedinherited |
Execute operation now if safe, otherwise queue it.
If busyDepth > 0 the operation is appended to pendingOperations and will run when the current iteration completes. If the manager is idle the operation executes immediately.
| operation | The callable to execute or defer. |
|
inherited |
Set a flag to false.
| state | The flag to disable. |
|
inherited |
Set a flag to false.
| state | The flag to disable. |
|
inherited |
Set a flag to false.
| state | The flag to disable. |
|
overridevirtual |
Draw this graphic to an SFML render target.
Delegates to T::draw after applying any render states returned by getRenderStates() (e.g., a shader set on this component).
| target | SFML render target (window or texture). |
| states | Current render states (transform, blend mode, etc.). |
Reimplemented from ml::Graphic< ml::RoundedRectangle >.
|
inherited |
Set a flag to true.
| state | The flag to enable. |
|
inherited |
Set a flag to true.
| state | The flag to enable. |
|
inherited |
Set a flag to true.
| state | The flag to enable. |
|
staticprotectedinherited |
Signal that iteration has ended; flush pending operations.
Decrements the busy-depth counter. When the counter reaches zero, all operations in pendingOperations are executed in FIFO order and the queue is cleared.
|
staticprotectedinherited |
Signal that iteration has ended; flush pending operations.
Decrements the busy-depth counter. When the counter reaches zero, all operations in pendingOperations are executed in FIFO order and the queue is cleared.
|
nodiscardinherited |
Return a read-only view of all currently registered objects.
The returned reference is valid until the next structural modification (add or remove). Do not store the reference across frames.
|
inherited |
Return the current per-corner vertex count.
|
overridevirtualinherited |
Return the axis-aligned bounding box in world space.
Delegates to T::getGlobalBounds(). Used by UIManager for hit-testing (click, hover) and by layout helpers.
Implements ml::Positionable.
|
overridevirtualinherited |
Return the position of a single vertex.
Required by sf::Shape for geometry generation.
| index | Vertex index in [0, getPointCount()). |
Implements sf::Shape.
|
overridevirtualinherited |
|
overridevirtualinherited |
Return the current world-space position.
Delegates to T::getPosition.
Implements ml::Positionable.
|
inherited |
Return the current corner arc radius.
|
inlinevirtualinherited |
Returns the SFML render states to use when drawing this object.
The default implementation returns a default-constructed sf::RenderStates (no transform, no texture, no blend mode override). Override to apply a custom shader, blend mode, or transform.
|
inlinevirtualinherited |
Returns the SFML render states to use when drawing this object.
The default implementation returns a default-constructed sf::RenderStates (no transform, no texture, no blend mode override). Override to apply a custom shader, blend mode, or transform.
|
inherited |
Return the current size of the rectangle.
|
inherited |
Return the current state value.
StateEnum value.
|
inherited |
Return the current state value.
StateEnum value.
|
inherited |
Return the current state value.
StateEnum value.
|
inherited |
|
explicitinherited |
Construct from an existing SFML object of type U.
| U | Source type, must be compatible with T's copy/move constructor. |
| obj | The source object to copy-construct from. |
|
staticinherited |
Return true if the manager is currently iterating.
Can be used by external code that needs to know whether a destructive operation will be deferred.
true when busyDepth > 0.
|
staticinherited |
Return true if the manager is currently iterating.
Can be used by external code that needs to know whether a destructive operation will be deferred.
true when busyDepth > 0.
|
inherited |
Return true while a moveTo or moveDistance animation is in progress.
true if the waypoint queue is non-empty.
|
inherited |
Return true while a moveTo or moveDistance animation is in progress.
true if the waypoint queue is non-empty.
|
inlinenodiscardinherited |
Return true if applySettings() is currently blocked.
Definition at line 115 of file Themeable.h.
|
inherited |
Return true if currently in state.
| state | The state value to compare against. |
true if the current state equals state.
|
inherited |
Return true if currently in state.
| state | The state value to compare against. |
true if the current state equals state.
|
inherited |
Return true if currently in state.
| state | The state value to compare against. |
true if the current state equals state.
|
inherited |
Return true if currently in state.
| state | The state value to compare against. |
true if the current state equals state.
|
inherited |
Return true if currently in state.
| state | The state value to compare against. |
true if the current state equals state.
|
inlinenodiscardinherited |
Return true if this component ignores theme changes.
Definition at line 97 of file Themeable.h.
|
inlineinherited |
Prevent applySettings() from taking effect.
Explicit individual setter calls still work normally. Only blocks the batch applySettings() path.
Definition at line 107 of file Themeable.h.
|
inlineinherited |
Prevent automatic re-styling when the global theme changes.
The component keeps its current visual state. Explicit individual setter calls still work normally.
Definition at line 85 of file Themeable.h.
|
inherited |
Animate by a relative offset from the current position.
Equivalent to moveTo(getPosition() + distance, seconds).
| distance | Offset in world coordinates to move by. |
| seconds | Duration of the animation. Defaults to 1.0 s. |
|
inherited |
Animate by a relative offset from the current position.
Equivalent to moveTo(getPosition() + distance, seconds).
| distance | Offset in world coordinates to move by. |
| seconds | Duration of the animation. Defaults to 1.0 s. |
|
inherited |
Animate to a position defined by a FloatRect origin.
Convenience overload that uses the top-left of position as the target. Useful when positioning relative to layout rects.
| position | Rect whose origin is the animation target. |
| seconds | Duration of the animation. Defaults to 1.0 s. |
|
inherited |
Animate to a position defined by a FloatRect origin.
Convenience overload that uses the top-left of position as the target. Useful when positioning relative to layout rects.
| position | Rect whose origin is the animation target. |
| seconds | Duration of the animation. Defaults to 1.0 s. |
|
inherited |
Animate to an absolute world-space position.
Populates an internal waypoint queue and advances through it on successive onUpdate ticks. The object's position at the start of the call is the implicit start point.
| position | Target position in world coordinates. |
| seconds | Duration of the animation. Defaults to 1.0 s. |
|
inherited |
Animate to an absolute world-space position.
Populates an internal waypoint queue and advances through it on successive onUpdate ticks. The object's position at the start of the call is the implicit start point.
| position | Target position in world coordinates. |
| seconds | Duration of the animation. Defaults to 1.0 s. |
|
inherited |
Register a no-argument callback invoked when this component loses keyboard focus.
| callback | Function invoked with no arguments when focus is lost. |
|
inherited |
Register a no-argument callback invoked when this component loses keyboard focus.
| callback | Function invoked with no arguments when focus is lost. |
|
inherited |
Register a callback invoked when this component loses keyboard focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is lost. |
|
inherited |
Register a callback invoked when this component loses keyboard focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is lost. |
|
inherited |
Register a no-argument callback invoked when this component is clicked.
Replaces any previously registered onClick callback. The callback fires after the mouse button is released over this component.
| callback | Function invoked with no arguments on click. |
|
inherited |
Register a no-argument callback invoked when this component is clicked.
Replaces any previously registered onClick callback. The callback fires after the mouse button is released over this component.
| callback | Function invoked with no arguments on click. |
|
inherited |
Register a callback invoked when this component is clicked, receiving the raw SFML event.
Replaces any previously registered onClick callback.
| callback | Function invoked with the SFML event on click. |
|
inherited |
Register a callback invoked when this component is clicked, receiving the raw SFML event.
Replaces any previously registered onClick callback.
| callback | Function invoked with the SFML event on click. |
|
inherited |
Register a no-argument callback invoked when this component gains keyboard focus.
| callback | Function invoked with no arguments when focus is gained. |
|
inherited |
Register a no-argument callback invoked when this component gains keyboard focus.
| callback | Function invoked with no arguments when focus is gained. |
|
inherited |
Register a callback invoked when this component gains keyboard focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is gained. |
|
inherited |
Register a callback invoked when this component gains keyboard focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is gained. |
|
inherited |
Register a no-argument callback invoked when the mouse enters this component's bounds.
| callback | Function invoked with no arguments on hover enter. |
|
inherited |
Register a no-argument callback invoked when the mouse enters this component's bounds.
| callback | Function invoked with no arguments on hover enter. |
|
inherited |
Register a callback invoked when the mouse enters this component's bounds, receiving the raw SFML event.
| callback | Function invoked with the SFML event on hover enter. |
|
inherited |
Register a callback invoked when the mouse enters this component's bounds, receiving the raw SFML event.
| callback | Function invoked with the SFML event on hover enter. |
|
inherited |
Register a no-argument callback invoked when a key is pressed while this component has focus.
| callback | Function invoked with no arguments on key press. |
|
inherited |
Register a no-argument callback invoked when a key is pressed while this component has focus.
| callback | Function invoked with no arguments on key press. |
|
inherited |
Register a callback invoked when a key is pressed while this component has focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event on key press. |
|
inherited |
Register a callback invoked when a key is pressed while this component has focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event on key press. |
|
inherited |
Register a no-argument callback invoked when a key is released while this component has focus.
| callback | Function invoked with no arguments on key release. |
|
inherited |
Register a no-argument callback invoked when a key is released while this component has focus.
| callback | Function invoked with no arguments on key release. |
|
inherited |
Register a callback invoked when a key is released while this component has focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event on key release. |
|
inherited |
Register a callback invoked when a key is released while this component has focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event on key release. |
|
inherited |
Register a no-argument callback invoked whenever the mouse moves anywhere in the window.
Unlike onHover, this fires for every component regardless of whether the cursor is over it.
| callback | Function invoked with no arguments on mouse move. |
|
inherited |
Register a no-argument callback invoked whenever the mouse moves anywhere in the window.
Unlike onHover, this fires for every component regardless of whether the cursor is over it.
| callback | Function invoked with no arguments on mouse move. |
|
inherited |
Register a callback invoked whenever the mouse moves anywhere in the window, receiving the raw SFML event.
| callback | Function invoked with the SFML event on mouse move. |
|
inherited |
Register a callback invoked whenever the mouse moves anywhere in the window, receiving the raw SFML event.
| callback | Function invoked with the SFML event on mouse move. |
|
inherited |
Register a no-argument callback invoked when a mouse button is pressed anywhere in the window.
This fires before click logic is evaluated. Prefer onClick for standard click handling.
| callback | Function invoked with no arguments on mouse press. |
|
inherited |
Register a no-argument callback invoked when a mouse button is pressed anywhere in the window.
This fires before click logic is evaluated. Prefer onClick for standard click handling.
| callback | Function invoked with no arguments on mouse press. |
|
inherited |
Register a callback invoked when a mouse button is pressed, receiving the raw SFML event.
| callback | Function invoked with the SFML event on mouse press. |
|
inherited |
Register a callback invoked when a mouse button is pressed, receiving the raw SFML event.
| callback | Function invoked with the SFML event on mouse press. |
|
inherited |
Register a no-argument callback invoked when a mouse button is released anywhere in the window.
This fires before click logic is evaluated. Prefer onClick for standard click handling.
| callback | Function invoked with no arguments on mouse release. |
|
inherited |
Register a no-argument callback invoked when a mouse button is released anywhere in the window.
This fires before click logic is evaluated. Prefer onClick for standard click handling.
| callback | Function invoked with no arguments on mouse release. |
|
inherited |
Register a callback invoked when a mouse button is released, receiving the raw SFML event.
| callback | Function invoked with the SFML event on mouse release. |
|
inherited |
Register a callback invoked when a mouse button is released, receiving the raw SFML event.
| callback | Function invoked with the SFML event on mouse release. |
|
inherited |
Register a no-argument callback invoked when the mouse wheel is scrolled while the cursor is over this component.
| callback | Function invoked with no arguments on scroll. |
|
inherited |
Register a no-argument callback invoked when the mouse wheel is scrolled while the cursor is over this component.
| callback | Function invoked with no arguments on scroll. |
|
inherited |
Register a callback invoked when the mouse wheel is scrolled while the cursor is over this component, receiving the SFML event.
| callback | Function invoked with the SFML event on scroll. |
|
inherited |
Register a callback invoked when the mouse wheel is scrolled while the cursor is over this component, receiving the SFML event.
| callback | Function invoked with the SFML event on scroll. |
|
inherited |
Register a callback invoked after each state transition.
The callback receives the newly entered state. Only one enter callback is active at a time; calling this again replaces it.
| callback | Function called with the new state after each transition. |
|
inherited |
Register a callback invoked after each state transition.
The callback receives the newly entered state. Only one enter callback is active at a time; calling this again replaces it.
| callback | Function called with the new state after each transition. |
|
inherited |
Register a callback invoked after each state transition.
The callback receives the newly entered state. Only one enter callback is active at a time; calling this again replaces it.
| callback | Function called with the new state after each transition. |
|
inherited |
Register a callback invoked after each state transition.
The callback receives the newly entered state. Only one enter callback is active at a time; calling this again replaces it.
| callback | Function called with the new state after each transition. |
|
inherited |
Register a callback invoked after each state transition.
The callback receives the newly entered state. Only one enter callback is active at a time; calling this again replaces it.
| callback | Function called with the new state after each transition. |
|
inherited |
Register a callback invoked before each state transition.
The callback receives the state being left. Only one exit callback is active at a time; calling this again replaces it.
| callback | Function called with the old state before each transition. |
|
inherited |
Register a callback invoked before each state transition.
The callback receives the state being left. Only one exit callback is active at a time; calling this again replaces it.
| callback | Function called with the old state before each transition. |
|
inherited |
Register a callback invoked before each state transition.
The callback receives the state being left. Only one exit callback is active at a time; calling this again replaces it.
| callback | Function called with the old state before each transition. |
|
inherited |
Register a callback invoked before each state transition.
The callback receives the state being left. Only one exit callback is active at a time; calling this again replaces it.
| callback | Function called with the old state before each transition. |
|
inherited |
Register a callback invoked before each state transition.
The callback receives the state being left. Only one exit callback is active at a time; calling this again replaces it.
| callback | Function called with the old state before each transition. |
|
inherited |
Register a no-argument callback invoked when a unicode character is entered while this component has focus.
Prefer onTextEntered over onKeypress for text input — it handles modifier keys, input method editors (IME), and non-ASCII characters correctly.
| callback | Function invoked with no arguments when text is entered. |
|
inherited |
Register a no-argument callback invoked when a unicode character is entered while this component has focus.
Prefer onTextEntered over onKeypress for text input — it handles modifier keys, input method editors (IME), and non-ASCII characters correctly.
| callback | Function invoked with no arguments when text is entered. |
|
inherited |
Register a callback invoked when a unicode character is entered while this component has focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when text is entered. |
|
inherited |
Register a callback invoked when a unicode character is entered while this component has focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when text is entered. |
|
overrideprotectedvirtual |
Called by ThemeManager when the active theme changes.
Override in your component to re-style from the new theme. Always check isThemeLocked() first:
| theme | The newly active theme. |
Implements ml::Themeable.
|
inherited |
Register a no-argument callback invoked when the mouse leaves this component's bounds.
| callback | Function invoked with no arguments on hover leave. |
|
inherited |
Register a no-argument callback invoked when the mouse leaves this component's bounds.
| callback | Function invoked with no arguments on hover leave. |
|
inherited |
Register a callback invoked when the mouse leaves this component's bounds, receiving the raw SFML event.
| callback | Function invoked with the SFML event on hover leave. |
|
inherited |
Register a callback invoked when the mouse leaves this component's bounds, receiving the raw SFML event.
| callback | Function invoked with the SFML event on hover leave. |
|
inherited |
Register a no-argument callback invoked every frame.
The callback fires once per frame before the draw pass. All active components receive this regardless of hover or focus state.
| callback | Function invoked with no arguments each frame. |
|
inherited |
Register a no-argument callback invoked every frame.
The callback fires once per frame before the draw pass. All active components receive this regardless of hover or focus state.
| callback | Function invoked with no arguments each frame. |
|
inherited |
Register a callback invoked every frame, receiving the SFML event.
For frame events the std::optional<sf::Event> is always std::nullopt — use the no-argument overload unless you specifically need the optional parameter in your callback signature.
| callback | Function invoked with the SFML event (always nullopt) each frame. |
|
inherited |
Register a callback invoked every frame, receiving the SFML event.
For frame events the std::optional<sf::Event> is always std::nullopt — use the no-argument overload unless you specifically need the optional parameter in your callback signature.
| callback | Function invoked with the SFML event (always nullopt) each frame. |
|
inherited |
Register a no-argument callback invoked when the application window gains OS focus.
| callback | Function invoked with no arguments when focus is gained. |
|
inherited |
Register a no-argument callback invoked when the application window gains OS focus.
| callback | Function invoked with no arguments when focus is gained. |
|
inherited |
Register a callback invoked when the application window gains OS focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is gained. |
|
inherited |
Register a callback invoked when the application window gains OS focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is gained. |
|
inherited |
Register a no-argument callback invoked when the application window loses OS focus.
| callback | Function invoked with no arguments when focus is lost. |
|
inherited |
Register a no-argument callback invoked when the application window loses OS focus.
| callback | Function invoked with no arguments when focus is lost. |
|
inherited |
Register a callback invoked when the application window loses OS focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is lost. |
|
inherited |
Register a callback invoked when the application window loses OS focus, receiving the raw SFML event.
| callback | Function invoked with the SFML event when focus is lost. |
|
inherited |
Register a no-argument callback invoked when the application window is resized.
| callback | Function invoked with no arguments on window resize. |
|
inherited |
Register a no-argument callback invoked when the application window is resized.
| callback | Function invoked with no arguments on window resize. |
|
inherited |
Register a callback invoked when the application window is resized, receiving the raw SFML event.
| callback | Function invoked with the SFML event on window resize. |
|
inherited |
Register a callback invoked when the application window is resized, receiving the raw SFML event.
| callback | Function invoked with the SFML event on window resize. |
|
inherited |
Implicit conversion to a const sf::Drawable reference.
Allows a Graphic to be passed wherever a raw sf::Drawable& is expected (e.g., window.draw()).
sf::Drawable.
|
virtualinherited |
Invoke all callbacks registered for key.
Called by framework dispatchers. key is the string produced by EnumKey::get(eventEnum).
| key | String key identifying the event. |
| event | SFML event forwarded to each callback. |
|
virtualinherited |
Invoke all callbacks registered for key.
Called by framework dispatchers. key is the string produced by EnumKey::get(eventEnum).
| key | String key identifying the event. |
| event | SFML event forwarded to each callback. |
|
inherited |
Invoke all callbacks registered for eventName.
Template overload that accepts any enum value directly, converting to a string key via EnumKey::get() internally.
| ENUM_TYPE | Any enum type. |
| eventName | The enum value identifying the event. |
| event | SFML event forwarded to each callback. |
|
inherited |
Invoke all callbacks registered for eventName.
Template overload that accepts any enum value directly, converting to a string key via EnumKey::get() internally.
| ENUM_TYPE | Any enum type. |
| eventName | The enum value identifying the event. |
| event | SFML event forwarded to each callback. |
|
inherited |
Invoke all callbacks registered for eventName.
Template overload that accepts any enum value directly, converting to a string key via EnumKey::get() internally.
| ENUM_TYPE | Any enum type. |
| eventName | The enum value identifying the event. |
| event | SFML event forwarded to each callback. |
|
inherited |
Invoke all callbacks registered for eventName.
Template overload that accepts any enum value directly, converting to a string key via EnumKey::get() internally.
| ENUM_TYPE | Any enum type. |
| eventName | The enum value identifying the event. |
| event | SFML event forwarded to each callback. |
|
staticinherited |
Flush all pending operations immediately.
Normally called automatically by endBusy(). Provided as a public escape hatch for unusual teardown sequences.
isBusy() is true can cause iterator invalidation in the currently running loop. Only call manually when you are certain it is safe.
|
staticinherited |
Flush all pending operations immediately.
Normally called automatically by endBusy(). Provided as a public escape hatch for unusual teardown sequences.
isBusy() is true can cause iterator invalidation in the currently running loop. Only call manually when you are certain it is safe.
|
inherited |
Fire an enum-keyed event to all matching subscribers.
Iterates all subscribers registered for event and invokes their callbacks for each subscriber that passes the optional filter. Optional resolve and reject system callbacks are called after each component passes or fails the filter respectively.
| ENUM_TYPE | Any enum type. |
| event | The enum value identifying the event to fire. |
| filter | Optional predicate; only subscribers for which this returns true receive the event. Defaults to accepting all subscribers. |
| resolve | Optional callback invoked for each subscriber that passes the filter. |
| reject | Optional callback invoked for each subscriber that fails the filter. |
|
inherited |
Fire an enum-keyed event to all matching subscribers.
Iterates all subscribers registered for event and invokes their callbacks for each subscriber that passes the optional filter. Optional resolve and reject system callbacks are called after each component passes or fails the filter respectively.
| ENUM_TYPE | Any enum type. |
| event | The enum value identifying the event to fire. |
| filter | Optional predicate; only subscribers for which this returns true receive the event. Defaults to accepting all subscribers. |
| resolve | Optional callback invoked for each subscriber that passes the filter. |
| reject | Optional callback invoked for each subscriber that fails the filter. |
| bool ml::Panel::removeComponent | ( | Core & | child | ) |
Remove a child component from this panel.
|
inherited |
Position this object immediately above obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately above obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately above obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately above obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately below obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately below obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately below obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately below obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Set the number of vertices per corner arc.
Triggers geometry regeneration.
| count | Vertex count per corner. Must be at least 1. |
|
inherited |
Constrain drag movement to an axis-aligned bounding rectangle.
While bounds are set, the component's position is clamped so that its top-left corner never moves outside bounds during a drag gesture. Bounds are applied in world coordinates.
Call clearDragBounds() to remove the constraint and allow free movement again.
| bounds | The world-space rectangle within which the component may be dragged. |
|
inherited |
Constrain drag movement to an axis-aligned bounding rectangle.
While bounds are set, the component's position is clamped so that its top-left corner never moves outside bounds during a drag gesture. Bounds are applied in world coordinates.
Call clearDragBounds() to remove the constraint and allow free movement again.
| bounds | The world-space rectangle within which the component may be dragged. |
|
inherited |
Set a flag to an explicit value.
| state | The flag to modify. |
| status | true to enable, false to disable. |
|
inherited |
Set a flag to an explicit value.
| state | The flag to modify. |
| status | true to enable, false to disable. |
|
inherited |
Set a flag to an explicit value.
| state | The flag to modify. |
| status | true to enable, false to disable. |
|
inherited |
Set the assumed framerate for movement interpolation.
moveTo generates a queue of intermediate positions based on this value. Defaults to 60 fps. Call this if your application runs at a different target rate to keep animation timing accurate.
| framerate | Target framerate in frames per second. |
|
inherited |
Set the assumed framerate for movement interpolation.
moveTo generates a queue of intermediate positions based on this value. Defaults to 60 fps. Call this if your application runs at a different target rate to keep animation timing accurate.
| framerate | Target framerate in frames per second. |
|
inherited |
Position this object immediately to the left of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately to the left of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately to the left of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately to the left of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
overridevirtual |
Move the panel and shift all children by the same delta.
Reimplemented from ml::Graphic< ml::RoundedRectangle >.
|
inherited |
Set the corner arc radius.
Triggers geometry regeneration. Values larger than half the shorter side are clamped automatically.
| radius | Corner radius in pixels. |
|
inherited |
Position this object immediately to the right of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately to the right of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately to the right of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Position this object immediately to the right of obj.
| T | Any type with getGlobalBounds(). |
| obj | Reference object. |
| spacing | Gap in pixels between the two objects. Defaults to 0. |
|
inherited |
Set the width and height of the rectangle.
Triggers geometry regeneration.
| size | New size in pixels. |
|
inherited |
Transition to a new state.
Fires the exit callback with the current state, updates the stored state to newState, then fires the enter callback with the new state. Either callback may be unset (nullptr), in which case it is skipped.
| newState | The state to transition into. |
|
inherited |
Transition to a new state.
Fires the exit callback with the current state, updates the stored state to newState, then fires the enter callback with the new state. Either callback may be unset (nullptr), in which case it is skipped.
| newState | The state to transition into. |
|
inherited |
Transition to a new state.
Fires the exit callback with the current state, updates the stored state to newState, then fires the enter callback with the new state. Either callback may be unset (nullptr), in which case it is skipped.
| newState | The state to transition into. |
|
inherited |
Transition to a new state.
Fires the exit callback with the current state, updates the stored state to newState, then fires the enter callback with the new state. Either callback may be unset (nullptr), in which case it is skipped.
| newState | The state to transition into. |
|
inherited |
Transition to a new state.
Fires the exit callback with the current state, updates the stored state to newState, then fires the enter callback with the new state. Either callback may be unset (nullptr), in which case it is skipped.
| newState | The state to transition into. |
|
inherited |
Subscribe to an enum-keyed event with a no-argument callback.
Convenience overload for callbacks that do not need access to the raw SFML event.
| ENUM_TYPE | Any enum type. |
| event | The enum value identifying the event to subscribe to. |
| callback | Function invoked with no arguments when the event fires. |
|
inherited |
Subscribe to an enum-keyed event with a no-argument callback.
Convenience overload for callbacks that do not need access to the raw SFML event.
| ENUM_TYPE | Any enum type. |
| event | The enum value identifying the event to subscribe to. |
| callback | Function invoked with no arguments when the event fires. |
|
inherited |
Subscribe to an enum-keyed event with a full SFML event callback.
The callback is invoked each time the event fires and the framework's filter (defined by the associated EventDispatcher) passes this component. The std::optional<sf::Event> parameter carries the raw SFML event when one is available, or std::nullopt for frame events.
| ENUM_TYPE | Any enum type — ml::Event for built-in events, or a manifest event enum for custom events. |
| event | The enum value identifying the event to subscribe to. |
| callback | Function invoked with the SFML event when the event fires. |
|
inherited |
Subscribe to an enum-keyed event with a full SFML event callback.
The callback is invoked each time the event fires and the framework's filter (defined by the associated EventDispatcher) passes this component. The std::optional<sf::Event> parameter carries the raw SFML event when one is available, or std::nullopt for frame events.
| ENUM_TYPE | Any enum type — ml::Event for built-in events, or a manifest event enum for custom events. |
| event | The enum value identifying the event to subscribe to. |
| callback | Function invoked with the SFML event when the event fires. |
|
inherited |
Flip a flag between true and false.
| state | The flag to toggle. |
|
inherited |
Flip a flag between true and false.
| state | The flag to toggle. |
|
inherited |
Flip a flag between true and false.
| state | The flag to toggle. |
|
inlineinherited |
Allow applySettings() to take effect again.
Definition at line 112 of file Themeable.h.
|
inlineinherited |
Resume reacting to global theme changes.
Does NOT immediately re-apply the current theme — call ThemeManager::get() and pass it to onThemeApplied() manually if you want to re-sync immediately after unlocking.
Definition at line 94 of file Themeable.h.
|
inlineinherited |
Unsubscribe from a single event by enum value.
Works with any enum type — ml::Event for built-in events, or a manifest Event enum for custom events.
If called during an EventManager::fire() iteration the removal is deferred until the iteration completes.
| EnumType | Any enum type. Enforced at compile time. |
| event | The enum value identifying the event to remove. |
Definition at line 65 of file Unsubscribable.h.
|
inlineinherited |
Unsubscribe from a single event by enum value.
Works with any enum type — ml::Event for built-in events, or a manifest Event enum for custom events.
If called during an EventManager::fire() iteration the removal is deferred until the iteration completes.
| EnumType | Any enum type. Enforced at compile time. |
| event | The enum value identifying the event to remove. |
Definition at line 65 of file Unsubscribable.h.
|
inherited |
Remove all event subscriptions for this component.
Removes every subscription registered across all event names. Called automatically by Core's destructor.
If called during an EventManager::fire() iteration the removal is deferred until the iteration completes.
|
inherited |
Remove all event subscriptions for this component.
Removes every subscription registered across all event names. Called automatically by Core's destructor.
If called during an EventManager::fire() iteration the removal is deferred until the iteration completes.
|
inlinestaticprotectedinherited |
Iteration nesting depth. Operations are deferred while this is > 0.
Definition at line 70 of file DeferredOperationsManager.h.
|
inlinestaticprotectedinherited |
Iteration nesting depth. Operations are deferred while this is > 0.
Definition at line 70 of file DeferredOperationsManager.h.
|
inlinestaticprotectedinherited |
Queue of operations pending until the current iteration completes.
Definition at line 73 of file DeferredOperationsManager.h.
|
inlinestaticprotectedinherited |
Queue of operations pending until the current iteration completes.
Definition at line 73 of file DeferredOperationsManager.h.