$search
#include <graph_viewport.h>
Public Member Functions | |
void | add_drawable (Papyrus::Drawable::pointer d) |
virtual void | clear () |
Papyrus::AffineController::pointer | get_affine () |
bool | get_update_graph () |
void | render () |
void | save () |
bool | scale_override () |
void | set_bb (double bbw, double bbh) |
void | set_graph (std::string graph) |
void | set_graph_fsm (std::string fsm_name) |
void | set_gvjob (GVJ_t *job) |
void | set_pad (double pad_x, double pad_y) |
void | set_scale (double scale) |
void | set_translation (double tx, double ty) |
void | set_update_graph (bool update) |
SkillGuiGraphViewport () | |
void | zoom_fit () |
void | zoom_in () |
void | zoom_out () |
void | zoom_reset () |
~SkillGuiGraphViewport () | |
Protected Member Functions | |
void | on_expose (GdkEventExpose *event) |
Private Attributes | |
Papyrus::AffineController::pointer | __affine |
double | __bbh |
double | __bbw |
Gtk::FileChooserDialog * | __fcd |
std::string | __graph |
std::string | __graph_fsm |
GVC_t * | __gvc |
GVJ_t * | __gvjob |
double | __pad_x |
double | __pad_y |
double | __scale |
bool | __scale_override |
double | __translation_x |
double | __translation_y |
Papyrus::Translator::pointer | __translator |
bool | __update_graph |
Skill FSM Graph Viewport.
Definition at line 34 of file graph_viewport.h.
SkillGuiGraphViewport::SkillGuiGraphViewport | ( | ) |
Constructor.
Definition at line 34 of file graph_viewport.cpp.
SkillGuiGraphViewport::~SkillGuiGraphViewport | ( | ) |
Destructor.
Definition at line 95 of file graph_viewport.cpp.
void SkillGuiGraphViewport::add_drawable | ( | Papyrus::Drawable::pointer | d | ) |
Add a drawable. To be called only by the Graphviz plugin.
d | drawable to add |
Definition at line 140 of file graph_viewport.cpp.
void SkillGuiGraphViewport::clear | ( | ) | [virtual] |
Clear all drawables. To be called only by the Graphviz plugin.
Definition at line 151 of file graph_viewport.cpp.
Papyrus::AffineController::pointer SkillGuiGraphViewport::get_affine | ( | ) |
bool SkillGuiGraphViewport::get_update_graph | ( | ) |
Check if graph is being updated.
Definition at line 211 of file graph_viewport.cpp.
void SkillGuiGraphViewport::on_expose | ( | GdkEventExpose * | event | ) | [protected] |
Called on explose.
event | Gdk event structure |
Definition at line 398 of file graph_viewport.cpp.
void SkillGuiGraphViewport::render | ( | ) |
Render current graph.
Definition at line 371 of file graph_viewport.cpp.
void SkillGuiGraphViewport::save | ( | ) |
Render current graph.
Definition at line 315 of file graph_viewport.cpp.
bool SkillGuiGraphViewport::scale_override | ( | ) |
Check if scale override is enabled.
Definition at line 298 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_bb | ( | double | bbw, | |
double | bbh | |||
) |
Set bounding box. To be called only by the Graphviz plugin.
bbw | bounding box width | |
bbh | bounding box height |
Definition at line 164 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_graph | ( | std::string | graph | ) |
Set graph.
graph | string representation of the current graph in the dot language. |
Definition at line 129 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_graph_fsm | ( | std::string | fsm_name | ) |
Set graph's FSM name.
fsm_name | name of FSM the graph belongs to |
Definition at line 116 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_gvjob | ( | GVJ_t * | job | ) |
Set current Graphviz job.
job | current Graphviz job |
Definition at line 106 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_pad | ( | double | pad_x, | |
double | pad_y | |||
) |
Set padding. To be called only by the Graphviz plugin.
pad_x | padding in x | |
pad_y | padding in y |
Definition at line 177 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_scale | ( | double | scale | ) |
Set scale. To be called only by the Graphviz plugin.
scale | scale value |
Definition at line 202 of file graph_viewport.cpp.
void SkillGuiGraphViewport::set_translation | ( | double | tx, | |
double | ty | |||
) |
Set translation. To be called only by the Graphviz plugin.
tx | translation in x | |
ty | translation in y |
Definition at line 190 of file graph_viewport.cpp.
void SkillGuiGraphViewport::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 221 of file graph_viewport.cpp.
void SkillGuiGraphViewport::zoom_fit | ( | ) |
Zoom to fit. Disables scale override and draws with values suggested by Graphviz plugin.
Definition at line 269 of file graph_viewport.cpp.
void SkillGuiGraphViewport::zoom_in | ( | ) |
Zoom in. Sets scale override and increases the scale by 0.1.
Definition at line 231 of file graph_viewport.cpp.
void SkillGuiGraphViewport::zoom_out | ( | ) |
Zoom out. Sets scale override and decreases the scale by 0.1.
Definition at line 250 of file graph_viewport.cpp.
void SkillGuiGraphViewport::zoom_reset | ( | ) |
Zoom reset. Reset zoom to 1. Enables scale override.
Definition at line 282 of file graph_viewport.cpp.
Papyrus::AffineController::pointer SkillGuiGraphViewport::__affine [private] |
Definition at line 87 of file graph_viewport.h.
double SkillGuiGraphViewport::__bbh [private] |
Definition at line 76 of file graph_viewport.h.
double SkillGuiGraphViewport::__bbw [private] |
Definition at line 75 of file graph_viewport.h.
Gtk::FileChooserDialog* SkillGuiGraphViewport::__fcd [private] |
Definition at line 86 of file graph_viewport.h.
std::string SkillGuiGraphViewport::__graph [private] |
Definition at line 73 of file graph_viewport.h.
std::string SkillGuiGraphViewport::__graph_fsm [private] |
Definition at line 72 of file graph_viewport.h.
GVC_t* SkillGuiGraphViewport::__gvc [private] |
Definition at line 69 of file graph_viewport.h.
GVJ_t* SkillGuiGraphViewport::__gvjob [private] |
Definition at line 70 of file graph_viewport.h.
double SkillGuiGraphViewport::__pad_x [private] |
Definition at line 77 of file graph_viewport.h.
double SkillGuiGraphViewport::__pad_y [private] |
Definition at line 78 of file graph_viewport.h.
double SkillGuiGraphViewport::__scale [private] |
Definition at line 81 of file graph_viewport.h.
bool SkillGuiGraphViewport::__scale_override [private] |
Definition at line 84 of file graph_viewport.h.
double SkillGuiGraphViewport::__translation_x [private] |
Definition at line 79 of file graph_viewport.h.
double SkillGuiGraphViewport::__translation_y [private] |
Definition at line 80 of file graph_viewport.h.
Papyrus::Translator::pointer SkillGuiGraphViewport::__translator [private] |
Definition at line 88 of file graph_viewport.h.
bool SkillGuiGraphViewport::__update_graph [private] |
Definition at line 82 of file graph_viewport.h.