class Buffer;
class BufferParams;
class BufferView;
+class CompletionList;
class CursorSlice;
class Dimension;
class ParagraphList;
class InsetText : public Inset {
public:
///
- explicit InsetText(BufferParams const &);
- ///
- InsetText();
+ explicit InsetText(Buffer const & buffer);
///
InsetText(InsetText const &);
+ ///
+ void setBuffer(Buffer &);
///
Dimension const dimension(BufferView const &) const;
///
InsetText const * asInsetText() const { return this; }
///
+ Text & text() { return text_; }
+ Text const & text() const { return text_; }
+ ///
int latex(odocstream &, OutputParams const &) const;
///
int plaintext(odocstream &, OutputParams const &) const;
bool insetAllowed(InsetCode) const { return true; }
///
bool allowSpellCheck() const { return true; }
- /// should paragraph indendation be ommitted in any case?
- bool neverIndent() const;
///
- virtual bool isMacroScope() const { return true; }
+ virtual bool isMacroScope() const { return false; }
///
virtual bool allowMultiPar() const { return true; }
// Update the counters of this inset and of its contents
void updateLabels(ParIterator const &);
///
- Inset * clone() const;
+ void addToToc(DocIterator const &);
///
- virtual bool notifyCursorLeaves(Cursor const & old, Cursor & cur);
+ Inset * clone() const { return new InsetText(*this); }
+ ///
+ bool notifyCursorLeaves(Cursor const & old, Cursor & cur);
///
bool completionSupported(Cursor const &) const;
///
bool automaticPopupCompletion() const;
///
+ bool showCompletionCursor() const;
+ ///
CompletionList const * createCompletionList(Cursor const & cur) const;
///
docstring completionPrefix(Cursor const & cur) const;
///
void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const;
-protected:
///
- virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
-
+ virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
+ ///
+ void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
+ ///
+ void initParagraphs(BufferParams const &);
///
void setParagraphOwner();
///
ColorCode frame_color_;
///
mutable pit_type old_pit;
- ///
- docstring previousWord(CursorSlice const & sl) const;
-
-public:
///
mutable Text text_;
};