Editor Refactoring

Refactoring the editors' code. Introduced a new superclass for them providing a toolbar.
This is a try to make the code somewhat maintainable, but there's just so much done wrong there, it's still a long way.
On 12/08/2014 09:55 PM, Lukas W wrote:

> Sure, I'll do some style updates sooner or later ;) I think you
> renamed that particular enum in |lmms2| already.
>

Did I? Can't remember if I've touched AutomationEditor in lmms2 yet...

> Btw, I suggest dropping the convention about parentheses being
> followed/preceded by a space character (like |printf( "Hello World!"
> );| instead of |printf("Hello World!");|). It can get really hard to
> stick to, and it doesn't really add much to readability.
>

Sorry but personally, I have to disagree with that. I actually think it
clears up the code a lot... it adds some separation between arguments
and it makes it a whole lot easier to read especially when there are a
lot of nested function calls. Or complex equations with lots of
parentheses. For example, compare this:

	m_b1 = ( 4.0f * ( m_wc4 + sq_tmp1 - m_k4 - sq_tmp2 ) ) / m_a;
	m_b2 = ( 6.0f * m_wc4 - 8.0f * wc2 * k2 + 6.0f * m_k4 ) / m_a;
	m_b3 = ( 4.0f * ( m_wc4 - sq_tmp1 + sq_tmp2 - m_k4 ) ) / m_a;
	m_b4 = ( m_k4 - 2.0f * sq_tmp1 + m_wc4 - 2.0f * sq_tmp2 + 4.0f * wc2 * k2 ) / m_a;


to this:

	b1=(4*(wc4+sq_tmp1-k4-sq_tmp2))/a_tmp;
	b2=(6*wc4-8*wc2*k2+6*k4)/a_tmp;
	b3=(4*(wc4-sq_tmp1+sq_tmp2-k4))/a_tmp;
	b4=(k4-2*sq_tmp1+wc4-2*sq_tmp2+4*wc2*k2)/a_tmp;


The first one looks a whole lot more readable to me...