2002-08-11 15:03:52 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
#ifndef INSET_LIST_H
|
|
|
|
#define INSET_LIST_H
|
|
|
|
|
|
|
|
#include "support/types.h"
|
|
|
|
|
2003-07-25 21:20:24 +00:00
|
|
|
class InsetOld;
|
2002-08-11 15:03:52 +00:00
|
|
|
class BufferView;
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
class InsetList {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
struct InsetTable {
|
|
|
|
///
|
|
|
|
lyx::pos_type pos;
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
InsetOld * inset;
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
InsetTable(lyx::pos_type p, InsetOld * i) : pos(p), inset(i) {}
|
2002-08-11 15:03:52 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
typedef std::vector<InsetTable> List;
|
|
|
|
///
|
2003-05-29 01:13:18 +00:00
|
|
|
typedef List::iterator iterator;
|
|
|
|
///
|
|
|
|
typedef List::const_iterator const_iterator;
|
2003-07-25 21:20:24 +00:00
|
|
|
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
|
|
|
~InsetList();
|
|
|
|
///
|
|
|
|
iterator begin();
|
|
|
|
///
|
|
|
|
iterator end();
|
|
|
|
///
|
2003-05-29 01:13:18 +00:00
|
|
|
const_iterator begin() const;
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
2003-05-29 01:13:18 +00:00
|
|
|
const_iterator end() const;
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
|
|
|
iterator insetIterator(lyx::pos_type pos);
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
void insert(InsetOld * inset, lyx::pos_type pos);
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
|
|
|
void erase(lyx::pos_type pos);
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
InsetOld * release(lyx::pos_type);
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
InsetOld * get(lyx::pos_type pos) const;
|
2002-08-11 15:03:52 +00:00
|
|
|
///
|
|
|
|
void increasePosAfterPos(lyx::pos_type pos);
|
|
|
|
///
|
|
|
|
void decreasePosAfterPos(lyx::pos_type pos);
|
|
|
|
///
|
|
|
|
void deleteInsetsLyXText(BufferView * bv);
|
2003-08-17 11:28:23 +00:00
|
|
|
///
|
|
|
|
void InsetList::insetsOpenCloseBranch(BufferView * bv);
|
|
|
|
|
2002-08-11 15:03:52 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
List list;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|