// -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file insetcollapsable.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
+ * \author Alejandro Aguilar Sierra
+ * \author Jürgen Vigna
+ * \author Lars Gullik Bjønnes
*
- * Copyright 2000-2001 The LyX Team.
- *
- *======================================================
+ * Full author contact details are available in file CREDITS
*/
-
#ifndef INSETCOLLAPSABLE_H
#define INSETCOLLAPSABLE_H
-#ifdef __GNUG__
-#pragma interface
-#endif
#include "inset.h"
#include "insettext.h"
#include "lyxfont.h"
#include "LColor.h"
+#include <boost/weak_ptr.hpp>
+
class Painter;
class LyXText;
class Paragraph;
///
int width(BufferView *, LyXFont const &) const;
///
- void draw(BufferView *, const LyXFont &, int , float &, bool) const;
+ void draw(BufferView *, const LyXFont &, int , float &) const;
///
void update(BufferView *, LyXFont const &, bool =false);
///
///
bool isTextInset() const { return true; }
///
- bool doClearArea() const;
- ///
void insetUnlock(BufferView *);
///
bool needFullRow() const { return isOpen(); }
///
int insetInInsetY() const;
///
- bool insetButtonRelease(BufferView *, int, int, mouse_button::state);
- ///
- void insetButtonPress(BufferView *, int, int, mouse_button::state);
- ///
- void insetMotionNotify(BufferView *, int, int, mouse_button::state);
- ///
- UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
- string const &);
+ RESULT localDispatch(FuncRequest const &);
///
int latex(Buffer const *, std::ostream &,
bool fragile, bool free_spc) const;
///
int linuxdoc(Buffer const *, std::ostream &) const;
///
- int docbook(Buffer const *, std::ostream &) const;
+ int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
void validate(LaTeXFeatures & features) const;
///
UpdatableInset::scroll(bv, offset);
}
///
- Paragraph * getParFromID(int id) const;
- ///
Inset * getInsetFromID(int id) const;
///
Paragraph * firstParagraph() const;
///
void close(BufferView *) const;
///
- bool allowSpellcheck() { return inset.allowSpellcheck(); }
- string const selectNextWordToSpellcheck(BufferView *, float &) const;
-
+ bool allowSpellcheck() const { return inset.allowSpellcheck(); }
+ ///
+ WordLangTuple const
+ selectNextWordToSpellcheck(BufferView *, float &) const;
+ ///
void selectSelectedWord(BufferView * bv) {
inset.selectSelectedWord(bv);
}
+ ///
void toggleSelection(BufferView * bv, bool kill_selection) {
inset.toggleSelection(bv, kill_selection);
}
+
+ void markErased();
+
+ bool nextChange(BufferView * bv, lyx::pos_type & length);
+
///
bool searchForward(BufferView * bv, string const & str,
bool = true, bool = false);
bool searchBackward(BufferView * bv, string const & str,
bool = true, bool = false);
+ ///
+ void addPreview(grfx::PreviewLoader &) const;
+
protected:
+ ///
+ virtual void cache(BufferView *) const;
+ ///
+ virtual BufferView * view() const;
+
///
int ascent_collapsed() const;
///
mutable UpdateCodes need_update;
private:
+ ///
+ void lfunMousePress(FuncRequest const &);
+ ///
+ bool lfunMouseRelease(FuncRequest const &);
+ ///
+ void lfunMouseMotion(FuncRequest const &);
+
///
mutable string label;
#if 0
bool in_update;
///
mutable bool first_after_edit;
+ ///
+ mutable boost::weak_ptr<BufferView> view_;
};
#endif