While I'm finding possible API problems...is gtk_style_attach() wrapped 
anywhere? I cannot find it either under Gtk::Style or Gdk::Window and, 
resultingly, I don't believe that copy()'d styles can be used without 
dropping back to GTK+.

For example, this is the only way I can see to create a derivative style 
with a specific background colour (assume that it's during a Gtk::Widget 
subclass' on_realize()):

m_orange = get_style()->copy();
m_orange->set_bg(Gtk::STATE_NORMAL, Gdk::Color("#ffaa00"));
m_orange = Glib::wrap(
    gtk_style_attach(
        m_orange->gobj(),
        m_gdk_window->gobj()));

Attempting to use this style without the attachment results in a 
Gdk-CRITICAL, as it hasn't been realized (and thus allocated colours and 
such) yet. Likewise, detach() appears to be missing, which I believe is 
required for cleanup.

LionsPhil

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to