]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNote.h
Fix GRAPHICS_EDIT of InsetGraphics
[lyx.git] / src / insets / InsetNote.h
index 808b99e0c039101490310705ee15457e33f8bded..a9ca313b8767968eb843363dd6df5db38d3b2c5f 100644 (file)
@@ -23,9 +23,7 @@ public:
        enum Type {
                Note,
                Comment,
-               Greyedout,
-               Framed,
-               Shaded
+               Greyedout
        };
        /// \c type defaults to Note
        InsetNoteParams();
@@ -44,44 +42,55 @@ public:
 class InsetNote : public InsetCollapsable {
 public:
        ///
-       InsetNote(BufferParams const &, std::string const &);
+       InsetNote(Buffer const &, std::string const &);
        ///
        ~InsetNote();
        ///
-       virtual docstring const editMessage() const;
+       InsetNoteParams const & params() const { return params_; }
+private:
+       ///
+       docstring editMessage() const;
+       ///
+       InsetCode lyxCode() const { return NOTE_CODE; }
+       ///
+       docstring name() const;
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
+       virtual DisplayType display() const;
        ///
-       void write(Buffer const &, std::ostream &) const;
+       bool noFontChange() const { return params_.type != InsetNoteParams::Note; }
        ///
-       void read(Buffer const & buf, Lexer & lex);
+       void write(std::ostream &) const;
+       ///
+       void read(Lexer & lex);
        ///
        void setButtonLabel();
        /// show the note dialog
        bool showInsetDialog(BufferView * bv) const;
        ///
-       int latex(Buffer const &, odocstream &, OutputParams const &) const;
+       bool isMacroScope() const;
        ///
-       int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
+       int latex(odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const &, odocstream &, OutputParams const &) const;
+       int plaintext(odocstream &, OutputParams const &) const;
+       ///
+       int docbook(odocstream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
-       InsetNoteParams const & params() const { return params_; }
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+       // Update the counters of this inset and of its contents
+       void updateLabels(ParIterator const &);
        ///
-       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
-protected:
-       InsetNote(InsetNote const &);
+       void addToToc(ParConstIterator const &) const;
        ///
-       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
-private:
-       friend class InsetNoteParams;
-
-       virtual std::auto_ptr<InsetBase> doClone() const;
-
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
+       ///
+       Inset * clone() const { return new InsetNote(*this); }
        /// used by the constructors
        void init();
+       ///
+       friend class InsetNoteParams;
+
        ///
        InsetNoteParams params_;
 };
@@ -92,7 +101,7 @@ public:
        ///
        InsetNoteMailer(InsetNote & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///