signals in Eventbox [was: begginer with C++]
- From: "Carlos Garces" <carlos garces gmail com>
- To: "Jonathon Jongsma" <jonathon jongsma gmail com>
- Cc: gtkmm-list gnome org
- Subject: signals in Eventbox [was: begginer with C++]
- Date: Sat, 25 Feb 2006 12:28:38 +0100
Hi.
I explain it.
My reference code is there
http://cvs.sourceforge.net/viewcvs.py/dcatalyst/dcatalyst/clients/gcatalyst/
It use signal_clicked(), that need a void function for callback
// utility functions
template <typename T_widget>
void addClickHandler(const std::string& id, void (MainWindow::*pFunc)())
{
T_widget* pWidget;
mpGlade->get_widget(id, pWidget);
pWidget->signal_clicked().connect(sigc::mem_fun(*this, pFunc));
}
In my code (http://cvs.sourceforge.net/viewcvs.py/winpackman/WinPackManGTK/src/MainWindow.cpp?rev=1.4&view=markup)
I use a signal_button_press_event() in a eventbox.
mpGlade->get_widget("boxAbout", mpEventBox);
mpEventBox->set_events (Gdk::BUTTON_PRESS_MASK);
mpEventBox->signal_button_press_event().connect(sigc::mem_fun(*this,
&MainWindow::onAbout));
My questions are:
-I can use signal_clicked() in EventBox (I think that NO)
-BUTTON_PRESS_MASK is the better way to "emulate a GKT Image as button.
I have also other questions about GLADE, but I put it in other post.
Un saludo
Carlos Garcés
2006/2/25, Jonathon Jongsma <jonathon jongsma gmail com>:
> Sorry, I'm still not quite sure I understand the question. You can't
> use *what* in an EventBox?
>
> Jonner
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]