You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
1.2 KiB

#include "TEXTAREAElement.h"
#include "../components/InputComponent.h"
#include "../components/ButtonComponent.h"
#include "../components/DocumentComponent.h"
#include "../../Log.h"
#include "../../html/HTMLParser.h"
#include "../../FormData.h"
#include <ctime>
TEXTAREAElement::TEXTAREAElement() {
isInline = true;
}
std::unique_ptr<Component> TEXTAREAElement::renderer(const ElementRenderRequest &request) {
// const float rawX, const float rawY, const float rawWidth, const float rawHeight, const int windowWidth, const int windowHeight
// what should our default size be?
//std::cout << "INPUTElement::renderer - creating InputComponent at " << x << "x" << y << std::endl;
TagNode *tagNode = dynamic_cast<TagNode*>(request.node.get());
if (tagNode) {
std::unique_ptr<InputComponent> inputComponent = std::make_unique<InputComponent>(0, 0, 250.0f, 52.0f, request.parentComponent->win->windowWidth, request.parentComponent->win->windowHeight);
inputComponent->node = tagNode;
inputComponent->multiLine = true;
//inputComponent->name = "textareaInput";
return std::move(inputComponent);
}
return nullptr;
}