OSDN Git Service

dac44d09d3ab064ae54d410b0390730c4bb7cace
[fukui-no-namari/dialektos.git] / src / application_framework.hxx
1 /*
2  * Copyright (C) 2009 by Aiwota Programmer
3  * aiwotaprog@tetteke.tk
4  *
5  * This file is part of Dialektos.
6  *
7  * Dialektos is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * Dialektos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Dialektos.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #ifndef APPLICATION_FRAMEWORK_HXX
22 #define APPLICATION_FRAMEWORK_HXX
23
24 #include <glibmm/refptr.h>
25 #include <gtkmm/widget.h>
26 #include <gtkmm/box.h>
27 #include <gtkmm/statusbar.h>
28 #include <gtkmm/uimanager.h>
29 #include <gtkmm/actiongroup.h>
30 #include <gtkmm/menu.h>
31 #include <gtkmm/menuitem.h>
32 #include "application_window.hxx"
33
34
35 namespace dialektos {
36
37
38 class ApplicationFrameWork: public ApplicationWindow {
39   typedef ApplicationFrameWork ThisClass;
40 public:
41   ApplicationFrameWork();
42   virtual ~ApplicationFrameWork();
43   void add(Gtk::Widget& child);
44 protected:
45   void build_menubar();
46   virtual void on_action_file_quit();
47   virtual void on_action_edit_copy();
48   virtual void on_action_view_refresh();
49   virtual void on_action_view_stop();
50   virtual void on_action_view_menubar();
51   virtual void on_action_view_toolbar();
52   virtual void on_action_view_statusbar();
53   virtual void on_action_bookmark_show();
54
55   virtual void on_child_button_press(GdkEventButton*);
56
57   void on_history_menu_item_activate(const std::string&);
58   void set_history_menus();
59
60   Gtk::VBox vbox_;
61   Gtk::Statusbar statusbar_;
62   Glib::RefPtr<Gtk::UIManager> ui_manager_;
63   Glib::RefPtr<Gtk::ActionGroup> action_group_;
64   Gtk::Widget* menubar_;
65   Gtk::Widget* toolbar_;
66   Gtk::Menu* popupmenu_;
67   Gtk::MenuItem* history_menu_;
68 };
69
70
71 } // namespace dialektos
72
73 #endif