1 /* === S Y N F I G ========================================================= */
2 /*! \file cellrenderer_gradient.cpp
3 ** \brief Template File
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === H E A D E R S ======================================================= */
32 #include <gtkmm/entry.h>
33 #include <gtkmm/button.h>
34 #include "cellrenderer_gradient.h"
35 #include "widget_gradient.h"
40 /* === U S I N G =========================================================== */
43 //using namespace etl;
44 using namespace synfig;
45 using namespace studio;
47 /* === M A C R O S ========================================================= */
53 /* === G L O B A L S ======================================================= */
55 /* === P R O C E D U R E S ================================================= */
57 /* === M E T H O D S ======================================================= */
59 CellRenderer_Gradient::CellRenderer_Gradient():
60 Glib::ObjectBase (typeid(CellRenderer_Gradient)),
61 Gtk::CellRendererText (),
62 property_gradient_(*this,"gradient",synfig::Gradient())
64 //CellRendererText::signal_edited().connect(sigc::mem_fun(*this,&studio::CellRenderer_Gradient::string_edited_));
67 CellRenderer_Gradient::~CellRenderer_Gradient()
73 CellRenderer_Gradient::render_vfunc(
74 const Glib::RefPtr<Gdk::Drawable>& window,
75 Gtk::Widget& /*widget*/,
76 const Gdk::Rectangle& /*background_area*/,
77 const Gdk::Rectangle& ca,
78 const Gdk::Rectangle& /*expose_area*/,
79 Gtk::CellRendererState /*flags*/)
83 render_gradient_to_window(window,ca,property_gradient_.get_value());
88 CellRenderer_Gradient::start_editing_vfunc(
90 Gtk::Widget& /*widget*/,
91 const Glib::ustring& /*path*/,
92 const Gdk::Rectangle& /*background_area*/,
93 const Gdk::Rectangle& /*cell_area*/,
94 Gtk::CellRendererState /*flags*/)