diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ChatMessage.hpp | 16 | ||||
-rw-r--r-- | include/ChatWindow.hpp | 29 | ||||
-rw-r--r-- | include/LoginWindow.hpp | 21 | ||||
-rw-r--r-- | include/Window.hpp | 20 |
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 |