$search
#include <graph_drawing_area.h>

Public Member Functions | |
| Cairo::RefPtr< Cairo::Context > | get_cairo () |
| void | get_dimensions (double &width, double &height) |
| void | get_pad (double &pad_x, double &pad_y) |
| double | get_scale () |
| void | get_translation (double &tx, double &ty) |
| bool | get_update_graph () |
| void | open () |
| void | save () |
| bool | scale_override () |
| void | set_active_state (std::string active_state) |
| void | set_bb (double bbw, double bbh) |
| bool | set_follow_active_state (bool follow_active_state) |
| void | set_graph (std::string graph) |
| void | set_graph_fsm (std::string fsm_name) |
| void | set_pad (double pad_x, double pad_y) |
| bool | set_recording (bool recording) |
| void | set_scale (double scale) |
| void | set_translation (double tx, double ty) |
| void | set_update_graph (bool update) |
| sigc::signal< void > | signal_update_disabled () |
| SkillGuiGraphDrawingArea () | |
| void | update_translations () |
| void | zoom_fit () |
| void | zoom_in () |
| void | zoom_out () |
| void | zoom_reset () |
| ~SkillGuiGraphDrawingArea () | |
Protected Member Functions | |
| virtual bool | on_button_press_event (GdkEventButton *event) |
| virtual bool | on_button_release_event (GdkEventButton *event) |
| virtual bool | on_expose_event (GdkEventExpose *event) |
| virtual bool | on_motion_notify_event (GdkEventMotion *event) |
| virtual bool | on_scroll_event (GdkEventScroll *event) |
Private Member Functions | |
| std::string | get_active_state (Agraph_t *graph) |
| bool | get_state_position (std::string state_name, double &px, double &py) |
| void | layout_graph () |
| void | save_dotfile (const char *filename) |
Private Attributes | |
| std::string | __active_state |
| double | __bbh |
| double | __bbw |
| Cairo::RefPtr< Cairo::Context > | __cairo |
| Gtk::FileChooserDialog * | __fcd_open |
| Gtk::FileChooserDialog * | __fcd_recording |
| Gtk::FileChooserDialog * | __fcd_save |
| Gtk::FileFilter * | __filter_dot |
| Gtk::FileFilter * | __filter_pdf |
| Gtk::FileFilter * | __filter_png |
| Gtk::FileFilter * | __filter_svg |
| bool | __follow_active_state |
| graph_t * | __graph |
| std::string | __graph_dot |
| std::string | __graph_fsm |
| GVC_t * | __gvc |
| double | __last_mouse_x |
| double | __last_mouse_y |
| double | __last_update_time |
| bool | __mouse_motion |
| std::string | __nonupd_active_state |
| std::string | __nonupd_graph |
| std::string | __nonupd_graph_fsm |
| double | __pad_x |
| double | __pad_y |
| std::string | __record_directory |
| bool | __recording |
| double | __scale |
| bool | __scale_override |
| sigc::signal< void > | __signal_update_disabled |
| double | __speed |
| double | __speed_max |
| double | __speed_ramp_distance |
| double | __translation_x |
| double | __translation_x_setpoint |
| double | __translation_y |
| double | __translation_y_setpoint |
| bool | __update_graph |
Graph drawing area. Derived version of Gtk::DrawingArea that renders a graph via Graphviz.
Definition at line 36 of file graph_drawing_area.h.
| SkillGuiGraphDrawingArea::SkillGuiGraphDrawingArea | ( | ) |
Constructor.
Definition at line 36 of file graph_drawing_area.cpp.
| SkillGuiGraphDrawingArea::~SkillGuiGraphDrawingArea | ( | ) |
Definition at line 112 of file graph_drawing_area.cpp.
| std::string SkillGuiGraphDrawingArea::get_active_state | ( | Agraph_t * | graph | ) | [private] |
| Cairo::RefPtr< Cairo::Context > SkillGuiGraphDrawingArea::get_cairo | ( | ) | [virtual] |
Get Cairo context. This is only valid during the expose event and is only meant for the Graphviz plugin.
Implements SkillGuiCairoRenderInstructor.
Definition at line 378 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::get_dimensions | ( | double & | width, | |
| double & | height | |||
| ) | [virtual] |
Get dimensions
| width | upon return contains width | |
| height | upon return contains height |
Implements SkillGuiCairoRenderInstructor.
Definition at line 287 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::get_pad | ( | double & | pad_x, | |
| double & | pad_y | |||
| ) | [virtual] |
Get padding. To be called only by the Graphviz plugin.
| pad_x | upon return contains padding in x | |
| pad_y | upon return contains padding in y |
Implements SkillGuiCairoRenderInstructor.
Definition at line 227 of file graph_drawing_area.cpp.
| double SkillGuiGraphDrawingArea::get_scale | ( | ) | [virtual] |
Get scale. To be called only by the Graphviz plugin.
Implements SkillGuiCairoRenderInstructor.
Definition at line 266 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::get_state_position | ( | std::string | state_name, | |
| double & | px, | |||
| double & | py | |||
| ) | [private] |
Get position of a state in the graph.
| state_name | name of state to get position of | |
| px | upon successful return contains X position value | |
| py | upon succesful return contains Y position value Positions px/py are decimal percentages of graph width/height from left/top. |
Definition at line 679 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::get_translation | ( | double & | tx, | |
| double & | ty | |||
| ) | [virtual] |
Get translation.
| tx | upon return contains translation value | |
| ty | upon return contains translation value |
Implements SkillGuiCairoRenderInstructor.
Definition at line 276 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::get_update_graph | ( | ) |
Check if graph is being updated.
Definition at line 389 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::layout_graph | ( | ) | [private] |
Definition at line 828 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::on_button_press_event | ( | GdkEventButton * | event | ) | [protected, virtual] |
Button press event handler.
| event | event data |
Definition at line 631 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::on_button_release_event | ( | GdkEventButton * | event | ) | [protected, virtual] |
Button release event handler.
| event | event data |
Definition at line 645 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::on_expose_event | ( | GdkEventExpose * | event | ) | [protected, virtual] |
Expose event handler.
| event | event info structure. |
Definition at line 579 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::on_motion_notify_event | ( | GdkEventMotion * | event | ) | [protected, virtual] |
Mouse motion notify event handler.
| event | event data |
Definition at line 658 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::on_scroll_event | ( | GdkEventScroll * | event | ) | [protected, virtual] |
Scroll event handler.
| event | event structure |
Definition at line 615 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::open | ( | ) |
Open a dot graph and display it.
Definition at line 543 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::save | ( | ) |
save current graph.
Definition at line 471 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::save_dotfile | ( | const char * | filename | ) | [private] |
Definition at line 414 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::scale_override | ( | ) | [virtual] |
Check if scale override is enabled.
Implements SkillGuiCairoRenderInstructor.
Definition at line 366 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_active_state | ( | std::string | active_state | ) |
| void SkillGuiGraphDrawingArea::set_bb | ( | double | bbw, | |
| double | bbh | |||
| ) | [virtual] |
Set bounding box. To be called only by the Graphviz plugin.
| bbw | bounding box width | |
| bbh | bounding box height |
Implements SkillGuiCairoRenderInstructor.
Definition at line 201 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::set_follow_active_state | ( | bool | follow_active_state | ) |
Enable/disable active state following.
| follow_active_state | true to enable active state following, false otherwise |
Definition at line 432 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_graph | ( | std::string | graph | ) |
Set graph.
| graph | string representation of the current graph in the dot language. |
Definition at line 161 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_graph_fsm | ( | std::string | fsm_name | ) |
Set graph's FSM name.
| fsm_name | name of FSM the graph belongs to |
Definition at line 144 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_pad | ( | double | pad_x, | |
| double | pad_y | |||
| ) | [virtual] |
Set padding. To be called only by the Graphviz plugin.
| pad_x | padding in x | |
| pad_y | padding in y |
Implements SkillGuiCairoRenderInstructor.
Definition at line 214 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::set_recording | ( | bool | recording | ) |
Enable/disable recording.
| recording | true to enable recording, false otherwise |
Definition at line 451 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_scale | ( | double | scale | ) | [virtual] |
Set scale. To be called only by the Graphviz plugin.
| scale | scale value |
Implements SkillGuiCairoRenderInstructor.
Definition at line 256 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_translation | ( | double | tx, | |
| double | ty | |||
| ) | [virtual] |
Set translation. To be called only by the Graphviz plugin.
| tx | translation in x | |
| ty | translation in y |
Implements SkillGuiCairoRenderInstructor.
Definition at line 244 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_update_graph | ( | bool | update | ) |
Set if the graph should be updated on new data.
| update | true to update on new data, false to disable update |
Definition at line 399 of file graph_drawing_area.cpp.
| sigc::signal< void > SkillGuiGraphDrawingArea::signal_update_disabled | ( | ) |
Get "update disabled" signal.
Definition at line 134 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::update_translations | ( | ) |
Update __translation_x and __translation_y for state following animation.
Definition at line 748 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::zoom_fit | ( | ) |
Zoom to fit. Disables scale override and draws with values suggested by Graphviz plugin.
Definition at line 338 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::zoom_in | ( | ) |
Zoom in. Increases zoom factor by 20, no upper limit.
Definition at line 299 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::zoom_out | ( | ) |
Zoom out. Decreases zoom factor by 20 with a minimum of 1.
Definition at line 317 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::zoom_reset | ( | ) |
Zoom reset. Reset zoom to 1. Enables scale override.
Definition at line 349 of file graph_drawing_area.cpp.
std::string SkillGuiGraphDrawingArea::__active_state [private] |
Definition at line 107 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__bbh [private] |
Definition at line 113 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__bbw [private] |
Definition at line 112 of file graph_drawing_area.h.
Cairo::RefPtr<Cairo::Context> SkillGuiGraphDrawingArea::__cairo [private] |
Definition at line 91 of file graph_drawing_area.h.
Gtk::FileChooserDialog* SkillGuiGraphDrawingArea::__fcd_open [private] |
Definition at line 93 of file graph_drawing_area.h.
Gtk::FileChooserDialog* SkillGuiGraphDrawingArea::__fcd_recording [private] |
Definition at line 94 of file graph_drawing_area.h.
Gtk::FileChooserDialog* SkillGuiGraphDrawingArea::__fcd_save [private] |
Definition at line 92 of file graph_drawing_area.h.
Gtk::FileFilter* SkillGuiGraphDrawingArea::__filter_dot [private] |
Definition at line 98 of file graph_drawing_area.h.
Gtk::FileFilter* SkillGuiGraphDrawingArea::__filter_pdf [private] |
Definition at line 95 of file graph_drawing_area.h.
Gtk::FileFilter* SkillGuiGraphDrawingArea::__filter_png [private] |
Definition at line 97 of file graph_drawing_area.h.
Gtk::FileFilter* SkillGuiGraphDrawingArea::__filter_svg [private] |
Definition at line 96 of file graph_drawing_area.h.
bool SkillGuiGraphDrawingArea::__follow_active_state [private] |
Definition at line 132 of file graph_drawing_area.h.
graph_t* SkillGuiGraphDrawingArea::__graph [private] |
Definition at line 103 of file graph_drawing_area.h.
std::string SkillGuiGraphDrawingArea::__graph_dot [private] |
Definition at line 105 of file graph_drawing_area.h.
std::string SkillGuiGraphDrawingArea::__graph_fsm [private] |
Definition at line 106 of file graph_drawing_area.h.
GVC_t* SkillGuiGraphDrawingArea::__gvc [private] |
Definition at line 102 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__last_mouse_x [private] |
Definition at line 128 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__last_mouse_y [private] |
Definition at line 129 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__last_update_time [private] |
Definition at line 120 of file graph_drawing_area.h.
bool SkillGuiGraphDrawingArea::__mouse_motion [private] |
Definition at line 127 of file graph_drawing_area.h.
std::string SkillGuiGraphDrawingArea::__nonupd_active_state [private] |
Definition at line 110 of file graph_drawing_area.h.
std::string SkillGuiGraphDrawingArea::__nonupd_graph [private] |
Definition at line 108 of file graph_drawing_area.h.
std::string SkillGuiGraphDrawingArea::__nonupd_graph_fsm [private] |
Definition at line 109 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__pad_x [private] |
Definition at line 114 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__pad_y [private] |
Definition at line 115 of file graph_drawing_area.h.
std::string SkillGuiGraphDrawingArea::__record_directory [private] |
Definition at line 137 of file graph_drawing_area.h.
bool SkillGuiGraphDrawingArea::__recording [private] |
Definition at line 136 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__scale [private] |
Definition at line 118 of file graph_drawing_area.h.
bool SkillGuiGraphDrawingArea::__scale_override [private] |
Definition at line 131 of file graph_drawing_area.h.
sigc::signal<void> SkillGuiGraphDrawingArea::__signal_update_disabled [private] |
Definition at line 100 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__speed [private] |
Definition at line 121 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__speed_max [private] |
Definition at line 122 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__speed_ramp_distance [private] |
Definition at line 123 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__translation_x [private] |
Definition at line 116 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__translation_x_setpoint [private] |
Definition at line 124 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__translation_y [private] |
Definition at line 117 of file graph_drawing_area.h.
double SkillGuiGraphDrawingArea::__translation_y_setpoint [private] |
Definition at line 125 of file graph_drawing_area.h.
bool SkillGuiGraphDrawingArea::__update_graph [private] |
Definition at line 133 of file graph_drawing_area.h.