Author: vfr
Date: Sat Oct 29 17:34:06 2011
New Revision: 40059
URL: http://www.lyx.org/trac/changeset/40059

Log:
Header file cleanups

Modified:
   lyx-devel/trunk/src/insets/InsetArgument.cpp
   lyx-devel/trunk/src/insets/InsetArgument.h
   lyx-devel/trunk/src/insets/InsetBox.h

Modified: lyx-devel/trunk/src/insets/InsetArgument.cpp
==============================================================================
--- lyx-devel/trunk/src/insets/InsetArgument.cpp        Sat Oct 29 16:48:55 
2011        (r40058)
+++ lyx-devel/trunk/src/insets/InsetArgument.cpp        Sat Oct 29 17:34:06 
2011        (r40059)
@@ -32,28 +32,6 @@
        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
 {

Modified: lyx-devel/trunk/src/insets/InsetArgument.h
==============================================================================
--- lyx-devel/trunk/src/insets/InsetArgument.h  Sat Oct 29 16:48:55 2011        
(r40058)
+++ lyx-devel/trunk/src/insets/InsetArgument.h  Sat Oct 29 17:34:06 2011        
(r40059)
@@ -32,28 +32,36 @@
        /// 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); }
+       //@}
 };
 
 

Modified: lyx-devel/trunk/src/insets/InsetBox.h
==============================================================================
--- lyx-devel/trunk/src/insets/InsetBox.h       Sat Oct 29 16:48:55 2011        
(r40058)
+++ lyx-devel/trunk/src/insets/InsetBox.h       Sat Oct 29 17:34:06 2011        
(r40059)
@@ -79,15 +79,16 @@
        };
        ///
        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 @@
        ///
        void read(Lexer & lex);
        ///
-       void setButtonLabel();
-       ///
        void metrics(MetricsInfo &, Dimension &) const;
        ///
        DisplayType display() const { return Inline; }
@@ -108,9 +107,7 @@
        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 @@
        ///
        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_;
 };
 

Reply via email to