Gnome::Canvas my derived group won't display



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?





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]