-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHtmlDocument.h
More file actions
44 lines (31 loc) · 887 Bytes
/
HtmlDocument.h
File metadata and controls
44 lines (31 loc) · 887 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// HtmlDocument.h
// C++HTML
//
// Created by Denis Stadniczuk on 03/07/14.
// Copyright (c) 2014 Denis Stadniczuk. All rights reserved.
//
#ifndef __C__HTML__HtmlDocument__
#define __C__HTML__HtmlDocument__
#include <iostream>
#include <vector>
#include <libxml/parser.h>
#include "Renderer.h"
#include "CssStyleSheet.h"
#include "HtmlElement.h"
class HtmlDocument {
void parse_traverse(xmlNode *node, HtmlElement *root);
void applyCss(HtmlElement *root);
public:
HtmlDocument(std::string html);
~HtmlDocument();
std::vector<CssStyleSheet*> styleSheets;
HtmlElement *head;
HtmlElement *body;
std::vector<HtmlElement*> querySelectorAll(std::string selector);
void reCalcStyles();
Renderer *renderer;
void needsReRendering();
// void DOMNodeInsertedIntoDocument(HtmlNode *node);
};
#endif /* defined(__C__HTML__HtmlDocument__) */