23 #ifndef __TOOLS_SKILLGUI_GRAPH_DRAWING_AREA_H_ 24 #define __TOOLS_SKILLGUI_GRAPH_DRAWING_AREA_H_ 31 #include "gvplugin_skillgui_cairo.h" 34 :
public Gtk::DrawingArea,
54 void set_bb(
double bbw,
double bbh);
55 void set_pad(
double pad_x,
double pad_y);
62 void get_pad(
double &pad_x,
double &pad_y);
63 Cairo::RefPtr<Cairo::Context>
get_cairo();
71 #if GTK_VERSION_GE(3,0) 72 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
81 void save_dotfile(
const char *filename);
84 Cairo::RefPtr<Cairo::Context> __cairo;
85 Gtk::FileChooserDialog *__fcd_save;
86 Gtk::FileChooserDialog *__fcd_open;
87 Gtk::FileChooserDialog *__fcd_recording;
88 #if GTK_VERSION_GE(3,0) 89 Glib::RefPtr<Gtk::FileFilter> __filter_pdf;
90 Glib::RefPtr<Gtk::FileFilter> __filter_svg;
91 Glib::RefPtr<Gtk::FileFilter> __filter_png;
92 Glib::RefPtr<Gtk::FileFilter> __filter_dot;
94 Gtk::FileFilter *__filter_pdf;
95 Gtk::FileFilter *__filter_svg;
96 Gtk::FileFilter *__filter_png;
97 Gtk::FileFilter *__filter_dot;
100 sigc::signal<void> __signal_update_disabled;
104 std::string __graph_fsm;
106 std::string __nonupd_graph;
107 std::string __nonupd_graph_fsm;
113 double __translation_x;
114 double __translation_y;
117 double __last_mouse_x;
118 double __last_mouse_y;
120 bool __scale_override;
125 std::string __record_directory;
void set_graph(std::string graph)
Set graph.
Graphviz Cairo render plugin instructor.
virtual bool on_scroll_event(GdkEventScroll *event)
Scroll event handler.
bool set_recording(bool recording)
Enable/disable recording.
sigc::signal< void > signal_update_disabled()
Get "update disabled" signal.
SkillGuiGraphDrawingArea()
Constructor.
double get_scale()
Get scale.
bool get_update_graph()
Check if graph is being updated.
void set_graph_fsm(std::string fsm_name)
Set graph's FSM name.
virtual bool on_expose_event(GdkEventExpose *event)
Expose event handler.
Cairo::RefPtr< Cairo::Context > get_cairo()
Get Cairo context.
virtual bool on_motion_notify_event(GdkEventMotion *event)
Mouse motion notify event handler.
void zoom_fit()
Zoom to fit.
void zoom_reset()
Zoom reset.
bool scale_override()
Check if scale override is enabled.
void save()
save current graph.
void get_translation(double &tx, double &ty)
Get translation.
void set_update_graph(bool update)
Set if the graph should be updated on new data.
void get_dimensions(double &width, double &height)
Get dimensions.
void set_pad(double pad_x, double pad_y)
Set padding.
void get_pad(double &pad_x, double &pad_y)
Get padding.
void set_translation(double tx, double ty)
Set translation.
void set_bb(double bbw, double bbh)
Set bounding box.
void open()
Open a dot graph and display it.
virtual bool on_button_press_event(GdkEventButton *event)
Button press event handler.
void set_scale(double scale)
Set scale.