Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends

FlowCanvas::Canvas Class Reference
[FlowCanvas]

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

#include <Canvas.hpp>

List of all members.

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< 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, 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

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


Member Enumeration Documentation

Enumerator:
HORIZONTAL 
VERTICAL 

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]
ItemList& FlowCanvas::Canvas::selected_items (  )  [inline]
ConnectionList& FlowCanvas::Canvas::connections (  )  [inline]
ConnectionList& FlowCanvas::Canvas::selected_connections (  )  [inline]
void FlowCanvas::Canvas::lock ( bool  l  ) 
bool FlowCanvas::Canvas::locked (  )  const [inline]

References _items.

double FlowCanvas::Canvas::get_zoom (  )  [inline]

References _connections.

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]

References VERTICAL.

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

sigc::signal<void, Gnome::Canvas::Item*> FlowCanvas::Canvas::signal_item_entered [static]
sigc::signal<void, Gnome::Canvas::Item*> FlowCanvas::Canvas::signal_item_left [static]

All items on this canvas.

Referenced by locked().

All connections on this canvas.

Referenced by get_zoom().

std::list< boost::shared_ptr<Item> > FlowCanvas::Canvas::_selected_items [protected]

All currently selected modules.

std::list< boost::shared_ptr<Connection> > FlowCanvas::Canvas::_selected_connections [protected]

All currently selected connections.


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