On 19-May-2000 Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> 
>| In my case, it would appear all the time. (This being multiple
>| citation keys in 
>| one citation inset. If the keys have easily understandable names,
>| then it only 
>| takes two or three to produce quite a long inset.) If the key comes at the
>| start of the line, no problem. Often however, it comes near the end and hence
>| my desire to make it wrap. I was of the impression that drawing multiple
>| buttons would affect only InsetCommand::draw().
> 
> Only when you use the whole width. Insets do not usually know how much
> space that is free on a line, not even the painter knows that. If the
> painter knew it would be "easy".
> 

Well they know in a way, but they shouldn't have to care about that! The
problem with insets is that we mix there realtive and absolut positions.
This may be good for the draw(x,baseline), but for example we have to maintain
a absolute x position for the cursor, while the y position is relative!

> Hmmm... otoh we know most of what we need to know throught the
> painter to place the break at the correct spot... the baseline will be
> harder to get right. ... And you also need this information to be in
> the lyxrows in lyxtext.
> 

I think that to be able to have this type of insets we would just have to
return also the value for the new baseline, but I think this is a really
bad move, as think of different fonts and how would you know inside the
inset that the second row of your inset should be higher because there is
a following text with higher font so that in this row ascent/descent change.

The real good move would be that the inset returns the rows it will span,
then LyXText can call a draw for the whole inset or a draw for single rows
(this obviouly only on inset-types with DO span multiple rows). This would
be a really needed change as then LyXText could do a really good work
drawing the insets row by row, and don't draw unneeded stuff. Think of a
tabular inset which spanns 3 whole pages. Think of 1 row as 1 tabular row,
now LyXText can construct it's row-structure also viewing a tabular as
single rows and so do a much better job when having to repaint part of it.

What do you think about this?

Well to you Angus :), for now you have to live with it that you don't have
that form of half-row, you can only paint 1, 2 or more WHOLE rows. The inset
is always rectangular!

Greets Jürgen

-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Dr. Jürgen Vigna                      E-Mail: [EMAIL PROTECTED]
Italienallee 13/N                     Tel:    +39-0471-450260
I-39100 Bozen                         Fax:    +39-0471-450296
ITALY                                 Web:    http://www.sad.it/~jug

knowledge, n.:
        Things you believe.

-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Reply via email to