// -*- C++ -*-
/* This file is part of
* ======================================================
- *
+ *
* LyX, The Document Processor
*
* Copyright 2000-2001 The LyX Team.
class LyXCursor;
/** A collapsable text inset
-
+
*/
class InsetCollapsable : public UpdatableInset {
public:
///
static int const TEXT_TO_BOTTOM_OFFSET = 2;
/// inset is initially collapsed if bool = true
- InsetCollapsable(bool = false);
+ InsetCollapsable(BufferParams const &, bool = false);
///
InsetCollapsable(InsetCollapsable const & in, bool same_id = false);
///
///
void draw(BufferView *, const LyXFont &, int , float &, bool) const;
///
- void update(BufferView *, LyXFont const &, bool =false);
+ void update(BufferView *, LyXFont const &, bool =false);
///
void edit(BufferView *, int, int, unsigned int);
///
///
bool updateInsetInInset(BufferView *, Inset *);
///
- unsigned int insetInInsetY();
+ int insetInInsetY() const;
///
- void insetButtonRelease(BufferView *, int, int, int);
+ bool insetButtonRelease(BufferView *, int, int, int);
///
void insetButtonPress(BufferView *, int, int, int);
///
void insetKeyPress(XKeyEvent *);
///
UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
- string const &);
+ string const &);
///
int latex(Buffer const *, std::ostream &,
bool fragile, bool free_spc) const;
///
- int ascii(Buffer const *, std::ostream &, int) const { return 0; }
+ int ascii(Buffer const *, std::ostream &, int) const;
///
- int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
+ int linuxdoc(Buffer const *, std::ostream &) const;
///
- int docbook(Buffer const *, std::ostream &) const { return 0; }
+ int docbook(Buffer const *, std::ostream &) const;
///
void validate(LaTeXFeatures & features) const;
///
UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
///
void setFont(BufferView *, LyXFont const &, bool toggleall = false,
- bool selectall = false);
+ bool selectall = false);
///
void setLabel(string const & l) const;
///
///
void setAutoCollapse(bool f) { autocollapse = f; }
#endif
+#if 0
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
+#endif
///
LyXText * getLyXText(BufferView const *, bool const recursive) const;
///
///
void close(BufferView *) const;
///
- string const selectNextWord(BufferView * bv, float & value) const;
+ bool allowSpellcheck() { return inset.allowSpellcheck(); }
+ string const selectNextWordToSpellcheck(BufferView *, float &) const;
void selectSelectedWord(BufferView * bv) {
inset.selectSelectedWord(bv);
}
///
bool searchForward(BufferView * bv, string const & str,
- bool const & cs = true, bool const & mw = false);
+ bool = true, bool = false);
bool searchBackward(BufferView * bv, string const & str,
- bool const & cs = true, bool const & mw = false);
- /// check if the font of the char we want inserting is correct
- /// and modify it if it is not.
- virtual bool checkInsertChar(LyXFont &) { return false; }
+ bool = true, bool = false);
protected:
///
void draw_collapsed(Painter & pain, int , float &) const;
///
int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;
-
+
///
mutable bool collapsed_;
///