mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
LibWeb: Move everything into the Web namespace
This commit is contained in:
parent
6a3b12664a
commit
7a6c4a72d5
143 changed files with 593 additions and 45 deletions
|
@ -43,14 +43,14 @@ NonnullRefPtr<IRCLogBuffer> IRCLogBuffer::create()
|
|||
|
||||
IRCLogBuffer::IRCLogBuffer()
|
||||
{
|
||||
m_document = adopt(*new Document);
|
||||
m_document->append_child(adopt(*new DocumentType(document())));
|
||||
m_document = adopt(*new Web::Document);
|
||||
m_document->append_child(adopt(*new Web::DocumentType(document())));
|
||||
auto html_element = create_element(document(), "html");
|
||||
m_document->append_child(html_element);
|
||||
auto head_element = create_element(document(), "head");
|
||||
html_element->append_child(head_element);
|
||||
auto style_element = create_element(document(), "style");
|
||||
style_element->append_child(adopt(*new Text(document(), "div { font-family: Csilla; font-weight: lighter; }")));
|
||||
style_element->append_child(adopt(*new Web::Text(document(), "div { font-family: Csilla; font-weight: lighter; }")));
|
||||
head_element->append_child(style_element);
|
||||
auto body_element = create_element(document(), "body");
|
||||
html_element->append_child(body_element);
|
||||
|
|
|
@ -49,11 +49,11 @@ public:
|
|||
void add_message(const String& text, Color = Color::Black);
|
||||
void dump() const;
|
||||
|
||||
const Document& document() const { return *m_document; }
|
||||
Document& document() { return *m_document; }
|
||||
const Web::Document& document() const { return *m_document; }
|
||||
Web::Document& document() { return *m_document; }
|
||||
|
||||
private:
|
||||
IRCLogBuffer();
|
||||
RefPtr<Document> m_document;
|
||||
RefPtr<Element> m_container_element;
|
||||
RefPtr<Web::Document> m_document;
|
||||
RefPtr<Web::Element> m_container_element;
|
||||
};
|
||||
|
|
|
@ -46,7 +46,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
|
|||
// Make a container for the log buffer view + (optional) member list.
|
||||
auto& container = add<GUI::HorizontalSplitter>();
|
||||
|
||||
m_html_view = container.add<HtmlView>();
|
||||
m_html_view = container.add<Web::HtmlView>();
|
||||
|
||||
if (m_type == Channel) {
|
||||
auto& member_view = container.add<GUI::TableView>();
|
||||
|
@ -82,7 +82,7 @@ IRCWindow::~IRCWindow()
|
|||
void IRCWindow::set_log_buffer(const IRCLogBuffer& log_buffer)
|
||||
{
|
||||
m_log_buffer = &log_buffer;
|
||||
m_html_view->set_document(const_cast<Document*>(&log_buffer.document()));
|
||||
m_html_view->set_document(const_cast<Web::Document*>(&log_buffer.document()));
|
||||
}
|
||||
|
||||
bool IRCWindow::is_active() const
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibHTML/Forward.h>
|
||||
|
||||
class IRCChannel;
|
||||
class IRCClient;
|
||||
class IRCQuery;
|
||||
class IRCLogBuffer;
|
||||
class HtmlView;
|
||||
|
||||
class IRCWindow : public GUI::Widget {
|
||||
C_OBJECT(IRCWindow)
|
||||
|
@ -72,7 +72,7 @@ private:
|
|||
void* m_owner { nullptr };
|
||||
Type m_type;
|
||||
String m_name;
|
||||
RefPtr<HtmlView> m_html_view;
|
||||
RefPtr<Web::HtmlView> m_html_view;
|
||||
RefPtr<GUI::TextEditor> m_text_editor;
|
||||
RefPtr<IRCLogBuffer> m_log_buffer;
|
||||
int m_unread_count { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue