1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 12:45:07 +00:00
serenity/Applications/IRCClient/IRCAppWindow.h
Andreas Kling 5e6c1c6912 IRCClient: Open query window immediately when created by the user.
When handling "/query nick", we now immediately switch to the new query.
2019-07-13 11:54:01 +02:00

38 lines
923 B
C++

#pragma once
#include "IRCClient.h"
#include "IRCWindow.h"
#include <LibGUI/GWidget.h>
#include <LibGUI/GWindow.h>
class GAction;
class GStackWidget;
class IRCAppWindow : public GWindow {
public:
IRCAppWindow();
virtual ~IRCAppWindow() override;
static IRCAppWindow& the();
void set_active_window(IRCWindow&);
private:
void setup_client();
void setup_actions();
void setup_menus();
void setup_widgets();
void update_title();
void update_part_action();
IRCWindow& create_window(void* owner, IRCWindow::Type, const String& name);
IRCClient m_client;
GStackWidget* m_container { nullptr };
GTableView* m_window_list { nullptr };
RefPtr<GAction> m_join_action;
RefPtr<GAction> m_part_action;
RefPtr<GAction> m_whois_action;
RefPtr<GAction> m_open_query_action;
RefPtr<GAction> m_close_query_action;
RefPtr<GAction> m_change_nick_action;
};