12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
- /*
- * g-window.h
- * Copyright (C) 2017 Unknown <francois@gautrais.eu>
- *
- * histodexc is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * histodexc is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- #ifndef _G_WINDOW_H_
- #define _G_WINDOW_H_
- #include <iostream>
- #include <json/json.h>
- #include <gtk/gtk.h>
- class GeneralTab;
- class ResourceTab;
- class ZoneTab;
- class StageTab;
- struct _Private;
- class GWindow
- {
- public:
- GWindow(const std::string& file);
- virtual ~GWindow();
- virtual void show()=0;
- virtual void write(const std::string& file)=0;
- virtual Json::Value getJson(bool genFinal=false)=0;
- virtual void on_generate()=0;
- virtual void on_new()=0;
- virtual void on_import()=0;
- virtual void on_open()=0;
- virtual void on_save()=0;
- virtual void on_saveas()=0;
- virtual void on_exit()=0;
- virtual void open(const std::string& f)=0;
- virtual void changeFile(const std::string& file)=0;
-
-
- protected:
- int m_magic;
- GtkWidget *m_window;
- GtkBuilder *m_builder;
- struct _Private *m_priv;
- GtkButton* m_generate;
- GtkImageMenuItem* m_new;
- GtkMenuItem* m_import;
- GtkImageMenuItem* m_open;
- GtkImageMenuItem* m_save;
- GtkImageMenuItem* m_saveas;
- GtkImageMenuItem* m_exit;
- GtkTextView* m_log;
-
-
- protected:
- virtual void init_menu()=0;
- virtual void setModidified()=0;
- virtual void clearModidified()=0;
- virtual bool isModidified()=0;
- virtual bool checkSaved()=0;
-
- private:
- };
- extern "C" {
- extern void window_start(int argc, char** argv); /* a C function */
- }
- #endif // _G_WINDOW_H_
|