FlowCanvas
0.7.1
|
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 |
![]() | |
Item (boost::shared_ptr< Canvas > canvas, const std::string &name, double x, double y, uint32_t color) | |
virtual | ~Item () |
bool | selected () const |
virtual void | set_minimum_width (double w) |
boost::weak_ptr< Canvas > | canvas () const |
bool | popup_menu (guint button, guint32 activate_time) |
virtual void | create_menu () |
Gtk::Menu * | menu () const |
void | set_menu (Gtk::Menu *m) |
double | width () const |
double | height () const |
virtual void | load_location () |
virtual void | store_location () |
bool | is_within (const Gnome::Canvas::Rect &rect) const |
bool | point_is_within (double x, double y) const |
Returns whether or not the point x, y (world units) is within the item. | |
const std::string & | name () const |
uint32_t | base_color () const |
void | set_partner (boost::shared_ptr< Item > partner) |
Set the partner of this node. | |
boost::weak_ptr< Item > | partner () |
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) |
![]() | |
virtual void | on_drag (double dx, double dy) |
virtual void | on_drop () |
virtual void | on_click (GdkEventButton *ev) |
virtual void | on_double_click (GdkEventButton *ev) |
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 |
![]() | |
const boost::weak_ptr< Canvas > | _canvas |
boost::weak_ptr< Item > | _partner |
Gtk::Menu * | _menu |
std::string | _name |
double | _minimum_width |
double | _width |
double | _height |
uint32_t | _border_color |
uint32_t | _color |
bool | _selected:1 |
Friends | |
class | Canvas |
Additional Inherited Members | |
![]() | |
sigc::signal< void > | signal_pointer_entered |
sigc::signal< void > | signal_pointer_exited |
sigc::signal< void > | signal_selected |
sigc::signal< void > | signal_unselected |
sigc::signal< void, GdkEventButton * > | signal_clicked |
sigc::signal< void, GdkEventButton * > | signal_double_clicked |
sigc::signal< void, double, double > | signal_dragged |
sigc::signal< void, double, double > | signal_dropped |
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 |
|
inline |
References _ports.
|
inline |
References _ports.
|
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 | ||
) |
|
virtual |
Reimplemented from FlowCanvas::Item.
|
virtual |
Implements FlowCanvas::Item.
|
inline |
References _show_port_labels.
void FlowCanvas::Module::set_show_port_labels | ( | bool | b | ) |
|
virtual |
Implements FlowCanvas::Item.
|
virtual |
|
virtual |
Reimplemented from FlowCanvas::Item.
|
inline |
References _border_width.
void FlowCanvas::Module::set_border_width | ( | double | w | ) |
|
virtual |
Implements FlowCanvas::Item.
|
virtual |
Reimplemented from FlowCanvas::Item.
void FlowCanvas::Module::set_highlighted | ( | bool | b | ) |
|
virtual |
Reimplemented from FlowCanvas::Item.
|
virtual |
Reimplemented from FlowCanvas::Item.
|
virtual |
Implements FlowCanvas::Item.
void FlowCanvas::Module::set_stacked_border | ( | bool | b | ) |
void FlowCanvas::Module::set_icon | ( | const Glib::RefPtr< Gdk::Pixbuf > & | icon | ) |
|
inline |
References _ports.
double FlowCanvas::Module::empty_port_breadth | ( | ) | const |
double FlowCanvas::Module::empty_port_depth | ( | ) | const |
|
protectedvirtual |
Reimplemented from FlowCanvas::Item.
|
protectedvirtual |
Implements FlowCanvas::Item.
|
protectedvirtual |
Implements FlowCanvas::Item.
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
References _port_renamed.
|
protected |
|
friend |
|
protected |
Referenced by get_port(), num_ports(), and ports().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by border_width().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by port_renamed().
|
protected |
Referenced by show_port_labels().