// -*- C++ -*-
/* This file is part of
* ======================================================
- *
+ *
* LyX, The Document Processor
*
* Copyright 1998 The LyX Team.
class Painter;
class BufferView;
class Buffer;
+class BufferParams;
class LyXCursor;
class LyXText;
class LyXScreen;
/**
A text inset is like a TeX box to write full text
- (including styles and other insets) in a given space.
+ (including styles and other insets) in a given space.
@author: Jürgen Vigna
*/
class InsetText : public UpdatableInset {
ALWAYS
};
///
- InsetText();
+ InsetText(BufferParams const &);
///
explicit
InsetText(InsetText const &, bool same_id = false);
///
void setFont(BufferView *, LyXFont const &,
bool toggleall = false,
- bool selectall = false);
+ bool selectall = false);
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
///
void setParagraphData(Paragraph *, bool same_id = false);
///
- void setText(string const &);
+ void setText(string const &, LyXFont const &);
///
void setAutoBreakRows(bool);
///
void toggleSelection(BufferView *, bool kill_selection);
///
bool searchForward(BufferView *, string const &,
- bool = true, bool = false);
+ bool = true, bool = false);
///
bool searchBackward(BufferView *, string const &,
- bool = true, bool = false);
+ bool = true, bool = false);
///
bool checkInsertChar(LyXFont &);
///
+ void getDrawFont(LyXFont &) const;
+ ///
+ void appendParagraphs(BufferParams const & bparams, Paragraph *);
+ ///
//
// Public structures and variables
///
bool activate_inset = true,
bool selecting = false);
///
- UpdatableInset::RESULT moveLeftIntern(BufferView *, bool behind,
+ UpdatableInset::RESULT moveLeftIntern(BufferView *, bool behind,
bool activate_inset = true,
bool selecting = false);
bool checkAndActivateInset(BufferView * bv, bool behind);
///
bool checkAndActivateInset(BufferView * bv, int x = 0, int y = 0,
- int button = 0);
+ int button = 0);
///
void removeNewlines();
///
void reinitLyXText() const;
///
void collapseParagraphs(BufferParams const & bparams) const;
-
+
/* Private structures and variables */
///
Paragraph * par;
};
///
mutable save_state sstate;
-
+
///
// this is needed globally so we know that we're using it actually and
// so the LyXText-Cache is not erased until used!
mutable BufferView * do_resize;
mutable bool do_reinit;
mutable bool in_insetAllowed;
+ ///
+ // these are used to check for mouse movement in Motion selection code
+ ///
+ int mouse_x;
+ int mouse_y;
};
#endif