Photon 1.0.0
Loading...
Searching...
No Matches
el_comment.h
Go to the documentation of this file.
1#ifndef LH_EL_COMMENT_H
2#define LH_EL_COMMENT_H
3
4#include "html_tag.h"
5
6namespace litehtml
7{
8 class el_comment : public element
9 {
10 string m_text;
11 public:
12 explicit el_comment(const std::shared_ptr<document>& doc);
13
14 bool is_comment() const override;
15 void get_text(string& text) override;
16 void set_data(const char* data) override;
17 std::shared_ptr<render_item> create_render_item(const std::shared_ptr<render_item>& /*parent_ri*/) override
18 {
19 // Comments are not rendered
20 return nullptr;
21 }
22 };
23}
24
25#endif // LH_EL_COMMENT_H
Definition el_comment.h:9
bool is_comment() const override
Definition el_comment.cpp:9
std::shared_ptr< render_item > create_render_item(const std::shared_ptr< render_item > &) override
Definition el_comment.h:17
void get_text(string &text) override
Definition el_comment.cpp:14
void set_data(const char *data) override
Definition el_comment.cpp:19
string m_text
Definition el_comment.h:10
Definition element.h:19
Definition background.h:12
Definition format.h:1901