main.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // gvectors is a frontend to libgvectors using gtkmm.
00004 // Copyright (C) 2007  Rafael Ostertag
00005 //
00006 // This program is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU General Public License
00008 // as published by the Free Software Foundation; either version 2
00009 // of the License, or (at your option) any later version.
00010 //
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
00019 // USA.
00020 //
00021 // $Id: main_8h-source.html,v 1.1 2007-09-10 23:31:15 rafi Exp $
00022 //
00023 // File:   main.h
00024 // Author: Rafael Ostertag
00025 //
00026 // Created on July 3, 2007, 9:51 PM
00027 //
00028 
00031 
00032 #ifndef _MAIN_H
00033 #define _MAIN_H
00034 
00035 #include <gtkmm.h>
00036 #include "extfilefilter.h"
00037 #include "ntab.h"
00038 #include "notebook.h"
00039 
00040 
00044 class MainWindow : public Gtk::Window {
00045 private:
00049     int tabcounter;
00053     Gtk::Statusbar statbar;
00054     Gtk::VBox vb;
00055     Glib::RefPtr<Gtk::ActionGroup> ac_mainmenu;
00056     Glib::RefPtr<Gtk::UIManager> ui_manager;
00060     NoteBook nb;
00064     ExtFileFilter filter_xml;
00068     ExtFileFilter filter_binary;
00069 
00071     Glib::ustring tabcounter_str() const;
00072     
00074     NTab* create_new_tab();
00075         
00077     void setup_window();
00079     void setup_menu_icons();
00081     void setup_menu();
00083     void setup_filters();
00085     void file_save_dialog(const Glib::ustring& t);
00087     void menu_save_sensitive(bool yesno);
00089     bool close();
00090     
00092     bool on_delete_event(GdkEventAny* wdc);
00093     
00095     void on_action_file_quit();
00097     void on_action_file_new();
00099     void on_action_file_load();
00101     void on_action_file_save();
00103     void on_action_file_save_as();
00105     void on_action_file_close();
00106     
00108     void on_action_vectors_new();
00110     void on_action_vectors_add();
00112     void on_action_vectors_edit();
00114     void on_action_vectors_remove();
00116     void on_action_vectors_connecting();
00118     void on_action_vectors_middle();
00120     void on_action_vectors_cross();
00122     void on_action_vectors_invert();
00123     
00125     void on_action_help_about();
00126     
00128     void on_notebook_switch_page(GtkNotebookPage* page, guint page_num);
00130     void on_notebook_tab_modified(const NTab& wdc, bool modified);
00131     
00134     void set_sensitive_vectors_none_selected();
00136     void set_sensitive_vectors_one_selected();
00138     void set_sensitive_vectors_two_selected();
00141     void set_sensitive_vectors_several_selected();
00142 
00144     NTab* get_current_tab();
00145     
00149     void show_status(const Glib::ustring& stat);
00151     void clear_status();
00152     
00153 public:
00154     MainWindow();
00155 
00156 };
00157 
00158 
00159 #endif  /* _MAIN_H */

Generated on Tue Sep 11 01:14:28 2007 for gvectors by  doxygen 1.4.7