Re: signal_realize



29.10.2010 01:19, Kees Kling пишет:
Hi,

just a newbie with gtkmm i'm hvaing some problems with the signal realize.

I making  a custom window which will take care of arranging its childs. Therefor I need  the size of the window. I know  that  I can only  requets te size when the window is realized, so I made a ctor

screenManager::screenManager() : Window() {
     wb = manage(new windowBox());   // my own packing box
   add(*wb);
   wb->show();
   signal_realize().connect(sigc::mem_fun(*this,&screenManager::realized));
}

void screenManager::realized() {
   cout<<"realized"<<endl;
}

So I connected the function realized to the signal_realize(). It compiles, but the realized function is never called.

How come??

regards
Kees Kling
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

May be it would be better to override virtual method on_realize()?

void screenManager::on_realize() {
    Window::on_realize();
.... do what you want ....
}


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