#define INSETTEXT_H
#include "updatableinset.h"
-#include "LColor.h"
#include "ParagraphList_fwd.h"
#include "RowList_fwd.h"
#include "lyxtext.h"
#include "frontends/mouse_state.h"
-#include "support/std_string.h"
class Buffer;
class BufferParams;
class BufferView;
class Dimension;
-class EnumLColor;
+class LColor_color;
class LyXCursor;
class Painter;
class Paragraph;
ALWAYS
};
///
- InsetText(BufferParams const &);
+ explicit InsetText(BufferParams const &);
///
- explicit InsetText(InsetText const &);
+ InsetText(InsetText const &);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
- InsetText & operator=(InsetText const & it);
+ void operator=(InsetText const & it);
/// empty inset to empty par, or just mark as erased
void clear(bool just_mark_erased);
///
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
bool isTextInset() const { return true; }
///
bool unlockInsetInInset(BufferView *,
UpdatableInset *, bool lr = false);
///
- RESULT localDispatch(FuncRequest const &);
+ dispatch_result localDispatch(FuncRequest const &);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
bool toggleall = false,
bool selectall = false);
///
- void init(InsetText const * ins);
- ///
void writeParagraphData(Buffer const &, std::ostream &) const;
///
- void setText(string const &, LyXFont const &);
+ void setText(std::string const &, LyXFont const &);
///
void setAutoBreakRows(bool);
///
///
void setDrawFrame(DrawFrame);
///
- void setFrameColor(EnumLColor);
+ LColor_color frameColor() const;
+ void setFrameColor(LColor_color);
///
LyXText * getLyXText(BufferView const *,
bool const recursive = false) const;
void deleteLyXText(BufferView *, bool recursive = true) const;
///
bool showInsetDialog(BufferView *) const;
- ///
- void getLabelList(std::vector<string> &) const;
+ /// Appends \c list with all labels found within this inset.
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int scroll(bool recursive = true) const;
///
bool nextChange(BufferView *, lyx::pos_type & length);
///
- bool searchForward(BufferView *, string const &,
+ bool searchForward(BufferView *, std::string const &,
bool = true, bool = false);
///
- bool searchBackward(BufferView *, string const &,
+ bool searchBackward(BufferView *, std::string const &,
bool = true, bool = false);
///
bool checkInsertChar(LyXFont &);
void lockInset(BufferView *, UpdatableInset *);
private:
+ ///
+ void init();
///
void lfunMousePress(FuncRequest const &);
///
void lfunMouseMotion(FuncRequest const &);
///
- RESULT moveRight(BufferView *);
+ dispatch_result moveRight(BufferView *);
///
- RESULT moveLeft(BufferView *);
+ dispatch_result moveLeft(BufferView *);
///
- RESULT moveRightIntern(BufferView *, bool front,
+ dispatch_result moveRightIntern(BufferView *, bool front,
bool activate_inset = true,
bool selecting = false);
///
- RESULT moveLeftIntern(BufferView *, bool front,
+ dispatch_result moveLeftIntern(BufferView *, bool front,
bool activate_inset = true,
bool selecting = false);
///
- RESULT moveUp(BufferView *);
+ dispatch_result moveUp(BufferView *);
///
- RESULT moveDown(BufferView *);
+ dispatch_result moveDown(BufferView *);
///
void setCharFont(Buffer const &, int pos, LyXFont const & font);
///
bool autoBreakRows_;
///
DrawFrame drawFrame_;
- ///
- LColor::color frame_color_;
+ /** We store the LColor::color value as an int to get LColor.h out
+ * of the header file.
+ */
+ int frame_color_;
///
mutable bool locked;
///
mutable int top_y;
///
- ParagraphList::iterator inset_par;
+ lyx::paroffset_type inset_par;
///
lyx::pos_type inset_pos;
///
///
UpdatableInset * the_locking_inset;
///
- mutable ParagraphList::iterator old_par;
+ mutable lyx::paroffset_type old_par;
///
// to remember old painted frame dimensions to clear it on the right spot!