Gnome::Canvas my derived group won't display
- From: Martin Metzker <martinmetzker gmx net>
- To: gtkmm-list gnome org
- Subject: Gnome::Canvas my derived group won't display
- Date: Fri, 28 Sep 2007 13:34:10 +0200
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]