A named block (possibly) containing input and output ports. More...
#include <Module.hpp>
Classes | |
struct | PortComparator |
Public Member Functions | |
Module (boost::shared_ptr< Canvas > canvas, const std::string &name, double x=0, double y=0, bool show_title=true, bool show_port_labels=true) | |
virtual | ~Module () |
const PortVector & | ports () const |
PortVector & | ports () |
boost::shared_ptr< Port > | get_port (const std::string &name) const |
Find a port on this module. | |
void | add_port (boost::shared_ptr< Port > port) |
void | remove_port (boost::shared_ptr< Port > port) |
boost::shared_ptr< Port > | port_at (double x, double y) |
void | zoom (double z) |
void | resize () |
bool | show_port_labels (bool b) |
void | set_show_port_labels (bool b) |
virtual void | move (double dx, double dy) |
virtual void | move_to (double x, double y) |
virtual void | set_name (const std::string &n) |
double | border_width () const |
void | set_border_width (double w) |
void | select_tick () |
void | set_selected (bool b) |
void | set_highlighted (bool b) |
void | set_border_color (uint32_t c) |
void | set_base_color (uint32_t c) |
void | set_default_base_color () |
void | set_stacked_border (bool b) |
void | set_icon (const Glib::RefPtr< Gdk::Pixbuf > &icon) |
size_t | num_ports () const |
double | empty_port_breadth () const |
double | empty_port_depth () const |
Protected Member Functions | |
virtual bool | on_event (GdkEvent *ev) |
virtual void | set_width (double w) |
virtual void | set_height (double h) |
void | fit_canvas () |
void | measure_ports () |
void | resize_horiz () |
void | resize_vert () |
void | port_renamed () |
void | embed (Gtk::Container *widget) |
Protected Attributes | |
PortVector | _ports |
Gnome::Canvas::Rect | _module_box |
Gnome::Canvas::Text | _canvas_title |
Gnome::Canvas::Rect * | _stacked_border |
Gnome::Canvas::Pixbuf * | _icon_box |
Gtk::Container * | _embed_container |
Gnome::Canvas::Widget * | _embed_item |
double | _border_width |
double | _embed_width |
double | _embed_height |
double | _icon_size |
double | _widest_input |
double | _widest_output |
double | _title_width |
double | _title_height |
bool | _title_visible:1 |
bool | _port_renamed:1 |
bool | _show_port_labels:1 |
Friends | |
class | Canvas |
A named block (possibly) containing input and output ports.
FlowCanvas::Module::Module | ( | boost::shared_ptr< Canvas > | canvas, | |
const std::string & | name, | |||
double | x = 0 , |
|||
double | y = 0 , |
|||
bool | show_title = true , |
|||
bool | show_port_labels = true | |||
) |
virtual FlowCanvas::Module::~Module | ( | ) | [virtual] |
const PortVector& FlowCanvas::Module::ports | ( | ) | const [inline] |
References _ports.
PortVector& FlowCanvas::Module::ports | ( | ) | [inline] |
References _ports.
boost::shared_ptr< Port > FlowCanvas::Module::get_port | ( | const std::string & | port_name | ) | const [inline] |
Find a port on this module.
References _ports.
void FlowCanvas::Module::add_port | ( | boost::shared_ptr< Port > | port | ) |
void FlowCanvas::Module::remove_port | ( | boost::shared_ptr< Port > | port | ) |
boost::shared_ptr<Port> FlowCanvas::Module::port_at | ( | double | x, | |
double | y | |||
) |
void FlowCanvas::Module::zoom | ( | double | z | ) | [virtual] |
Reimplemented from FlowCanvas::Item.
void FlowCanvas::Module::resize | ( | ) | [virtual] |
Implements FlowCanvas::Item.
bool FlowCanvas::Module::show_port_labels | ( | bool | b | ) | [inline] |
References _show_port_labels.
void FlowCanvas::Module::set_show_port_labels | ( | bool | b | ) |
virtual void FlowCanvas::Module::move | ( | double | dx, | |
double | dy | |||
) | [virtual] |
Implements FlowCanvas::Item.
virtual void FlowCanvas::Module::move_to | ( | double | x, | |
double | y | |||
) | [virtual] |
virtual void FlowCanvas::Module::set_name | ( | const std::string & | n | ) | [virtual] |
Reimplemented from FlowCanvas::Item.
double FlowCanvas::Module::border_width | ( | ) | const [inline] |
References _border_width.
void FlowCanvas::Module::set_border_width | ( | double | w | ) |
void FlowCanvas::Module::select_tick | ( | ) | [virtual] |
Implements FlowCanvas::Item.
void FlowCanvas::Module::set_selected | ( | bool | b | ) | [virtual] |
Reimplemented from FlowCanvas::Item.
void FlowCanvas::Module::set_highlighted | ( | bool | b | ) |
void FlowCanvas::Module::set_border_color | ( | uint32_t | c | ) | [virtual] |
Reimplemented from FlowCanvas::Item.
void FlowCanvas::Module::set_base_color | ( | uint32_t | c | ) | [virtual] |
Reimplemented from FlowCanvas::Item.
void FlowCanvas::Module::set_default_base_color | ( | ) | [virtual] |
Implements FlowCanvas::Item.
void FlowCanvas::Module::set_stacked_border | ( | bool | b | ) |
void FlowCanvas::Module::set_icon | ( | const Glib::RefPtr< Gdk::Pixbuf > & | icon | ) |
size_t FlowCanvas::Module::num_ports | ( | ) | const [inline] |
References _ports.
double FlowCanvas::Module::empty_port_breadth | ( | ) | const |
double FlowCanvas::Module::empty_port_depth | ( | ) | const |
virtual bool FlowCanvas::Module::on_event | ( | GdkEvent * | ev | ) | [protected, virtual] |
Reimplemented from FlowCanvas::Item.
virtual void FlowCanvas::Module::set_width | ( | double | w | ) | [protected, virtual] |
Implements FlowCanvas::Item.
virtual void FlowCanvas::Module::set_height | ( | double | h | ) | [protected, virtual] |
Implements FlowCanvas::Item.
void FlowCanvas::Module::fit_canvas | ( | ) | [protected] |
void FlowCanvas::Module::measure_ports | ( | ) | [protected] |
void FlowCanvas::Module::resize_horiz | ( | ) | [protected] |
void FlowCanvas::Module::resize_vert | ( | ) | [protected] |
void FlowCanvas::Module::port_renamed | ( | ) | [inline, protected] |
References _port_renamed.
void FlowCanvas::Module::embed | ( | Gtk::Container * | widget | ) | [protected] |
friend class Canvas [friend] |
PortVector FlowCanvas::Module::_ports [protected] |
Referenced by get_port(), num_ports(), and ports().
Gnome::Canvas::Rect FlowCanvas::Module::_module_box [protected] |
Gnome::Canvas::Text FlowCanvas::Module::_canvas_title [protected] |
Gnome::Canvas::Rect* FlowCanvas::Module::_stacked_border [protected] |
Gnome::Canvas::Pixbuf* FlowCanvas::Module::_icon_box [protected] |
Gtk::Container* FlowCanvas::Module::_embed_container [protected] |
Gnome::Canvas::Widget* FlowCanvas::Module::_embed_item [protected] |
double FlowCanvas::Module::_border_width [protected] |
Referenced by border_width().
double FlowCanvas::Module::_embed_width [protected] |
double FlowCanvas::Module::_embed_height [protected] |
double FlowCanvas::Module::_icon_size [protected] |
double FlowCanvas::Module::_widest_input [protected] |
double FlowCanvas::Module::_widest_output [protected] |
double FlowCanvas::Module::_title_width [protected] |
double FlowCanvas::Module::_title_height [protected] |
bool FlowCanvas::Module::_title_visible [protected] |
bool FlowCanvas::Module::_port_renamed [protected] |
Referenced by port_renamed().
bool FlowCanvas::Module::_show_port_labels [protected] |
Referenced by show_port_labels().