On Friday 20 July 2001 11:19, Juergen Vigna wrote:
> Have a look at this function:
>
> int InsetCollapsable::width_collapsed(Painter & pain, LyXFont const &) const
> {
> int width;
> int ascent;
> int descent;
> pain.buttonText(TEXT_TO_INSET_OFFSET, 0, label, labelfont, false,
> width, ascent, descent);
> return width + (2*TEXT_TO_INSET_OFFSET);
> }
>
> Could I do:
>
> int InsetCollapsable::width_collapsed(Painter & pain, LyXFont const &) const
> {
> int width;
> int ascent;
> int descent;
> PainterBase::buttonText(TEXT_TO_INSET_OFFSET, 0, label, labelfont,
> false, width, ascent, descent);
> return width + (2*TEXT_TO_INSET_OFFSET);
> }
>
> Is it the same??
Only if buttonText is a static method. From a quick look, it isn't. (But the
compiler will bomb out if it doesn't like it.)
Angus