Handle multiple windows (inside a main-window) by Gtk::RadioToolButton in a Gtk::Toolbar



hi,

I want to create a main-window (a Gtk::Window) having a set
of multiple windows (sub-windows). At any time only one
sub-window is visible inside the main-window. Each
sub-window has a corresponding Gtk::RadioToolButton on a
Gtk::Toolbar in the main-window, with sub-window's title as
its Gtk::Label. When any RadioToolButton is clicked, it is
pressed, the corresponding sub-window becomes visible in
the main-window and the previous sub-window hides and its
RadioToolButton is depressed. When a new sub-window is
opened by user, it is added to the sub-windows list, and
its RadioToolButton is appended to the Toolbar. When any
arbitrary sub-window is destroyed, its corresponding
RadioToolButton is also destroyed and hides from Toolbar.
This is similar to "X-Chat ver 2.0.7" program's behavior. My
priority is to do it using Gtkmm and not Gnomemm nor any
other one. How cat I do this?

The second question is that when I try to append(), insert()
or add() any Gtk::Widget to Gtk::Toolbar, (the Toolbar is)
reparented from a glade file to main-window (a Gtk::Window),
I get this runtime error message:

"(myprogram:2470): Gtk-WARNING **: mixing deprecated and
non-deprecated GtkToolbar API is not allowed"

and the Widget is not visible in the Toolbar. Why is
this so? What is the remedy? I will be thankful to have an
answer.

Both of my questions are related to Gtkmm 2.4.

Regards,

Masood



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