aboutsummaryrefslogtreecommitdiffstats
path: root/include/litehtml/el_comment.h
blob: fa8e72fc91e0705de83266d140cf02cffff35d42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef LH_EL_COMMENT_H
#define LH_EL_COMMENT_H

#include "element.h"

namespace litehtml
{
	class el_comment : public element
	{
		string	m_text;
	public:
		explicit el_comment(const std::shared_ptr<document>& doc);

		bool is_comment() const override;
		void get_text(string& text) override;
		void set_data(const char* data) override;
		std::shared_ptr<render_item> create_render_item(const std::shared_ptr<render_item>& /*parent_ri*/) override
		{
			// Comments are not rendered
			return nullptr;
		}
	};
}

#endif  // LH_EL_COMMENT_H