An item on a Canvas.
More...
#include <Item.hpp>
List of all members.
Public Member Functions |
| 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_selected (bool s) |
virtual void | set_minimum_width (double w) |
virtual void | select_tick ()=0 |
virtual void | move (double dx, double dy)=0 |
virtual void | zoom (double z) |
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 | resize ()=0 |
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 |
virtual void | set_name (const std::string &n) |
uint32_t | base_color () const |
virtual void | set_border_color (uint32_t c) |
virtual void | set_base_color (uint32_t c) |
virtual void | set_default_base_color ()=0 |
void | set_partner (boost::shared_ptr< Item > partner) |
| Set the partner of this node.
|
boost::weak_ptr< Item > | partner () |
Public Attributes |
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 |
Protected Member Functions |
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) |
virtual void | set_height (double h)=0 |
virtual void | set_width (double w)=0 |
bool | on_event (GdkEvent *event) |
Protected Attributes |
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 |
Detailed Description
An item on a Canvas.
Constructor & Destructor Documentation
FlowCanvas::Item::Item |
( |
boost::shared_ptr< Canvas > |
canvas, |
|
|
const std::string & |
name, |
|
|
double |
x, |
|
|
double |
y, |
|
|
uint32_t |
color | |
|
) |
| | |
virtual FlowCanvas::Item::~Item |
( |
|
) |
[inline, virtual] |
Member Function Documentation
bool FlowCanvas::Item::selected |
( |
|
) |
const [inline] |
virtual void FlowCanvas::Item::set_selected |
( |
bool |
s |
) |
[virtual] |
virtual void FlowCanvas::Item::set_minimum_width |
( |
double |
w |
) |
[inline, virtual] |
virtual void FlowCanvas::Item::select_tick |
( |
|
) |
[pure virtual] |
virtual void FlowCanvas::Item::move |
( |
double |
dx, |
|
|
double |
dy | |
|
) |
| | [pure virtual] |
virtual void FlowCanvas::Item::zoom |
( |
double |
z |
) |
[inline, virtual] |
boost::weak_ptr<Canvas> FlowCanvas::Item::canvas |
( |
|
) |
const [inline] |
bool FlowCanvas::Item::popup_menu |
( |
guint |
button, |
|
|
guint32 |
activate_time | |
|
) |
| | [inline] |
virtual void FlowCanvas::Item::create_menu |
( |
|
) |
[inline, virtual] |
Gtk::Menu* FlowCanvas::Item::menu |
( |
|
) |
const [inline] |
void FlowCanvas::Item::set_menu |
( |
Gtk::Menu * |
m |
) |
[inline] |
double FlowCanvas::Item::width |
( |
|
) |
const [inline] |
double FlowCanvas::Item::height |
( |
|
) |
const [inline] |
virtual void FlowCanvas::Item::resize |
( |
|
) |
[pure virtual] |
virtual void FlowCanvas::Item::load_location |
( |
|
) |
[inline, virtual] |
virtual void FlowCanvas::Item::store_location |
( |
|
) |
[inline, virtual] |
bool FlowCanvas::Item::is_within |
( |
const Gnome::Canvas::Rect & |
rect |
) |
const [inline] |
bool FlowCanvas::Item::point_is_within |
( |
double |
x, |
|
|
double |
y | |
|
) |
| | const [inline] |
Returns whether or not the point x, y (world units) is within the item.
References _height, and _width.
const std::string& FlowCanvas::Item::name |
( |
|
) |
const [inline] |
virtual void FlowCanvas::Item::set_name |
( |
const std::string & |
n |
) |
[inline, virtual] |
uint32_t FlowCanvas::Item::base_color |
( |
|
) |
const [inline] |
virtual void FlowCanvas::Item::set_border_color |
( |
uint32_t |
c |
) |
[inline, virtual] |
virtual void FlowCanvas::Item::set_base_color |
( |
uint32_t |
c |
) |
[inline, virtual] |
virtual void FlowCanvas::Item::set_default_base_color |
( |
|
) |
[pure virtual] |
void FlowCanvas::Item::set_partner |
( |
boost::shared_ptr< Item > |
partner |
) |
[inline] |
Set the partner of this node.
Partner nodes are nodes that should be visually aligned to correspond to each other, even if they are not necessarily connected (e.g. for separate modules representing the inputs and outputs of a single interface). The partner is invisibly connected as if it had an input that is connected to this item, e.g. foo.set_partner(bar) will arrange like: [foo] [bar] with a left-to-right flow direction.
References _partner.
boost::weak_ptr<Item> FlowCanvas::Item::partner |
( |
|
) |
[inline] |
virtual void FlowCanvas::Item::on_drag |
( |
double |
dx, |
|
|
double |
dy | |
|
) |
| | [protected, virtual] |
virtual void FlowCanvas::Item::on_drop |
( |
|
) |
[protected, virtual] |
virtual void FlowCanvas::Item::on_click |
( |
GdkEventButton * |
ev |
) |
[protected, virtual] |
virtual void FlowCanvas::Item::on_double_click |
( |
GdkEventButton * |
ev |
) |
[protected, virtual] |
virtual void FlowCanvas::Item::set_height |
( |
double |
h |
) |
[protected, pure virtual] |
virtual void FlowCanvas::Item::set_width |
( |
double |
w |
) |
[protected, pure virtual] |
bool FlowCanvas::Item::on_event |
( |
GdkEvent * |
event |
) |
[protected] |
Member Data Documentation
The documentation for this class was generated from the following file: