best way to use multiple windows



Greetings everyone,


I am writing a simple GTKmm (btw, GTKmm 2.4) application, which has a
main window, a menu, etc, using glade (just to place the widgets).
Some options in the menu (such as "preferences") are required to open
a modal window, with apply and revert buttons, allowing the user to
tweak the app; pretty straightforward :)

My question is: what is the best way to implement such feature? should
i make the "preferences" window a member variable of the main window
class, create it (i.e.: alloc memory) when it is requested?? if so,
how should i handle the window closing? my first guess would be to
send a signal to the main window to hide the preferences window and
release the memory used by it, so that the main window will regain
focus.


-- 
Thiago dos Santos Guzella
Electrical Enginnering Student - UFMG (www.ufmg.br), Brazil 
Linux User #354160
UIN: 13465286. Jabber: tguzella @ jabber.org

"Faith: not wanting to know what is true." 
Friedrich Nietzsche



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