FlowCanvas 0.7.1
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
FlowCanvas::Canvas Class Reference

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

#include <Canvas.hpp>

Inheritance diagram for FlowCanvas::Canvas:
Inheritance graph
[legend]
Collaboration diagram for FlowCanvas::Canvas:
Collaboration graph
[legend]

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. More...
 
virtual void connect (boost::shared_ptr< Connectable >, boost::shared_ptr< Connectable >)
 Make a connection. More...
 
virtual void disconnect (boost::shared_ptr< Connectable >, boost::shared_ptr< Connectable >)
 Disconnect two ports. More...
 

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. More...
 
ConnectionList _connections
 All connections on this canvas. More...
 
std::list< boost::shared_ptr< Item > > _selected_items
 All currently selected modules. More...
 
std::list< boost::shared_ptr< Connection > > _selected_connections
 All currently selected connections. More...
 

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

◆ FlowDirection

Enumerator
HORIZONTAL 
VERTICAL 

Constructor & Destructor Documentation

◆ Canvas()

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

◆ ~Canvas()

virtual FlowCanvas::Canvas::~Canvas ( )
virtual

Member Function Documentation

◆ destroy()

void FlowCanvas::Canvas::destroy ( )

◆ add_item()

void FlowCanvas::Canvas::add_item ( boost::shared_ptr< Item i)

◆ remove_item()

bool FlowCanvas::Canvas::remove_item ( boost::shared_ptr< Item i)

◆ get_connection()

boost::shared_ptr< Connection > FlowCanvas::Canvas::get_connection ( boost::shared_ptr< Connectable tail,
boost::shared_ptr< Connectable head 
) const

◆ add_connection() [1/2]

bool FlowCanvas::Canvas::add_connection ( boost::shared_ptr< Connectable tail,
boost::shared_ptr< Connectable head,
uint32_t  color 
)

◆ add_connection() [2/2]

bool FlowCanvas::Canvas::add_connection ( boost::shared_ptr< Connection connection)

◆ remove_connection()

boost::shared_ptr< Connection > FlowCanvas::Canvas::remove_connection ( boost::shared_ptr< Connectable tail,
boost::shared_ptr< Connectable head 
)

◆ set_default_placement()

void FlowCanvas::Canvas::set_default_placement ( boost::shared_ptr< Module m)

◆ clear_selection()

void FlowCanvas::Canvas::clear_selection ( )

◆ select_item()

void FlowCanvas::Canvas::select_item ( boost::shared_ptr< Item item)

◆ unselect_ports()

void FlowCanvas::Canvas::unselect_ports ( )

◆ unselect_item()

void FlowCanvas::Canvas::unselect_item ( boost::shared_ptr< Item item)

◆ unselect_connection()

void FlowCanvas::Canvas::unselect_connection ( Connection c)

◆ items()

ItemList & FlowCanvas::Canvas::items ( )
inline

References _items.

◆ selected_items()

ItemList & FlowCanvas::Canvas::selected_items ( )
inline

References _selected_items.

◆ connections()

ConnectionList & FlowCanvas::Canvas::connections ( )
inline

References _connections.

◆ selected_connections()

ConnectionList & FlowCanvas::Canvas::selected_connections ( )
inline

References _selected_connections.

◆ lock()

void FlowCanvas::Canvas::lock ( bool  l)

◆ locked()

bool FlowCanvas::Canvas::locked ( ) const
inline

◆ get_zoom()

double FlowCanvas::Canvas::get_zoom ( )
inline

◆ set_zoom()

void FlowCanvas::Canvas::set_zoom ( double  pix_per_unit)

◆ zoom_full()

void FlowCanvas::Canvas::zoom_full ( )

◆ render_to_dot()

void FlowCanvas::Canvas::render_to_dot ( const std::string &  filename)

◆ arrange()

virtual void FlowCanvas::Canvas::arrange ( bool  use_length_hints = false,
bool  center = true 
)
virtual

◆ move_contents_to()

void FlowCanvas::Canvas::move_contents_to ( double  x,
double  y 
)

◆ width()

double FlowCanvas::Canvas::width ( ) const
inline

◆ height()

double FlowCanvas::Canvas::height ( ) const
inline

◆ resize()

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

◆ resize_all_items()

void FlowCanvas::Canvas::resize_all_items ( )

◆ scroll_to_center()

void FlowCanvas::Canvas::scroll_to_center ( )

◆ set_direction()

void FlowCanvas::Canvas::set_direction ( FlowDirection  d)
inline

◆ direction()

FlowDirection FlowCanvas::Canvas::direction ( ) const
inline

◆ select_dash()

ArtVpathDash * FlowCanvas::Canvas::select_dash ( )
inline

Dash applied to selected items.

Set an object's property_dash() to this for the "rubber band" effect

◆ connect()

virtual void FlowCanvas::Canvas::connect ( boost::shared_ptr< Connectable ,
boost::shared_ptr< Connectable  
)
inlinevirtual

Make a connection.

Should be overridden by an implementation to do something.

◆ disconnect()

virtual void FlowCanvas::Canvas::disconnect ( boost::shared_ptr< Connectable ,
boost::shared_ptr< Connectable  
)
inlinevirtual

Disconnect two ports.

Should be overridden by an implementation to do something

◆ canvas_event()

virtual bool FlowCanvas::Canvas::canvas_event ( GdkEvent *  event)
protectedvirtual

◆ frame_event()

virtual bool FlowCanvas::Canvas::frame_event ( GdkEvent *  ev)
protectedvirtual

Friends And Related Function Documentation

◆ Module

friend class Module
friend

Member Data Documentation

◆ signal_item_entered

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

◆ signal_item_left

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

◆ _items

ItemList FlowCanvas::Canvas::_items
protected

All items on this canvas.

Referenced by items().

◆ _connections

ConnectionList FlowCanvas::Canvas::_connections
protected

All connections on this canvas.

Referenced by connections().

◆ _selected_items

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

All currently selected modules.

Referenced by selected_items().

◆ _selected_connections

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: