FlowCanvas  0.7.1
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends
FlowCanvas::Port Class Reference

A port on a Module. More...

#include <Port.hpp>

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

List of all members.

Classes

struct  Control
 Port control value indicator "gauge". More...

Public Member Functions

 Port (boost::shared_ptr< Module > module, const std::string &name, bool is_input, uint32_t color)
virtual ~Port ()
void disconnect_all ()
virtual Gnome::Art::Point src_connection_point ()
virtual Gnome::Art::Point dst_connection_point (const Gnome::Art::Point &src)
virtual Gnome::Art::Point connection_point_vector (double dx, double dy)
boost::weak_ptr< Modulemodule () const
void set_fill_color (uint32_t c)
void show_label (bool b)
void set_selected (bool b)
bool selected () const
void set_highlighted (bool highlight, bool highlight_parent=true, bool highlight_connections=true, bool raise_connections=true)
void zoom (float z)
void popup_menu (guint button, guint32 activate_time)
virtual void create_menu ()
void set_menu (Gtk::Menu *m)
Gtk::Menu * menu () const
double width () const
void set_width (double w)
void set_height (double h)
double border_width () const
void set_border_width (double w)
double natural_width () const
const std::string & name () const
virtual void set_name (const std::string &n)
bool is_input () const
bool is_output () const
uint32_t color () const
double height () const
virtual bool is_toggled () const
virtual void set_toggled (bool b)
virtual void toggle (bool signal=true)
virtual void set_control (float value, bool signal=true)
virtual void set_control_min (float min)
virtual void set_control_max (float max)
float control_value () const
float control_min () const
float control_max () const
void show_control ()
void hide_control ()
bool operator== (const std::string &name)
- Public Member Functions inherited from FlowCanvas::Connectable
virtual ~Connectable ()
virtual void add_connection (boost::shared_ptr< Connection > c)
virtual void remove_connection (boost::shared_ptr< Connection > c)
virtual void move_connections ()
virtual void raise_connections ()
bool is_connected_to (boost::shared_ptr< Connectable > other)
Connectionsconnections ()

Public Attributes

sigc::signal< void > signal_renamed
sigc::signal< void, float > signal_control_changed

Protected Member Functions

void on_menu_hide ()

Protected Attributes

boost::weak_ptr< Module_module
std::string _name
Gnome::Canvas::Text * _label
Gnome::Canvas::Rect * _rect
Gtk::Menu * _menu
Control_control
double _width
double _height
double _border_width
uint32_t _color
bool _is_input:1
bool _selected:1
bool _toggled:1
- Protected Attributes inherited from FlowCanvas::Connectable
Connections _connections
 needed for dragging

Friends

class Canvas

Additional Inherited Members

- Public Types inherited from FlowCanvas::Connectable
typedef std::list
< boost::weak_ptr< Connection > > 
Connections

Detailed Description

A port on a Module.

This is a group that contains both the label and rectangle for a port.


Constructor & Destructor Documentation

FlowCanvas::Port::Port ( boost::shared_ptr< Module module,
const std::string &  name,
bool  is_input,
uint32_t  color 
)
virtual FlowCanvas::Port::~Port ( )
virtual

Member Function Documentation

void FlowCanvas::Port::disconnect_all ( )
virtual Gnome::Art::Point FlowCanvas::Port::src_connection_point ( )
virtual
virtual Gnome::Art::Point FlowCanvas::Port::dst_connection_point ( const Gnome::Art::Point &  src)
virtual
virtual Gnome::Art::Point FlowCanvas::Port::connection_point_vector ( double  dx,
double  dy 
)
virtual
boost::weak_ptr<Module> FlowCanvas::Port::module ( ) const
inline

References _module.

void FlowCanvas::Port::set_fill_color ( uint32_t  c)
inline

References _rect.

void FlowCanvas::Port::show_label ( bool  b)
void FlowCanvas::Port::set_selected ( bool  b)
bool FlowCanvas::Port::selected ( ) const
inline

References _selected.

void FlowCanvas::Port::set_highlighted ( bool  highlight,
bool  highlight_parent = true,
bool  highlight_connections = true,
bool  raise_connections = true 
)
void FlowCanvas::Port::zoom ( float  z)
void FlowCanvas::Port::popup_menu ( guint  button,
guint32  activate_time 
)
inline

References _menu, and create_menu().

virtual void FlowCanvas::Port::create_menu ( )
virtual

Referenced by popup_menu().

void FlowCanvas::Port::set_menu ( Gtk::Menu *  m)
Gtk::Menu* FlowCanvas::Port::menu ( ) const
inline

References _menu.

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

References _width.

void FlowCanvas::Port::set_width ( double  w)
void FlowCanvas::Port::set_height ( double  h)
double FlowCanvas::Port::border_width ( ) const
inline

References _border_width.

void FlowCanvas::Port::set_border_width ( double  w)
double FlowCanvas::Port::natural_width ( ) const
const std::string& FlowCanvas::Port::name ( ) const
inline

References _name.

virtual void FlowCanvas::Port::set_name ( const std::string &  n)
virtual
bool FlowCanvas::Port::is_input ( ) const
inline

References _is_input.

bool FlowCanvas::Port::is_output ( ) const
inline

References _is_input.

uint32_t FlowCanvas::Port::color ( ) const
inline

References _color.

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

References _height.

virtual bool FlowCanvas::Port::is_toggled ( ) const
inlinevirtual

References _toggled.

virtual void FlowCanvas::Port::set_toggled ( bool  b)
inlinevirtual

References _toggled.

virtual void FlowCanvas::Port::toggle ( bool  signal = true)
virtual
virtual void FlowCanvas::Port::set_control ( float  value,
bool  signal = true 
)
virtual
virtual void FlowCanvas::Port::set_control_min ( float  min)
virtual
virtual void FlowCanvas::Port::set_control_max ( float  max)
virtual
float FlowCanvas::Port::control_value ( ) const
inline
float FlowCanvas::Port::control_min ( ) const
inline
float FlowCanvas::Port::control_max ( ) const
inline
void FlowCanvas::Port::show_control ( )
void FlowCanvas::Port::hide_control ( )
bool FlowCanvas::Port::operator== ( const std::string &  name)
inline

References _name.

void FlowCanvas::Port::on_menu_hide ( )
protected

Friends And Related Function Documentation

friend class Canvas
friend

Member Data Documentation

sigc::signal<void> FlowCanvas::Port::signal_renamed
sigc::signal<void,float> FlowCanvas::Port::signal_control_changed
boost::weak_ptr<Module> FlowCanvas::Port::_module
protected

Referenced by module().

std::string FlowCanvas::Port::_name
protected

Referenced by name(), and operator==().

Gnome::Canvas::Text* FlowCanvas::Port::_label
protected
Gnome::Canvas::Rect* FlowCanvas::Port::_rect
protected

Referenced by set_fill_color().

Gtk::Menu* FlowCanvas::Port::_menu
protected

Referenced by menu(), and popup_menu().

Control* FlowCanvas::Port::_control
protected
double FlowCanvas::Port::_width
protected

Referenced by width().

double FlowCanvas::Port::_height
protected

Referenced by height().

double FlowCanvas::Port::_border_width
protected

Referenced by border_width().

uint32_t FlowCanvas::Port::_color
protected

Referenced by color().

bool FlowCanvas::Port::_is_input
protected

Referenced by is_input(), and is_output().

bool FlowCanvas::Port::_selected
protected

Referenced by selected().

bool FlowCanvas::Port::_toggled
protected

Referenced by is_toggled(), and set_toggled().


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