Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ In the future it should have apps that work using SQL, SDL and even web requests

``` C++
MultiApp/ // Core application files
├── src/ // C++ Source Files
│ └── include/ // C++ Header Files
│
├── res/ // Misc Resources
│ └── gtk/ // Gtk UI Resources
├── include/ // C++ Project and Test Header Files
├── src/ // Main C++ Project Source Files
├── resources/ // Misc Resources
│ │── gtk/ // Gtk UI Resources
│ └── screenshots/ // README Screenshots
│
└── tests/ // Test Source Files
└── include/ // Tests Header Files
```

## 🗺️ Roadmap
Expand Down Expand Up @@ -99,13 +98,13 @@ and run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /
Here are some screenshots of the funtioning app on Linux.

Fresh window when opening browser app:
![Browser App](https://github.com/dxchel/MultiApp/blob/main/res/screenshots/fresh_window.png)
![Browser App](https://github.com/dxchel/MultiApp/blob/main/resources/screenshots/fresh_window.png)

Window after adding directions and returning to project repo in URL history, notice both back and forward buttons enabled:
![Added some directions and returned to project Repo](https://github.com/dxchel/MultiApp/blob/main/res/screenshots/multiapp_repo.png)
![Added some directions and returned to project Repo](https://github.com/dxchel/MultiApp/blob/main/resources/screenshots/multiapp_repo.png)

Fractal app window:
![Fractal App](https://github.com/dxchel/MultiApp/blob/main/res/screenshots/fractal.png)
![Fractal App](https://github.com/dxchel/MultiApp/blob/main/resources/screenshots/fractal.png)

Chat app window:
![Chat App](https://github.com/dxchel/MultiApp/blob/main/res/screenshots/chat.png)
![Chat App](https://github.com/dxchel/MultiApp/blob/main/resources/screenshots/chat.png)
2 changes: 1 addition & 1 deletion src/include/browser_app.hpp → include/browser_app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Browser : public Gtk::Box {
/**
* @brief Creates Browser object with all needed Widgets and signals.
*
* Creates Browser object using res/gtk/browser_app.ui file,
* Creates Browser object using resources/gtk/browser_app.ui file,
* Checks for file issues, gets Widgets and connects needed signals.
*/
Browser();
Expand Down
2 changes: 1 addition & 1 deletion src/include/chat_app.hpp → include/chat_app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Chat : public Gtk::Box {
/**
* @brief Creates Chat object with all needed Widgets and signals.
*
* Creates Chat object using res/gtk/chat_app.ui file,
* Creates Chat object using resources/gtk/chat_app.ui file,
* Checks for file issues, gets Widgets and connects needed signals.
*/
Chat();
Expand Down
2 changes: 1 addition & 1 deletion src/include/fractal_app.hpp → include/fractal_app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class Fractal : public Gtk::Box {
/**
* @brief Creates FractalBox object with all needed Widgets and signals.
*
* Creates FractalBox object using res/gtk/fractal_app.ui file,
* Creates FractalBox object using resources/gtk/fractal_app.ui file,
* Checks for file issues, gets Widgets and connects needed signals.
*/
Fractal();
Expand Down
51 changes: 51 additions & 0 deletions include/main_application.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#pragma once

#include <gtkmm.h>


/**
* @brief MainApplication class containing other apps in project.
*
* Gtk::Application that initializes a window containing needed
* Widgets for containing core apps in the project and running functions.
*/
class MainApplication : public Gtk::Application {
friend class MainApplicationTest;
friend class MainApplicationTest_MainApplicationStructureTest_Test;

public:
Gtk::Label *status_label{};

/**
* @brief Creates RefPtr using class constructor.
*
* @return New MainApplication object RefPtr.
*/
static Glib::RefPtr<MainApplication> create();

private:
Gtk::ApplicationWindow *main_window{};
Gtk::Box *selected_app{};

std::vector<std::pair<std::string, std::function<Gtk::Box*()>>> apps{};

/**
* @brief Creates ApplicationWindow to show.
*
* Creates and populates the main ApplicationWindow using
* resources/gtk/main_app.ui file as base and adding Apps into it.
*
* @return New ApplicationWindow to use in the program.
*/
Gtk::ApplicationWindow* create_window();

/**
* @brief Creates MainApplication object with application id and handles.
*/
MainApplication();

/**
* @brief Presents main window.
*/
void on_activate() override;
};
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/include/tests.hpp → include/tests.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include "../../src/include/main_application.hpp"
#include "../../src/include/browser_app.hpp"
#include "../../src/include/fractal_app.hpp"
#include "../../src/include/chat_app.hpp"
#include "main_application.hpp"
#include "browser_app.hpp"
#include "fractal_app.hpp"
#include "chat_app.hpp"

#include <gtest/gtest.h>
#include <gmock/gmock.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions src/browser_app.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/browser_app.hpp"
#include "../include/browser_app.hpp"

#include <iostream>
#include <regex>
Expand All @@ -11,7 +11,7 @@ Browser::Browser() : Gtk::Box(Gtk::Orientation::VERTICAL) {
// Load the GtkBuilder file and instantiate its widgets, check for errors
auto ref_builder {Gtk::Builder::create()};
try {
ref_builder->add_from_file("res/gtk/browser_app.ui");
ref_builder->add_from_file("resources/gtk/browser_app.ui");
} catch(const Glib::FileError& ex) {
std::cerr << "FileError: " << ex.what() << std::endl;
throw ex;
Expand Down
8 changes: 4 additions & 4 deletions src/chat_app.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "include/chat_app.hpp"
#include "include/session.hpp"
#include "../include/chat_app.hpp"
#include "../include/session.hpp"

#include <gtkmm.h>
#include <iostream>
Expand All @@ -11,7 +11,7 @@ Chat::Chat() : Gtk::Box(Gtk::Orientation::VERTICAL) {
// Load the GtkBuilder file and instantiate its widgets, check for errors
auto ref_builder {Gtk::Builder::create()};
try {
ref_builder->add_from_file("res/gtk/chat_app.ui");
ref_builder->add_from_file("resources/gtk/chat_app.ui");
} catch(const Glib::FileError& ex) {
std::cerr << "FileError: " << ex.what() << "\n";
throw ex;
Expand Down Expand Up @@ -61,7 +61,7 @@ Chat::Chat() : Gtk::Box(Gtk::Orientation::VERTICAL) {

// Add css to the default display
auto css_provider = Gtk::CssProvider::create();
css_provider->load_from_path("./res/gtk/chat_app.css");
css_provider->load_from_path("./resources/gtk/chat_app.css");

Gtk::StyleContext::add_provider_for_display(
Gdk::Display::get_default(),
Expand Down
4 changes: 2 additions & 2 deletions src/fractal_app.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/fractal_app.hpp"
#include "../include/fractal_app.hpp"

#include <iostream>
#include <any>
Expand Down Expand Up @@ -164,7 +164,7 @@ Fractal::Fractal() : Gtk::Box(Gtk::Orientation::HORIZONTAL) {
// Load the GtkBuilder file and instantiate its widgets, check for errors
auto ref_builder {Gtk::Builder::create()};
try {
ref_builder->add_from_file("res/gtk/fractal_app.ui");
ref_builder->add_from_file("resources/gtk/fractal_app.ui");
} catch(const Glib::FileError& ex) {
std::cerr << "FileError: " << ex.what() << std::endl;
throw ex;
Expand Down
2 changes: 1 addition & 1 deletion src/include/main_application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MainApplication : public Gtk::Application {
* @brief Creates ApplicationWindow to show.
*
* Creates and populates the main ApplicationWindow using
* res/gtk/main_app.ui file as base and adding Apps into it.
* resources/gtk/main_app.ui file as base and adding Apps into it.
*
* @return New ApplicationWindow to use in the program.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/main_application.hpp"
#include "../include/main_application.hpp"


int main(int argc, char** argv) {
Expand Down
10 changes: 5 additions & 5 deletions src/main_application.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "include/main_application.hpp"
#include "../include/main_application.hpp"
#include "gtkmm/object.h"
#include "include/browser_app.hpp"
#include "include/fractal_app.hpp"
#include "include/chat_app.hpp"
#include "../include/browser_app.hpp"
#include "../include/fractal_app.hpp"
#include "../include/chat_app.hpp"

#include <iostream>

Expand All @@ -28,7 +28,7 @@ Gtk::ApplicationWindow* MainApplication::create_window() {
// Load the GtkBuilder file and instantiate its widgets, check for errors
auto ref_builder {Gtk::Builder::create()};
try {
ref_builder->add_from_file("res/gtk/main_app.ui");
ref_builder->add_from_file("resources/gtk/main_app.ui");
} catch(const Glib::FileError& ex) {
std::cerr << "FileError: " << ex.what() << std::endl;
throw ex;
Expand Down
2 changes: 1 addition & 1 deletion src/session.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/session.hpp"
#include "../include/session.hpp"

#include <iostream>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion tests/browser_app_tests.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/tests.hpp"
#include "../include/tests.hpp"

#include <gtest/gtest.h>
#include <gmock/gmock.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/chat_app_tests.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/tests.hpp"
#include "../include/tests.hpp"

#include <gtkmm.h>
#include <regex>
Expand Down
2 changes: 1 addition & 1 deletion tests/fractal_app_tests.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/tests.hpp"
#include "../include/tests.hpp"

#include <random>

Expand Down
2 changes: 1 addition & 1 deletion tests/main.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/tests.hpp"
#include "../include/tests.hpp"

#include <gtest/gtest.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/main_application_tests.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "include/tests.hpp"
#include "../include/tests.hpp"

#include <gtest/gtest.h>
#include <gmock/gmock.h>
Expand Down