FlowCanvas 0.7.1
|
The 'master' canvas widget which contains all other objects. More...
#include <Canvas.hpp>
Public Types | |
enum | FlowDirection { HORIZONTAL, VERTICAL } |
Public Member Functions | |
Canvas (double width, double height) | |
virtual | ~Canvas () |
void | destroy () |
void | add_item (boost::shared_ptr< Item > i) |
bool | remove_item (boost::shared_ptr< Item > i) |
boost::shared_ptr< Connection > | get_connection (boost::shared_ptr< Connectable > tail, boost::shared_ptr< Connectable > head) const |
bool | add_connection (boost::shared_ptr< Connectable > tail, boost::shared_ptr< Connectable > head, uint32_t color) |
bool | add_connection (boost::shared_ptr< Connection > connection) |
boost::shared_ptr< Connection > | remove_connection (boost::shared_ptr< Connectable > tail, boost::shared_ptr< Connectable > head) |
void | set_default_placement (boost::shared_ptr< Module > m) |
void | clear_selection () |
void | select_item (boost::shared_ptr< Item > item) |
void | unselect_ports () |
void | unselect_item (boost::shared_ptr< Item > item) |
void | unselect_connection (Connection *c) |
ItemList & | items () |
ItemList & | selected_items () |
ConnectionList & | connections () |
ConnectionList & | selected_connections () |
void | lock (bool l) |
bool | locked () const |
double | get_zoom () |
void | set_zoom (double pix_per_unit) |
void | zoom_full () |
void | render_to_dot (const std::string &filename) |
virtual void | arrange (bool use_length_hints=false, bool center=true) |
void | move_contents_to (double x, double y) |
double | width () const |
double | height () const |
void | resize (double width, double height) |
void | resize_all_items () |
void | scroll_to_center () |
void | set_direction (FlowDirection d) |
FlowDirection | direction () const |
ArtVpathDash * | select_dash () |
Dash applied to selected items. | |
virtual void | connect (boost::shared_ptr< Connectable >, boost::shared_ptr< Connectable >) |
Make a connection. | |
virtual void | disconnect (boost::shared_ptr< Connectable >, boost::shared_ptr< Connectable >) |
Disconnect two ports. | |
Static Public Attributes | |
static sigc::signal< void, Gnome::Canvas::Item * > | signal_item_entered |
static sigc::signal< void, Gnome::Canvas::Item * > | signal_item_left |
Protected Member Functions | |
virtual bool | canvas_event (GdkEvent *event) |
virtual bool | frame_event (GdkEvent *ev) |
Protected Attributes | |
ItemList | _items |
All items on this canvas. | |
ConnectionList | _connections |
All connections on this canvas. | |
std::list< boost::shared_ptr < Item > > | _selected_items |
All currently selected modules. | |
std::list< boost::shared_ptr < Connection > > | _selected_connections |
All currently selected connections. | |
Friends | |
class | Module |
The 'master' canvas widget which contains all other objects.
Applications must override some virtual methods to make the widget actually do anything (ie connect).
FlowCanvas::Canvas::Canvas | ( | double | width, |
double | height | ||
) |
virtual FlowCanvas::Canvas::~Canvas | ( | ) | [virtual] |
void FlowCanvas::Canvas::destroy | ( | ) |
void FlowCanvas::Canvas::add_item | ( | boost::shared_ptr< Item > | i | ) |
bool FlowCanvas::Canvas::remove_item | ( | boost::shared_ptr< Item > | i | ) |
boost::shared_ptr<Connection> FlowCanvas::Canvas::get_connection | ( | boost::shared_ptr< Connectable > | tail, |
boost::shared_ptr< Connectable > | head | ||
) | const |
bool FlowCanvas::Canvas::add_connection | ( | boost::shared_ptr< Connectable > | tail, |
boost::shared_ptr< Connectable > | head, | ||
uint32_t | color | ||
) |
bool FlowCanvas::Canvas::add_connection | ( | boost::shared_ptr< Connection > | connection | ) |
boost::shared_ptr<Connection> FlowCanvas::Canvas::remove_connection | ( | boost::shared_ptr< Connectable > | tail, |
boost::shared_ptr< Connectable > | head | ||
) |
void FlowCanvas::Canvas::set_default_placement | ( | boost::shared_ptr< Module > | m | ) |
void FlowCanvas::Canvas::clear_selection | ( | ) |
void FlowCanvas::Canvas::select_item | ( | boost::shared_ptr< Item > | item | ) |
void FlowCanvas::Canvas::unselect_ports | ( | ) |
void FlowCanvas::Canvas::unselect_item | ( | boost::shared_ptr< Item > | item | ) |
void FlowCanvas::Canvas::unselect_connection | ( | Connection * | c | ) |
ItemList& FlowCanvas::Canvas::selected_items | ( | ) | [inline] |
References _selected_items.
ConnectionList& FlowCanvas::Canvas::connections | ( | ) | [inline] |
References _connections.
ConnectionList& FlowCanvas::Canvas::selected_connections | ( | ) | [inline] |
References _selected_connections.
void FlowCanvas::Canvas::lock | ( | bool | l | ) |
bool FlowCanvas::Canvas::locked | ( | ) | const [inline] |
double FlowCanvas::Canvas::get_zoom | ( | ) | [inline] |
void FlowCanvas::Canvas::set_zoom | ( | double | pix_per_unit | ) |
void FlowCanvas::Canvas::zoom_full | ( | ) |
void FlowCanvas::Canvas::render_to_dot | ( | const std::string & | filename | ) |
virtual void FlowCanvas::Canvas::arrange | ( | bool | use_length_hints = false , |
bool | center = true |
||
) | [virtual] |
void FlowCanvas::Canvas::move_contents_to | ( | double | x, |
double | y | ||
) |
double FlowCanvas::Canvas::width | ( | ) | const [inline] |
double FlowCanvas::Canvas::height | ( | ) | const [inline] |
void FlowCanvas::Canvas::resize | ( | double | width, |
double | height | ||
) |
void FlowCanvas::Canvas::resize_all_items | ( | ) |
void FlowCanvas::Canvas::scroll_to_center | ( | ) |
void FlowCanvas::Canvas::set_direction | ( | FlowDirection | d | ) | [inline] |
FlowDirection FlowCanvas::Canvas::direction | ( | ) | const [inline] |
ArtVpathDash* FlowCanvas::Canvas::select_dash | ( | ) | [inline] |
Dash applied to selected items.
Set an object's property_dash() to this for the "rubber band" effect
virtual void FlowCanvas::Canvas::connect | ( | boost::shared_ptr< Connectable > | , |
boost::shared_ptr< Connectable > | |||
) | [inline, virtual] |
Make a connection.
Should be overridden by an implementation to do something.
virtual void FlowCanvas::Canvas::disconnect | ( | boost::shared_ptr< Connectable > | , |
boost::shared_ptr< Connectable > | |||
) | [inline, virtual] |
Disconnect two ports.
Should be overridden by an implementation to do something
virtual bool FlowCanvas::Canvas::canvas_event | ( | GdkEvent * | event | ) | [protected, virtual] |
virtual bool FlowCanvas::Canvas::frame_event | ( | GdkEvent * | ev | ) | [protected, virtual] |
friend class Module [friend] |
sigc::signal<void, Gnome::Canvas::Item*> FlowCanvas::Canvas::signal_item_entered [static] |
sigc::signal<void, Gnome::Canvas::Item*> FlowCanvas::Canvas::signal_item_left [static] |
ItemList FlowCanvas::Canvas::_items [protected] |
All items on this canvas.
Referenced by items().
ConnectionList FlowCanvas::Canvas::_connections [protected] |
All connections on this canvas.
Referenced by connections().
std::list< boost::shared_ptr<Item> > FlowCanvas::Canvas::_selected_items [protected] |
All currently selected modules.
Referenced by selected_items().
std::list< boost::shared_ptr<Connection> > FlowCanvas::Canvas::_selected_connections [protected] |
All currently selected connections.
Referenced by selected_connections().