From 9096d6ef3710118f98c46f6e7f7689d5aa11c7f4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 25 Oct 2018 16:19:49 +0200 Subject: Initial commit --- include/ChatMessage.hpp | 16 ++++++++++++++++ include/ChatWindow.hpp | 29 +++++++++++++++++++++++++++++ include/LoginWindow.hpp | 21 +++++++++++++++++++++ include/Window.hpp | 20 ++++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 include/ChatMessage.hpp create mode 100644 include/ChatWindow.hpp create mode 100644 include/LoginWindow.hpp create mode 100644 include/Window.hpp (limited to 'include') diff --git a/include/ChatMessage.hpp b/include/ChatMessage.hpp new file mode 100644 index 0000000..0547557 --- /dev/null +++ b/include/ChatMessage.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include +#include + +namespace dchat +{ + class ChatMessage : public Gtk::Grid + { + public: + ChatMessage(const Glib::ustring &username, const Glib::ustring &text); + + Gtk::Label username; + Gtk::Label text; + }; +} \ No newline at end of file diff --git a/include/ChatWindow.hpp b/include/ChatWindow.hpp new file mode 100644 index 0000000..2d45b76 --- /dev/null +++ b/include/ChatWindow.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace dchat +{ + class ChatWindow : public Gtk::Grid + { + public: + ChatWindow(); + private: + void setupTopBar(); + void setupLeftPanel(Gtk::Paned *sidePanels); + void setupMessageArea(Gtk::Grid *rightPanel); + void setupChatInput(Gtk::Grid *rightPanel); + private: + Gtk::Grid topbar; + Gtk::Entry topbarSearchBar; + Gtk::Label currentChannelTitle; + Gtk::ScrolledWindow chatArea; + Gtk::TextView chatInput; + }; +} \ No newline at end of file diff --git a/include/LoginWindow.hpp b/include/LoginWindow.hpp new file mode 100644 index 0000000..b60dddb --- /dev/null +++ b/include/LoginWindow.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include +#include +#include +#include + +namespace dchat +{ + class LoginWindow : public Gtk::Grid + { + public: + LoginWindow(); + + void setLoginHandler(std::function loginHandler); + private: + Gtk::Entry usernameInput; + Gtk::Entry passwordInput; + Gtk::Button loginButton; + }; +} \ No newline at end of file diff --git a/include/Window.hpp b/include/Window.hpp new file mode 100644 index 0000000..2810bbd --- /dev/null +++ b/include/Window.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "ChatWindow.hpp" +#include "LoginWindow.hpp" +#include +#include + +namespace dchat +{ + class Window : public Gtk::Window + { + public: + Window(); + virtual ~Window(); + protected: + Gtk::Stack stack; + LoginWindow loginWindow; + ChatWindow chatWindow; + }; +} \ No newline at end of file -- cgit v1.2.3