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 namespace fawkes {
38  class BlackBoard;
39  class InterfaceDispatcher;
40  class LogView;
41  class Throbber;
42  class PluginTreeView;
43 }
44 
45 #ifdef USE_PAPYRUS
47 #else
49 #endif
50 
51 class SkillGuiGtkWindow : public Gtk::Window
52 {
53  public:
54  SkillGuiGtkWindow(BaseObjectType* cobject,
55  const Glib::RefPtr<Gtk::Builder> &builder);
57 
58  private:
59  void close_bb();
60  void send_graphdir_message(fawkes::SkillerDebugInterface *iface,
62 
63  void on_connection_clicked();
64  void on_connect();
65  void on_disconnect();
66  void on_exec_clicked();
67  void on_skiller_data_changed();
68  void on_skdbg_data_changed();
69  void on_agdbg_data_changed();
70  void on_exit_clicked();
71  void on_controller_clicked();
72  void on_stop_clicked();
73  void on_config_changed();
74  void on_contexec_toggled();
75  void on_skill_changed();
76  void on_graphupd_clicked();
77  void on_update_disabled();
78  void on_recording_toggled();
79  void on_graphdir_clicked();
80  void on_graphdir_changed(fawkes::SkillerDebugInterface::GraphDirectionEnum gd);
81  void on_graphcolor_toggled();
82 
83  private:
84  class SkillStringRecord : public Gtk::TreeModelColumnRecord
85  {
86  public:
87  SkillStringRecord();
88  /// @cond INTERNALS
89  Gtk::TreeModelColumn<Glib::ustring> skillstring;
90  /// @endcond
91  };
92  SkillStringRecord __sks_record;
93 
94 
96 
97  fawkes::ConnectionDispatcher connection_dispatcher;
98  fawkes::InterfaceDispatcher *__skiller_ifd;
99  fawkes::InterfaceDispatcher *__skdbg_ifd;
100  fawkes::InterfaceDispatcher *__agdbg_ifd;
101 
102  Gtk::ToolButton *tb_connection;
103  Gtk::ToolButton *tb_exit;
104  Gtk::Button *but_exec;
105  Gtk::Button *but_stop;
106  Gtk::ToggleButton *but_continuous;
107  Gtk::Button *but_clearlog;
108 #if GTK_VERSION_GE(3,0)
109  Gtk::ComboBox *cbe_skillstring;
110 #else
111  Gtk::ComboBoxEntry *cbe_skillstring;
112 #endif
113  Gtk::Label *lab_status;
114  Gtk::Label *lab_alive;
115  Gtk::Label *lab_continuous;
116  Gtk::Label *lab_skillstring;
117  Gtk::Label *lab_error;
118  Gtk::ScrolledWindow *scw_graph;
119  Gtk::Notebook *ntb_tabs;
120  Gtk::DrawingArea *drw_graph;
121  Gtk::ToggleToolButton *tb_skiller;
122  Gtk::ToggleToolButton *tb_agent;
123  Gtk::ComboBoxText *cb_graphlist;
124  Gtk::ToolItem *tb_graphlist;
125  Gtk::ToolButton *tb_graphsave;
126  Gtk::ToolButton *tb_graphopen;
127  Gtk::ToolButton *tb_graphupd;
128  Gtk::ToggleToolButton *tb_graphrecord;
129  Gtk::ToolButton *tb_controller;
130  Gtk::ToolButton *tb_zoomin;
131  Gtk::ToolButton *tb_zoomout;
132  Gtk::ToolButton *tb_zoomfit;
133  Gtk::ToolButton *tb_zoomreset;
134 
135  Gtk::ToolButton *tb_graphdir;
136  Gtk::ToggleToolButton *tb_graphcolored;
137 
138  Glib::RefPtr<Gtk::ListStore> __sks_list;
139 
140 #ifdef HAVE_GCONFMM
141  Glib::RefPtr<Gnome::Conf::Client> __gconf;
142 #endif
143 
144 #ifdef USE_PAPYRUS
145  SkillGuiGraphViewport *pvp_graph;
146 #else
148 #endif
149 
150  fawkes::SkillerInterface *__skiller_if;
151  fawkes::SkillerDebugInterface *__skdbg_if;
152  fawkes::SkillerDebugInterface *__agdbg_if;
153 
154  fawkes::LogView *__logview;
155  fawkes::Throbber *__throbber;
156  fawkes::PluginTreeView *__trv_plugins;
157 
158  bool __update_graph;
159 };
160 
161 #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:51
Graph drawing area.
~SkillGuiGtkWindow()
Destructor.
Definition: skillgui.cpp:209
SkillGuiGtkWindow(BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
Constructor.
Definition: skillgui.cpp:60
GraphDirectionEnum
Primary direction of the graph.
Simple Gtk Throbber/Spinner.
Definition: throbber.h:31
SkillerInterface Fawkes BlackBoard Interface.
The BlackBoard abstract class.
Definition: blackboard.h:49
Watches network client events and dispatches them as signals.
Skill FSM Graph Viewport.
Interface listener with dispatcher.