projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Duck::type_name() for debugging purposes.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
duck.h
diff --git
a/synfig-studio/trunk/src/gtkmm/duck.h
b/synfig-studio/trunk/src/gtkmm/duck.h
index
5631ac9
..
9ba7b00
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/duck.h
+++ b/
synfig-studio/trunk/src/gtkmm/duck.h
@@
-91,13
+91,13
@@
class Duck : public etl::shared_object
public:
enum Type
{
public:
enum Type
{
- TYPE_NONE = (0),
- TYPE_POSITION = (1<<0),
- TYPE_TANGENT = (1<<1),
- TYPE_RADIUS = (1<<2),
- TYPE_WIDTH = (1<<3),
- TYPE_ANGLE = (1<<4),
- TYPE_VERTEX = (1<<5),
+ TYPE_NONE = (0),
// 0
+ TYPE_POSITION = (1<<0),
// 1
+ TYPE_TANGENT = (1<<1),
// 2
+ TYPE_RADIUS = (1<<2),
// 4
+ TYPE_WIDTH = (1<<3),
// 8
+ TYPE_ANGLE = (1<<4),
// 16
+ TYPE_VERTEX = (1<<5),
// 32
TYPE_ALL = (~0),
TYPE_ALL = (~0),
@@
-136,6
+136,7
@@
private:
bool radius_;
bool tangent_;
bool hover_;
bool radius_;
bool tangent_;
bool hover_;
+ bool ignore_;
synfig::TransformStack transform_stack_;
synfig::TransformStack transform_stack_;
@@
-175,6
+176,12
@@
public:
//! Retrieves whether to show the duck as if it is being hovered over
bool get_hover()const { return hover_; }
//! Retrieves whether to show the duck as if it is being hovered over
bool get_hover()const { return hover_; }
+ //! Sets whether to ignore the duck when checking for user interaction
+ void set_ignore(bool i) { ignore_=i; }
+
+ //! Retrieves whether to ignore the duck when checking for user interaction
+ bool get_ignore()const { return ignore_; }
+
void set_connect_duck(const etl::handle<Duck>& x) { connect_duck=x; }
void set_box_duck(const etl::handle<Duck>& x) { box_duck=x; }
void set_connect_duck(const etl::handle<Duck>& x) { connect_duck=x; }
void set_box_duck(const etl::handle<Duck>& x) { box_duck=x; }
@@
-244,6
+251,15
@@
public:
synfig::String get_name()const { return name; }
bool operator==(const Duck &rhs)const;
synfig::String get_name()const { return name; }
bool operator==(const Duck &rhs)const;
+
+#ifdef _DEBUG
+ //! Returns a string containing the name of the given Type
+ static synfig::String type_name(Type id);
+
+ //! Returns a string containing the name of the type
+ synfig::String type_name()const { return type_name(get_type()); }
+#endif // _DEBUG
+
}; // END of class Duck
//! Combine Flags
}; // END of class Duck
//! Combine Flags