Re: [gtkmm] Spawning a new windows from toplevel window
- From: "Claudio Polegato Junior" <cpolegatojr_lsts pop com br>
- To: "Jaroslaw Mroczek" <jaroslaw mroczek wp pl>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Spawning a new windows from toplevel window
- Date: Sat, 4 Sep 2004 11:09:09 -0300 (BRT)
Hi,
You should use the show() metode instead Gtk::Main::run() to show this window.
Then you should use set_transient_for() and set_modal() metodes to block the main
window interation with user.
To you block the code on main window function when show signal window you need
see about dialog and its run() metode.
[]'s
Claudio
> I write program for analizing ECG signals (viewer, R peak detector, PVC
> detector, ...). I wrote everything in C++ and designed GUI in GTKmm.
> Main window of my aplication is represented by EcgMain class (public
> Gtk::Window(TOPLEVEL)). It's responsible for making general operations
> on signal records (opening, saving,...). So I have method
> EcgMain::on_open_file() which is responsible for opening new signal
> record and spawning new window with record (class SignalWindow : public
> Gtk::Window as well).
> To spawn a new toplevel signal window in on_open_file() i used
> Gtk::Main:run(m_signal_window_object). Simple code doing this looks in
> my program as follows:
>
> ... // finding signal record and loading to memory
>
> SignalWindow m_signal_window(pointer_to_signal_record) ; // new window
> Gtk::Main:run(m_signal_window); // launch new window
>
> The problem is of course when I open a few signal windows and want to
> close one of them. In SignalWindow class I have overriden
> on_delete_event() method. When I want to close single signal window
> there is Gtk::Main::quit() call inside on_delete_event(). Window is
> closed of course but not this one which I wanted to close, but this
> which was last launched by Gtk::Main:run. My question is quite simple.
> How can I spawn new window from main one without calling Gtk::Main::run
> or how can I close single window (this one which I want to close, not
> the last opened) ??
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]