OSDN Git Service

bb66a6448552b902f204568a8e0822955013999b
[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_file_close();
48   virtual void on_action_edit_copy();
49   virtual void on_action_view_refresh();
50   virtual void on_action_view_stop();
51   virtual void on_action_view_menubar();
52   virtual void on_action_view_toolbar();
53   virtual void on_action_view_statusbar();
54   virtual void on_action_bookmark_show();
55
56   virtual void on_child_button_press(GdkEventButton*);
57
58   void on_history_menu_item_activate(const std::string&);
59   void on_history_menu_items_activate(const std::vector<std::string>&) const;
60   void on_history_menu_items_open_close_activate(
61       const std::vector<std::string>&) const;
62   void set_history_menus();
63
64   Gtk::VBox vbox_;
65   Gtk::Statusbar statusbar_;
66   Glib::RefPtr<Gtk::UIManager> ui_manager_;
67   Glib::RefPtr<Gtk::ActionGroup> action_group_;
68   Gtk::Widget* menubar_;
69   Gtk::Widget* toolbar_;
70   Gtk::Menu* popupmenu_;
71   Gtk::MenuItem* history_menu_;
72 };
73
74
75 } // namespace dialektos
76
77 #endif