2025-08-02 20:10:33 +03:00
|
|
|
#pragma once
|
|
|
|
|
#include "../DrawComponents/DrawTextBox.hpp"
|
|
|
|
|
#include "DrawingProgramEditToolBase.hpp"
|
|
|
|
|
#include <Helpers/SCollision.hpp>
|
|
|
|
|
#include <any>
|
|
|
|
|
|
|
|
|
|
class DrawingProgram;
|
|
|
|
|
|
|
|
|
|
class TextBoxEditTool : public DrawingProgramEditToolBase {
|
|
|
|
|
public:
|
|
|
|
|
TextBoxEditTool(DrawingProgram& initDrawP);
|
|
|
|
|
|
|
|
|
|
virtual void edit_start(EditTool& editTool, const std::shared_ptr<DrawComponent>& a, std::any& prevData) override;
|
|
|
|
|
virtual void commit_edit_updates(const std::shared_ptr<DrawComponent>& a, std::any& prevData) override;
|
|
|
|
|
virtual bool edit_update(const std::shared_ptr<DrawComponent>& a) override;
|
|
|
|
|
virtual bool edit_gui(const std::shared_ptr<DrawComponent>& a) override;
|
|
|
|
|
private:
|
|
|
|
|
void edit_text(std::function<void()> toRun, const std::shared_ptr<DrawTextBox>& textBox);
|
|
|
|
|
void update_textbox_network(const std::shared_ptr<DrawTextBox>& textBox);
|
|
|
|
|
|
2025-10-11 15:35:17 +03:00
|
|
|
std::optional<DrawTextBox::Data> oldData;
|
2025-08-02 20:10:33 +03:00
|
|
|
};
|