Johannes wrote:
Ahh, now I understand. layout is a new layout specific to the button. It is created in ComplexButton::init (). So the purpose of ComplexButton is to create buttons that can have arbitrary HTML rendered on them.
I wonder if we really need to duplicate the button code from fltk for this.
For now I think your fix is good. Perhaps we can make the whole stuff simpler in the future.
Did you already manage to add an dw::Image to a ComplexButton?
Yes. The two problems that remained were: Small images were only visible when the control panel was not visible. The recurring problem of dw's idea of offsets being different than that of fltk. And big images were usually (but not always -- some timing thing) offset inside their buttons by an amount that seemed to depend on the size of the alt text.