Fawkes API  Fawkes Development Version
skillgui.h
1 
2 /***************************************************************************
3  * skillgui.h - Skill GUI
4  *
5  * Created: Mon Nov 03 13:35:34 2008
6  * Copyright 2008 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __TOOLS_SKILLGUI_SKILLGUI_H_
24 #define __TOOLS_SKILLGUI_SKILLGUI_H_
25 
26 #include <gui_utils/connection_dispatcher.h>
27 
28 #include <gtkmm.h>
29 #ifdef HAVE_GCONFMM
30 # include <gconfmm.h>
31 # define GCONF_PREFIX "/apps/fawkes/skillgui"
32 #endif
33 
34 #include <interfaces/SkillerInterface.h>
35 #include <interfaces/SkillerDebugInterface.h>
36 
37 #ifndef GTKMM_VERSION_GE
38 # define GTKMM_VERSION_GE(major,minor) ((GTKMM_MAJOR_VERSION>major)||(GTKMM_MAJOR_VERSION==major)&&(GTKMM_MINOR_VERSION>=minor))
39 #endif
40 
41 namespace fawkes {
42  class BlackBoard;
43  class InterfaceDispatcher;
44  class LogView;
45  class PluginTreeView;
46 }
47 
48 #ifdef USE_PAPYRUS
50 #else
52 #endif
53 
54 class SkillGuiGtkWindow : public Gtk::Window
55 {
56  public:
57  SkillGuiGtkWindow(BaseObjectType* cobject,
58  const Glib::RefPtr<Gtk::Builder> &builder);
60 
61  private:
62  void close_bb();
63  void send_graphdir_message(fawkes::SkillerDebugInterface *iface,
65 
66  void on_connection_clicked();
67  void on_connect();
68  void on_disconnect();
69  void on_exec_clicked();
70  void on_skiller_data_changed();
71  void on_skdbg_data_changed();
72  void on_agdbg_data_changed();
73  void on_exit_clicked();
74  void on_controller_clicked();
75  void on_stop_clicked();
76  void on_config_changed();
77  void on_skill_changed();
78  void on_graphupd_clicked();
79  void on_update_disabled();
80  void on_recording_toggled();
81  void on_graphdir_clicked();
82  void on_graphdir_changed(fawkes::SkillerDebugInterface::GraphDirectionEnum gd);
83  void on_graphcolor_toggled();
84 
85  private:
86  class SkillStringRecord : public Gtk::TreeModelColumnRecord
87  {
88  public:
89  SkillStringRecord();
90  /// @cond INTERNALS
91  Gtk::TreeModelColumn<Glib::ustring> skillstring;
92  /// @endcond
93  };
94  SkillStringRecord __sks_record;
95 
96 
98 
99  fawkes::ConnectionDispatcher connection_dispatcher;
100  fawkes::InterfaceDispatcher *__skiller_ifd;
101  fawkes::InterfaceDispatcher *__skdbg_ifd;
102  fawkes::InterfaceDispatcher *__agdbg_ifd;
103 
104  Gtk::ToolButton *tb_connection;
105  Gtk::ToolButton *tb_exit;
106  Gtk::Button *but_exec;
107  Gtk::Button *but_stop;
108  Gtk::Button *but_clearlog;
109 #if GTK_VERSION_GE(3,0)
110  Gtk::ComboBox *cbe_skillstring;
111 #else
112  Gtk::ComboBoxEntry *cbe_skillstring;
113 #endif
114  Gtk::Label *lab_status;
115  Gtk::Label *lab_alive;
116  Gtk::Label *lab_skillstring;
117  Gtk::Label *lab_error;
118  Gtk::ScrolledWindow *scw_graph;
119  Gtk::Notebook *ntb_tabs;
120  Gtk::ToggleToolButton *tb_skiller;
121  Gtk::ToggleToolButton *tb_agent;
122  Gtk::ComboBoxText *cb_graphlist;
123  Gtk::ToolItem *tb_graphlist;
124  Gtk::ToolButton *tb_graphsave;
125  Gtk::ToolButton *tb_graphopen;
126  Gtk::ToolButton *tb_graphupd;
127  Gtk::ToggleToolButton *tb_graphrecord;
128  Gtk::ToolButton *tb_controller;
129  Gtk::ToolButton *tb_zoomin;
130  Gtk::ToolButton *tb_zoomout;
131  Gtk::ToolButton *tb_zoomfit;
132  Gtk::ToolButton *tb_zoomreset;
133 #if GTKMM_VERSION_GE(2,20)
134  Gtk::Spinner *tb_spinner;
135 #endif
136 
137  Gtk::ToolButton *tb_graphdir;
138  Gtk::ToggleToolButton *tb_graphcolored;
139 
140  Glib::RefPtr<Gtk::ListStore> __sks_list;
141 
142 #ifdef HAVE_GCONFMM
143  Glib::RefPtr<Gnome::Conf::Client> __gconf;
144 #endif
145 
146 #ifdef USE_PAPYRUS
147  SkillGuiGraphViewport *pvp_graph;
148 #else
150 #endif
151 
152  fawkes::SkillerInterface *__skiller_if;
153  fawkes::SkillerDebugInterface *__skdbg_if;
154  fawkes::SkillerDebugInterface *__agdbg_if;
155 
156  fawkes::LogView *__logview;
157  fawkes::PluginTreeView *__trv_plugins;
158 };
159 
160 #endif
SkillerDebugInterface Fawkes BlackBoard Interface.
Log View widget.
Definition: logview.h:40
A TreeView class to list available plugins und trigger their loading/unloading.
Fawkes library namespace.
Skill GUI main window.
Definition: skillgui.h:54
Graph drawing area.
GraphDirectionEnum
Primary direction of the graph.
SkillerInterface Fawkes BlackBoard Interface.
The BlackBoard abstract class.
Definition: blackboard.h:48
Watches network client events and dispatches them as signals.
Skill FSM Graph Viewport.
Interface listener with dispatcher.