basic libglademm and design questions
- From: "Markus" <gnufriend gmx de>
- To: gtkmm-list gnome org
- Subject: basic libglademm and design questions
- Date: Sun, 01 Jul 2007 12:05:53 +0200
Hallo,
i have already tried Gtkmm some time ago, than tried Gtk+ (C) and Gtk# but now i came to the conclusion that Gtkmm is the right thing for me. So now i really want to learn it. After writing some small examples by hand i have tried Glade and libgaldemm. Therefore i have looked at the libglademm documentation/examples. Because the examples has almost no comments who explain it i have some questions:
1. the examples always name the variables for GUI elements pButton or m_pButton. Why does they use the "p"? What does it stands for?
2. If i want to derive a window from a glade-window the example uses this constructor:
DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
Wat is this "BaseObjectType* cobject" and why does i need it?
3. if i connect the signals i have to write something like this:
m_refGlade->get_widget("quit_button", m_pButton);
if(m_pButton)
{
m_pButton->signal_clicked().connect( sigc::mem_fun(*this, &DerivedDialog::on_button_quit) );
}
This looks OK for small example where i have to connect only few signals. But if i think about real world applications with a menu-bar and a tool-bar i will easily have 50 and more signals to connect. Writing 50 times this 5 lines will result in 250 and more lines of boring code in my constructor. Is this really the way to go or are there other ways how i can write it with less code or in a more "sexy" way? How do you do this in real world apps?
Hope you can help me to get into Gtkmm and answerer this questions.
Thanks!
Markus
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]