Re: [LAD] AMS LV2: GUI?

From: Harry van Haaren <harryhaaren@email-addr-hidden>
Date: Tue Dec 13 2011 - 05:21:19 EET

On Sun, Dec 11, 2011 at 12:10 PM, Aurélien Leblond <blablack@email-addr-hiddenwrote:

> 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

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Dec 13 08:15:01 2011

This archive was generated by hypermail 2.1.8 : Tue Dec 13 2011 - 08:15:01 EET