From 99a0845cb14d164c1e147e278edc85cccf269937 Mon Sep 17 00:00:00 2001 From: Monoki Dorina <mondo1@cortex.itk.ppke.hu> Date: Mon, 6 May 2024 13:05:17 +0200 Subject: [PATCH] proba --- main.cpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..26b4516 --- /dev/null +++ b/main.cpp @@ -0,0 +1,78 @@ +#include "graphics.hpp" +#include "widgets.hpp" +#include "application.hpp" +#include "checkbox.hpp" +//#include "spinbox.hpp" +//#include "dropdown.hpp" +//#include "statictext.hpp" +#include "textedit.hpp" +//#include "multiline.hpp" +#include "palya.hpp" + +#include <iostream> +#include <fstream> +#include <vector> +#include <string> + +using namespace std; +using namespace genv; + +const int ablak_szel=702; +const int ablak_mag=702; + +class MyApp : public Application +{ +public: + MyApp() + { + p = new Palya(this, 0, 0, 702, "mo1.txt", "fe1.txt"); + } + + void action(string id) + { + /*if (id=="enter") + save(); + + else if (id=="space" && cb->xelt_e()) + save2();*/ + } + + /*void save() + { + std::ofstream file(te1->get_szoveg()); + file << te2->get_szoveg(); + file.close(); + } + + void save2() + { + std::ofstream file(te2->get_szoveg()); + file << te1->get_szoveg(); + file.close(); + }*/ + +protected: + Palya* p; +}; + +int main() +{ + gout.open(ablak_szel,ablak_mag); + + /*std::ofstream file("mentes.txt"); + for (int i=0; i<9; i++) + { + for (int j=0; j<9; j++) + { + file << "0"; + } + file << endl; + } + file.close();*/ + + MyApp app; + + app.event_loop(); + + return 0; +} -- GitLab