/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "IRCClient.h" #include "IRCWindow.h" #include #include class IRCAppWindow : public GUI::Window { C_OBJECT(IRCAppWindow); public: virtual ~IRCAppWindow() override; static IRCAppWindow& the(); void set_active_window(IRCWindow&); private: IRCAppWindow(String server, int port); void setup_client(); void setup_actions(); void setup_menus(); void setup_widgets(); void update_title(); void update_gui_actions(); NonnullRefPtr create_window(void* owner, IRCWindow::Type, const String& name); NonnullRefPtr m_client; RefPtr m_container; RefPtr m_window_list; RefPtr m_join_action; RefPtr m_list_channels_action; RefPtr m_part_action; RefPtr m_cycle_channel_action; RefPtr m_whois_action; RefPtr m_open_query_action; RefPtr m_close_query_action; RefPtr m_change_nick_action; RefPtr m_change_topic_action; RefPtr m_invite_user_action; RefPtr m_banlist_action; RefPtr m_voice_user_action; RefPtr m_devoice_user_action; RefPtr m_hop_user_action; RefPtr m_dehop_user_action; RefPtr m_op_user_action; RefPtr m_deop_user_action; RefPtr m_kick_user_action; };