/* * Copyright (c) 2021, Luke Wilde * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "AccountHolder.h" #include "InboxModel.h" #include #include #include #include #include class MailWidget final : public GUI::Widget { C_OBJECT(MailWidget) public: virtual ~MailWidget() override = default; bool connect_and_login(); void on_window_close(); private: MailWidget(); void selected_mailbox(); void selected_email_to_load(); struct Alternative { IMAP::BodyStructureData const& body_structure; Vector position; }; IMAP::MultiPartBodyStructureData const* look_for_alternative_body_structure(IMAP::MultiPartBodyStructureData const& current_body_structure, Vector& position_stack) const; Vector get_alternatives(IMAP::MultiPartBodyStructureData const&) const; bool is_supported_alternative(Alternative const&) const; OwnPtr m_imap_client; RefPtr m_mailbox_list; RefPtr m_individual_mailbox_view; RefPtr m_web_view; RefPtr m_statusbar; RefPtr m_link_context_menu; RefPtr m_link_context_menu_default_action; URL m_link_context_menu_url; RefPtr m_image_context_menu; Gfx::ShareableBitmap m_image_context_menu_bitmap; URL m_image_context_menu_url; OwnPtr m_account_holder; };