On an unrelated topic, can a Gdk::DrawingArea be put inside another widget? For example, the clock in the docs works fine as a standalone program. If I try to put it inside a Frame, the program fails to draw the clock. For instance, changing the main.cc in the clock example to
#include "clock.cc"
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/frame.h>
int main(int argc, char** argv)
{
Gtk::Main kit(argc, argv);
Gtk::Window win;
Gtk::Frame frame;
win.set_title("Cairomm Clock");
Clock c;
/*win.add(c);*/
win.add(frame);
frame.add(c);
c.show();
Gtk::Main::run(win);
return 0;
}
results in an empty box.
I'm guessing the on_expose_event() that is used in the manual as the only method for initiating the drawing process is hidden if it's not called on a top- level window, but I can't see a work-around. Can I pass the event to the Window somehow?
Ian
Generally, rearranging widgets is sometimes necessary, but overall it's
definitely one of the rarer operations an application usually performs.
I think that in your case, you probably shouldn't change the Gtk::Image
widgets at all, but instead just set a different pixbuf to display.
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome orghttp://mail.gnome.org/mailman/listinfo/gtkmm-list