From 893a9af507c919d03c13bddba286b2bb3583f6a5 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 25 Jun 2022 15:11:11 +0200 Subject: [PATCH] Added getters and setters for HTMLTag. --- modules/web/html/html_builder_bind.cpp | 14 ++++++++++++++ modules/web/html/html_builder_bind.h | 9 +++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/web/html/html_builder_bind.cpp b/modules/web/html/html_builder_bind.cpp index 577170da3..e8eb06a74 100644 --- a/modules/web/html/html_builder_bind.cpp +++ b/modules/web/html/html_builder_bind.cpp @@ -4,6 +4,20 @@ //#include "web/http/request.h" +bool _HTMLTag::get_simple() const { + return simple; +} +void _HTMLTag::set_simple(const bool val) { + simple = val; +} + +String _HTMLTag::get_result() { + return result; +} +void _HTMLTag::set_result(const String &str) { + result = str; +} + Ref<_HTMLTag> _HTMLTag::str(const String &str) { result += " " + str; diff --git a/modules/web/html/html_builder_bind.h b/modules/web/html/html_builder_bind.h index ad23df4ca..ba59e05e4 100644 --- a/modules/web/html/html_builder_bind.h +++ b/modules/web/html/html_builder_bind.h @@ -12,8 +12,11 @@ class _HTMLTag : public Reference { GDCLASS(_HTMLTag, Reference) public: - bool simple; - String result; + bool get_simple() const; + void set_simple(const bool val); + + String get_result(); + void set_result(const String &str); Ref<_HTMLTag> str(const String &str); Ref<_HTMLTag> style(const String &val); @@ -189,6 +192,8 @@ public: _HTMLTag(); Ref<_HTMLBuilder> owner; + bool simple; + String result; protected: static void _bind_methods();