///
TOC_CODE, // do these insets really need a code? (ale)
///
- LOF_CODE, // 2
- ///
- LOT_CODE,
- ///
- LOA_CODE,
- ///
- QUOTE_CODE, // 5
+ QUOTE_CODE,
///
MARK_CODE,
///
- REF_CODE,
+ REF_CODE, // 5
///
URL_CODE,
///
HTMLURL_CODE,
///
- SEPARATOR_CODE, // 10
+ SEPARATOR_CODE,
///
ENDING_CODE,
///
- LABEL_CODE,
+ LABEL_CODE, // 10
///
IGNORE_CODE,
///
ACCENT_CODE,
///
- MATH_CODE, // 15
+ MATH_CODE,
///
INDEX_CODE,
///
- INCLUDE_CODE,
+ INCLUDE_CODE, // 15
///
GRAPHICS_CODE,
///
PARENT_CODE,
///
- BIBTEX_CODE, // 20
+ BIBTEX_CODE,
///
TEXT_CODE,
///
- ERT_CODE,
+ ERT_CODE, // 20
///
FOOT_CODE,
///
MARGIN_CODE,
///
- FLOAT_CODE, // 25
+ FLOAT_CODE,
///
MINIPAGE_CODE,
///
- SPECIALCHAR_CODE,
+ SPECIALCHAR_CODE, // 25
///
TABULAR_CODE,
///
EXTERNAL_CODE,
///
- THEOREM_CODE, // 30
+ THEOREM_CODE,
///
CAPTION_CODE,
///
- MATHMACRO_CODE,
+ MATHMACRO_CODE, // 30
///
ERROR_CODE,
///
- CITE_CODE
+ CITE_CODE,
+ ///
+ FLOAT_LIST_CODE
};
///
///
Inset() : top_x(0), top_baseline(0), scx(0), owner_(0) {}
- ///
+ /// Virtual base destructor
virtual ~Inset() {}
///
virtual int ascent(BufferView *, LyXFont const &) const = 0;
///
virtual void resizeLyXText(BufferView *) const {}
/// returns the actuall scroll-value
- int scroll() const { return scx; }
+ virtual int scroll(bool recursive=true) const {
+ if (!recursive || !owner_)
+ return scx;
+ return 0;
+ }
+
protected:
///
mutable int top_x;
}
///
- UpdatableInset() : cursor_visible_(false) {}
+ UpdatableInset() : cursor_visible_(false), block_drawing_(false) {}
+
///
virtual EDITABLE Editable() const;
///
virtual int getMaxWidth(BufferView * bv, UpdatableInset const *) const;
///
- int scroll() const {
+ int scroll(bool recursive=true) const {
// We need this method to not clobber the real method in Inset
- return Inset::scroll();
+ return Inset::scroll(recursive);
}
///
virtual bool ShowInsetDialog(BufferView *) const { return false; }
+ ///
+ virtual void nodraw(bool b) {
+ block_drawing_ = b;
+ }
+ ///
+ virtual bool nodraw() const {
+ return block_drawing_;
+ }
+
protected:
///
void toggleCursorVisible() const {
void scroll(BufferView *, float sx) const;
/// scrolls offset pixels
void scroll(BufferView *, int offset) const;
+
private:
///
mutable bool cursor_visible_;
+ ///
+ bool block_drawing_;
};
#endif