skillgui.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __TOOLS_SKILLGUI_SKILLGUI_H_
00024 #define __TOOLS_SKILLGUI_SKILLGUI_H_
00025
00026 #include <gui_utils/connection_dispatcher.h>
00027
00028 #include <gtkmm.h>
00029 #include <libglademm/xml.h>
00030 #ifdef HAVE_GCONFMM
00031 # include <gconfmm.h>
00032 # define GCONF_PREFIX "/apps/fawkes/skillgui"
00033 #endif
00034
00035 #include <interfaces/SkillerInterface.h>
00036 #include <interfaces/SkillerDebugInterface.h>
00037
00038 namespace fawkes {
00039 class BlackBoard;
00040 class InterfaceDispatcher;
00041 class LogView;
00042 class Throbber;
00043 class PluginTreeView;
00044 }
00045
00046 #ifdef USE_PAPYRUS
00047 class SkillGuiGraphViewport;
00048 #else
00049 class SkillGuiGraphDrawingArea;
00050 #endif
00051
00052 class SkillGuiGtkWindow : public Gtk::Window
00053 {
00054 public:
00055 SkillGuiGtkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refxml);
00056 ~SkillGuiGtkWindow();
00057
00058 private:
00059 void close_bb();
00060 void send_graphdir_message(fawkes::SkillerDebugInterface *iface,
00061 fawkes::SkillerDebugInterface::GraphDirectionEnum gd);
00062
00063 void on_connection_clicked();
00064 void on_connect();
00065 void on_disconnect();
00066 void on_exec_clicked();
00067 void on_skiller_data_changed();
00068 void on_skdbg_data_changed();
00069 void on_agdbg_data_changed();
00070 void on_exit_clicked();
00071 void on_controller_clicked();
00072 void on_stop_clicked();
00073 void on_config_changed();
00074 void on_contexec_toggled();
00075 void on_skill_changed();
00076 void on_graphupd_clicked();
00077 void on_update_disabled();
00078 void on_recording_toggled();
00079 void on_graphdir_clicked();
00080 void on_graphdir_changed(fawkes::SkillerDebugInterface::GraphDirectionEnum gd);
00081 void on_graphcolor_toggled();
00082
00083 private:
00084 class SkillStringRecord : public Gtk::TreeModelColumnRecord
00085 {
00086 public:
00087 SkillStringRecord();
00088 Gtk::TreeModelColumn<Glib::ustring> skillstring;
00089 };
00090 SkillStringRecord __sks_record;
00091
00092
00093 fawkes::BlackBoard *bb;
00094
00095 fawkes::ConnectionDispatcher connection_dispatcher;
00096 fawkes::InterfaceDispatcher *__skiller_ifd;
00097 fawkes::InterfaceDispatcher *__skdbg_ifd;
00098 fawkes::InterfaceDispatcher *__agdbg_ifd;
00099
00100 Gtk::ToolButton *tb_connection;
00101 Gtk::ToolButton *tb_exit;
00102 Gtk::Button *but_exec;
00103 Gtk::Button *but_stop;
00104 Gtk::ToggleButton *but_continuous;
00105 Gtk::Button *but_clearlog;
00106 Gtk::ComboBoxEntry *cbe_skillstring;
00107 Gtk::Label *lab_status;
00108 Gtk::Label *lab_alive;
00109 Gtk::Label *lab_continuous;
00110 Gtk::Label *lab_skillstring;
00111 Gtk::Label *lab_error;
00112 Gtk::ScrolledWindow *scw_graph;
00113 Gtk::Notebook *ntb_tabs;
00114 Gtk::DrawingArea *drw_graph;
00115 Gtk::ToggleToolButton *tb_skiller;
00116 Gtk::ToggleToolButton *tb_agent;
00117 Gtk::ComboBoxText *cb_graphlist;
00118 Gtk::ToolItem *tb_graphlist;
00119 Gtk::ToolButton *tb_graphsave;
00120 Gtk::ToolButton *tb_graphopen;
00121 Gtk::ToolButton *tb_graphupd;
00122 Gtk::ToggleToolButton *tb_graphrecord;
00123 Gtk::ToolButton *tb_controller;
00124 Gtk::ToolButton *tb_zoomin;
00125 Gtk::ToolButton *tb_zoomout;
00126 Gtk::ToolButton *tb_zoomfit;
00127 Gtk::ToolButton *tb_zoomreset;
00128
00129 Gtk::MenuToolButton *tb_graphdir;
00130 Gtk::ToggleToolButton *tb_graphcolored;
00131 Gtk::MenuItem *mi_graphdir;
00132 Gtk::MenuItem *mi_bottom_top;
00133 Gtk::MenuItem *mi_top_bottom;
00134 Gtk::MenuItem *mi_left_right;
00135 Gtk::MenuItem *mi_right_left;
00136
00137 Glib::RefPtr<Gtk::ListStore> __sks_list;
00138
00139 #ifdef HAVE_GCONFMM
00140 Glib::RefPtr<Gnome::Conf::Client> __gconf;
00141 #endif
00142
00143 #ifdef USE_PAPYRUS
00144 SkillGuiGraphViewport *pvp_graph;
00145 #else
00146 SkillGuiGraphDrawingArea *gda;
00147 #endif
00148
00149 fawkes::SkillerInterface *__skiller_if;
00150 fawkes::SkillerDebugInterface *__skdbg_if;
00151 fawkes::SkillerDebugInterface *__agdbg_if;
00152
00153 fawkes::LogView *__logview;
00154 fawkes::Throbber *__throbber;
00155 fawkes::PluginTreeView *__trv_plugins;
00156
00157 bool __update_graph;
00158 };
00159
00160 #endif