]> git.lyx.org Git - features.git/commitdiff
Header file cleanups
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 29 Oct 2011 15:34:06 +0000 (15:34 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 29 Oct 2011 15:34:06 +0000 (15:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40059 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetArgument.cpp
src/insets/InsetArgument.h
src/insets/InsetBox.h

index 00ad499d462a56d9e1ce65b6c375c01ed01bdb87..fb78b227eb38a21a1e6c005372f943bef065b048 100644 (file)
@@ -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
 {
index c57553474af8815571a794712edc6407058a1478..37805ce3355bec9df2c14bb3280419fa40ba3ffe 100644 (file)
@@ -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); }
+       //@}
 };
 
 
index 52cb776416f6cf0d0c365c2ffa65e2b9d4e8bd61..236525e7a88cb24e17fb61e43cebecc56384835f 100644 (file)
@@ -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_;
 };