Re: Call parent Window Functions..



> but element or own created methods dont apear..
>
I think it works with static_cast:
(static_cast<MainWindow*>(this->get_parent())->...

But, in your situation, you can use the return value of run method.
Add you buttons with Gtk::Dialog::add_button, and the run method
will return the response id specified in add_button.
For example:

WindowPopup::WindowPopup()
{
...
    add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
    add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
...
}

WindowMain::XXX()
{
    WindowPopup popup;
    popup.showall();
    status = popup.run() != Gtk::RESPONSE_OK;
}



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