FlowCanvas::Canvas Class Reference
[Canvas widget for dataflow systems.]

The 'master' canvas widget which contains all other objects. More...

#include <Canvas.hpp>

List of all members.

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< Connectionget_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< Connectionremove_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)
ItemListitems ()
ItemListselected_items ()
ConnectionListconnections ()
ConnectionListselected_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)
double width () const
double height () const
void resize (double width, double height)
void resize_all_items ()
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.

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


Detailed Description

The 'master' canvas widget which contains all other objects.

Applications must override some virtual methods to make the widget actually do anything (ie connect).


Constructor & Destructor Documentation

FlowCanvas::Canvas::Canvas ( double  width,
double  height 
)

virtual FlowCanvas::Canvas::~Canvas (  )  [virtual]


Member Function Documentation

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::items (  )  [inline]

References _items.

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  )  [virtual]

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 (  ) 

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]


Friends And Related Function Documentation

friend class Module [friend]


Member Data Documentation

All items on this canvas.

Referenced by items().

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().


The documentation for this class was generated from the following file:

Generated on Sat Nov 27 15:42:34 2010 for FlowCanvas by  doxygen 1.5.9