Alfredo Braunstein <[EMAIL PROTECTED]> writes:

|         - this seems to work now
|         - it is completely standalone (no Textcursor, no bv, rows, dispatch 
|         or whatever... nothing. And so terribly simple). In other words, 
|         it doesn't have the burden of acting transitionally as a lyx cursor.
|         - it uses no paroffsets, and thus may be faster. it is 
|         completely non-stable: works on static text only.
>
| Even if some or all of the above are right/wrong, I still cannot make my
| mind if this can be useful at all (aside Cursor, or as a transitional
| thing). As I changed view a few times in the last hours, I'though I'd
| better post it here and ask for comments. And so I'm doing.

I'll comment more after thinging abit about this.

| class PosIterator
| {
| public:
|         PosIterator(ParIterator & parit, lyx::pos_type p);
|         PosIterator(ParagraphList * pl, ParagraphList::iterator pit,
|                     lyx::pos_type pos) {
|                 stack_.push_back(PosIteratorItem(pl,pit,pos));
|         };      
|         PosIterator & operator++();
|         bool operator!=(PosIterator const &);
>
|         ParagraphList::iterator pit() const { return stack_.back().pit; }
|         lyx::pos_type pos() const { return stack_.back().pos; }
|         bool at_end() const;
| private:
|         std::vector<PosIteratorItem> stack_;
| };

Is it a stack or a vector? do you need access to any other element
thatn the top one? perhaps a std::stack would do?


-- 
        Lgb

Reply via email to