Show the size of circles as they are drawn using the draw tool.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 9 Feb 2008 17:25:00 +0000 (17:25 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 9 Feb 2008 17:25:00 +0000 (17:25 +0000)
git-svn-id: http://svn.voria.com/code@1641 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/duck.cpp
synfig-studio/trunk/src/gtkmm/duck.h
synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp
synfig-studio/trunk/src/gtkmm/state_circle.cpp

index 63bebe7..70f2fa8 100644 (file)
@@ -72,7 +72,8 @@ Duck::Duck():
        scalar(1),
        editable(false),
        radius_(false),
-       tangent_(false)
+       tangent_(false),
+       hover_(false)
 { duck_count++; _DuckCounter::counter++; }
 
 Duck::Duck(const synfig::Point &point):
index 179fba7..7b96d9b 100644 (file)
@@ -134,6 +134,7 @@ private:
        bool editable;
        bool radius_;
        bool tangent_;
+       bool hover_;
 
        synfig::TransformStack transform_stack_;
 
@@ -167,6 +168,12 @@ public:
        //! \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; }
 
index cab4d95..1030402 100644 (file)
@@ -236,7 +236,7 @@ Renderer_Ducks::render_vfunc(
                }
 
                bool selected(get_work_area()->duck_is_selected(*iter));
-               bool hover(*iter==hover_duck);
+               bool hover(*iter==hover_duck || (*iter)->get_hover());
 
                shadow = selected?Gtk::SHADOW_IN:Gtk::SHADOW_OUT;
 
index 878118e..72700a4 100644 (file)
@@ -474,6 +474,7 @@ StateCircle_Context::event_mouse_click_handler(const Smach::event& x)
                point2_duck->set_radius(true);
                point2_duck->set_scalar(-1);
                point2_duck->set_type(Duck::TYPE_RADIUS);
+               point2_duck->set_hover(true);
                get_work_area()->add_duck(point2_duck);
 
                return Smach::RESULT_ACCEPT;