<commit_before>#pragma once

#include "Container.hpp"
#include <functional>

class Texture2D;
class Font;
namespace Geometry {
    class Rectangle;
    class OBJModel;
}

namespace GUI {
    class ImageButton;
    class VerticalScrollLayout;
    
    /// A window where a model can be selected.
    class TextureSelector : public Container {
        public:
            /// Create new window.
            /**
             * @param parent Parent widget.
             */
            TextureSelector(Widget* parent);
            
            /// Destructor.
            ~TextureSelector() override;
            
            /// Update the widget.
            void Update() override;
            
            /// Render the widget.
            void Render() override;
            
            /// Get the size of the widget.
            /**
             * @return The size
             */
            glm::vec2 GetSize() const override;
            
            /// Set the size of the widget.
            /**
             * @param size The new size.
             */
            void SetSize(const glm::vec2& size);
            
            /// Set function to call when a texture has been selected.
            /**
             * @param callback Function to call.
             */
            void SetTextureSelectedCallback(std::function<void(Texture2D*)> callback);
            
            /// Set the textures to select from.
            /**
             * @param models The textures to select from.
             */
            void SetTextures(const std::vector<Texture2D*>* textures);
            
            /// Update the list of textures.
            void UpdateTextures();
            
        private:
            void Close();
            void TextureSelected(Texture2D* model);
            
            Geometry::Rectangle* rectangle;
            Font* font;
            
            glm::vec2 size;
            
            bool hasTextureSelectedCallback = false;
            std::function<void(Texture2D*)> textureSelectedCallback;
            
            ImageButton* closeButton;
            Texture2D* closeTexture;
            
            const std::vector<Texture2D*>* textures;
            VerticalScrollLayout* textureList;
    };
}<commit_msg>Fix TextureSelector documentation.<commit_after>#pragma once

#include "Container.hpp"
#include <functional>

class Texture2D;
class Font;
namespace Geometry {
    class Rectangle;
    class OBJModel;
}

namespace GUI {
    class ImageButton;
    class VerticalScrollLayout;
    
    /// A window where a model can be selected.
    class TextureSelector : public Container {
        public:
            /// Create new window.
            /**
             * @param parent Parent widget.
             */
            TextureSelector(Widget* parent);
            
            /// Destructor.
            ~TextureSelector() override;
            
            /// Update the widget.
            void Update() override;
            
            /// Render the widget.
            void Render() override;
            
            /// Get the size of the widget.
            /**
             * @return The size
             */
            glm::vec2 GetSize() const override;
            
            /// Set the size of the widget.
            /**
             * @param size The new size.
             */
            void SetSize(const glm::vec2& size);
            
            /// Set function to call when a texture has been selected.
            /**
             * @param callback Function to call.
             */
            void SetTextureSelectedCallback(std::function<void(Texture2D*)> callback);
            
            /// Set the textures to select from.
            /**
             * @param textures The textures to select from.
             */
            void SetTextures(const std::vector<Texture2D*>* textures);
            
            /// Update the list of textures.
            void UpdateTextures();
            
        private:
            void Close();
            void TextureSelected(Texture2D* model);
            
            Geometry::Rectangle* rectangle;
            Font* font;
            
            glm::vec2 size;
            
            bool hasTextureSelectedCallback = false;
            std::function<void(Texture2D*)> textureSelectedCallback;
            
            ImageButton* closeButton;
            Texture2D* closeTexture;
            
            const std::vector<Texture2D*>* textures;
            VerticalScrollLayout* textureList;
    };
}
{'fraction_non_alphanumeric': 0.0845225027442371, 'fraction_numerical': 0.0043907793633369925, 'mean_word_length': 1.2421259842519685, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3811903', 'n_tokens_mistral': 1060, 'n_tokens_neox': 1035, 'n_words': 312}