bool CairoWidget::_flat_buttons = false;
bool CairoWidget::_widget_prelight = true;
-static void noop() { }
-sigc::slot<void> CairoWidget::focus_handler (sigc::ptr_fun (noop));
+sigc::slot<void,Gtk::Widget*> CairoWidget::focus_handler;
void CairoWidget::set_source_rgb_a( cairo_t* cr, Gdk::Color col, float a) //ToDo: this one and the Canvas version should be in a shared file (?)
{
bool
CairoWidget::on_button_press_event (GdkEventButton*)
{
- focus_handler();
+ focus_handler (this);
return false;
}
#endif
cr->rectangle (ev->area.x, ev->area.y, ev->area.width, ev->area.height);
- cr->clip_preserve ();
- /* paint expose area the color of the parent window bg
- */
+ if (_need_bg) {
+ cr->clip_preserve ();
+
+ /* paint expose area the color of the parent window bg
+ */
- Gdk::Color bg (get_parent_bg());
+ Gdk::Color bg (get_parent_bg());
- cr->set_source_rgb (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
- cr->fill ();
+ cr->set_source_rgb (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
+ cr->fill ();
+ } else {
+ std::cerr << get_name() << " skipped bg fill\n";
+ cr->clip ();
+ }
cairo_rectangle_t expose_area;
expose_area.x = ev->area.x;
}
void
-CairoWidget::set_focus_handler (sigc::slot<void> s)
+CairoWidget::set_focus_handler (sigc::slot<void,Gtk::Widget*> s)
{
focus_handler = s;
}