On Sun, Dec 11, 2011 at 12:10 PM, Aurélien Leblond <blablack(a)gmail.com>wrote;wrote:
Let's get carried away!
<code>
m_comboWaveForm = 0;
builder->get_widget("comboboxtextWaveForm", m_comboWaveForm);
slot<void> p_slotWaveForm = compose(bind<0> (mem_fun(*this,
&Vco2GUI::write_control), p_waveForm), mem_fun(*m_comboWaveForm,
&ComboBoxText::get_active_row_number));
m_comboWaveForm->signal_changed().connect(p_slotWaveForm);
</code>
Here were getting a widget pointer, then your "compose"-ing a connection
between its "get_active_row_number()" and your own "write_control()".
Essentially we need to write a seperate widget class, that will *not* be
inserted in the glade file, instead I'll be inserting an instance of my
Gtk::DrawingArea inherited class. I can then emit a signal pretty much as
ComboBoxText does, I just need to find out what the actual arguments are
that it sends.. (or that I should send).
Perhaps we can simplify the code by me sending 2 variables, a port number
and a value, and then connecting *all* widgets to *one* function, which
would then just have a "write_event()" function that accepts any port
number, and any value... that's the way I've previously worked.
If you'd prefer leave things the way they are that's fine too :D
I'll try find some time during the week to throw together a simple widget,
and we can see how to best incorperate the different signals into the GUI.
Cheers, -Harry