Resolved: Gnome::Canvas my derived group won't display
- From: Martin Metzker <martinmetzker gmx net>
- To: gtkmm-list gnome org
- Subject: Resolved: Gnome::Canvas my derived group won't display
- Date: Fri, 28 Sep 2007 19:56:35 +0200
Just in case people care:
I figured it out. These two lines
Gnome::Canvas::Pixbuf(m_group,0,0, /*(CCanvasGroupCounter++ & 1) ? whitetux:*/blacktux);
Gnome::Canvas::Text(m_group,0,whitetux->get_height(),"Hello world");
each need a new prepended. Could and should have seen that ...
Martin Metzker schrieb:
> Hi!
>
> I wrote this:
>
> class CCanvasGroup: public Gnome::Canvas::Group
> {
> public:
> CCanvasGroup(Gnome::Canvas::Group&, double, double);
> protected:
>
> private:
> Glib::RefPtr<Gdk::Pixbuf> whitetux;
> Glib::RefPtr<Gdk::Pixbuf> blacktux;
> Gnome::Canvas::Group m_group;
> };
>
> CCanvasGroup::CCanvasGroup(Gnome::Canvas::Group& parent, double x, double y)
> :m_group(parent,x,y)
> {
> std::cout << "CCanvasGroup";
> whitetux = Gdk::Pixbuf::create_from_file(STONE_WHITE);
> blacktux = Gdk::Pixbuf::create_from_file(STONE_BLACK);
>
> Gnome::Canvas::Pixbuf(m_group,0,0, /*(CCanvasGroupCounter++ & 1) ? whitetux:*/blacktux);
> Gnome::Canvas::Text(m_group,0,whitetux->get_height(),"Hello world");
> std::cout << " done" << std::endl;
> }
>
> My mainwindow consists of a canvas and two buttons. One button simply places a Gnome::Canvas::Pixbuf, which works quite well. The other button is supposed to place a CCanvasGroup Object on the canvas. When i push the button i do get the output from the constructor, but nothing is displayed on the canvas. What did i forget?
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]