OSDN Git Service

76fa2720e67a0327be1c609ec6615342f33cb1cc
[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 on_history_menu_items_activate(const std::vector<std::string>&) const;
59   void on_history_menu_items_open_close_activate(
60       const std::vector<std::string>&) const;
61   void set_history_menus();
62
63   Gtk::VBox vbox_;
64   Gtk::Statusbar statusbar_;
65   Glib::RefPtr<Gtk::UIManager> ui_manager_;
66   Glib::RefPtr<Gtk::ActionGroup> action_group_;
67   Gtk::Widget* menubar_;
68   Gtk::Widget* toolbar_;
69   Gtk::Menu* popupmenu_;
70   Gtk::MenuItem* history_menu_;
71 };
72
73
74 } // namespace dialektos
75
76 #endif