X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetText.h;h=6f509ada4572c470fad3b69b39a9b0c51ae8c640;hb=f61bebd7fb25beabdf0dc761520030f9059499d6;hp=8168a71f5d40b6205877a2408a4d733d9e561d32;hpb=9e499117e3ecae7c61ec0e5bd5a7d54791f3cacf;p=lyx.git diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index 8168a71f5d..6f509ada45 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Jürgen Vigna + * \author Jürgen Vigna * * Full author contact details are available in file CREDITS. */ @@ -34,14 +34,19 @@ class InsetTabular; */ class InsetText : public Inset { public: - /// - explicit InsetText(Buffer const & buffer); - /// - InsetText(); + enum UsePlain { + DefaultLayout, + PlainLayout + }; + /// \param buffer + /// \param useplain whether to use the plain layout + /// This is needed because we cannot call the virtual function + /// usePlainLayout() from within the constructor. + explicit InsetText(Buffer const & buffer, UsePlain type = DefaultLayout); /// InsetText(InsetText const &); /// - void initParagraphs(Buffer const & buffer); + void setBuffer(Buffer &); /// Dimension const dimension(BufferView const &) const; @@ -59,7 +64,7 @@ public: /// docstring editMessage() const; /// - EDITABLE editable() const { return HIGHLY_EDITABLE; } + bool editable() const { return true; } /// bool canTrackChanges() const { return true; } /// @@ -67,12 +72,17 @@ public: /// 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; /// int docbook(odocstream &, OutputParams const &) const; /// + int xhtml(odocstream &, OutputParams const &) const; + /// void validate(LaTeXFeatures & features) const; /// return x,y of given position relative to the inset's baseline @@ -130,10 +140,6 @@ public: /// bool allowSpellCheck() const { return true; } /// - bool isTableCell() const; - /// should paragraph indendation be ommitted in any case? - bool neverIndent() const; - /// virtual bool isMacroScope() const { return false; } /// virtual bool allowMultiPar() const { return true; } @@ -141,6 +147,8 @@ public: // Update the counters of this inset and of its contents void updateLabels(ParIterator const &); /// + void addToToc(DocIterator const &); + /// Inset * clone() const { return new InsetText(*this); } /// bool notifyCursorLeaves(Cursor const & old, Cursor & cur); @@ -169,6 +177,8 @@ public: /// void doDispatch(Cursor & cur, FuncRequest & cmd); private: + /// + void initParagraphs(UsePlain type); /// void setParagraphOwner(); /// @@ -177,8 +187,6 @@ private: ColorCode frame_color_; /// mutable pit_type old_pit; - -public: /// mutable Text text_; };