enum Type {
Note,
Comment,
- Greyedout,
- Framed,
- Shaded
+ Greyedout
};
/// \c type defaults to Note
InsetNoteParams();
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_;
};
///
InsetNoteMailer(InsetNote & inset);
///
- virtual InsetBase & inset() const { return inset_; }
+ virtual Inset & inset() const { return inset_; }
///
virtual std::string const & name() const { return name_; }
///