How to create a new Window?



Hi,

I am using gtkmm-2.0. I looked into the documentation but I couldn't find the answers for couple of things.

I've created a class that derives Gtk::Window and named it as SomeInterface. I put all the interface elemets (buttons labels, etc). In the top-level window, I have a button to pop-up this new window. The button callback function is like:

void TopLevelWindow::on_button_showSomeInterface()
{
SomeInterface* SomeInterfaceObject = new SomeInterface();
	SomeInterface->show();
}

Now, this creates the window, but I don't know how to get the number of windows created and how to delete them upon the program exit. At this point, my questions are: Are the instances automatically deleted from the memory when the user clicks the quit button located at top right (X button) or should I delete them upon the program exit? How can I know the number of instaced created? Also, how can I capture the quit signal event when quit button is clicked?

Thank you so much for your response and your time.





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