<commit_before>#ifndef WIDGET_HPP
#define WIDGET_HPP

#include <SFML/Window/Window.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Graphics/Sprite.hpp>

#include "gui/signal.hpp"

namespace qrw
{
    class Widget : public sf::Sprite
    {
        public:
            Widget(sf::Window* window, float width, float height);
            Widget(sf::Window* window, sf::Vector2f size);
            ~Widget();

            void handleEvent(const sf::Event& event);

            void setVisible(bool visibility = true);

            void disconnectAllSignals();

            void setSize(sf::Vector2f size);
            sf::Vector2f getSize() const;

            // Signals
            Signal signalclicked;
            Signal signalmouseentered;
            Signal signalmouseleft;
            Signal signalmousemoved;
            Signal signalleftmousebuttonpressed;

        protected:
            bool hasMouseFocus();

        private:
            /**
             * @brief Registeres when left mouse button is pressed.
             *
             * Is set to true if the left mouse button was pressed while mouse cursor was on the widget. If the mouse
             * is released again while on the widget a click event took place. Reset leftMouseButtonpressRegistered if
             * mouse leaves focus.
             */
            bool leftMouseButtonPressRegistered;
            bool mouseFocus;

            bool visible;

            /**
             * Holds size of the widget.
             */
            sf::Vector2f size;

            const sf::Window* window;
    };
}
#endif<commit_msg>Changed visibility of Widget::window to protected.<commit_after>#ifndef WIDGET_HPP
#define WIDGET_HPP

#include <SFML/Window/Window.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Graphics/Sprite.hpp>

#include "gui/signal.hpp"

namespace qrw
{
    class Widget : public sf::Sprite
    {
        public:
            Widget(sf::Window* window, float width, float height);
            Widget(sf::Window* window, sf::Vector2f size);
            ~Widget();

            void handleEvent(const sf::Event& event);

            void setVisible(bool visibility = true);

            void disconnectAllSignals();

            void setSize(sf::Vector2f size);
            sf::Vector2f getSize() const;

            // Signals
            Signal signalclicked;
            Signal signalmouseentered;
            Signal signalmouseleft;
            Signal signalmousemoved;
            Signal signalleftmousebuttonpressed;

        protected:
            bool hasMouseFocus();
            const sf::Window* window;

        private:
            /**
             * @brief Registeres when left mouse button is pressed.
             *
             * Is set to true if the left mouse button was pressed while mouse cursor was on the widget. If the mouse
             * is released again while on the widget a click event took place. Reset leftMouseButtonpressRegistered if
             * mouse leaves focus.
             */
            bool leftMouseButtonPressRegistered;
            bool mouseFocus;

            bool visible;

            /**
             * Holds size of the widget.
             */
            sf::Vector2f size;
    };
}
#endif
{'fraction_non_alphanumeric': 0.0787037037037037, 'fraction_numerical': 0.0024691358024691358, 'mean_word_length': 1.7795883361921099, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2061096', 'n_tokens_mistral': 829, 'n_tokens_neox': 800, 'n_words': 254}