7 changed files with 110 additions and 1 deletions
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required (VERSION 2.8.4) |
||||
project (juci) |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
||||
|
||||
INCLUDE(FindPkgConfig) |
||||
|
||||
# name of the executable on Windows will be example.exe |
||||
add_executable(juci |
||||
# list of every needed file to create the executable |
||||
juci.cc |
||||
controller.h |
||||
model.h |
||||
view.h |
||||
view.cc) |
||||
|
||||
# dependencies |
||||
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0) |
||||
include_directories(${GTKMM_INCLUDE_DIRS} ) |
||||
link_directories(${GTKMM_LIBRARY_DIRS}) |
||||
target_link_libraries(juci ${GTKMM_LIBRARIES}) |
||||
@ -0,0 +1,17 @@
|
||||
/*juCi++ controller header file*/ |
||||
#ifndef CONTROLLER_H |
||||
#define CONTROLLER_H |
||||
|
||||
#include "model.h" |
||||
|
||||
/* -------------------------- HOW TO -------------------------- */ |
||||
/* Controll classes under Controller->public */ |
||||
/* Model object under Controller::class->private */ |
||||
/* ------------------ Remove these comments ------------------- */ |
||||
|
||||
class Controller { |
||||
public: |
||||
|
||||
}; |
||||
|
||||
#endif //CONTROLLER_H
|
||||
@ -0,0 +1,9 @@
|
||||
#include "view.h" |
||||
|
||||
int main (int argc, char *argv[]) { |
||||
Glib::RefPtr <Gtk::Application> app = Gtk::Application::create(argc, argv, "org.bachelor.juci"); |
||||
|
||||
View view; |
||||
|
||||
return app->run(view); |
||||
} |
||||
@ -0,0 +1,17 @@
|
||||
/*juCi++ model header file*/ |
||||
#ifndef MODEL_H |
||||
#define MODEL_H |
||||
|
||||
#include <iostream> |
||||
|
||||
/* -------------------------- HOW TO -------------------------- */ |
||||
/* Model classes under Model->public if they are going to be */ |
||||
/* used from controllers */ |
||||
/* ------------------ Remove these comments ------------------- */ |
||||
|
||||
class Model { |
||||
public: |
||||
|
||||
}; |
||||
|
||||
#endif //MODEL_H
|
||||
@ -0,0 +1,19 @@
|
||||
#include "view.h" |
||||
|
||||
View::View() : |
||||
window_box(Gtk::ORIENTATION_VERTICAL){ |
||||
|
||||
set_title("juCi++"); |
||||
set_default_size(800, 600); |
||||
maximize(); |
||||
|
||||
add(window_box); |
||||
|
||||
/*Add default views here */ |
||||
|
||||
show_all_children(); |
||||
|
||||
}; |
||||
View::~View() { |
||||
|
||||
} |
||||
@ -0,0 +1,28 @@
|
||||
/*juCi++ view header file*/ |
||||
#ifndef VIEW_H |
||||
#define VIEW_H |
||||
|
||||
#include <iostream> |
||||
#include "gtkmm.h" |
||||
#include "controller.h" |
||||
|
||||
/* -------------------------- HOW TO -------------------------- */ |
||||
/* All view shall be under View->private if possible */ |
||||
/* View objects under View->protected */ |
||||
/* View controller object under View::class->private */ |
||||
/* ------------------ Remove these comments ------------------- */ |
||||
|
||||
|
||||
class View : public Gtk::Window { |
||||
public: |
||||
View(); |
||||
virtual ~View(); |
||||
protected: |
||||
Gtk::Box window_box; |
||||
private: |
||||
|
||||
|
||||
|
||||
}; |
||||
|
||||
#endif // VIEW_H
|
||||
Loading…
Reference in new issue