PDA

View Full Version : [SOLVED] Gtkmm: Create child Window ?



fallenshadow
February 14th, 2012, 01:28 PM
Does anyone know how to create a child window? (Window inside the main window that maximizes inside the boundaries of the main window)

Like this:
http://i43.tinypic.com/5frxtu.png

I know how to create a window but I don't want a normal window.

fallenshadow
February 15th, 2012, 06:30 PM
Anyone know at all? o.O

pbrane
February 15th, 2012, 08:38 PM
I don't think MDI/WiW is implemented in Gtk. You would have to do that coding yourself. An alternative is to use a notebook container, like in gedit.

Have you tried making a window as a child of the main window to see what happens?

fallenshadow
February 15th, 2012, 09:04 PM
Im not sure how to set a window as a child of a parent window... is it something to do with this?



void Gtk::Window::set_transient_for (Window& parent)

fallenshadow
February 15th, 2012, 09:22 PM
Alright I had a proper attempt at it:


newfile.cc:117:21: error: ‘add_window’ was not declared in this scope

This is the line of code it has trouble with:


add_window(*window);

However it is from example code so I don't know how its wrong...

Cookieh
February 15th, 2012, 09:34 PM
Try having a look at python as it is way more simple than PHP and it also can control the window size to full screen, hidden menu bars and controls. Just try to look at it, but not sure if it would be good in this concept..

pbrane
February 15th, 2012, 09:34 PM
The add_window function is a custom function that you have to implement, it's not a Gtkmm function.

fallenshadow
February 15th, 2012, 10:42 PM
Oh right... I will do some more investigating then.

@Cookieh By the way it is C++ im using not PHP. :)

fallenshadow
April 9th, 2012, 01:38 AM
Question open to all here:

Which is better in your honest opinion for an image editor, Window in Window or Tabs? (per image)

Your answers will determine the direction I take. :)

fallenshadow
April 9th, 2012, 05:28 AM
Decided on tabs since its built into GTK. :D