Re: [gtkmm] Activating a Window from a MenuItem
- From: Paul Davis <pbd op net>
- To: Jarek Dukat <madmaxer poczta fm>
- Cc: Gtkmm <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Activating a Window from a MenuItem
- Date: Thu, 11 Jul 2002 14:05:59 -0400
>On Tue, 2002-07-09 at 17:49, Stephen G. Tashiro wrote:
>> I understand that it is easy to write code that causes a MenuItem to
>> activate another MenuItem. Often a chain of such things must lead to
>> activating some Window, like a FileSelection. Is there a "one liner"
>> way to write this last activation ?
>>
>> So far, the only way I see to do it is to use something like
>>
>> list.push_back(MenuElem("Last Menu Label",slot(
>> global_function_that_creates_the_FileSelection) ) );
>
>I'm affraid it's the only way to do it.
if the FS already exists:
list.push_back (MenuElem ("The Label",
slot (*(static_cast<Gtk::Widget *> (&fileSelector)), &Gtk::Widget::show)));
its too bad that gcc's templates can't understand that
Gtk::FileSelection IS-A Gtk::Widget, but without the cast you get
strange results (IIRC).
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]