summaryrefslogtreecommitdiff
path: root/Applications/IRCClient/IRCAppWindow.h
blob: 128371c42d5beba302fe71cd83f0c7709e90e231 (plain)
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
#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;

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;
};