SkillGuiGraphDrawingArea Class Reference
Graph drawing area. More...
#include <graph_drawing_area.h>

Public Member Functions | |
| SkillGuiGraphDrawingArea () | |
| Constructor. | |
| void | save () |
| save current graph. | |
| void | open () |
| Open a dot graph and display it. | |
| bool | set_recording (bool recording) |
| Enable/disable recording. | |
| void | zoom_in () |
| Zoom in. | |
| void | zoom_out () |
| Zoom out. | |
| void | zoom_fit () |
| Zoom to fit. | |
| void | zoom_reset () |
| Zoom reset. | |
| void | set_graph_fsm (std::string fsm_name) |
| Set graph's FSM name. | |
| void | set_graph (std::string graph) |
| Set graph. | |
| void | set_bb (double bbw, double bbh) |
| Set bounding box. | |
| void | set_pad (double pad_x, double pad_y) |
| Set padding. | |
| void | set_translation (double tx, double ty) |
| Set translation. | |
| void | set_scale (double scale) |
| Set scale. | |
| bool | scale_override () |
| Check if scale override is enabled. | |
| double | get_scale () |
| Get scale. | |
| void | get_translation (double &tx, double &ty) |
| Get translation. | |
| void | get_dimensions (double &width, double &height) |
| Get dimensions. | |
| void | get_pad (double &pad_x, double &pad_y) |
| Get padding. | |
| Cairo::RefPtr< Cairo::Context > | get_cairo () |
| Get Cairo context. | |
| bool | get_update_graph () |
| Check if graph is being updated. | |
| void | set_update_graph (bool update) |
| Set if the graph should be updated on new data. | |
| sigc::signal< void > | signal_update_disabled () |
| Get "update disabled" signal. | |
Protected Member Functions | |
| virtual bool | on_expose_event (GdkEventExpose *event) |
| Expose event handler. | |
| virtual bool | on_scroll_event (GdkEventScroll *event) |
| Scroll event handler. | |
| virtual bool | on_button_press_event (GdkEventButton *event) |
| Button press event handler. | |
| virtual bool | on_motion_notify_event (GdkEventMotion *event) |
| Mouse motion notify event handler. | |
Detailed Description
Graph drawing area.Derived version of Gtk::DrawingArea that renders a graph via Graphviz.
Definition at line 33 of file graph_drawing_area.h.
Constructor & Destructor Documentation
| SkillGuiGraphDrawingArea::SkillGuiGraphDrawingArea | ( | ) |
Constructor.
Definition at line 35 of file graph_drawing_area.cpp.
References on_button_press_event(), on_expose_event(), and on_motion_notify_event().
Member Function Documentation
| 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.
- Returns:
- Cairo context
Implements SkillGuiCairoRenderInstructor.
Definition at line 348 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::get_dimensions | ( | double & | width, | |
| double & | height | |||
| ) | [virtual] |
Get dimensions.
- Parameters:
-
width upon return contains width height upon return contains height
Implements SkillGuiCairoRenderInstructor.
Definition at line 267 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.
- Parameters:
-
pad_x upon return contains padding in x pad_y upon return contains padding in y
Implements SkillGuiCairoRenderInstructor.
Definition at line 206 of file graph_drawing_area.cpp.
| double SkillGuiGraphDrawingArea::get_scale | ( | ) | [virtual] |
Get scale.
To be called only by the Graphviz plugin.
- Returns:
- scale value
Implements SkillGuiCairoRenderInstructor.
Definition at line 245 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::get_translation | ( | double & | tx, | |
| double & | ty | |||
| ) | [virtual] |
Get translation.
- Parameters:
-
tx upon return contains translation value ty upon return contains translation value
Implements SkillGuiCairoRenderInstructor.
Definition at line 255 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::get_update_graph | ( | ) |
Check if graph is being updated.
- Returns:
- true if the graph will be update if new data is received, false otherwise
Definition at line 359 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::on_button_press_event | ( | GdkEventButton * | event | ) | [protected, virtual] |
Button press event handler.
- Parameters:
-
event event data
- Returns:
- true
Definition at line 586 of file graph_drawing_area.cpp.
Referenced by SkillGuiGraphDrawingArea().
| bool SkillGuiGraphDrawingArea::on_expose_event | ( | GdkEventExpose * | event | ) | [protected, virtual] |
Expose event handler.
- Parameters:
-
event event info structure.
- Returns:
- signal return value
Definition at line 533 of file graph_drawing_area.cpp.
Referenced by SkillGuiGraphDrawingArea().
| bool SkillGuiGraphDrawingArea::on_motion_notify_event | ( | GdkEventMotion * | event | ) | [protected, virtual] |
Mouse motion notify event handler.
- Parameters:
-
event event data
- Returns:
- true
Definition at line 599 of file graph_drawing_area.cpp.
Referenced by SkillGuiGraphDrawingArea().
| bool SkillGuiGraphDrawingArea::on_scroll_event | ( | GdkEventScroll * | event | ) | [protected, virtual] |
Scroll event handler.
- Parameters:
-
event event structure
- Returns:
- signal return value
Definition at line 570 of file graph_drawing_area.cpp.
References zoom_in(), and zoom_out().
| void SkillGuiGraphDrawingArea::open | ( | ) |
Open a dot graph and display it.
Definition at line 497 of file graph_drawing_area.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
| void SkillGuiGraphDrawingArea::save | ( | ) |
save current graph.
Definition at line 421 of file graph_drawing_area.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
| bool SkillGuiGraphDrawingArea::scale_override | ( | ) | [virtual] |
Check if scale override is enabled.
- Returns:
- true if scale override is enabled, false otherwise
Implements SkillGuiCairoRenderInstructor.
Definition at line 336 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_bb | ( | double | bbw, | |
| double | bbh | |||
| ) | [virtual] |
Set bounding box.
To be called only by the Graphviz plugin.
- Parameters:
-
bbw bounding box width bbh bounding box height
Implements SkillGuiCairoRenderInstructor.
Definition at line 180 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_graph | ( | std::string | graph | ) |
Set graph.
- Parameters:
-
graph string representation of the current graph in the dot language.
Definition at line 141 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_graph_fsm | ( | std::string | fsm_name | ) |
Set graph's FSM name.
- Parameters:
-
fsm_name name of FSM the graph belongs to
Definition at line 124 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.
- Parameters:
-
pad_x padding in x pad_y padding in y
Implements SkillGuiCairoRenderInstructor.
Definition at line 193 of file graph_drawing_area.cpp.
| bool SkillGuiGraphDrawingArea::set_recording | ( | bool | recording | ) |
Enable/disable recording.
- Parameters:
-
recording true to enable recording, false otherwise
- Returns:
- true if recording is enabled now, false if it is disabled. Enabling the recording may fail for example if the user chose to abort the directory creation process.
Definition at line 401 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_scale | ( | double | scale | ) | [virtual] |
Set scale.
To be called only by the Graphviz plugin.
- Parameters:
-
scale scale value
Implements SkillGuiCairoRenderInstructor.
Definition at line 235 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.
- Parameters:
-
tx translation in x ty translation in y
Implements SkillGuiCairoRenderInstructor.
Definition at line 223 of file graph_drawing_area.cpp.
| void SkillGuiGraphDrawingArea::set_update_graph | ( | bool | update | ) |
Set if the graph should be updated on new data.
- Parameters:
-
update true to update on new data, false to disable update
Definition at line 369 of file graph_drawing_area.cpp.
| sigc::signal< void > SkillGuiGraphDrawingArea::signal_update_disabled | ( | ) |
Get "update disabled" signal.
- Returns:
- "update disabled" signal
Definition at line 114 of file graph_drawing_area.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
| void SkillGuiGraphDrawingArea::zoom_fit | ( | ) |
Zoom to fit.
Disables scale override and draws with values suggested by Graphviz plugin.
Definition at line 310 of file graph_drawing_area.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
| void SkillGuiGraphDrawingArea::zoom_in | ( | ) |
Zoom in.
Increases zoom factor by 20, no upper limit.
Definition at line 279 of file graph_drawing_area.cpp.
Referenced by on_scroll_event(), and SkillGuiGtkWindow::SkillGuiGtkWindow().
| void SkillGuiGraphDrawingArea::zoom_out | ( | ) |
Zoom out.
Decreases zoom factor by 20 with a minimum of 1.
Definition at line 293 of file graph_drawing_area.cpp.
Referenced by on_scroll_event(), and SkillGuiGtkWindow::SkillGuiGtkWindow().
| void SkillGuiGraphDrawingArea::zoom_reset | ( | ) |
Zoom reset.
Reset zoom to 1. Enables scale override.
Definition at line 321 of file graph_drawing_area.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
The documentation for this class was generated from the following files:
- src/tools/skillgui/graph_drawing_area.h
- src/tools/skillgui/graph_drawing_area.cpp

