Fawkes API
Fawkes Development Version
|
Skill FSM Graph Viewport. More...
#include "graph_viewport.h"
Public Member Functions | |
SkillGuiGraphViewport () | |
Constructor. More... | |
~SkillGuiGraphViewport () | |
Destructor. More... | |
void | set_gvjob (GVJ_t *job) |
Set current Graphviz job. More... | |
void | set_graph_fsm (std::string fsm_name) |
Set graph's FSM name. More... | |
void | set_graph (std::string graph) |
Set graph. More... | |
bool | get_update_graph () |
Check if graph is being updated. More... | |
void | set_update_graph (bool update) |
Set if the graph should be updated on new data. More... | |
void | save () |
Render current graph. More... | |
void | render () |
Render current graph. More... | |
void | zoom_in () |
Zoom in. More... | |
void | zoom_out () |
Zoom out. More... | |
void | zoom_fit () |
Zoom to fit. More... | |
void | zoom_reset () |
Zoom reset. More... | |
Papyrus::AffineController::pointer | get_affine () |
Get scaler. More... | |
void | add_drawable (Papyrus::Drawable::pointer d) |
Add a drawable. More... | |
virtual void | clear () |
Clear all drawables. More... | |
void | set_bb (double bbw, double bbh) |
Set bounding box. More... | |
void | set_pad (double pad_x, double pad_y) |
Set padding. More... | |
void | set_translation (double tx, double ty) |
Set translation. More... | |
void | set_scale (double scale) |
Set scale. More... | |
bool | scale_override () |
Check if scale override is enabled. More... | |
Protected Member Functions | |
void | on_expose (GdkEventExpose *event) |
Called on explose. More... | |
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.
References on_expose(), and render().
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.
|
virtual |
Clear all drawables.
To be called only by the Graphviz plugin.
Definition at line 151 of file graph_viewport.cpp.
Referenced by render().
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.
|
protected |
Called on explose.
event | Gdk event structure |
Definition at line 398 of file graph_viewport.cpp.
Referenced by SkillGuiGraphViewport().
void SkillGuiGraphViewport::render | ( | ) |
Render current graph.
Definition at line 371 of file graph_viewport.cpp.
References clear().
Referenced by SkillGuiGraphViewport().
void SkillGuiGraphViewport::save | ( | ) |
Render current graph.
Definition at line 315 of file graph_viewport.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
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.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
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.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
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.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().
void SkillGuiGraphViewport::zoom_reset | ( | ) |
Zoom reset.
Reset zoom to 1. Enables scale override.
Definition at line 282 of file graph_viewport.cpp.
Referenced by SkillGuiGtkWindow::SkillGuiGtkWindow().