On 10/28/2010 01:51 AM, Uwe Stöhr wrote:
> You are going forward... you should go backward.
Ah, OK.
When I replace "++it" by "--it" the compiler quites with the message
that there are unresolved externals because a variable beginning with
"--" doesn't exist.
Then it is declared but not implemented...
This is strange because I thought that -- can be used the same way as ++.
No, this has to be a different method.
> Also cur.inset() is 'this' really.
I tried this but this doesn't compile:
D:\LyXSVN\lyx-devel\src\insets\InsetTabular.cpp(4318) : error C2664:
'lyx::inset
_iterator_begin' : cannot convert parameter 1 from 'const
lyx::InsetTabular *con
st ' to 'lyx::Inset &'
'this' is 'Inset *' so in this cas you must use '*this'.
> But I don't like use of InsetIterator in this case.
Why is InsetIterator no good solution?
Because it is heavy.
> You can just use the Cursor starting at position 0...
I don't understand yet how the cursor stuff works. I can move the
cursor stepwise through the table cells but how do I move it outside
of the table to check if I'm then in a float?
You have to go up in the Cursor slices. Use DocIterator::operator[]. The
last element of the DocIterator slices is the current cursor position;
the first element is the position in the outer text inset.
(Damn, I permanently hit my programming skills limits.)
The DocIterator stuff is documented somewhere in the Wiki. You must read
that before doing anything else.
Abdel.