From: Vincent van Ravesteijn Date: Sat, 29 Oct 2011 15:34:06 +0000 (+0000) Subject: Header file cleanups X-Git-Tag: 2.1.0beta1~2448 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=37c4b71a3eafab74cce09b9f41c679f7581cf449;p=features.git Header file cleanups git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40059 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetArgument.cpp b/src/insets/InsetArgument.cpp index 00ad499d46..fb78b227eb 100644 --- a/src/insets/InsetArgument.cpp +++ b/src/insets/InsetArgument.cpp @@ -32,28 +32,6 @@ void InsetArgument::write(ostream & os) const InsetCollapsable::write(os); } - -void InsetArgument::latex(otexstream &, OutputParams const &) const -{} - - -int InsetArgument::plaintext(odocstream &, OutputParams const &) const -{ - return 0; // do not output optional arguments -} - - -int InsetArgument::docbook(odocstream &, OutputParams const &) const -{ - return 0; -} - - -docstring InsetArgument::xhtml(XHTMLStream &, OutputParams const &) const -{ - return docstring(); -} - void InsetArgument::latexArgument(otexstream & os, OutputParams const & runparams, bool optional) const { diff --git a/src/insets/InsetArgument.h b/src/insets/InsetArgument.h index c57553474a..37805ce335 100644 --- a/src/insets/InsetArgument.h +++ b/src/insets/InsetArgument.h @@ -32,28 +32,36 @@ public: /// Outputting the parameter of a LaTeX command void latexArgument(otexstream &, OutputParams const &, bool optional) const; + + /// \name Public functions inherited from Inset class + //@{ /// bool hasSettings() const { return false; } - -private: - /// code of the inset + /// InsetCode lyxCode() const { return ARG_CODE; } /// docstring layoutName() const { return from_ascii("Argument"); } - /// Standard LaTeX output -- short-circuited - void latex(otexstream &, OutputParams const &) const; - /// Standard plain text output -- short-circuited - int plaintext(odocstream &, OutputParams const &) const; - /// Standard DocBook output -- short-circuited - int docbook(odocstream &, OutputParams const &) const; - /// Standard XHTML output -- short-circuited - docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// Write out to the .lyx file + /// + void latex(otexstream &, OutputParams const &) const { } + /// + int plaintext(odocstream &, OutputParams const &) const { return 0; } + /// + int docbook(odocstream &, OutputParams const &) const { return 0; } + /// + docstring xhtml(XHTMLStream &, OutputParams const &) const + { return docstring(); }; + /// void write(std::ostream & os) const; - /// should paragraph indendation be ommitted in any case? + /// bool neverIndent() const { return true; } + //@} + +protected: + /// \name Protected functions inherited from Inset class + //@{ /// Inset * clone() const { return new InsetArgument(*this); } + //@} }; diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h index 52cb776416..236525e7a8 100644 --- a/src/insets/InsetBox.h +++ b/src/insets/InsetBox.h @@ -79,15 +79,16 @@ public: }; /// InsetBox(Buffer *, std::string const &); + /// static std::string params2string(InsetBoxParams const &); /// static void string2params(std::string const &, InsetBoxParams &); /// InsetBoxParams const & params() const { return params_; } -private: - /// - friend class InsetBoxParams; + + /// \name Public functions inherited from Inset class + //@{ /// InsetCode lyxCode() const { return BOX_CODE; } /// @@ -97,8 +98,6 @@ private: /// void read(Lexer & lex); /// - void setButtonLabel(); - /// void metrics(MetricsInfo &, Dimension &) const; /// DisplayType display() const { return Inline; } @@ -108,9 +107,7 @@ private: bool forcePlainLayout(idx_type = 0) const; /// bool neverIndent() const { return true; } - /** returns false if, when outputing LaTeX, font changes should - be closed before generating this inset. This is needed for - insets that may contain several paragraphs */ + /// bool inheritFont() const { return false; } /// void latex(otexstream &, OutputParams const &) const; @@ -123,19 +120,34 @@ private: /// void validate(LaTeXFeatures &) const; /// + bool hasFixedWidth() const; + /// + std::string contextMenuName() const; + //@} + + /// \name Public functions inherited from InsetCollapsable class + //@{ + /// + void setButtonLabel(); + //@} + +protected: + /// \name Protected functions inherited from Inset class + //@{ + /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// void doDispatch(Cursor & cur, FuncRequest & cmd); - /// Is the width forced to some value? - bool hasFixedWidth() const; /// Inset * clone() const { return new InsetBox(*this); } + //@} + +private: /// used by the constructors void init(); - /// - std::string contextMenuName() const; /// + friend class InsetBoxParams; InsetBoxParams params_; };