projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added copyright lines for files I've edited this year.
[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
618662f
..
5631ac9
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/duck.h
+++ b/
synfig-studio/trunk/src/gtkmm/duck.h
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007, 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-44,20
+45,27
@@
/* === M A C R O S ========================================================= */
/* === M A C R O S ========================================================= */
-#define HASH_MAP_H <ext/hash_map>
-#define HASH_SET_H <ext/hash_set>
-
#ifdef HASH_MAP_H
#include HASH_MAP_H
#ifdef HASH_MAP_H
#include HASH_MAP_H
+#include FUNCTIONAL_H
+
#ifndef __STRING_HASH__
#define __STRING_HASH__
class StringHash
{
#ifndef __STRING_HASH__
#define __STRING_HASH__
class StringHash
{
- __gnu_cxx::hash<const char*> hasher_;
+# ifdef FUNCTIONAL_HASH_ON_STRING
+ HASH_MAP_NAMESPACE::hash<synfig::String> hasher_;
+# else // FUNCTIONAL_HASH_ON_STRING
+ HASH_MAP_NAMESPACE::hash<const char*> hasher_;
+# endif // FUNCTIONAL_HASH_ON_STRING
public:
size_t operator()(const synfig::String& x)const
{
public:
size_t operator()(const synfig::String& x)const
{
+# ifdef FUNCTIONAL_HASH_ON_STRING
+ return hasher_(x);
+# else // FUNCTIONAL_HASH_ON_STRING
return hasher_(x.c_str());
return hasher_(x.c_str());
+# endif // FUNCTIONAL_HASH_ON_STRING
}
};
#endif
}
};
#endif
@@
-127,6
+135,7
@@
private:
bool editable;
bool radius_;
bool tangent_;
bool editable;
bool radius_;
bool tangent_;
+ bool hover_;
synfig::TransformStack transform_stack_;
synfig::TransformStack transform_stack_;
@@
-160,6
+169,12
@@
public:
//! \writeme
bool get_tangent()const { return tangent_; }
//! \writeme
bool get_tangent()const { return tangent_; }
+ //! Sets whether to show the duck as if it is being hovered over
+ void set_hover(bool h) { hover_=h; }
+
+ //! Retrieves whether to show the duck as if it is being hovered over
+ bool get_hover()const { return hover_; }
+
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; }
@@
-251,9
+266,9
@@
operator&(const Duck::Type lhs, const Duck::Type rhs)
class DuckMap : public
#ifdef HASH_MAP_H
class DuckMap : public
#ifdef HASH_MAP_H
-
__gnu_cxx::hash_map
<synfig::GUID,etl::handle<studio::Duck>,synfig::GUIDHash>
+
HASH_MAP_CLASS
<synfig::GUID,etl::handle<studio::Duck>,synfig::GUIDHash>
{
{
- typedef
__gnu_cxx::hash_map
<synfig::GUID,etl::handle<studio::Duck>,synfig::GUIDHash> PARENT_TYPE;
+ typedef
HASH_MAP_CLASS
<synfig::GUID,etl::handle<studio::Duck>,synfig::GUIDHash> PARENT_TYPE;
#else
std::map<synfig::GUID,etl::handle<studio::Duck> >
{
#else
std::map<synfig::GUID,etl::handle<studio::Duck> >
{