aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-25 16:19:49 +0200
committerdec05eba <dec05eba@protonmail.com>2018-10-25 16:19:49 +0200
commit9096d6ef3710118f98c46f6e7f7689d5aa11c7f4 (patch)
tree3fe958d79d2771cd8ee26863486eb3dedc1b4b49 /include
parentc50ef935e0792eeb0256ddf5df87af015f3ae1d8 (diff)
Initial commit
Diffstat (limited to 'include')
-rw-r--r--include/ChatMessage.hpp16
-rw-r--r--include/ChatWindow.hpp29
-rw-r--r--include/LoginWindow.hpp21
-rw-r--r--include/Window.hpp20
4 files changed, 86 insertions, 0 deletions
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 <gtkmm/grid.h>
+#include <gtkmm/label.h>
+
+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 <gtkmm/label.h>
+#include <gtkmm/grid.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/paned.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/stack.h>
+#include <gtkmm/textview.h>
+
+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 <gtkmm/grid.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/button.h>
+#include <functional>
+
+namespace dchat
+{
+ class LoginWindow : public Gtk::Grid
+ {
+ public:
+ LoginWindow();
+
+ void setLoginHandler(std::function<void()> 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 <gtkmm/window.h>
+#include <gtkmm/stack.h>
+
+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