]> git.lyx.org Git - features.git/commitdiff
make doc++ able to generate the source documentation for lyx
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 7 Aug 2000 20:58:24 +0000 (20:58 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 7 Aug 2000 20:58:24 +0000 (20:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@956 a592a061-630c-0410-9148-cb99ea01b6c8

105 files changed:
ChangeLog
development/Code_rules/Rules
src/BackStack.h
src/BufferView.h
src/BufferView_pimpl.h
src/Bullet.h
src/Chktex.h
src/ColorHandler.h
src/CutAndPaste.C
src/CutAndPaste.h
src/FloatList.h
src/FontInfo.h
src/FontLoader.h
src/ImportNoweb.h
src/LColor.h
src/LaTeX.h
src/LaTeXFeatures.h
src/Literate.h
src/LyXAction.h
src/MenuBackend.h
src/Painter.h
src/PainterBase.h
src/PrinterParams.h
src/Sectioning.h
src/TextCache.h
src/Timeout.h
src/ToolbarDefaults.h
src/WorkArea.h
src/buffer.h
src/bufferlist.h
src/bufferparams.h
src/combox.h
src/encoding.h
src/filedlg.h
src/font.h
src/frontends/DialogBase.h
src/frontends/Liason.h
src/frontends/Menubar.h
src/frontends/Toolbar.h
src/frontends/gnome/FormCopyright.h
src/frontends/kde/FormCopyright.h
src/frontends/xforms/FormCommand.h
src/frontends/xforms/FormCopyright.h
src/frontends/xforms/FormGraphics.h
src/gettext.h
src/graphics/GraphicsCache.h
src/graphics/GraphicsCacheItem.h
src/insets/ExternalTemplate.h
src/insets/insetcommand.h
src/intl.h
src/language.h
src/lastfiles.h
src/layout.h
src/lyx_cb.h
src/lyx_gui.h
src/lyx_gui_misc.h
src/lyx_main.h
src/lyx_sty.h
src/lyxcursor.h
src/lyxfont.h
src/lyxfr0.h
src/lyxfr1.h
src/lyxfunc.h
src/lyxlex.h
src/lyxlookup.h
src/lyxparagraph.h
src/lyxrc.h
src/lyxscreen.h
src/lyxserver.h
src/lyxtext.h
src/lyxvc.h
src/mathed/array.h
src/mathed/math_defs.h
src/mathed/math_iter.h
src/mathed/math_macro.h
src/mathed/math_panel.h
src/mathed/math_parser.h
src/mathed/math_root.h
src/mathed/symbol_def.h
src/minibuffer.h
src/spellchecker.h
src/support/DebugStream.h
src/support/FileInfo.h
src/support/LAssert.h
src/support/LRegex.h
src/support/StrPool.h
src/support/block.h
src/support/filetools.h
src/support/lstrings.h
src/support/lxtl.h
src/support/lyxlib.h
src/support/lyxstring.h
src/support/path.h
src/support/utility.hpp
src/table.h
src/tabular.h
src/tex-strings.h
src/texrow.C
src/tracer.h
src/trans.h
src/trans_decl.h
src/trans_mgr.h
src/vc-backend.h
src/version.h
src/vspace.h

index 6c38709abf873e986bc32890a6bef8c655593b10..52bacc1e78fdfeb39217c24d90a0d139d982c8d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-08-07  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * src/CutAndPaste.[Ch]: make all metods static. 
+
+       * development/Code_rules/Rules: more work, added section on
+       Exceptions, and a References section.
+
+       * a lot of header files: work to make doc++ able to generate the
+       source documentation, some workarounds of doc++ problems. Doc++ is
+       now able to generate the documentation.
+
 2000-08-07  Juergen Vigna  <jug@sad.it>
 
        * src/insets/insettabular.C (recomputeTextInsets): removed function
index 52d29fbccae5ea2f9e748c96d6f62c3e7df45a51..7e2ed08ab3b6342c382d70625070e65568801c67 100644 (file)
@@ -34,6 +34,7 @@ that you:
 - take advantage of the C++ standard library. especially don't use
   custom containers when a standard container is usable, learn to use
   the algorithms and functors in the standard library.
+- be aware of exceptions and write exception safe code. See Exceptions.
 - document all variables, methods, functions, classes etc. We are
   using the source documentation program doc++, a program that handles
   javadoc syntax, to document sources. See Source Documentation.
@@ -114,6 +115,70 @@ in C++.
        T add(...);
 
 
+Exceptions
+----------
+
+Even if LyX currently is not using exceptions we need to be aware of
+them. One important thing to realize is that you often do not have to
+use throw,try or catch to be exception safe. Let's look at the
+different types of exceptions safety: (These are taken from Herb
+Sutters book[ExC++]
+
+"
+1. Basic guarantee: Even in te presence of exceptions thrown by T or
+other exceptions, Stack objects don't leak resources.
+       Note that this also implies that the container will be
+       destructible and usable even if an exception is thrown wile
+       performing some container operation. However, if an exception
+       is thrown, the container will be in a consistent, but not
+       necessarily predictable, state. Containers that support the
+       basic guarantee can work safely in some settings.
+
+2. Strong guarantee: If an operation terminates because of an
+exception, program state will remain uncanged.
+       This always implies commit-or-rollback samantics, including
+       that no references or iterators into the container be
+       invalidated if an operation fails. For example, if a Stack
+       client calls Top and then attempts a Push that fails because
+       of an exception, then the state of the Stack object must be
+       unchanged and the reference returned from the prior call to
+       Top must still be valid. For more information on there
+       guarantees, see Dave Abrahams's documentation of the SGI
+       exception-safe standard library adaption at:
+       http://www.metabyte.com/~fbp/stl/eg_contract.html 
+
+       Probably te most interesting point here is tat wen you
+       implement the basic guarantee, the strong guarantee often
+       comes for free. For example, in our Stack implementation,
+       alost everything we did was needed to satisfy just the basic
+       guarantee -- and wath's presented above very nearly satisfires
+       the strong guarantee, with little of no extra work. Not half
+       bad, considering all the trouble we went to.
+
+       In addition to tese two guarantees, there is one more
+       guarantee that certain functions must provide in order to make
+       overall exception safety possible: 
+
+3. Nothrow guarantee: Te function will not emit an exception under any
+   circumstances.
+       Overall exception safety isn't possible unless certain
+       functions are guaranteed not to throw. In particualr, we've
+       seen that this is true for destructors; later in tis
+       miniseries, we'll see that it's also needed in certain helper
+       functions, such as Swap(). 
+"
+
+For all cases where we might be able to write exception safe functions
+without using try,throw or catch we should do so. In particular we
+should look over all destructors to ensure that they are as exception
+safe at possible.
+
+Later when more compiler support exceptions sufficiently well we will
+begin using them too. One reason for this is that the C++ standard
+library actually requires exceptions, e.g. "new" will throw
+bad_allocation if the requested memory is not available.
+
+
 Formatting
 ----------
 
@@ -297,3 +362,9 @@ existing member functions. That will help maintainability in the
 future.
 
 (I'll fill in more from Scott Meyers article when time allows.)
+
+References
+----------
+
+[ExC++] Sutter, Herb. Exceptional C++: 47 engineering puzzles,
+       programming problems, and solutions. ISBN 0-201-61562-2
index d1dc6f973c96c70d1accce9e2294b5db0116b5dd..ca5a1b5264ced59ecb0a6aef5fd0e02d2495adda 100644 (file)
@@ -15,9 +15,9 @@
 
 #include "LString.h"
 
-// Created by Alejandro Aguilar Sierra, 970806
-
 /**  Utility to get back from a reference or from a child document.
+     @author Alejandro Aguilar Sierra
+     @version 970806
  */
 class BackStack {
 private:
@@ -50,7 +50,9 @@ public:
                stakk.pop();
                return bit.fname;
        }
-       ///
+       /**
+          @return returns #true# if the stack is empty, #false# otherwise.
+        */
        bool empty() const {
                return stakk.empty();
        }
index dd923183f0c4c80cf9ce2c62a417b76715d3b751..e1b3bc621812798597dc185814dfec066d444b7d 100644 (file)
@@ -32,9 +32,13 @@ class BufferView : public noncopyable {
 public:
        ///
        enum UpdateCodes {
+               ///
                UPDATE = 0,
+               ///
                SELECT = 1,
+               ///
                FITCUR = 2,
+               ///
                CHANGE = 4
        };
                                            
@@ -62,12 +66,13 @@ public:
        void fitCursor();
        ///
        void update();
-       ///
+       //
        void update(UpdateCodes uc);
        ///
        void updateScrollbar();
        ///
-       Inset * checkInsetHit(LyXText *, int & x, int & y, unsigned int button);
+       Inset * checkInsetHit(LyXText *, int & x, int & y,
+                             unsigned int button);
        /// 
        void redoCurrentBuffer();
        ///
@@ -172,14 +177,17 @@ public:
        void insertErrors(TeXErrors & terr);
        ///
        void setCursorFromRow(int row);
-       /** Insert an inset into the buffer
-           Insert inset into buffer, placing it in a layout of lout,
-           if no_table make sure that it doesn't end up in a table. */
+       /** Insert an inset into the buffer.
+           Placie it in a layout of lout,
+           if no_table make sure that it doesn't end up in a table.
+       */
        bool insertInset(Inset * inset, string const & lout = string(),
                         bool no_table = false);
        /// open and lock an updatable inset
        bool open_new_inset(UpdatableInset * new_inset);
-       /// Inserts a lyx file at cursor position. Returns false if it fails.
+       /** Inserts a lyx file at cursor position.
+           @return #false# if it fails.
+       */
        bool insertLyXFile(string const & file);
        ///
        bool lockInset(UpdatableInset * inset);
@@ -244,11 +252,14 @@ public:
        void stuffClipboard(string const &) const;
 private:
        struct Pimpl;
+       ///
        friend struct BufferView::Pimpl;
+       ///
        Pimpl * pimpl_;
 };
 
 
+///
 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
                                  BufferView::UpdateCodes uc2);
 
index 4358e20197396ac012b83a2343ebbfd79b25605d..7de82ef77a28ec79bf60678615ac05aa270f95bc 100644 (file)
@@ -20,7 +20,9 @@ class LyXScreen;
 using SigC::Object;
 #endif
 
+///
 struct BufferView::Pimpl : public Object {
+       ///
        Pimpl(BufferView * i, LyXView * o,
              int xpos, int ypos, int width, int height);
        ///
@@ -41,7 +43,7 @@ struct BufferView::Pimpl : public Object {
        int resizeCurrentBuffer();
        ///
        void update();
-       ///
+       //
        void update(BufferView::UpdateCodes);
        ///
        void gotoError();
@@ -54,7 +56,8 @@ struct BufferView::Pimpl : public Object {
        ///
        void scrollCB(double value);
        ///
-       Inset * checkInsetHit(LyXText *, int & x, int & y, unsigned int button);
+       Inset * checkInsetHit(LyXText *, int & x, int & y,
+                             unsigned int button);
        /// 
        int scrollUp(long time);
        ///
@@ -142,6 +145,7 @@ struct BufferView::Pimpl : public Object {
        ///
        void stuffClipboard(string const &) const;
 private:
+       ///
        bool using_xterm_cursor;
 };
 #endif
index 446f18b1e5ad5283d0af882e0e7274c800e340d5..f761dd8cf235bec2cd329800c6eaf22e37bb5cd2 100644 (file)
@@ -60,6 +60,7 @@ public:
        }
 protected:
 #ifdef ENABLE_ASSERTIONS
+       ///
        void testInvariant() const {
                Assert(font >= MIN);
                Assert(font < FONTMAX);
@@ -254,6 +255,7 @@ char const * Bullet::c_str() const
 
 /*-----------------End Bullet Member Functions-----------------*/
 
+///
 extern
 Bullet const ITEMIZE_DEFAULTS[];
 
index 3770d0f1f93f10b8334b6b368418c4dec7860dfe..745e8b449317c8b1dddd1a5af833c084d9495fc9 100644 (file)
@@ -29,14 +29,15 @@ class TeXErrors;
 class Chktex {
 public:
        /**
-         cmd = the chktex command, file = name of the (temporary) latex file,
-         path = name of the files original path.
-         */
+         @param cmd the chktex command.
+         @param file name of the (temporary) latex file.
+         @param path name of the files original path.
+       */
        Chktex(string const & cmd, string const & file,
               string const & path);
        
        /** Runs chktex.
-         Returns -1 if fail, number of messages otherwise.
+           @return -1 if fail, number of messages otherwise.
          */
        int run(TeXErrors &);
 private:
index b9e2640839f014d17f9da62f1941d551f31011f6..0af42d70dc60d6a777f72b5186bed2dbb7542882 100644 (file)
@@ -15,9 +15,6 @@
 #pragma interface
 #endif
 
-//#include "config.h"
-//#include "LString.h"
-
 // This is only included to provide stuff for the non-public sections
 #include <X11/Xlib.h>
 
@@ -60,6 +57,7 @@ private:
        Pixmap drawable;
 };
 
+///
 extern LyXColorHandler * lyxColorHandler;
 
 #endif
index 0987745ca1f25f3c1f845b53b486918296d19fea..de95af7932e5d9fba35b486d83f92ac33ce38059 100644 (file)
@@ -448,7 +448,7 @@ bool CutAndPaste::pasteSelection(LyXParagraph ** par, LyXParagraph ** endpar,
 }
 
 
-int CutAndPaste::nrOfParagraphs() const
+int CutAndPaste::nrOfParagraphs()
 {
        if (!buf) return 0;
 
@@ -503,7 +503,7 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(LyXTextClassList::size_type c1,
 }
 
 
-bool CutAndPaste::checkPastePossible(LyXParagraph * par, int) const
+bool CutAndPaste::checkPastePossible(LyXParagraph * par, int)
 {
     if (!buf) return false;
 
index c0888e89f795f74e683931f9630d550f42f3b1c5..825b11d210b0a0ff047b64ee1225d33789264906 100644 (file)
@@ -23,26 +23,32 @@ class LyXParagraph;
 class CutAndPaste {
 public:
        ///
+       static
        bool cutSelection(LyXParagraph * startpar, LyXParagraph ** endpar,
                          int start, int & end,
                          char tc, bool doclear = false);
        ///
+       static
        bool copySelection(LyXParagraph * startpar, LyXParagraph * endpar,
                           int start, int end, char tc);
        ///
+       static
        bool pasteSelection(LyXParagraph ** par, LyXParagraph ** endpar,
                            int & pos, char tc);
        ///
-       int nrOfParagraphs() const;
+       static
+       int nrOfParagraphs();
        /** needed to switch between different classes this works
            for a list of paragraphs beginning with the specified par 
            return value is the number of wrong conversions
-       */ 
+       */
+       static
        int SwitchLayoutsBetweenClasses(LyXTextClassList::size_type class1,
                                        LyXTextClassList::size_type class2,
                                        LyXParagraph * par);
        ///
-       bool checkPastePossible(LyXParagraph *, int pos) const;
+       static
+       bool checkPastePossible(LyXParagraph *, int pos);
 };
 
 #endif
index c231d525212290d63d5dbdb6ebfd542063cd98cb..aed0dfa79b7f92f7766a1e5136a494c5cc6614e0 100644 (file)
@@ -41,6 +41,7 @@ private:
        List list;
 };
 
+///
 extern FloatList floatList;
 
 #endif
index 49fbbfe299eb52e0d44dab429bbbc811d82218e0..d3d2e8b0a08a5b6216c0a7fad11f196be0f87f65 100644 (file)
 #include "LString.h"
 
 /** This class manages a font.
-The idea is to create a FontInfo object with a font name pattern with a 
-wildcard at the size field. Then this object can host request for font-
-instances of any given size. If no exact match is found, the closest size
-is chosen instead. If the font is scalable, the flag lyxrc.use_scalable_fonts
-determines whether to allow scalable fonts to give an exact match. */
+    The idea is to create a FontInfo object with a font name pattern with a 
+    wildcard at the size field. Then this object can host request for font-
+    instances of any given size. If no exact match is found, the closest size
+    is chosen instead. If the font is scalable, the flag
+    lyxrc.use_scalable_fonts determines whether to allow scalable fonts to
+    give an exact match.
+*/
 class FontInfo {
 public:
        ///
index 189a0b986b53a6f33198db70fee16342f6b6b75e..fce75a74b198d151d6e69baf0f6476aa6582936a 100644 (file)
@@ -74,6 +74,7 @@ private:
                             LyXFont::FONT_SIZE size);
 };
 
+///
 extern FontLoader fontloader;
 
 #endif
index 551e2b76434656e8fe8598fdd16a2a82cc9a417d..c83d148341e60b13fb3594ed00b08830b8584c0b 100644 (file)
@@ -41,7 +41,8 @@ private:
        ///
        string documentclass();
        ///
-       enum { 
+       enum {
+               ///
                BUFSIZE = 512 
        };
 };
index 1875816b784bcc30c78ec7583ef447450f153066..e282761c1b2d8abb24982c78efddc7be0ee038ad 100644 (file)
@@ -18,6 +18,7 @@
 #include <map>
 
 #include "LString.h"
+#include "support/utility.hpp"
 
 /**
   This is a stateless class. 
@@ -31,8 +32,7 @@
   - A logical color, such as no color, inherit, math
 
   */
-
-class LColor {
+class LColor : public noncopyable {
 public:
        /// Names of colors, including all logical colors
        enum color {
@@ -55,7 +55,7 @@ public:
                ///
                yellow,
 
-               /// Needed interface colors
+               // Needed interface colors
 
                /// Background color
                background,
@@ -161,7 +161,7 @@ public:
                /// Color used for bottom background
                buttonbg,
 
-               /// Logical attributes
+               // Logical attributes
 
                /// Color is inherited
                inherit,
@@ -193,9 +193,13 @@ public:
 private:
        ///
        struct information {
+               ///
                string guiname;
+               ///
                string latexname;
+               ///
                string x11name;
+               ///
                string lyxname;
        };
 
@@ -206,10 +210,11 @@ private:
 
        ///
        typedef std::map<LColor::color, information> InfoTab;
-
+       ///
        InfoTab infotab;
 };
 
+///
 extern LColor lcolor;
 
 #endif
index fdc9f523325f658093c0ef065210faeb51da99a4..89325b2a2639c06de7530299cac5028e75f38700 100644 (file)
@@ -64,10 +64,10 @@ private:
 class LaTeX {
 public:
        /** Return values from scanLogFile() and run() (to come)
-
-         This enum should be enlarged a bit so that one could
-         get more feedback from the LaTeX run.
-         */
+           
+           This enum should be enlarged a bit so that one could
+           get more feedback from the LaTeX run.
+       */
        enum log_status {
                ///
                NO_ERRORS = 0,
@@ -154,7 +154,7 @@ protected:
        ///
        string path;
 
-       // used by scanLogFile
+       /// used by scanLogFile
        int num_errors;
 };
 
index cee55913a121baf94785f6acbfc916483df0c751..f8cc2e63aec019b3ac1f1e7473d1e1e6557de43c 100644 (file)
@@ -27,10 +27,11 @@ class LyXTextClass;
 struct Language;
 
 /** The packages and commands that a buffer needs. This struct
-  contains an entry for each of the latex packages and
-  commands that a buffer might need. This struct is supposed to be
-  extended as the need arises. Remember to update the validate function
-  in buffer.C and paragraph.C when you do so. */
+    contains an entry for each of the latex packages and
+    commands that a buffer might need. This struct is supposed to be
+    extended as the need arises. Remember to update the validate function
+    in buffer.C and paragraph.C when you do so.
+*/
 struct LaTeXFeatures {
        ///
        LaTeXFeatures(BufferParams const &, int n) ;
@@ -52,8 +53,6 @@ struct LaTeXFeatures {
        /// Static preamble bits from the external material insets
        string externalPreambles;
 
-       //@Man: Packages
-       //@{
        ///
        bool array;
        ///
@@ -92,11 +91,7 @@ struct LaTeXFeatures {
        bool prettyref; // prettyref.sty
        ///
        bool chess;     // chess.sty
-       //@}
 
-       
-       //@Man: Commands
-       //@{
        ///
        bool lyx;
        ///
@@ -105,10 +100,7 @@ struct LaTeXFeatures {
        bool noun;
        /// \lyxarrow
        bool lyxarrow;
-       //@}
-       
-       //@Man: Quotes
-       //@{
+
        ///
        bool quotesinglbase;
        ///
@@ -121,25 +113,17 @@ struct LaTeXFeatures {
        bool guillemotleft;
        ///
        bool guillemotright;
-       //@}
-       
-       //@Man: Math mode
-       //@{
+
        ///
        bool amsstyle;
        ///
        bool boldsymbol;
        ///
        bool binom;
-       //@}
        
-       //@Man: Layouts
-       //@{
        std::vector<bool> layout;
-       //@}
-       
-       //@Man: Special features
-       //@{
+
+       ///
        bool LyXParagraphIndent;
        ///
        bool NeedLyXFootnoteCode;
@@ -157,9 +141,10 @@ struct LaTeXFeatures {
        typedef std::map<string , string> FileMap;
        ///
        FileMap IncludedFiles;
-       //@}
+       ///
        BufferParams const & bufferParams() const;
 private:
+       ///
        BufferParams const & params;
 };
 
index 9027db10d03c2f2e41ccf793f28ea4e1a432d400..73688ddd8ebe1006c183119d96987a1a1743244c 100644 (file)
@@ -22,6 +22,7 @@ class MiniBuffer;
 ///
 class Literate : public LaTeX {
 public:
+       ///
        Literate(string const & cmd, string const & file, string const & path,
                 string const & litfile,
                 string const & literate_cmd, string const & literate_filter, 
index 4fadb5c04840c4e8c2367096ab60d45c0022ae7a..19790c32e5f9bcb473bfeca5393067012d779d68 100644 (file)
 
 #include "commandtags.h"
 #include "LString.h"
+#include "support/utility.hpp"
 
 /** This class encapsulates LyX action and user command operations.
  */
-class LyXAction {
+class LyXAction : public noncopyable {
 private:
        ///
        struct func_info {
+               ///
                string name;
+               ///
                unsigned int attrib;
+               ///
                string helpText;
        };
 
        ///
        struct pseudo_func {
+               ///
                kb_action action;
+               ///
                string arg;
        };
 public:
@@ -48,7 +54,8 @@ public:
                 /// Can be used when there is no document open
                 NoBuffer = 2,
                //Interactive = 2, // Is interactive (requires a GUI)
-               Argument=4      // Requires argument
+               ///
+               Argument = 4      // Requires argument
                //MathOnly = 8,    // Only math mode
                //EtcEtc = ...     // Or other attributes...
        };
index 161d9283dfb6c66e97d59c13985d254c01ba7966..29e004bf98e2708ba03f4d79c444ec028b4de825 100644 (file)
@@ -108,7 +108,6 @@ private:
        bool menubar_;
        ///
        string name_;
-       ///
 };
 
 
index 7bba9cdde2fa77d42091a068296b80ca6439001e..1becb41462cf5b8f83973d6d2e81985bff10a05a 100644 (file)
@@ -36,7 +36,6 @@ public:
        /// Constructor 
        explicit Painter(WorkArea &);
        
-       /**@Basic drawing routines */
        /// Draw a line from point to point
        PainterBase & line(int x1, int y1, int x2, int y2, 
                           LColor::color = LColor::foreground,
@@ -78,13 +77,9 @@ public:
        PainterBase & fillRectangle(int x, int y, int w, int h,
                                    LColor::color = LColor::background);
        
-       /**@Image stuff */
-       
        /// For the figure inset
        PainterBase & pixmap(int x, int y, int w, int h, Pixmap bitmap);
        
-       /**@String functions */
-       
        /// Draw a string at position x, y (y is the baseline)
        PainterBase & text(int x, int y,
                           string const & str, LyXFont const & f);
@@ -104,7 +99,6 @@ private:
        /// Check the font, and if set, draw an underline
        void underline(LyXFont const & f, int x, int y, int width);
        
-       /**@Low level X parameters */
        ///
        Display * display;
 };
index 22f3a0782b0539b5b478962f2815c7c8523b9735..11624821e7a614b82ba3b3d52305255d487b66f0 100644 (file)
@@ -35,7 +35,11 @@ class LyXFont;
 class PainterBase {
 protected:
         ///
-       static int dummy1, dummy2, dummy3;
+       static int dummy1;
+       ///
+       static int dummy2;
+       ///
+       static int dummy3;
 public:
        ///
        enum line_width {
@@ -61,7 +65,7 @@ public:
        ///
        virtual ~PainterBase() {}
 
-       /** Screen geometry */
+       /* Screen geometry */
        ///
        int paperMargin() const;
        ///
@@ -69,7 +73,6 @@ public:
        ///
        int paperHeight() const;
        
-       /**@Basic drawing routines */
        /// Draw a line from point to point
        virtual PainterBase & line(
                int x1, int y1, int x2, int y2, 
@@ -141,16 +144,13 @@ public:
        /// 
         virtual PainterBase & buttonFrame(int x, int y, int w, int h);
        
-       /**@Image stuff */
        
-       /// For the figure inset
+       // For the figure inset
        // This can't be part of the base since we don't know what window
        // system we will be useing, or if are going to use pixmaps at all.
        //virtual PainterBase & pixmap(int x, int y, Pixmap bitmap)=0;
 
        
-       /**@String functions */
-       
        /// Draw a string at position x, y (y is the baseline)
        virtual PainterBase & text(int x, int y,
                                   string const &str, LyXFont const & f) = 0;
@@ -184,6 +184,7 @@ public:
                             int & ascent = PainterBase::dummy2, 
                             int & descent = PainterBase::dummy3);
 protected:
+       ///
        WorkArea & owner;
 };
 
index 2c19c0af7418c4305617ed0b68a5b1facfcc6743..90ce2f9a008eec7926883f324bb4aa3f449e57a5 100644 (file)
 */
 struct PrinterParams {
        ///
-       enum Target{PRINTER, FILE};
+       enum Target{
+               ///
+               PRINTER,
+               ///
+               FILE
+       };
        ///
        Target target;
        ///
        string printer_name;
        ///
        string file_name;
-       ///We allow printing of even pages in a range and so on.
-       enum WhichPages{ALL, ODD, EVEN};
+       /// We allow printing of even pages in a range and so on.
+       enum WhichPages{
+               ///
+               ALL,
+               ///
+               ODD,
+               ///
+               EVEN
+       };
        ///
        WhichPages which_pages;
        /** Print a page range. Both from_page and to_page used to be strings
@@ -63,15 +75,13 @@ struct PrinterParams {
        // The settings below should allow us to print any read-only doc in
        // whatever size/orientation we want it -- overriding the documents
        // settings.
-        /// Override the documents orientation
-       //bool orientation;
-       /// Print n pages per physical sheet
-       //unsigned int nup;
-       /// Override document settings for duplex.
-       //bool duplex;
+        // Override the documents orientation
+       // bool orientation;
+       // Print n pages per physical sheet
+       // unsigned int nup;
+       // Override document settings for duplex.
+       // bool duplex;
 
-       //@name Constructors and Deconstructors
-       //@{
        ///
        PrinterParams(Target const & t = PRINTER,
                      string const & pname = lyxrc.printer,
@@ -108,15 +118,11 @@ struct PrinterParams {
                {
                        testInvariant();
                }
-       //@}
-
 
 // do we need these?
 //     friend bool operator==(PrinterParams const &, PrinterParams const &);
 //     friend bool operator<(PrinterParams const &, PrinterParams const &);
 
-       //@name Invariant Test Method
-       //@{
        /** Test that all the fields contain valid entries.  It's unlikely
            that the internal code will get this wrong (at least for the
            xforms code anyway) however new ports and external scripts
@@ -157,7 +163,6 @@ struct PrinterParams {
                        }
 #endif
                }
-       //@}
 };
 
 #endif
index ca1dd134b0a31efe500a3498da5f96e0fa9678ba..59df9a90d2c3d420f952717b47646c1a8ff3a3e0 100644 (file)
@@ -47,7 +47,6 @@ private:
 
 ///
 class SectioningList {
-public:
 private:
        ///
        typedef std::map<string, Section> List_;
index c65111d45b9474821c9af18dff9286e9a48baf2a..b18aabf3ca7ebebc2abc03fea2e52588538c989e 100644 (file)
@@ -138,6 +138,6 @@ private:
        Cache cache;
 };
 
-// bla bla
+///
 extern TextCache textcache;
 #endif
index d4c538a327d982ff0bcae7b02c27d0ea63587ffe..178aed8d417accb316768b1d750720448be8def5 100644 (file)
@@ -30,7 +30,9 @@ class Timeout {
 public:
        ///
        enum Type {
+               ///
                ONETIME,
+               ///
                CONTINOUS
        };
        ///
index 00f3c9182a10e9874862d9fa88301a7f9591ac3a..2f98e4f1b626768786385274622d10fac16d4d8d 100644 (file)
@@ -74,7 +74,7 @@ private:
        Defaults defaults;
 };
 
-//The global instance
+//The global instance
 extern ToolbarDefaults toolbardefaults;
 
 
index 651b2a033c96c45d7a8e9620e019845083d80bfa..85c85629c1c6d9211bd926ed2e44ff65bd032022 100644 (file)
@@ -30,7 +30,7 @@
 
 class BufferView;
 
-
+///
 class WorkArea {
 public:
        ///
@@ -106,26 +106,26 @@ public:
        BufferView * owner() const { return owner_; }
 
        // Signals
-       ///
-       //Signal0<void> workAreaExpose;
-       ///
-       //Signal3<void, int, int, unsigned int> workAreaButtonPress;
-       ///
-       //Signal3<void, int, int, unsigned int> workAreaButtonRelease;
-       ///
-       //Signal3<void, int, int, unsigned int> workAreaMotionNotify;
-       ///
-       //Signal0<void> workAreaFocus;
-       ///
-       //Signal0<void> workAreaUnfocus;
-       ///
-       //Signal0<void> workAreaEnter;
-       ///
-       //Signal0<void> workAreaLeave;
-       ///
-       //Signal3<void, int, int, unsigned int> workAreaDoubleClick;
-       ///
-       //Signal3<void, int, int, unsigned int> workAreaTripleClick;
+       //
+       // Signal0<void> workAreaExpose;
+       //
+       // Signal3<void, int, int, unsigned int> workAreaButtonPress;
+       //
+       // Signal3<void, int, int, unsigned int> workAreaButtonRelease;
+       //
+       // Signal3<void, int, int, unsigned int> workAreaMotionNotify;
+       //
+       // Signal0<void> workAreaFocus;
+       //
+       // Signal0<void> workAreaUnfocus;
+       //
+       // Signal0<void> workAreaEnter;
+       //
+       // Signal0<void> workAreaLeave;
+       //
+       // Signal3<void, int, int, unsigned int> workAreaDoubleClick;
+       //
+       // Signal3<void, int, int, unsigned int> workAreaTripleClick;
 private:
        ///
        void createPixmap(int, int);
index 598ea56015991c8dd20318aef7555926083617e4..1404bfc90b204e3366ad5d01b32a1e7383dc672d 100644 (file)
@@ -56,27 +56,21 @@ struct DEPCLEAN {
   */
 class Buffer {
 public:
-       /**@name Constructors and destructor */
-       //@{
        ///
        explicit Buffer(string const & file, bool b = false);
        
        ///
        ~Buffer();
-       //@}
-
-       /**@name Methods */
-       //@{
 
        /** save the buffer's parameters as user default
-           This function saves a file user_lyxdir/templates/defaults.lyx 
+           This function saves a file #user_lyxdir/templates/defaults.lyx# 
            which parameters are those of the current buffer. This file
            is used as a default template when creating a new
-           file. Returns true on success.
+           file. Returns #true# on success.
        */
        bool saveParamsAsDefaults();
 
-       /** high-level interface to buffer functionality
+       /** High-level interface to buffer functionality.
            This function parses a command string and executes it
        */
        bool Dispatch(string const & command);
@@ -89,6 +83,7 @@ public:
 
        /// should be changed to work for a list.
        void resize();
+       ///
        void resizeInsets(BufferView *);
 
        /// Update window titles of all users
@@ -98,12 +93,12 @@ public:
        void resetAutosaveTimers() const;
 
        /** Adds the BufferView to the users list.
-           Later this func will insert the BufferView into a real list,
+           Later this func will insert the #BufferView# into a real list,
            not just setting a pointer.
        */
        void addUser(BufferView * u) { users = u; }
 
-       /** Removes the BufferView from the users list.
+       /** Removes the #BufferView# from the users list.
            Since we only can have one at the moment, we just reset it.
        */
        void delUser(BufferView *) { users = 0; }
@@ -119,16 +114,18 @@ public:
        void loadAutoSaveFile();
        
        /** Reads a file. 
-           Returns false if it fails.
-           If par is given, the file is inserted. */
+           @param par if != 0 insert the file.
+           @return #false# if method fails.
+       */
        bool readFile(LyXLex &, LyXParagraph * par = 0);
        
        /** Reads a file without header.
-           Returns false, if file is not completely read.
-           If par is given, the file is inserted. */
+           @param par if != 0 insert the file.
+           @return false if file is not completely read.
+       */
        bool readLyXformat2(LyXLex &, LyXParagraph * par = 0);
 
-       /* This parses a single LyXformat-Token */
+       /// This parses a single LyXformat-Token.
        bool parseSingleLyXformat2Token(LyXLex &, LyXParagraph *& par,
                                        LyXParagraph *& return_par,
                                        string const & token, int & pos,
@@ -139,16 +136,16 @@ public:
 #endif
                );
 private:
-       // Parse a single inset.
+       /// Parse a single inset.
        void readInset(LyXLex &, LyXParagraph *& par, int & pos, LyXFont &);
 public:
        /** Save file
            Takes care of auto-save files and backup file if requested.
-           Returns true if the save is successful, false otherwise.
+           Returns #true# if the save is successful, #false# otherwise.
        */
        bool save() const;
        
-       /// Write file. Returns false if unsuccesful.
+       /// Write file. Returns #false# if unsuccesful.
        bool writeFile(string const &, bool) const;
        
        ///
@@ -158,12 +155,11 @@ public:
        void makeLaTeXFile(string const & filename,
                           string const & original_path,
                           bool nice, bool only_body = false);
-       //
-       // LaTeX all paragraphs from par to endpar,
-       // if endpar == 0 then to the end
-       //
-       void latexParagraphs(std::ostream & os, LyXParagraph *par,
-                            LyXParagraph *endpar, TexRow & texrow) const;
+       /** LaTeX all paragraphs from par to endpar.
+           @param endpar if == 0 then to the end
+       */
+       void latexParagraphs(std::ostream & os, LyXParagraph * par,
+                            LyXParagraph * endpar, TexRow & texrow) const;
 
        ///
        int runLaTeX();
@@ -249,7 +245,8 @@ public:
        string const & fileName() const { return filename; }
 
        /** A transformed version of the file name, adequate for LaTeX  
-           The path is stripped if no_path is true (default) */
+           The path is stripped if no_path is true (default)
+       */
        string getLatexName(bool no_path = true) const;
 
        /// Change name of buffer. Updates "read-only" flag.
@@ -264,16 +261,16 @@ public:
        /// Set buffer read-only flag
        void setReadonly(bool flag = true);
 
-       /// returns true if the buffer contains a LaTeX document
+       /// returns #true# if the buffer contains a LaTeX document
        bool isLatex() const;
-       /// returns true if the buffer contains a LinuxDoc document
+       /// returns #true# if the buffer contains a LinuxDoc document
        bool isLinuxDoc() const;
-       /// returns true if the buffer contains a DocBook document
+       /// returns #true# if the buffer contains a DocBook document
        bool isDocBook() const;
-       /** returns true if the buffer contains either a LinuxDoc
+       /** returns #true# if the buffer contains either a LinuxDoc
            or DocBook document */
        bool isSGML() const;
-        /// returns true if the buffer contains a Wed document
+        /// returns #true# if the buffer contains a Wed document
         bool isLiterate() const;
 
        ///
@@ -281,7 +278,7 @@ public:
 
        /** Validate a buffer for LaTeX.
            This validates the buffer, and returns a struct for use by
-           makeLaTeX and others. Its main use is to figure out what
+           #makeLaTeX# and others. Its main use is to figure out what
            commands and packages need to be included in the LaTeX file.
            It (should) also check that the needed constructs are there
            (i.e. that the \refs points to coresponding \labels). It
@@ -296,8 +293,11 @@ public:
        std::vector<std::pair<string,string> > getBibkeyList();
        ///
        struct TocItem {
+               ///
                LyXParagraph * par;
+               ///
                int depth;
+               ///
                string str;
        };
        ///
@@ -325,8 +325,6 @@ public:
        ///
        bool isMultiLingual();
 
-        //@}
-
        /// Does this mean that this is buffer local?
         UndoStack undostack;
        
@@ -406,7 +404,7 @@ private:
        /// is this a unnamed file (New...)
        bool unnamed;
 
-       /// is regenerating .tex necessary
+       /// is regenerating #.tex# necessary
        DEPCLEAN * dep_clean;
 
        /// buffer is r/o
@@ -422,19 +420,25 @@ private:
            Why not keep a list of the BufferViews that use this buffer?
 
            At least then we don't have to do a lot of magic like:
-           buffer->lyx_gui->bufferview->updateLayoutChoice. Just ask each
-           of the buffers in the list of users to do a updateLayoutChoice.
+           #buffer->lyx_gui->bufferview->updateLayoutChoice#. Just ask each
+           of the buffers in the list of users to do a #updateLayoutChoice#.
        */
        BufferView * users;
 
 public:
+       ///
        class inset_iterator {
        public:
+               ///
                inset_iterator() : par(0) /*, it(0)*/ {}
+               //
                inset_iterator(LyXParagraph * paragraph) : par(paragraph) {
                        SetParagraph();
                }
-               inset_iterator(LyXParagraph * paragraph, LyXParagraph::size_type pos);
+               ///
+               inset_iterator(LyXParagraph * paragraph,
+                              LyXParagraph::size_type pos);
+               ///
                inset_iterator & operator++() {
                        if (par) {
                                ++it;
@@ -445,23 +449,26 @@ public:
                        }
                        return *this;
                }
+               ///
                Inset * operator*() {return *it; }
+               ///
                LyXParagraph * getPar() { return par; }
+               ///
                LyXParagraph::size_type getPos() {return it.getPos(); }
+               ///
                friend
                bool operator==(inset_iterator const & iter1,
-                               inset_iterator const & iter2) {
-                       return iter1.par == iter2.par
-                               && (iter1.par == 0 || iter1.it == iter2.it);
-               }
+                               inset_iterator const & iter2);
+               ///
                friend
                bool operator!=(inset_iterator const & iter1,
-                               inset_iterator const & iter2) {
-                       return !(iter1 == iter2);
-               }
+                               inset_iterator const & iter2);
        private:
+               ///
                void SetParagraph();
+               ///
                LyXParagraph * par;
+               ///
                LyXParagraph::inset_iterator it;
        };
 
@@ -482,6 +489,7 @@ void Buffer::setParentName(string const & name)
        params.parentname = name;    
 }
 
+///
 inline
 bool operator==(Buffer::TocItem const & a, Buffer::TocItem const & b) {
        return a.par == b.par && a.str == b.str;
@@ -489,10 +497,26 @@ bool operator==(Buffer::TocItem const & a, Buffer::TocItem const & b) {
 }
 
 
+///
 inline
 bool operator!=(Buffer::TocItem const & a, Buffer::TocItem const & b) {
        return !(a == b);
        // No need to compare depth.
 }
 
+///
+inline
+bool operator==(Buffer::inset_iterator const & iter1,
+               Buffer::inset_iterator const & iter2) {
+       return iter1.par == iter2.par
+               && (iter1.par == 0 || iter1.it == iter2.it);
+}
+
+///
+inline
+bool operator!=(Buffer::inset_iterator const & iter1,
+               Buffer::inset_iterator const & iter2) {
+       return !(iter1 == iter2);
+}
 #endif
+
index f5155b370eb3a5262f56c6de0765a5979f4de5fd..e397611607dfccd75c462e91a2cdf5c1e8f50512 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "buffer.h"
 #include "debug.h"
+#include "support/utility.hpp"
 
 /** A class to hold all the buffers in a structure
   The point of this class is to hide from bufferlist what kind
@@ -29,7 +30,7 @@
   This class should ideally be enclosed inside class BufferList, but that
   gave me an "internal gcc error".
   */
-class BufferStorage {
+class BufferStorage : public noncopyable {
 public:
        ///
        typedef std::vector<Buffer *> Container;
@@ -63,12 +64,9 @@ private:
 };
 
 
-/** The class governing all the open buffers
-  This class governs all the currently open buffers. Currently all the buffer
-  are located in a static array, soon this will change and we will have a
-  linked list instead.
+/** The class govern all open buffers.
  */
-class BufferList {
+class BufferList : public noncopyable {
 public:
        ///
        BufferList();
@@ -121,10 +119,11 @@ public:
        ///
        void emergencyWriteAll();
 
-       /** closes buffer
-         Returns false if operation was canceled
+       /** Close buffer.
+           @param buf the buffer that should be closed
+           @return #false# if operation was canceled
          */
-       bool close(Buffer *);
+       bool close(Buffer * buf);
 
        ///
        Buffer * first();
index 72d601b508ed44675a431ea0adbe3aad39b9063e..70d147c242e17a7cf60171597eef49d09a3e7ff9 100644 (file)
 #include "layout.h"
 #include "support/block.h"
 
-/**
-  This class contains all the parameters for this a buffer uses. Some
-  work needs to be done on this class to make it nice. Now everything
-  is in public.
-  */
 
 struct Language;
 
+/** Buffer parameters.
+   This class contains all the parameters for this a buffer uses. Some
+   work needs to be done on this class to make it nice. Now everything
+   is in public.
+*/
 class BufferParams {
 public:
        ///
@@ -104,11 +104,8 @@ public:
                ///
                ORIENTATION_LANDSCAPE
        };
-       //@Man: Constructors and Deconstructors
-       //@{
        ///
        BufferParams();
-       //@}
 
        ///
        void writeFile(std::ostream &) const;
@@ -136,12 +133,12 @@ public:
        LyXTextClassList::size_type textclass;
 
        /* this are for the PaperLayout */
-       ///
-       char papersize; /* the general papersize (papersize2 or paperpackage */ // add approp. signedness
-        ///
-        char papersize2; /* the selected Geometry papersize */ // add approp. signedness
-        ///
-        char paperpackage; /* a special paperpackage .sty-file */ // add approp. signedness
+       /// the general papersize (papersize2 or paperpackage
+       char papersize; // add apprip. signedness 
+        ///  the selected Geometry papersize
+        char papersize2; // add approp. signedness
+        /// a special paperpackage .sty-file
+        char paperpackage; // add approp. signedness
         ///
        PAPER_ORIENTATION orientation; // add approp. signedness
        ///
@@ -212,7 +209,8 @@ private:
        ///
        friend class Buffer;
        /** This is the amount of space used for paragraph_separation "skip",
-         and for detached paragraphs in "indented" documents. */
+         and for detached paragraphs in "indented" documents.
+       */
        VSpace defskip;
 };
 
index 70974c8f062bc9ebf6f730abc3ed7ef2ccb64c61..8668797a7422fad430600b5f303c6a0c11c66527 100644 (file)
@@ -56,7 +56,8 @@ public:
        ~Combox();
 
        /** To add this object to a form. Note that there are two heights
-        for normal (button) and expanded (browser) mode each. */
+        for normal (button) and expanded (browser) mode each.
+       */
        void add(int x, int y, int w, int hmin, int hmax);
        
        /// Add lines. Same as for fl_browser object
@@ -85,7 +86,8 @@ public:
        void remove();
 
        /**  Assign a callback to this object. The callback should be a void
-        function with a int and a void pointer as parameters. */
+        function with a int and a void pointer as parameters.
+       */
        void setcallback(FL_COMBO_CB, void *);
    
         ///  Pre handler
index 5b4d66174988dee58b3a7f442c788ea11079a610..eb37f642ade3cae1c14029b2dec0cac0477cf0c6 100644 (file)
 #include "LString.h"
 #include "lyxrc.h"
 
+///
 typedef unsigned short int Uchar;
 
+///
 class Encoding {
 public:
        ///
        enum Letter_Form {
+               ///
                FORM_ISOLATED,
+               ///
                FORM_FINAL,
+               ///
                FORM_INITIAL,
+               ///
                FORM_MEDIAL
        };
        ///
@@ -60,16 +66,25 @@ private:
        Uchar const * encoding_table;
 };
 
-
+///
 extern Encoding iso8859_1;
+///
 extern Encoding iso8859_2;
+///
 extern Encoding iso8859_3;
+///
 extern Encoding iso8859_4;
+///
 extern Encoding iso8859_6;
+///
 extern Encoding iso8859_7;
+///
 extern Encoding iso8859_9;
+///
 extern Encoding cp1255;
+///
 extern Encoding koi8;
+///
 extern Encoding symbol_encoding;
 
 #endif
index 43b8660f82e122e4f8f2a1883763236a7b04fe72..75ff15f698f622c53114167e11d77d3f27bbf907 100644 (file)
 #include "form1.h"
 
 /// LyXDirEntry internal structure definition
-class LyXDirEntry
-{
+class LyXDirEntry {
 public:
+       ///
        string pszName;
+       ///
        string pszDisplayed;
+       ///
        string pszLsEntry;
 };
 
index 89f04fa99d85e30cd93447afe037bc2e50de05e5..98f0013f52498f0ae6822c0e69ef69e4f0aad2da 100644 (file)
@@ -24,58 +24,58 @@ class LyXFont;
 
 //namespace lyx {
 //namespace font {
-
+///
 struct lyxfont {
-
+       ///
        static
        int maxAscent(LyXFont const & f);
-
+       ///
        static
        int maxDescent(LyXFont const & f);
-
+       ///
        static
        int ascent(char c, LyXFont const & f);
-
+       ///
        static
        int descent(char c, LyXFont const & f);
-
+       ///
        static
        int lbearing(char c, LyXFont const & f);
-
+       ///
        static
        int rbearing(char c, LyXFont const & f);
-
+       ///
        static
        int width(char c, LyXFont const & f) {
                return width(&c, 1, f);
        }
-
+       ///
        static
        int width(char const * s, int n, LyXFont const & f);
-
+       ///
        static
        int width(string const & s, LyXFont const & f) {
                if (s.empty()) return 0;
                return width(s.c_str(), s.length(), f);
        }
-
+       ///
        static
        int width(char const * s, LyXFont const & f) {
                return width(s, strlen(s), f);
        }
-
+       ///
        static
        int signedWidth(string const & s, LyXFont const & f);
-
+       ///
        static
        int XTextWidth(LyXFont const & f, char * str, int count);
-
+       ///
        static
        int width(XChar2b const * s, int n, LyXFont const & f);
-
+       ///
        static
        int XTextWidth16(LyXFont const & f, XChar2b * str, int count);
-
+       ///
        static
        void XSetFont(Display * display, GC gc, LyXFont const & f);
 };
index f110645d3e4773ccce32df30ebde4e0abcb9a3c2..f25f738f1fb67b9108348e941f2114df67e92cb6 100644 (file)
@@ -24,6 +24,8 @@
 #ifdef SIGC_CXX_NAMESPACES
 using SigC::Connection;
 using SigC::slot;
+using SigC::Object;
+
 #endif
 
 
@@ -33,13 +35,7 @@ using SigC::slot;
     satisfy that request.  Thus a dialog will have to "pull" the necessary
     details from the core of the program.
  */
-#ifdef SIGC_CXX_NAMESPACES
-///
-class DialogBase : public SigC::Object
-#else
-///
 class DialogBase : public Object
-#endif
 {
 public:
        /**@name Constructors and Deconstructors */
@@ -60,8 +56,11 @@ public:
 
        ///
        enum EnumDialogStatus {
+               ///
                DIALOG_UNMODIFIED,
+               ///
                DIALOG_MODIFIED,
+               ///
                DIALOG_READONLY
        };
 };
index 2fab06fc6820d8d8b7f9c305df2490faf8927a36..2b2adbcadab00e2819ad46211f5d796a76199ce5 100644 (file)
@@ -34,14 +34,14 @@ class PrinterParams;
 class Buffer;
 
 /** Temporary namespace to hold the various frontend functions
* until XTL and the compilers of the world are ready for something more
* elaborate. This is basically the Communicator class from the lyx cvs module
* all over again.
- *
* Eventually, we will switch back to the XTL+LyXFunc combination that
* worked so nicely on a very small number of compilers and systems.
* See the "dialogbase" branch of lyx-devel cvs module for xtl implementation.
- */
   until XTL and the compilers of the world are ready for something more
   elaborate. This is basically the Communicator class from the lyx cvs module
   all over again.
+    
   Eventually, we will switch back to the XTL+LyXFunc combination that
   worked so nicely on a very small number of compilers and systems.
   See the "dialogbase" branch of lyx-devel cvs module for xtl implementation.
+*/
 #ifdef CXX_WORKING_NAMESPACES
 namespace Liason
 {
index 4d24b4deca03277fa58c3201c8e3c1d4e7cb0ad5..c343cb44e95073a731f821793cbf2f6e99791bac 100644 (file)
@@ -42,8 +42,10 @@ public:
        //with compaq cxx. (Jean-Marc)
        // Is this a new comment? (Lgb)
        struct Pimpl;
+       ///
        friend struct Pimpl;
 private:
+       ///
        Pimpl * pimpl_;
 };
 #endif
index 121f3cecc1dff7a64feefc37355e992f887d5ddc..513ba45f4268e1b633ed0a9ceb4f321225a44064 100644 (file)
@@ -64,7 +64,9 @@ public:
 
 private:
        struct Pimpl;
+       ///
        friend struct Toolbar::Pimpl;
+       ///
        Pimpl * pimpl_;
 };
 #endif
index 6d807f7c0fb841f92d3ed38af4d065108732481f..a21b48d51c51af27136c4c2c205abc1a69f65d53 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "DialogBase.h"
 #include <gnome--/about.h>
+#include "support/utility.hpp"
 
 class Dialogs;
 // same arguement as in Dialogs.h s/LyX/UI/
@@ -23,31 +24,20 @@ class LyXView;
 
 /** This class provides an GTK-- implementation of the FormCopyright Dialog.
  */
-class FormCopyright : public DialogBase {
+class FormCopyright : public DialogBase, public noncopyable {
 public:
-       /**@name Constructors and Destructors */
-       //@{
        /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
        FormCopyright(LyXView *, Dialogs *);
        ///
        ~FormCopyright();
-       //@}
-
 private:
-       FormCopyright() {}
-       FormCopyright(FormCopyright &) : DialogBase() {}
-       
-       /**@name Slot Methods */
-       //@{
        /// Create the dialog if necessary, update it and display it.
        void show();
        /// Hide the dialog.
        void hide();
        /// Not used but we've got to implement it.
        void update() {}
-       //@}
 
-       //@{
        /// Real GUI implementation.
         Gnome::About * dialog_;
        /** Which LyXFunc do we use?
@@ -63,7 +53,6 @@ private:
        Connection h_;
        /// Destroy connection.
        Connection destroy_;
-       //@}
 };
 
 #endif
index 4952433fbdd1e6c726aca65801284dbf8e1afdd3..359fa0822ba302be4d2748a765bba1ed1d57c7f1 100644 (file)
 
 #include "DialogBase.h"
 
-/**
-  *@author Jürgen Vigna
-  */
 
 class Dialogs;
 class LyXFunc;
 class FormCopyrightDialog;
 
+/**
+  @author Jürgen Vigna
+  */
 class FormCopyright : public DialogBase  {
 public: 
        FormCopyright(LyXFunc *, Dialogs *);
        ~FormCopyright();
 
 private: 
-       /**@name Slot Methods */
-       //@{
        /// Create the dialog if necessary, update it and display it.
        void show();
        /// Hide the dialog.
        void hide();
        /// Not used but we've got to implement it.
        void update() {}
-       //@}
 
-       /**@name Private Data */
-       //@{
        /// Real GUI implementation.
        FormCopyrightDialog * dialog_;
        /** Which LyXFunc do we use?
@@ -59,7 +54,6 @@ private:
        Dialogs * d_;
        /// Hide connection.
        SigC::Connection h_;
-       //@}
 };
 
 #endif
index a5ea17fdb6ea5330bf87cb2fd2c54b9270445234..d7c02e76632bbe65c00858f7e9dd083a5c8a4b11 100644 (file)
@@ -32,23 +32,21 @@ public:
        /// Constructor
        FormCommand(LyXView *, Dialogs *, string const & );
 
-       /**@name Real per-instance Callback Methods */
-       //@{
+       ///
        static  int WMHideCB(FL_FORM *, void *);
+       ///
        static void OKCB(FL_OBJECT *, long);
+       ///
        static void ApplyCB(FL_OBJECT *, long);
+       ///
        static void CancelCB(FL_OBJECT *, long);
+       ///
        static void InputCB(FL_OBJECT *, long);
-       //@}
-
 protected:
-       /**@name Slot Methods */
-       //@{
        /// Slot launching dialog to (possibly) create a new inset
        void createInset( string const & );
        /// Slot launching dialog to an existing inset
        void showInset( InsetCommand * const );
-       //@}
 
        /// Build the dialog
        virtual void build() = 0;
@@ -65,8 +63,6 @@ protected:
        /// Pointer to the actual instantiation of the xform's form
        virtual FL_FORM * const form() const = 0;
 
-       /**@name Protected Data */
-       //@{
        /** Which LyXFunc do we use?
            We could modify Dialogs to have a visible LyXFunc* instead and
            save a couple of bytes per dialog.
@@ -80,17 +76,12 @@ protected:
        InsetCommand * inset_;
        /// the nitty-griity. What is modified and passed back
        InsetCommandParams params;
-       //@}
-
 private:
        /// Create the dialog if necessary, update it and display it.
        void show();
        /// Hide the dialog.
        void hide();
 
-
-       /**@name Private Data */
-       //@{
        /// Update connection.
        Connection u_;
        /// Hide connection.
@@ -101,7 +92,6 @@ private:
        bool dialogIsOpen;
        /// dialog title, displayed by WM.
        string title;
-       //@}
 };
 
 #endif
index dffdafd21d05710f62e870ec2e5cc181133df4f5..c2181599e6d4c3a1cd89980ee447db9096181af3 100644 (file)
@@ -34,30 +34,22 @@ struct FD_form_copyright;
  */
 class FormCopyright : public DialogBase, public noncopyable {
 public:
-       /**@name Constructors and Destructors */
-       //@{
        /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
        FormCopyright(LyXView *, Dialogs *);
        ///
        ~FormCopyright();
-       //@}
 
-       /**@name Real per-instance Callback Methods */
-       //@{
+       ///
        static  int WMHideCB(FL_FORM *, void *);
+       ///
        static void OKCB(FL_OBJECT *, long);
-       //@}
-
 private:
-       /**@name Slot Methods */
-       //@{
        /// Create the dialog if necessary, update it and display it.
        void show();
        /// Hide the dialog.
        void hide();
        /// Not used but we've got to implement it.
        void update() {}
-       //@}
 
        /// Build the dialog
        void build();
@@ -66,8 +58,6 @@ private:
        /// Explicitly free the dialog.
        void free();
 
-       /**@name Private Data */
-       //@{
        /// Real GUI implementation.
        FD_form_copyright * dialog_;
        /** Which LyXFunc do we use?
@@ -81,7 +71,6 @@ private:
        Dialogs * d_;
        /// Hide connection.
        Connection h_;
-       //@}
 };
 
 #endif
index b2642cc129c4093feb4f575a6c26d1df19da7fc7..6375e4c69f869a2a66bd393dc0c532969e254c61 100644 (file)
@@ -39,74 +39,85 @@ struct FD_form_graphics;
  */
 class FormGraphics: public DialogBase {
 public:
-       /**@name Constructors and Destructors */
-       //@{
        /// #FormGraphics x(LyXFunc ..., Dialogs ...);#
        FormGraphics(LyXView *, Dialogs *);
        ///
        ~FormGraphics();
-       //@}
-
-       /**@name Real per-instance Callback Methods */
-       //@{
+       ///
        static  int WMHideCB(FL_FORM *, void *);
+       ///
        static void OKCB(FL_OBJECT *, long);
-    static void ApplyCB(FL_OBJECT *, long);
-    static void CancelCB(FL_OBJECT *, long);
-    static void BrowseCB(FL_OBJECT *, long);
-    static void AdvancedOptionsCB(FL_OBJECT *, long);
-    static void InputCB(FL_OBJECT *, long);
-       //@}
+       ///
+       static void ApplyCB(FL_OBJECT *, long);
+       ///
+       static void CancelCB(FL_OBJECT *, long);
+       ///
+       static void BrowseCB(FL_OBJECT *, long);
+       ///
+       static void AdvancedOptionsCB(FL_OBJECT *, long);
+       ///
+       static void InputCB(FL_OBJECT *, long);
 
 private:
-       FormGraphics() : widthButtons(5), heightButtons(4), displayButtons(4) {}
-       FormGraphics(FormGraphics &) : DialogBase() {}
+       ///
+       FormGraphics()
+               : widthButtons(5), heightButtons(4), displayButtons(4) {}
+       //
+       FormGraphics(FormGraphics const &) : DialogBase() {}
        
-    /**@name Define enum constants */
-    //@{ 
-    /// The maximum digits for the image width (cm, inch, percent)
-    enum { WIDTH_MAXDIGITS = 3 }; 
-    /// The maximum digits for the image height (cm, inch, percent)
-    enum { HEIGHT_MAXDIGITS = 3 };
-    /// The maximum characters in the rotation angle (minus sign and 3 digits)
-    enum { ROTATE_MAXCHARS = 4 };
-    /// The maximum characters in a filename.
-    enum { FILENAME_MAXCHARS = 1024 };
-    //@}
-
+       /// The maximum digits for the image width (cm, inch, percent)
+       enum {
+               ///
+               WIDTH_MAXDIGITS = 3
+       }; 
+       /// The maximum digits for the image height (cm, inch, percent)
+       enum {
+               ///
+               HEIGHT_MAXDIGITS = 3
+       };
+       /// The maximum characters in the rotation angle (minus sign and 3 digits)
+       enum {
+               ///
+               ROTATE_MAXCHARS = 4
+       };
+       /// The maximum characters in a filename.
+       enum {
+               ///
+               FILENAME_MAXCHARS = 1024
+       };
     
        /**@name Slot Methods */
        //@{
        /// Save the active inset and show the dialog.
        void showDialog(InsetGraphics * inset);
        /// Create the dialog if necessary, update it and display it.
-    void show();
+       void show();
        /// Hide the dialog.
        void hide();
        /// Update the dialog
        void update();
        //@}
 
-    /**@name Callback methods */
-    //@{
-    /// Apply the changes to the inset.
-    void apply();
-    /// Verify that the input is correct. If not disable ok/apply buttons.
-    void input();
-    /// Open the file browse dialog to select an image file.
-    void browse();
-       /// Build the dialog
+       /**@name Callback methods */
+       //@{
+       /// Apply the changes to the inset.
+       void apply();
+       /// Verify that the input is correct. If not disable ok/apply buttons.
+       void input();
+       /// Open the file browse dialog to select an image file.
+       void browse();
        //@}
        
-    void build();
+       /// Build the dialog
+       void build();
        ///
        FD_form_graphics * build_graphics();
        /// Explicitly free the dialog.
        void free();
-    /// Display a file browser dialog and return the file chosen.
-    string browseFile(string const & filename);
+       /// Display a file browser dialog and return the file chosen.
+       string browseFile(string const & filename);
 
-       /**@name Private Data */
+       /**@name Data */
        //@{
        /// Real GUI implementation.
        FD_form_graphics * dialog_;
@@ -119,23 +130,25 @@ private:
            Used so we can get at the signals we have to connect to.
        */
        Dialogs * d_;
-    /** Which Inset do we belong to?
-     *  Used to set and update data to/from the inset.
-     */
-    InsetGraphics * inset_;
-    /// The radio buttons groups
-    RadioButtonGroup widthButtons;
-    RadioButtonGroup heightButtons;
-    RadioButtonGroup displayButtons;
+       /** Which Inset do we belong to?
+          Used to set and update data to/from the inset.
+       */
+       InsetGraphics * inset_;
+       /// The radio buttons groups
+       RadioButtonGroup widthButtons;
+       ///
+       RadioButtonGroup heightButtons;
+       ///
+       RadioButtonGroup displayButtons;
 
-    /// Inset Hide connection, connected to the calling inset hide signal.
-    Connection ih_;
+       /// Inset Hide connection, connected to the calling inset hide signal.
+       Connection ih_;
        /// Hide connection.
        Connection h_;
-    /// Update connection.
-    Connection u_;
-    /// Last used figure path
-    string last_image_path;
+       /// Update connection.
+       Connection u_;
+       /// Last used figure path
+       string last_image_path;
        //@}
 
 };
index db7e61e226faeef01880ae966c120fb89fc24a57..a8908d1a2ee535f7cedc043fb2739ecc05e1de7a 100644 (file)
 #  define gettext_init() { bindtextdomain (PACKAGE, lyx_localedir.c_str()); \
        textdomain (PACKAGE); }
 #else
+///
 #  define _(str) (str)
+///
 #  define N_(str) (str)
+///
 #  define locale_init()
+///
 #  define gettext_init()
 #endif
 
index d64df5f5d321193930dcc2b9c1fb2ab5433721d7..eba3413b190de1726d686409e88f9b82eb2f25f5 100644 (file)
 
 #include "LString.h"
 #include "GraphicsCacheItem.h"
+#include "support/utility.hpp"
 
 /** GraphicsCache is the manager of the image cache, it is responsible to
* create the GraphicsCacheItem's and maintain them.
- *
* GraphicsCache is a singleton class, there should be only one instance of
* it at any moment.
- */
-class GraphicsCache {
   create the GraphicsCacheItem's and maintain them.
+    
   GraphicsCache is a singleton class, there should be only one instance of
   it at any moment.
+*/
+class GraphicsCache : public noncopyable {
 public:
     /// Get the instance of the class.
     static GraphicsCache * getInstance();
@@ -47,8 +48,9 @@ private:
 
     /// Holder of the single instance of the class.
     static GraphicsCache * singleton;
-
+    ///
     typedef std::map<string, GraphicsCacheItem *> CacheType;
+    ///
     CacheType cache;
 };
 #endif
index e139fbffc46a4d24387dbfc728878aab066efc9b..49aaa28de928f294b323fb98384beedbae5237d3 100644 (file)
@@ -22,7 +22,7 @@ public:
 private:
     ///
     GraphicsCacheItem() {}
-    //
+    ///
     friend class GraphicsCache;
 };
 
index b9b0ae749a9cafecbd8964c2399cc20b1007220b..a0dfcbd7f9a5d79ef14c38ef116130ee4717dac2 100644 (file)
 #include <iosfwd>
 #include <map>
 #include "LString.h"
+#include "support/utility.hpp"
 
 class LyXLex;
 
+///
 struct ExternalTemplate {
        /// What is the name of this template in the LyX format?
        string lyxName;
@@ -52,12 +54,13 @@ struct ExternalTemplate {
                /// This constructor has to default a command for safety reasons!
                FormatTemplate();
        };
+       ///
        void readTemplate(LyXLex &);
-       
+       ///
        typedef std::map<string, FormatTemplate> Formats;
-
+       ///
        Formats formats;
-
+       ///
        void dumpFormats(std::ostream &) const;
        
        /// We have to have default commands for safety reasons!
@@ -67,9 +70,9 @@ struct ExternalTemplate {
 
 
 /**
* A singleton class that manages the external inset templates
- */
-class ExternalTemplateManager {
  A singleton class that manages the external inset templates
+*/
+class ExternalTemplateManager : public noncopyable {
 public:
        /// Map from the LyX name of the template to the template structure
        typedef std::map<string, ExternalTemplate> Templates;
index 4fb9df7d97976414054f37331e1c64e5ba033a18..bc040acd22daa6bd4ef6c0738782dfff38ec49c3 100644 (file)
@@ -77,8 +77,10 @@ private:
 };
 
 
+///
 class InsetCommand : public InsetButton, public noncopyable {
 public:
+       ///
        explicit
        InsetCommand(InsetCommandParams const &);
        ///
index e85036ceaba903745c6f95838c81fe06fd185008..8432bfcd1a80e685a1794457701dfbf147f80a6b 100644 (file)
@@ -28,8 +28,7 @@ class TransManager;
   classes. Probably should the gui class just have a pointer to the non
   gui class.
   */
-class Intl
-{
+class Intl {
 public:
        ///
        Intl();
index 68f87abd9d28b4275c0986bf20b4dde55ddbfa4e..0fe01ff608e47c46b6ad2ef0d8550378ebdd6230 100644 (file)
@@ -27,7 +27,8 @@ public:
        ///
        Language() : RightToLeft_(false) {}
        ///
-       Language(string const & l, string const & d, bool rtl, Encoding const * e)
+       Language(string const & l, string const & d,
+                bool rtl, Encoding const * e)
                : lang_(l), display_(d), RightToLeft_(rtl) , encoding_(e) {}
        ///
        string const & lang() const {
@@ -57,6 +58,7 @@ private:
 };
 
 #if 0
+///
 bool operator==(Language const & l1, Language const & l2) 
 {
        return l1.lang == l2.lang
@@ -65,17 +67,20 @@ bool operator==(Language const & l1, Language const & l2)
                && l1.encoding_ == l2.encoding_;
 }
 
-
+///
 bool operator!=(Language const l1, Language const & l2)
 {
        return !(l1 == l2);
 
 }
 #endif
-
+///
 typedef std::map<string, Language> Languages;
+///
 extern Languages languages;
+///
 extern Language const * default_language;
+///
 extern Language const *ignore_language;
 
 #endif
index 8f095fac1c50df1847eacf1196872dc91ca54862..6e9bd81fab5d701a1d3810957ac25089c63774eb 100644 (file)
 #include <deque>
 
 #include "LString.h"
+#include "support/utility.hpp"
 
-/** The latest documents loaded
+/** The latest documents loaded.
     This class takes care of the last .lyx files used by the LyX user. It
     both reads and writes this information to a file. The number of files
     kept are user defined, but defaults to four.
+    @author Lars Gullik Bjønnes
 */
-class LastFiles {
+class LastFiles : public noncopyable {
 public:
        ///
        typedef std::deque<string> Files;
@@ -33,26 +35,22 @@ public:
        ///
        typedef Files::const_iterator const_iterator;
        
-       /**@name Constructors and Deconstructors */
-       //@{
-       /**
-          Parameters are: name of file to read. Whether LastFiles should
-          check for file existance, and the number of files to remember.
+       /** Read the lastfiles file.
+          @param file The file to read the lastfiles form.
+          @param dostat Whether to check for file existance.
+          @param num number of files to remember.
        */
        explicit
-       LastFiles(string const &,
+       LastFiles(string const & file,
                  bool dostat = true, unsigned int num = 4);
-       //@}
        
-       /**@name Methods */
-       //@{
        /**
           This funtion inserts #file# into the last files list. If the file
           already exist it is moved to the top of the list, else exist it
           is placed on the top of the list. If the list is full the last
           file in the list is popped from the end.
        */
-       void newFile(string const &);
+       void newFile(string const & file);
        /**  Writes the lastfiles table to disk. One file on each line, this
             way we can at least have some special chars (e.g. space), but
             newline in filenames are thus not allowed.
@@ -64,14 +62,16 @@ public:
        Files::const_iterator begin() const { return files.begin(); }
        ///
        Files::const_iterator end() const { return files.end(); }
-       //@}
 private:
-       /**@name const variables */
-       //@{
-       enum {
-               ///
+       /** Local constants.
+           It is more portable among different C++ compilers to use
+           an enum instead of #int const XXX#
+       */
+       enum local_constants {
+               /// Default number of lastfiles.
                DEFAULTFILES = 4,
-               /** There is no point in keeping more than this number
+               /** Max number of lastfiles.
+                   There is no point in keeping more than this number
                    of files at the same time. However perhaps someday
                    someone finds use for more files and wants to
                    change it. Please do. But don't show the files in
@@ -79,21 +79,16 @@ private:
                */
                ABSOLUTEMAXLASTFILES = 20
        };
-       //@}
        
-       /**@name Variables */
-       //@{
        /// a list of lastfiles
        Files files;
        /// number of files in the lastfiles list.
        unsigned int num_files;
        /// check for file existance or not.
        bool dostat;
-       //@}
        
-       /**@name Methods */
-       //@{
-       /** reads the .lyx_lastfiles at the beginning of the LyX session.
+       /** Read the lastfiles file.
+           Reads the .lyx_lastfiles at the beginning of the LyX session.
            This will read the lastfiles file (usually .lyx_lastfiles). It
            will normally discard files that don't exist anymore, unless
            LastFiles has been initialized with dostat = false. 
@@ -101,6 +96,5 @@ private:
        void readFile(string const &);
        /// used by the constructor to set the number of stored last files.
         void setNumberOfFiles(unsigned int num);
-       //@}
 };
 #endif
index 641aad24c5506a7ace3b23ebaec2dda24474a55d..2eb47cef59451c2a9d71c161199504fc47df2180 100644 (file)
 #include "lyxlex.h"
 #include "lyxfont.h"
 #include "Spacing.h"
+#include "support/utility.hpp"
 
 /// Reads the style files
 extern void LyXSetStyle();
 
 ///
-enum { // no good name for this
+enum no_good_name_for_this {
        ///
         LYX_ENVIRONMENT_DEFAULT = 97,
        ///
@@ -85,7 +86,7 @@ enum LyXAlignment {
         LYX_ALIGN_SPECIAL = 32
 };
 
-
+///
 inline
 void operator|=(LyXAlignment & la1, LyXAlignment la2) {
        la1 = static_cast<LyXAlignment>(la1 | la2);
@@ -145,6 +146,7 @@ enum LYX_LABEL_TYPES {
        LABEL_COUNTER_ENUMIV
 };
 
+///
 enum LYX_END_LABEL_TYPES {
        ///
        END_LABEL_NO_LABEL,
@@ -180,7 +182,7 @@ enum LYX_END_LABEL_TYPES {
  */ 
 
 
-/// Attributes of a layout/paragraph environment
+// Attributes of a layout/paragraph environment
 class LyXTextClass;
 
 ///
@@ -191,21 +193,37 @@ public:
 
        ///
        bool Read (LyXLex &, LyXTextClass const &);
+       ///
        void readAlign(LyXLex &);
+       ///
        void readAlignPossible(LyXLex &);
+       ///
        void readLabelType(LyXLex &);
+       ///
        void readEndLabelType(LyXLex &);
+       ///
        void readMargin(LyXLex &);
+       ///
        void readLatexType(LyXLex &);
+       ///
        void readSpacing(LyXLex &);
+       ///
        string const & name() const { return name_; }
+       ///
        void name(string const & n) { name_ = n; }
+       ///
        string const & obsoleted_by() const { return obsoleted_by_; }
+       ///
        string const & latexname() const { return latexname_; }
+       ///
        string const & labelstring() const { return labelstring_; }
+       ///
        string const & endlabelstring() const { return endlabelstring_; }
+       ///
        string const & preamble() const { return preamble_; }
+       ///
        string const & latexparam() const { return latexparam_; }
+       ///
        string const & labelstring_appendix() const {
                return labelstring_appendix_;
        }
@@ -303,8 +321,8 @@ public:
 
        ///
        bool free_spacing;
-       /// true when the fragile commands in the paragraph need to be
-       /// \protect'ed.
+       /** true when the fragile commands in the paragraph need to be
+           \protect'ed. */
        bool needprotect;
        /// true when empty paragraphs should be kept.
        bool keepempty;
@@ -378,8 +396,11 @@ public:
        
        ///
        bool Read(string const & filename, bool merge = false);
+       ///
        void readOutputType(LyXLex &);
+       ///
        void readMaxCounter(LyXLex &);
+       ///
        void readClassOptions(LyXLex &);
        ///
        bool hasLayout(string const & name) const;
@@ -412,18 +433,25 @@ public:
 
        /// Packages that are already loaded by the class
        enum Provides {
+               ///
                nothing = 0,
+               ///
                amsmath = 1,
+               ///
                makeidx = 2,
+               ///
                url = 4
        };
+       ///
        bool provides(Provides p) const { return provides_ & p; }
        
        ///
        unsigned int columns() const { return columns_; }
        ///
        enum PageSides {
+               ///
                OneSide,
+               ///
                TwoSides
        };
        ///
@@ -506,7 +534,7 @@ private:
        bool loaded;
 };
 
-
+///
 inline
 void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2)
 {
@@ -519,7 +547,7 @@ std::ostream & operator<<(std::ostream & os, LyXTextClass::PageSides p);
 
 
 ///
-class LyXTextClassList {
+class LyXTextClassList : public noncopyable {
 public:
        ///
        typedef std::vector<LyXTextClass> ClassList;
@@ -580,7 +608,7 @@ private:
        void Add (LyXTextClass const &);
 };
 
-/// Should not be declared here!! (Lgb) Why not? (Asger)
+/// 
 extern LyXTextClassList textclasslist;
  
 #endif
index e0fcb07b7ad16c5ee769df04dce962ca79f08e9d..d15e788e18fd440a6be38e5fd61716c2071874cc 100644 (file)
@@ -6,11 +6,14 @@ class BufferParams;
 
 ///
 extern bool quitting;
+///
 extern bool toggleall;
 
 // When still false after reading lyxrc, warn user
 //about failing \bind_file command. RVDK_PATCH_5
+///
 extern bool BindFileSet;
+///
 extern LyXFont UserFreeFont(BufferParams const & params);
 
 #endif
index 55968e63423fd6c3b913ff9ae1a59768cfeb7df3..17dedf9edfff9364e543fb412fb4f269943d8539 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef LYX_GUI_H
 #define LYX_GUI_H
 
+#include "support/utility.hpp"
+
 #ifdef __GNUG__
 #pragma interface
 #endif
@@ -21,71 +23,49 @@ class LyX;
 class Buffer;
 
 /**
-  This class is going to be the entry point to {\em all} GUI funcionality.
-  From this object will all the things going on be initiated. However I
-  have not clearly figured out how this class is going to be, suggestions
-  are welcome. (Lgb)
-  */
-class LyXGUI {
+   This class is going to be the entry point to {\em all} GUI funcionality.
+   From this object will all the things going on be initiated. However I
+   have not clearly figured out how this class is going to be, suggestions
+   are welcome. (Lgb)
+*/
+class LyXGUI : public noncopyable {
 public:
-       /**@name Constructor */
-       //@{
-       
-       /** The only constructor allowed
-
-         If gui is false, LyX will operate in non-X mode
-         */
-       LyXGUI(LyX *owner, int *argc, char *argv[], bool gui);
+       /** The only constructor allowed.
+           If gui is false, LyX will operate in non-X mode
+       */
+       LyXGUI(LyX * owner, int * argc, char * argv[], bool gui);
        ///
        ~LyXGUI();
-       //@}
        
-       /**@name Members */
-       //@{
        /**
-         This functions starts the ball. For XForms it runs a loop of
-         fl_check_forms(). For QT this will probably be .exec().
-         */
+          This functions starts the ball. For XForms it runs a loop of
+          fl_check_forms(). For QT this will probably be .exec().
+       */
        void runTime();
        /** This will take care of the initializaton done after the
-         main initialization.
-         */
+           main initialization.
+       */
        void init();
-
+       
        /// Register the buffer with the first found LyXView in lyxViews
-       void regBuf(Buffer*);
-
+       void regBuf(Buffer *);
+       
        /// Access to (first?) LyXView
        LyXView * getLyXView() const;
        
-       //@}
 private:
-       /**@name Construcor */
-       //@{
-       /// not allowed
-       LyXGUI(); // don't allow this
-       /// not allowed
-       LyXGUI(const LyXGUI&); // nor this
-       //@}
-       
-       /**@name Members */
-       //@{
        ///
        void setDefaults();
        ///
        void create_forms();
-       //@}
-
-       /**@name Variables */
-       //@{
+       
        /// The LyX that owns this GUI.
-       LyX *_owner;
+       LyX * _owner;
        ///
-       LyXView *lyxViews; // or something so that several views
+       LyXView * lyxViews; // or something so that several views
        // on the same time can be allowed.
        /// Do we have a gui?
        bool gui;
-       //@}
 };
 
 #endif
index 0c399bd876ef4fd074d64a0e2e23962c76748b5b..7ce10aa5a42bd83e760bbe1f3c09ead87850a512 100644 (file)
@@ -34,14 +34,15 @@ void CloseAllBufferRelatedDialogs();
 void updateAllVisibleBufferRelatedDialogs();
 
 /* These shortcut extractors should be shifted to frontends/xforms/ eventually */
+
 /// Extract shortcut from <ident>|<shortcut> string
 char const * flyx_shortcut_extract(char const * sc);
-/// Make a shortnamed version of the above func
+/// Shortcut for flyx_shortcut_extract
 #define scex flyx_shortcut_extract
 
 /// Extract shortcut from <ident>|<shortcut> string
 char const * flyx_ident_extract(char const * sc);
-/// Make a shortnamed versjon of the above func
+/// Shortcut for flyx_ident_extract
 #define idex flyx_ident_extract
 
 /// Show message
@@ -70,8 +71,7 @@ void WarnReadonly(string const & file);
 /// Get the dpi setting of the current screen
 float getScreenDPI();
 
-// inlined functions
-// rings the audio bell.
+/// rings the audio bell.
 inline
 void LyXBell() {
        // if (audio()) ON/OFF switch yet to be implemented
index c68c87185db0a8f09006adfd826bfff6ca8f3351..0ba6779ef7b787acbbba6e761e8aa6a55edb7d4f 100644 (file)
@@ -30,10 +30,13 @@ class LastFiles;
 class Buffer;
 class kb_keymap;
 
+///
 extern string system_lyxdir;
+///
 extern string user_lyxdir;
+///
 extern string system_tempdir;
-
+///
 extern LastFiles * lastfiles; /* we should hopefully be able to move this
                              * inside the LyX class */
 
@@ -43,29 +46,18 @@ extern LastFiles * lastfiles; /* we should hopefully be able to move this
 */
 class LyX : public noncopyable {
 public:
-       /**@name Constructors and Deconstructors */
-       //@{
        /// the only allowed constructor
        LyX(int * argc, char * argv[]); // constructor
-       // Always is useful a destructor
+       /// Always is useful a destructor
        ~LyX();
-       //@}
 
-       /**@name Pointers to... */
-       //@{
        ///
        LyXGUI * lyxGUI;  // should be only one of this
-       //@}
 private:
-       /**@name Private variables */
-       //@{
        /// does this user start lyx for the first time?
        bool first_start;
        ///
        string batch_command;
-       //@}
-       /**@name Private Members */
-       //@{
        ///
        void runtime();
        ///
@@ -84,7 +76,6 @@ private:
        void ReadUIFile(string const & name);
         ///
        bool easyParse(int * argc, char * argv[]);
-       //@}
 };
 
 #endif
index 56def33a5de92d2332b0f50da2d75601bf674ac1..9166d19121265f615d4667c9ec0aa6da1e714461 100644 (file)
 // another object. I'll let some others have a look now... (Lgb)
 
 // include this always
+///
 extern string const lyx_def;
+///
 extern string const lyxline_def;
+///
 extern string const noun_def;
+///
 extern string const lyxarrow_def;
+///
 extern string const quotedblbase_def;
+///
 extern string const quotesinglbase_def;
+///
 extern string const guillemotleft_def;
+///
 extern string const guillemotright_def;
+///
 extern string const guilsinglleft_def;
+///
 extern string const guilsinglright_def;
+///
 extern string const paragraphindent_def;
+///
 extern string const floatingfootnote_def;
+///
 extern string const minipageindent_def;
+///
 extern string const boldsymbol_def;
+///
 extern string const binom_def;
 
 #endif
index 9137f48d4e4cc9ba2848c263ae34f22eed6e5d2a..60ad1e0bfbe4386b2fc85d2dd55c3fc1703c4f4a 100644 (file)
@@ -73,7 +73,7 @@ private:
        Row * row_;
 };
 
-
+///
 inline
 bool operator==(LyXCursor const & a, LyXCursor const & b)
 {
@@ -82,7 +82,7 @@ bool operator==(LyXCursor const & a, LyXCursor const & b)
                && a.boundary() == b.boundary();
 }
 
-
+///
 inline
 bool operator!=(LyXCursor const & a, LyXCursor const & b)
 {
index 62e5da13f22ad8c3c589acdfa23533cc17cd60f0..4123fa35134fd464350c8a7b17ef41ffefdda06c 100644 (file)
@@ -155,7 +155,7 @@ public:
        ///
        LyXFont();
 
-       /// LyXFont x(LyXFont ...) and LyXFont x = LyXFont ...
+       // LyXFont x(LyXFont ...) and LyXFont x = LyXFont ...
        LyXFont(LyXFont const & x);
  
        /// Shortcut initialization
@@ -264,16 +264,15 @@ public:
        /// Returns size of font in LaTeX text notation
        string latexSize() const;
  
-       /** Updates font settings according to request. If an
-           attribute is IGNORE, the attribute is left as it is. */
-       /* 
-        * When toggleall = true, all properties that matches the font in use
-        * will have the effect that the properties is reset to the
-        * default.  If we have a text that is TYPEWRITER_FAMILY, and is
-        * update()'ed with TYPEWRITER_FAMILY, the operation will be as if
-        * a INHERIT_FAMILY was asked for.  This is necessary for the
-        * toggle-user-defined-style button on the toolbar.
-        */
+       /** Updates font settings according to request.
+           If an attribute is IGNORE, the attribute is left as it is.
+           When toggleall = true, all properties that matches the font in use
+           will have the effect that the properties is reset to the
+           default.  If we have a text that is TYPEWRITER_FAMILY, and is
+           update()'ed with TYPEWRITER_FAMILY, the operation will be as if
+           a INHERIT_FAMILY was asked for.  This is necessary for the
+           toggle-user-defined-style button on the toolbar.
+       */
        void update(LyXFont const & newfont, 
                    Language const * default_lang,
                    bool toggleall = false);
@@ -317,16 +316,11 @@ public:
 
        ///
        friend
-       bool operator==(LyXFont const & font1, LyXFont const & font2) {
-               return font1.bits == font2.bits &&
-                       font1.lang == font2.lang;
-       }
+       bool operator==(LyXFont const & font1, LyXFont const & font2);
 
        ///
        friend 
-       bool operator!=(LyXFont const & font1, LyXFont const & font2) {
-               return !(font1 == font2);
-       }
+       bool operator!=(LyXFont const & font1, LyXFont const & font2);
 
        /// compares two fonts, ignoring the setting of the Latex part.
        bool equalExceptLatex(LyXFont const &) const;
@@ -378,9 +372,22 @@ private:
                                         LyXFont::FONT_MISC_STATE org);
 };
 
-
+///
 std::ostream & operator<<(std::ostream &, LyXFont::FONT_MISC_STATE);
 
+///
+inline
+bool operator==(LyXFont const & font1, LyXFont const & font2) {
+       return font1.bits == font2.bits &&
+               font1.lang == font2.lang;
+}
+
+///
+inline
+bool operator!=(LyXFont const & font1, LyXFont const & font2) {
+       return !(font1 == font2);
+}
+
 
 inline
 LyXFont::LyXFont()
@@ -420,6 +427,8 @@ LyXFont::LyXFont(LyXFont::FONT_INIT3)
        bits = sane;
        lang = default_language;
 }
+
+
 inline
 LyXFont::LyXFont(LyXFont::FONT_INIT1, Language const * l)
 {
index d3ddfc93bdba59ca876451225f6d5a5d7cc30355..bf549062dbec6bd5fccd81c058e1ec637e89056d 100644 (file)
@@ -33,7 +33,6 @@ class LyXFindReplace;
   - regex searches (I'm working on that -- dnaber, 1999-02-24)
 
 */
-
 class SearchForm {
 public:
        ///
index edfbfdb3c258583df41b6447bb342de32d93e97d..872854ac20281de03e63137011fa39d808a81937 100644 (file)
 
 class LyXText;
 
-/**
-  LyXFindReplace"
-
-  This class implements Find & Replace in LyXText texts. It is based on
-  LyXFindReplace0, which implements the form related stuff. (see lyxfr0.h)
-  */
+/** Find and replace in LyXText texts.
+   
+   This class implements Find & Replace in LyXText texts. It is based on
+   LyXFindReplace0, which implements the form related stuff. (see lyxfr0.h)
+*/
 class LyXFindReplace {
 public:
        ///
index 6913a51df25459db3061cf8f0fd0b679fbc21988..ec0685a265b850ba2411f1f066db3e51caf3d55b 100644 (file)
@@ -24,10 +24,15 @@ class LyXFunc {
 public:
        /// The status of a function.
        enum func_status {
-               OK = 0, // No problem
+               /// No problem
+               OK = 0,
+               ///
                Unknown = 1,
-               Disabled = 2, // Command cannot be executed
+               /// Command cannot be executed
+               Disabled = 2,
+               ///
                ToggleOn = 4,
+               ///
                ToggleOff = 8
        };
        ///
@@ -44,7 +49,7 @@ public:
        bool Dispatch(int action, auto_mem_buffer &);
 
        /// A keyboard event is processed to execute a lyx action. 
-       int  processKeyEvent(XEvent * ev);
+       int processKeyEvent(XEvent * ev);
 
        ///
        func_status getStatus(int ac) const;
@@ -115,6 +120,7 @@ private:
 
        ///
        void doImport(string const &);
+       ///
        void doImportHelper(string const &, string const &, string const &,
                bool func(BufferView *, string const &) );
 
@@ -172,7 +178,7 @@ void LyXFunc::setHintMessage(bool hm)
        show_sc = hm;
 }
 
-
+///
 inline
 void operator|=(LyXFunc::func_status & fs, LyXFunc::func_status f)
 {
index 42714c3af0dd4d056e28bb8ce9eb05c293b6de6f..9825fc962ed05e7b574e2327d2e91c27f78ff756 100644 (file)
@@ -24,11 +24,10 @@ struct keyword_item {
        short code;
 };
 
-/*@Doc:
-  Generalized simple lexical analizer.
-  It can be used for simple syntax parsers, like lyxrc,
-  texclass and others to come.
-  See lyxrc.C for an example of usage.
+/** Generalized simple lexical analizer.
+    It can be used for simple syntax parsers, like lyxrc,
+    texclass and others to come.
+    @see lyxrc.C for an example of usage.
   */
 class LyXLex : public noncopyable { 
 public:
@@ -64,13 +63,14 @@ public:
        int lex();
 
        /** Just read athe next word. If esc is true remember that
-         some chars might be escaped: "\ atleast */
+           some chars might be escaped: "\ atleast
+       */
        bool next(bool esc = false);
 
        /** Read next token. This one is almost the same as next,
-         but it will consider " as a regular character and always
-         split a word if it contains a backslash.
-         */
+           but it will consider " as a regular character and always
+           split a word if it contains a backslash.
+       */
        bool nextToken();
        /// Push a token, that next token got from lyxlex.
        void pushToken(string const &);
@@ -87,14 +87,13 @@ public:
        ///
        string const GetString() const;
        
-       /**
-        * Get a long string, ended by the tag `endtag'
-        * This string can span several lines. The first line
-        * serves as a template for how many spaces the lines
-        * are indented. This much white space is skipped from
-        * each following line. This mechanism does not work
-        * perfectly if you use tabs.
-        */
+       /** Get a long string, ended by the tag `endtag'.
+           This string can span several lines. The first line
+           serves as a template for how many spaces the lines
+           are indented. This much white space is skipped from
+           each following line. This mechanism does not work
+           perfectly if you use tabs.
+       */
        string const getLongString(string const & endtag);
        
        ///
@@ -110,31 +109,35 @@ public:
        /** Pushes a token list on a stack and replaces it with a new one.
         */
        void pushTable(keyword_item *, int);
-
+       
        /** Pops a token list into void and replaces it with the one now
-         on top of the stack.
-         */
+           on top of the stack.
+       */
        void popTable();
 
        /** Prints an error message with the corresponding line number
-         and file name. If message contains the substring `$$Token',
-         it is replaced with the value of GetString()
-         */
+           and file name. If message contains the substring `$$Token',
+           it is replaced with the value of GetString()
+       */
        void printError(string const & message) const;
 
        /**
-         Prints the current token table on the supplied ostream.
-         */
+          Prints the current token table on the supplied ostream.
+       */
        void printTable(std::ostream &);
 private:
        struct Pimpl;
+       ///
        Pimpl * pimpl_;
 };
 
 
-// This is needed to ensure that the pop is done upon exit from methods
-// with more than one exit point or that can return as a response to
-// exceptions. (Lgb)
+/** Use to enable multipe exit points.
+    This is needed to ensure that the pop is done upon exit from methods
+    with more than one exit point or that can return as a response to
+    exceptions.
+    @autor Lgb
+*/
 struct pushpophelper {
        pushpophelper(LyXLex & lexrc, keyword_item * i, int s) : lex(lexrc) {
                lex.pushTable(i, s);
@@ -144,10 +147,11 @@ struct pushpophelper {
        }
        LyXLex & lex;
 };
-// To avoid wrong usage:
-// pushpophelper(...); // wrong
-// pushpophelper pph(...); // right
-// we add this macro:
+/** Avoid wrong usage of pushpophelper.
+    To avoid wrong usage:
+    pushpophelper(...); // wrong
+    pushpophelper pph(...); // right
+*/
 #define pushpophelper(x, y, z) unnamed_pushpophelper;
 // Tip gotten from Bobby Schmidt's column in C/C++ Users Journal
 
index 5ed0e2e203dd23dfb2c03b561883b7c6ac89ccac..a2495b199310ddee33e46b7a08d756aa0cff88de 100644 (file)
 
 #include <X11/Xlib.h>
 
-// Initialize the compose key handling
+/// Initialize the compose key handling
 extern void InitLyXLookup(Display *, Window ) ;
 
-// Read a keysym and/or a string (like XLookupString)
+/// Read a keysym and/or a string (like XLookupString)
 extern int LyXLookupString(XEvent * event,    
                           char * buffer_return, int bytes_buffer,
                           KeySym * keysym_return);
 
-// Call this when you destroy your window
+/// Call this when you destroy your window
 extern void CloseLyXLookup();
index dcccb3cd75cfe95bb681f7c517e0eda1898238a9..31589a68bf8391c4bae81b45d9be048a6c97602a 100644 (file)
@@ -89,7 +89,7 @@ public:
 #endif
                ///
                META_NEWLINE,
-               ///
+               //
                //META_PROTECTED_SEPARATOR,
                ///
                META_INSET
@@ -220,6 +220,7 @@ public:
        void SetInsetOwner(Inset * i);
        ///
        void deleteInsetsLyXText(BufferView *);
+       ///
        void resizeInsetsLyXText(BufferView *);
 private:
        ///
@@ -267,8 +268,6 @@ public:
        /// footnote, margin, fig, tab
        footnote_kind footnotekind;
 #endif
-       //@Man: the LyX- DTP-switches
-       //@{
        ///
        bool line_top;
        
@@ -296,7 +295,9 @@ private:
 public:
        ///
        void setCounter(int i, int v) { counter_[i] = v; }
+       ///
        int getCounter(int i) const { return counter_[i]; }
+       ///
        void incCounter(int i) { counter_[i]++; }
        ///
        bool start_of_appendix;
@@ -329,7 +330,6 @@ public:
        
        ///
        string labelwidthstring;
-       //@}
        
        ///
        LyXParagraph * next;
@@ -423,12 +423,12 @@ public:
        LyXFont GetFirstFontSettings() const;
 
        /** Get fully instantiated font. If pos == -1, use the layout
-         font attached to this paragraph.
-         If pos == -2, use the label font of the layout attached here.
-         In all cases, the font is instantiated, i.e. does not have any
-         attributes with values LyXFont::INHERIT, LyXFont::IGNORE or 
-         LyXFont::TOGGLE.
-         */
+           font attached to this paragraph.
+           If pos == -2, use the label font of the layout attached here.
+           In all cases, the font is instantiated, i.e. does not have any
+           attributes with values LyXFont::INHERIT, LyXFont::IGNORE or 
+           LyXFont::TOGGLE.
+       */
        LyXFont getFont(BufferParams const &, size_type pos) const;
        ///
        value_type GetChar(size_type pos) const;
@@ -523,11 +523,11 @@ public:
 
 #ifndef NEW_INSETS
        /** A paragraph following a footnote is a "dummy". A paragraph
-         with a footnote in it is stored as three paragraphs:
-         First a paragraph with the text up to the footnote, then
-         one (or more) paragraphs with the footnote, and finally
-         the a paragraph with the text after the footnote. Only the
-         first paragraph keeps information  about layoutparameters, */
+           with a footnote in it is stored as three paragraphs:
+           First a paragraph with the text up to the footnote, then
+           one (or more) paragraphs with the footnote, and finally
+           the a paragraph with the text after the footnote. Only the
+           first paragraph keeps information  about layoutparameters, */
        bool IsDummy() const;
 #endif
         /* If I set a PExtra Indent on one paragraph of a ENV_LIST-TYPE
@@ -598,6 +598,7 @@ private:
                ///
                FontTable(size_type p, LyXFont const & f) {pos = p; font = f;}
        };
+       ///
        friend struct matchFT;
        ///
        struct matchFT {
@@ -662,23 +663,32 @@ private:
        ///
        static unsigned int paragraph_id;
 public:
+       ///
        class inset_iterator {
        public:
+               ///
                inset_iterator() {}
+               //
                inset_iterator(InsetList::iterator const & iter) : it(iter) {};
+               ///
                inset_iterator & operator++() {
                        ++it;
                        return *this;
                }
+               ///
                Inset * operator*() { return (*it).inset; }
+               ///
                size_type getPos() {return (*it).pos; }
+               ///
                bool operator==(inset_iterator const & iter) const {
                        return it == iter.it;
                }
+               ///
                bool operator!=(inset_iterator const & iter) const {
                        return it != iter.it;
                }
        private:
+               ///
                InsetList::iterator it;
        };
        ///
index 4844a92efe601b909f5c2e2c50a20d382a39ea59..79a08efd84bfc155a5a71183418a6cbddd4ae058 100644 (file)
 #endif
 
 #include "bufferparams.h"
+#include "support/utility.hpp"
 
 /// This contains the runtime configuration of LyX
-class LyXRC {
+class LyXRC : public noncopyable {
 public:
+       ///
        LyXRC();
        ///
        void setDefaults();
@@ -92,10 +94,13 @@ public:
        string dvi_to_ps_command;
         /// program for performing literate programming
         string literate_command;
+       ///
         string literate_extension;
+       ///
         string literate_error_filter;
         /// program for compiling
         string build_command;
+       ///
         string build_error_filter;
        /// program for running relyx
        string relyx_command;
@@ -163,11 +168,16 @@ public:
        string popup_font_name;
        ///
        string font_norm;
+       ///
        enum FontEncoding {
+               ///
                ISO_10646_1,
+               ///
                ISO_8859_6_8,
+               ///
                OTHER_ENCODING
        };
+       ///
        FontEncoding font_norm_type;
        ///
        void set_font_norm_type();
@@ -251,6 +261,7 @@ public:
        string docbook_to_pdf_command;
 };
 
+///
 extern LyXRC lyxrc;
 
 #endif
index 26e695533f3bdff053cb6a42300f9cf6e75d4b42..89e8cb01f143cdcdbad755a38502285a5888eebb 100644 (file)
 #include <X11/Xlib.h>
 
 class LyXText;
+class WorkArea;
+class Buffer;
+
 struct Row;
+
+///
 typedef unsigned short Dimension;
 
-class WorkArea;
-class Buffer;
 
 /** The class LyXScreen is used for the main Textbody.
     Concretely, the screen is held in a pixmap.  This pixmap is kept up to
@@ -33,7 +36,7 @@ class Buffer;
  */
 class LyXScreen {
 public:
-
+       ///
        enum Cursor_Shape {
                ///
                BAR_SHAPE,
@@ -44,7 +47,7 @@ public:
        };
 
        ///
-       LyXScreen(WorkArea &); //, LyXText * text_ptr);
+       LyXScreen(WorkArea &);
 
        /** Draws the screen form textposition y. Uses as much of
            the already printed pixmap as possible */
@@ -64,7 +67,8 @@ public:
        ///
        void CursorToggle(LyXText const *);
        ///
-       void ShowManualCursor(LyXText const *, long x, long y, int asc, int desc,
+       void ShowManualCursor(LyXText const *, long x, long y,
+                             int asc, int desc,
                              Cursor_Shape shape);
        /// returns 1 if first has changed, otherwise 0
        bool FitManualCursor(LyXText *, long, long, int, int);
index 800f93eb3bf81b5f6b82ecae5b29053fc8cdd3c1..9390f5e23d012e17a03c3b31e1a183222b0f3ce3 100644 (file)
@@ -29,8 +29,7 @@ class LyXServer;
  This class encapsulates all the dirty communication and thus provides
  a clean string interface.
  */
-class LyXComm
-{
+class LyXComm {
 public:
        /** When we receive a message, we send it to a client.
          This is one of the small things that would have been a lot
@@ -40,8 +39,7 @@ public:
 
        /// Construct with pipe-basename and callback to receive messages
        LyXComm(string const & pip, LyXServer * cli, ClientCallbackfct ccb = 0)
-               : pipename(pip), client(cli), clientcb(ccb)
-       {
+               : pipename(pip), client(cli), clientcb(ccb) {
                ready = false;
                openConnection();
        }
@@ -85,22 +83,22 @@ private:
 
 
 /* --- prototypes -------------------------------------------------------- */
-class LyXServer
-{
+///
+class LyXServer {
 public:
        // FIXME IN 0.13
        // Hack! This should be changed in 0.13
 
-       /// The lyx server should not take an argument "LyXFunc" but this is
+       // The lyx server should not take an argument "LyXFunc" but this is
        // how it will be done for 0.12. In 0.13 we must write a non-gui
        // bufferview.
         // IMO lyxserver is atypical, and for the moment the only one, non-gui
         // bufferview. We just have to find a way to handle situations like if
         // lyxserver is using a buffer that is being edited with a bufferview.
         // With a common buffer list this is not a problem, maybe. (Alejandro)
+       ///
        LyXServer(LyXFunc * f, string const & pip)
-               : numclients(0), func(f), pipes(pip, (this), callback)
-       { }
+               : numclients(0), func(f), pipes(pip, (this), callback) {}
         /// 
        ~LyXServer();
        ///
@@ -109,8 +107,13 @@ private:
        ///
        static void callback(LyXServer *, string const & msg);
        /// Names and number of current clients
-       enum { MAX_CLIENTS = 10 };
+       enum {
+               ///
+               MAX_CLIENTS = 10
+       };
+       ///
        string clients[MAX_CLIENTS];
+       ///
        int numclients;
        ///
        LyXFunc * func;
index 1a0d5c4cfaf785c6829b047b3bd2575489a5fa4d..1afc30597cf4b93a6d44d8735042bc105cd0ea29 100644 (file)
@@ -48,6 +48,7 @@ public:
 
        /// Constructor
        LyXText(BufferView *);
+       ///
        LyXText(InsetText *);
    
        /// Destructor
@@ -58,6 +59,7 @@ public:
        mutable int number_of_rows;
        ///
        mutable long height;
+       ///
        mutable unsigned int width;
        /// the current font settings
        mutable LyXFont current_font;
@@ -182,7 +184,8 @@ public:
        /** returns the column near the specified x-coordinate of the row 
         x is set to the real beginning of this column
         */ 
-       int GetColumnNearX(BufferView *, Row * row, int & x, bool & boundary) const;
+       int GetColumnNearX(BufferView *, Row * row,
+                          int & x, bool & boundary) const;
        
        /** returns a pointer to a specified row. y is set to the beginning
         of the row
@@ -247,7 +250,7 @@ public:
                       LyXParagraph::size_type pos,
                       bool setfont = true,
                       bool boundary = false) const;
-
+       ///
        void SetCursor(BufferView *, LyXCursor &, LyXParagraph * par,
                       LyXParagraph::size_type pos,
                       bool boundary = false) const;
@@ -269,6 +272,7 @@ public:
 
        ///
        void SetCursorFromCoordinates(BufferView *, int x, long y) const;
+       ///
        void SetCursorFromCoordinates(BufferView *, LyXCursor &,
                                      int x, long y) const;
        ///
@@ -313,10 +317,13 @@ public:
        void DeleteLineForward(BufferView *);
        ///
        bool SelectWordWhenUnderCursor(BufferView *);
-
+       ///
        enum TextCase {
+               ///
                text_lowercase = 0,
+               ///
                text_capitalization = 1,
+               ///
                text_uppercase = 2
        };
        /// Change the case of the word at cursor position.
@@ -385,6 +392,7 @@ public:
                          LyXAlignment align, 
                          string labelwidthstring,
                          bool noindent);
+       ///
        void SetParagraphExtraOpt(BufferView *, int type,
                                  char const * width,
                                  char const * widthp,
@@ -412,6 +420,7 @@ public:
        /** if the string can be found: return true and set the cursor to
          the new position */
        bool SearchForward(BufferView *, char const * str) const;
+       ///
        bool SearchBackward(BufferView *, char const * str) const;
 
        /// needed to insert the selection
@@ -522,7 +531,7 @@ public:
                else
                        return vis2log_list[pos-bidi_start];
        }
-
+       ///
        inline
        int bidi_level(LyXParagraph::size_type pos) const {
                if (bidi_start == -1)
@@ -530,7 +539,7 @@ public:
                else
                        return bidi_levels[pos-bidi_start];
        }       
-
+       ///
        inline
        bool bidi_InRange(LyXParagraph::size_type pos) const {
                return bidi_start == -1 ||
@@ -544,14 +553,14 @@ private:
        ///
        mutable Row * lastrow;
 
-       /** Copybuffer for copy environment type
+       /** Copybuffer for copy environment type.
          Asger has learned that this should be a buffer-property instead
          Lgb has learned that 'char' is a lousy type for non-characters
          */
        LyXTextClass::size_type copylayouttype;
 
        /** inserts a new row behind the specified row, increments
-        * the touched counters */
+           the touched counters */
        void InsertRow(Row * row, LyXParagraph * par,
                       LyXParagraph::size_type pos) const;
        /** removes the row and reset the touched counters */
@@ -561,7 +570,8 @@ private:
        void RemoveParagraph(Row * row) const;
 
        /** insert the specified paragraph behind the specified row */
-       void InsertParagraph(BufferView *, LyXParagraph * par, Row * row) const;
+       void InsertParagraph(BufferView *,
+                            LyXParagraph * par, Row * row) const;
 
        /** appends  the implizit specified paragraph behind the specified row,
         * start at the implizit given position */
@@ -684,13 +694,12 @@ private:
 
        ///
        void charInserted();
-       ///
-       /// special owner functions
+       //
+       // special owner functions
        ///
        LyXParagraph * OwnerParagraph() const;
-       ///
+       //
        LyXParagraph * OwnerParagraph(LyXParagraph *) const;
-       ///
 };
 
 #endif
index 706a5639f1a713fe7f0b9f1fa8c9ac3697fd9f0b..8f3272f699923a642ae4a46605fc9117cab7eefe 100644 (file)
@@ -91,7 +91,6 @@ public:
        static void logClose(FL_OBJECT *, long);
        ///
        static void logUpdate(FL_OBJECT *, long);
-protected:
 private:
        ///
        Buffer * owner_;
index 32e50c865089933964498888b324dacb9fc40d88..4683fc13acd5f3ccbb7117757e3318983b0d735a 100644 (file)
 #define byte unsigned char
 #endif
 
-/*@Doc: A resizable array
-  Why is it called "LyXArrayBase" if it is generic? (Lgb)
-  Initially I thought it could be the base class for both mathed's
-  and LyX' kernels data buffer. (Ale)
+/** A resizable array.
+    A general purpose resizable array.
+    @author Alejandro Aguilar Sierra
+    @version January 1996
   */
 class LyxArrayBase  {
 public:
index a53709a1ebd6c3369282488b819d6b612921cb26..bebf604dafddadf50199ebf0953b803004ef3767 100644 (file)
@@ -142,6 +142,7 @@ enum MathedTextCodes  {
        LM_TC_MAX
 };
 
+///
 std::ostream & operator<<(std::ostream &, MathedTextCodes mtc);
 
 ///
@@ -383,11 +384,11 @@ class MathParInset: public MathedInset  {
 //    virtual void SetLabel(char const *) {}
     ///
     virtual void SetStyle(short);
-       ///
+    ///
     virtual MathedRowSt * getRowSt() const { return 0; }
-       ///
+    ///
     virtual void setRowSt(MathedRowSt *) {}
-       ///
+    ///
     virtual bool Permit(short f) { return bool(f & flag); }
     
  protected:
@@ -416,7 +417,7 @@ class MathParInset: public MathedInset  {
 };
 
 
-/* The physical structure of a row and aditional information is stored here.
+/** The physical structure of a row and aditional information is stored here.
     It allows to manage the extra info independently of the paragraph data.  
     Only used for multiline paragraphs.
  */
@@ -554,70 +555,70 @@ int MathedLookupBOP(short);
 
 /************************ Inline functions ********************************/
 
+///
 inline
 bool MathIsInset(short x)
 {
        return LM_TC_INSET <= x && x <= LM_TC_ACTIVE_INSET;
 }
 
-
+///
 inline
 bool MathIsFont(short x)
 {
        return LM_TC_CONST <= x && x <= LM_TC_BSYM;
 }
 
-
+///
 inline
 bool MathIsAlphaFont(short x)
 {
        return LM_TC_VAR <= x && x <= LM_TC_TEXTRM;
 }
 
-
+///
 inline
 bool MathIsActive(short x)
 {
        return LM_TC_INSET < x && x <= LM_TC_ACTIVE_INSET;
 }
 
-
+///
 inline
 bool MathIsUp(short x)
 {
        return x == LM_TC_UP;
 }
 
-
+///
 inline
 bool MathIsDown(short x)
 {
        return x == LM_TC_DOWN;
 }
 
-
+///
 inline
 bool MathIsScript(short x)
 {
        return x == LM_TC_DOWN || x == LM_TC_UP;
 }
 
-
+///
 inline
 bool MathIsBOPS(short x)
 {
        return MathedLookupBOP(x) > LMB_NONE;
 }
 
-
-
+///
 inline
 bool MathIsBinary(short x)
 {
     return x == LM_TC_BOP || x == LM_TC_BOPS;
 }
 
-
+///
 inline
 bool MathIsSymbol(short x) {
     return LM_TC_SYMB <= x && x <= LM_TC_BSYM;
@@ -631,6 +632,7 @@ MathedInset::MathedInset(char const * nm, short ot, short st):
    width = ascent = descent = 0;
 }
 
+
 inline
 bool MathParInset::Inside(int x, int y) 
 {
index effa8200ccb94521081d7740d4a6bfe865b03fb6..dd4b1cb98286f7a0b9b242f9a203796b97a10c3c 100644 (file)
 
 ///
 enum mathIterFlags {
-       /// Allow newlines
+    /// Allow newlines
     MthIF_CR = 1,
     /// Allow tabs
     MthIF_Tabs = 2
 };
 
 
-/**
- Specialized array iterator for amth paragraph.  Used for
- storing and querying data operations
- */
+/** Specialized array iterator for math paragraph.
+    Used for storing and querying data operations
+*/
 class MathedIter {
  public:
     ///
-    MathedIter()
-    {
+    MathedIter() {
        pos = 0;
        fcode = 0;
        array = 0;
@@ -54,11 +52,11 @@ class MathedIter {
     explicit
     MathedIter(LyxArrayBase *);
     ///
-    virtual ~MathedIter() { }
+    virtual ~MathedIter() {}
     ///
     bool goNextCode(MathedTextCodes);
     ///
-   void goPosRel(int);
+    void goPosRel(int);
     ///
     void goPosAbs(int);
     ///
@@ -139,14 +137,15 @@ class MathedIter {
     LyxArrayBase *array;
     // one element stack
     struct MIState {
-           ///
+       ///
        short fcode;
-           ///
+       ///
        int x, y;
-           ///
+       ///
        int pos, row, col;
-    } stck;
-    
+    };
+    ///
+    MIState stck;
     /// Saves the current state of the iterator
     virtual void ipush();
     /// Recover previous state
@@ -166,13 +165,16 @@ class MathedIter {
 class MathedXIter: public MathedIter {
  public:
     ///
-    MathedXIter() : MathedIter(), sx(0), sw(0) { x = y = size = 0;  p = 0; crow = 0; }
-    ///
-    MathedXIter(MathParInset*);
+    MathedXIter()
+           : MathedIter(), sx(0), sw(0) {
+           x = y = size = 0;  p = 0; crow = 0;
+    }
+    //
+    MathedXIter(MathParInset *);
     ///
     void SetData(MathParInset *);
     ///
-    MathParInset *getPar() { return p; }
+    MathParInset * getPar() { return p; }
     ///
     bool Next();
     ///
@@ -191,12 +193,12 @@ class MathedXIter: public MathedIter {
     void Adjust();
     ///
     inline
-    void GetPos(int&, int&);
+    void GetPos(int &, int &);
     ///
     inline
-    void GetIncPos(int&, int&);
+    void GetIncPos(int &, int &);
     ///
-    byte* GetString(int&);
+    byte * GetString(int &);
     ///
     int GetX();
     ///
@@ -206,22 +208,19 @@ class MathedXIter: public MathedIter {
     ///
     void fitCoord(int, int);
     /// 
-    void getAD(int& a, int& d);
+    void getAD(int & a, int & d);
     
     /// Create a new row and insert #ncols# tabs.
     void addRow();
-       ///
-       void delRow();
+    ///
+    void delRow();
     
-       /**$ These two functions will be moved from here */
-         //@{
-       ///
+    ///
     bool setLabel(char* label);
-       ///
+    ///
     bool setNumbered(bool);
-       //@}
        
-       ///
+    ///
     void setTab(int, int);
     /// Merge the array at current position
     void Merge(LyxArrayBase*);
@@ -229,7 +228,7 @@ class MathedXIter: public MathedIter {
     void Clean(int pos2);
     MathedRowSt *adjustVerticalSt();
     
- private:
+private:
     /// This function is not recursive, as MathPar::Metrics is
     void IMetrics(int, int&, int&, int&);
     /// Font size (display, text, script, script2) 
@@ -248,16 +247,16 @@ class MathedXIter: public MathedIter {
     bool limits;
     /// Type of previous script
     short s_type;  
-
+    ///
     void ipush();
-
+    ///
     void ipop();
 
- protected:
+protected:
     /// 
     MathedRowSt *crow;
     
- private:
+private:
     ///
     friend class MathedCursor;
 };
index 5e9773acc6300b613ec8c37c1aa453c7185bf239..bd87b701af471c7b5a4284f474fa6e57dd39fc9c 100644 (file)
@@ -48,56 +48,56 @@ public:
     void draw(Painter &, int, int);
     ///
     void Metrics();
-       ///
+    ///
     MathedInset * Clone();
-       ///
+    ///
     void Write(std::ostream &, bool fragile);
-       ///
+    ///
     bool setArgumentIdx(int);
-       ///
+    ///
     int  getArgumentIdx();
-       ///
+    ///
     int  getMaxArgumentIdx();
-       ///
+    ///
     int GetColumns();
-       ///
+    ///
     void GetXY(int &, int &) const;
-       ///
+    ///
     void SetFocus(int, int);
-       ///
+    ///
     LyxArrayBase * GetData();
-       ///
+    ///
     MathedRowSt * getRowSt() const { return args[idx].row; }
-       ///
+    ///
     void SetData(LyxArrayBase *);
-       ///
+    ///
     MathedTextCodes getTCode() { return tcode; }
-       ///
+    ///
     bool Permit(short);
     
 private:
+    ///
+    MathMacroTemplate * tmplate;
+    ///
+    struct MacroArgumentBase {
+       /// Position of the macro
+       int x, y;
        ///
-       MathMacroTemplate * tmplate;
-       ///
-       struct MacroArgumentBase {
-               /// Position of the macro
-               int x, y;
-               ///
-               MathedRowSt * row;
-               ///
-               LyxArrayBase * array;
-               ///
-               MacroArgumentBase() { x = y = 0;  array = 0; row = 0; }
-       };
-       MacroArgumentBase * args;
-       ///
-       int idx;
-       ///
-       int nargs;
+       MathedRowSt * row;
        ///
-       MathedTextCodes tcode;
+       LyxArrayBase * array;
        ///
-       friend class MathMacroTemplate;
+       MacroArgumentBase() { x = y = 0;  array = 0; row = 0; }
+    };
+    MacroArgumentBase * args;
+    ///
+    int idx;
+    ///
+    int nargs;
+    ///
+    MathedTextCodes tcode;
+    ///
+    friend class MathMacroTemplate;
 };
 
 
@@ -117,11 +117,11 @@ public:
     ~MathMacroArgument() { lyxerr << "help, destroyme!" << std::endl; }
     ///
     MathedInset * Clone() { return this; }
-       ///
+    ///
     void Metrics();
-       ///
+    ///
     void draw(Painter &, int x, int baseline);
-       ///
+    ///
     void Write(std::ostream &, bool fragile);
     ///
     void setNumber(int n) { number = n; }
index def59e64bd6f3d7f44af85f1620d116aa8907d9d..c84c5e3e76ee0ee7954e1d61942136412e3e8238 100644 (file)
 #include "bmtable.h"                 
 
 ///
-enum  {
-   MM_GREEK, MM_ARROW, MM_BOP, MM_BRELATS, MM_VARSIZE, MM_MISC,
-   MM_FRAC, MM_SQRT, MM_DELIM, MM_MATRIX, MM_EQU,
-   MM_DECO, MM_SPACE, MM_DOTS, MM_FUNC,
-   MM_MAX,
-   MM_CLOSE = 1024,
-   MM_APPLY, MM_OK
+enum SomeMathValues {
+    ///
+    MM_GREEK,
+    ///
+    MM_ARROW,
+    ///
+    MM_BOP,
+    ///
+    MM_BRELATS,
+    ///
+    MM_VARSIZE,
+    ///
+    MM_MISC,
+    ///
+    MM_FRAC,
+    ///
+    MM_SQRT,
+    ///
+    MM_DELIM,
+    ///
+    MM_MATRIX,
+    ///
+    MM_EQU,
+    ///
+    MM_DECO,
+    ///
+    MM_SPACE,
+    ///
+    MM_DOTS,
+    ///
+    MM_FUNC,
+    ///
+    MM_MAX,
+    ///
+    MM_CLOSE = 1024,
+    ///
+    MM_APPLY,
+    ///
+    MM_OK
 };
 
-
+///
 typedef FL_OBJECT * FL_OBJECTP;
 
 /// Class to manage bitmap menu bars
 class BitmapMenu {
-  ///
+   ///
    static BitmapMenu * active;
    ///
    friend int peek_event(FL_FORM *, void *);
@@ -82,7 +114,7 @@ protected:
    int  GetIndex(FL_OBJECT * ob);
 };
 
-// This is just a wrapper around peek_event()
+/// This is just a wrapper around peek_event()
 extern "C" int C_peek_event(FL_FORM * form, void * ptr);
 
 
@@ -102,6 +134,7 @@ void BitmapMenu::Next()  {
 
 #include "math_forms.h"
 
+///
 extern FD_panel * create_math_panel(void);
 
 #endif /* FD_math_panel_h_ */
index 474a484ebc560847024c954d40fad71f937b20bf..3a283b48e7c720ce6bd1eab5b49a6bb286e7e300 100644 (file)
 
 #include "symbol_def.h"
 
-
+///
 #define LM_TK_OPEN '{'
-
+///
 #define LM_TK_CLOSE '}'
 
-
+///
 enum MathTokenEnum
 {
-   LM_TK_BOP = 256,
-     LM_TK_ALPHA,
-     LM_TK_STR,
-     LM_TK_SYM,
-     LM_TK_FRAC,
-     LM_TK_SQRT,
-     LM_TK_BEGIN,
-     LM_TK_END,
-     LM_TK_NEWLINE,
-     LM_TK_UNDEF,
-     LM_TK_FONT,
-     LM_TK_LEFT,
-     LM_TK_RIGHT,
-     LM_TK_ACCENT,
-     LM_TK_WIDE,
-     LM_TK_FUNC,
-     LM_TK_FUNCLIM,
-     LM_TK_BIGSYM,
-     LM_TK_LABEL,
-     LM_TK_NONUM,
-     LM_TK_SPACE,
-     LM_TK_DOTS,
-     LM_TK_LIMIT,
-     LM_TK_STY,
-     LM_TK_PMOD,
-     LM_TK_BMOD,
-     LM_TK_MACRO,
-     LM_TK_SPECIAL,
-     LM_TK_ARGUMENT, 
-     LM_TK_NEWCOMMAND,
-     LM_TK_STACK
+    ///
+    LM_TK_BOP = 256,
+    ///
+    LM_TK_ALPHA,
+    ///
+    LM_TK_STR,
+    ///
+    LM_TK_SYM,
+    ///
+    LM_TK_FRAC,
+    ///
+    LM_TK_SQRT,
+    ///
+    LM_TK_BEGIN,
+    ///
+    LM_TK_END,
+    ///
+    LM_TK_NEWLINE,
+    ///
+    LM_TK_UNDEF,
+    ///
+    LM_TK_FONT,
+    ///
+    LM_TK_LEFT,
+    ///
+    LM_TK_RIGHT,
+    ///
+    LM_TK_ACCENT,
+    ///
+    LM_TK_WIDE,
+    ///
+    LM_TK_FUNC,
+    ///
+    LM_TK_FUNCLIM,
+    ///
+    LM_TK_BIGSYM,
+    ///
+    LM_TK_LABEL,
+    ///
+    LM_TK_NONUM,
+    ///
+    LM_TK_SPACE,
+    ///
+    LM_TK_DOTS,
+    ///
+    LM_TK_LIMIT,
+    ///
+    LM_TK_STY,
+    ///
+    LM_TK_PMOD,
+    ///
+    LM_TK_BMOD,
+    ///
+    LM_TK_MACRO,
+    ///
+    LM_TK_SPECIAL,
+    ///
+    LM_TK_ARGUMENT, 
+    ///
+    LM_TK_NEWCOMMAND,
+    ///
+    LM_TK_STACK
 };
 
 
+///
 struct latexkeys {
-       char const * name;
-       short token;
-       int id;
+    ///
+    char const * name;
+    ///
+    short token;
+    ///
+    int id;
 };
 
 
+///
 latexkeys *
 in_word_set (register char const * str, register int len);
 
-
+///
 latexkeys * lm_get_key(int index);
 
-
+///
 latexkeys * lm_get_key_by_id(int id, short tc = LM_TK_SYM);
 
-
-typedef union{
-
-unsigned char c;
-
-char * s;
-
-int i;
-
-latexkeys * l;
-} YYSTYPE;
+///
+union YYSTYPE {
+    ///
+    unsigned char c;
+    ///
+    char * s;
+    ///
+    int i;
+    ///
+    latexkeys * l;
+};
 
 extern YYSTYPE yylval;
 
index 497adc0804041371a827572e57399d3279f65838..5a8aa95bc48e4d686ba0015f4878085760f08762 100644 (file)
@@ -26,7 +26,7 @@
 
 ///
 class MathRootInset: public MathSqrtInset {
- public:
+public:
     ///
     explicit
     MathRootInset(short st = LM_ST_TEXT);
@@ -59,7 +59,7 @@ class MathRootInset: public MathSqrtInset {
     ///
     void  SetStyle(short);
 
- protected:
+protected:
     ///
     int idx;
     ///
index b2d4ea9ff1377d4a086a9b8f61ff678d8ec836a0..af6674458475a376fd81fad3f07b1fe83c614a6a 100644 (file)
 #define SYMBOL_DEF 
 
 // Symbols that do exist in X11 symbol font
+///
 #define LM_Gamma 0x47
+///
 #define LM_Delta 0x44
+///
 #define LM_Theta 0x51
+///
 #define LM_Lambda 0x4c
+///
 #define LM_Xi 0x58
+///
 #define LM_Pi 0x50
+///
 #define LM_Sigma 0x53
 //#define LM_Upsilon 0x55
+///
 #define LM_Upsilon 0xa1
+///
 #define LM_Phi 0x46
+///
 #define LM_Psi 0x59
+///
 #define LM_Omega 0x57
+///
 #define LM_alpha 0x61
+///
 #define LM_beta 0x62
+///
 #define LM_gamma 0x67
+///
 #define LM_delta 0x64
+///
 #define LM_varepsilon 0x65
+///
 #define LM_eta 0x68
+///
 #define LM_theta 0x71
+///
 #define LM_vartheta 0x4a
+///
 #define LM_iota 0x69
+///
 #define LM_kappa 0x6b
+///
 #define LM_lambda 0x6c
+///
 #define LM_mu 0x6d
+///
 #define LM_nu 0x6e
+///
 #define LM_xi 0x78
+///
 #define LM_pi 0x70
+///
 #define LM_varpi 0x76
+///
 #define LM_rho 0x72
+///
 #define LM_sigma 0x73
+///
 #define LM_tau 0x74
+///
 #define LM_varsigma 0x56
+///
 #define LM_zeta 0x7a 
+///
 #define LM_upsilon 0x75
+///
 #define LM_phi 0x66
+///
 #define LM_varphi 0x6a
+///
 #define LM_chi 0x63
+///
 #define LM_psi 0x79
+///
 #define LM_omega 0x77
+///
 #define LM_downarrow 0xaf
+///
 #define LM_leftarrow 0xac
+///
 #define LM_Downarrow 0xdf
+///
 #define LM_Leftarrow 0xdc
+///
 #define LM_rightarrow 0xae
+///
 #define LM_uparrow 0xad
+///
 #define LM_Rightarrow 0xde
+///
 #define LM_Uparrow 0xdd
+///
 #define LM_Leftrightarrow 0xdb
+///
 #define LM_leftrightarrow 0xab
+///
 #define LM_leq 0xa3
+///
 #define LM_geq 0xb3
+///
 #define LM_equiv 0xba
+///
 #define LM_subset 0xcc
+///
 #define LM_supset 0xc9
+///
 #define LM_approx 0xbb
+///
 #define LM_subseteq 0xcd
+///
 #define LM_supseteq 0xca
+///
 #define LM_cong 0x40
+///
 #define LM_neq 0xb9
+///
 #define LM_in 0xce
+///
 #define LM_propto 0xb5
+///
 #define LM_pm 0xb1
+///
 #define LM_cap 0xc7
+///
 #define LM_diamond 0xe0
+///
 #define LM_oplus 0xc5
+///
 #define LM_cup 0xc8
+///
 #define LM_times 0xb4
+///
 #define LM_otimes 0xc4
+///
 #define LM_div 0xb8
+///
 #define LM_oslash 0xc6
+///
 #define LM_cdot 0xd7
+///
 #define LM_wedge 0xd9
+///
 #define LM_bullet 0xb7
+///
 #define LM_sum 0xe5
+///
 #define LM_int 0xf2
+///
 #define LM_prod 0xd5
+///
 #define LM_nabla 0xd1
+///
 #define LM_partial 0xb6
+///
 #define LM_infty 0xa5
+///
 #define LM_prime 0xa2
 //#define LM_emptyset 0xc6
+///
 #define LM_exists 0x24
+///
 #define LM_forall 0x22
+///
 #define LM_Re 0xc2
+///
 #define LM_Im 0xc1
+///
 #define LM_aleph 0xc0
+///
 #define LM_wp 0xc3
+///
 #define LM_bot 0x5e
+///
 #define LM_neg 0xd8
+///
 #define LM_sharp 0x23
+///
 #define LM_surd 0xd6
+///
 #define LM_diamondsuit 0xa8
+///
 #define LM_heartsuit 0xa9
+///
 #define LM_clubsuit 0xa7
+///
 #define LM_spadesuit 0xaa
+///
 #define LM_langle 0xe1
+///
 #define LM_lceil 0xe9
+///
 #define LM_lfloor 0xeb
+///
 #define LM_rangle 0xf1
+///
 #define LM_rceil 0xf9
+///
 #define LM_rfloor 0xfb
+///
 #define LM_mid 0x7c
-
+///
 #define LM_angle 0xd0
+///
 #define LM_vee 0xda
 
 //#define LM_backslash '\\'
   
-// Symbols that don't exist in X11 symbol font
+/// Symbols that don't exist in X11 symbol font
 enum Math_Symbols_enum {
+  ///
   LM_NoFont = 256,
+  ///
   LM_epsilon,  
-  LM_hookleftarrow,  LM_hookrightarrow,  LM_updownarrow,  LM_leftharpoonup,
-  LM_rightharpoonup,  LM_rightleftharpoons,  LM_Updownarrow,
-  LM_leftharpoondown,  LM_rightharpoondown,  LM_mapsto,  LM_Longleftarrow,
-  LM_Longrightarrow,  LM_Longleftrightarrow,  LM_longleftrightarrow,
-  LM_longleftarrow,  LM_longrightarrow,  LM_longmapsto,  LM_nwarrow,
-  LM_nearrow,  LM_swarrow,  LM_searrow,
-  LM_models,  LM_prec,  LM_succ,  LM_sim,  LM_perp,  LM_preceq,  LM_succeq,
-  LM_simeq,  LM_ll,  LM_gg,  LM_asymp,  LM_parallel,  LM_smile,
-  LM_frown,  LM_sqsubseteq,  LM_sqsupseteq,  LM_doteq,  LM_ni,  LM_notin,
-  LM_vdash,  LM_dashv,  LM_bowtie,
-  LM_mp,  LM_bigtriangleup,  LM_ominus,  LM_uplus,  LM_bigtriangledown,
-  LM_sqcap,  LM_triangleright,  LM_sqcup,  LM_triangleleft,  LM_odot,  LM_star,
-  LM_amalg,  LM_bigcirc,  LM_setminus,  LM_dagger,  LM_circ,  LM_wr,
+  ///
+  LM_hookleftarrow,
+  ///
+  LM_hookrightarrow,
+  ///
+  LM_updownarrow,
+  ///
+  LM_leftharpoonup,
+  ///
+  LM_rightharpoonup,
+  ///
+  LM_rightleftharpoons,
+  ///
+  LM_Updownarrow,
+  ///
+  LM_leftharpoondown,
+  ///
+  LM_rightharpoondown,
+  ///
+  LM_mapsto,
+  ///
+  LM_Longleftarrow,
+  ///
+  LM_Longrightarrow,
+  ///
+  LM_Longleftrightarrow,
+  ///
+  LM_longleftrightarrow,
+  ///
+  LM_longleftarrow,
+  ///
+  LM_longrightarrow,
+  ///
+  LM_longmapsto,
+  ///
+  LM_nwarrow,
+  ///
+  LM_nearrow,
+  ///
+  LM_swarrow,
+  ///
+  LM_searrow,
+  ///
+  LM_models,
+  ///
+  LM_prec,
+  ///
+  LM_succ,
+  ///
+  LM_sim,
+  ///
+  LM_perp,
+  ///
+  LM_preceq,
+  ///
+  LM_succeq,
+  ///
+  LM_simeq,
+  ///
+  LM_ll,
+  ///
+  LM_gg,
+  ///
+  LM_asymp,
+  ///
+  LM_parallel,
+  ///
+  LM_smile,
+  ///
+  LM_frown,
+  ///
+  LM_sqsubseteq,
+  ///
+  LM_sqsupseteq,
+  ///
+  LM_doteq,
+  ///
+  LM_ni,
+  ///
+  LM_notin,
+  ///
+  LM_vdash,
+  ///
+  LM_dashv,
+  ///
+  LM_bowtie,
+  ///
+  LM_mp,
+  ///
+  LM_bigtriangleup,
+  ///
+  LM_ominus,
+  ///
+  LM_uplus,
+  ///
+  LM_bigtriangledown,
+  ///
+  LM_sqcap,
+  ///
+  LM_triangleright,
+  ///
+  LM_sqcup,
+  ///
+  LM_triangleleft,
+  ///
+  LM_odot,
+  ///
+  LM_star,
+  ///
+  LM_amalg,
+  ///
+  LM_bigcirc,
+  ///
+  LM_setminus,
+  ///
+  LM_dagger,
+  ///
+  LM_circ,
+  ///
+  LM_wr,
+  ///
   LM_ddagger,
-  LM_oint,  LM_coprod,  LM_bigsqcup,  LM_bigotimes,  LM_bigodot,  LM_bigoplus,
-  LM_bigcap,  LM_bigcup,  LM_biguplus,  LM_bigvee,  LM_bigwedge,
-  LM_ell,  LM_imath,  LM_jmath,  LM_hbar, LM_top,  LM_Vert,  LM_flat,
-  LM_natural,  LM_triangle,
-  LM_widehat, LM_widetilde, LM_underline, LM_overline, LM_underbrace, 
-  LM_overbrace, LM_overleftarrow, LM_overightarrow, 
-  LM_ldots, LM_cdots, LM_vdots, LM_ddots,            
-  LM_backslash, LM_emptyset,
+  ///
+  LM_oint,
+  ///
+  LM_coprod,
+  ///
+  LM_bigsqcup,
+  ///
+  LM_bigotimes,
+  ///
+  LM_bigodot,
+  ///
+  LM_bigoplus,
+  ///
+  LM_bigcap,
+  ///
+  LM_bigcup,
+  ///
+  LM_biguplus,
+  ///
+  LM_bigvee,
+  ///
+  LM_bigwedge,
+  ///
+  LM_ell,
+  ///
+  LM_imath,
+  ///
+  LM_jmath,
+  ///
+  LM_hbar,
+  ///
+  LM_top,
+  ///
+  LM_Vert,
+  ///
+  LM_flat,
+  ///
+  LM_natural,
+  ///
+  LM_triangle,
+  ///
+  LM_widehat,
+  ///
+  LM_widetilde,
+  ///
+  LM_underline,
+  ///
+  LM_overline,
+  ///
+  LM_underbrace, 
+  ///
+  LM_overbrace,
+  ///
+  LM_overleftarrow,
+  ///
+  LM_overightarrow, 
+  ///
+  LM_ldots,
+  ///
+  LM_cdots,
+  ///
+  LM_vdots,
+  ///
+  LM_ddots,            
+  ///
+  LM_backslash,
+  ///
+  LM_emptyset,
+  ///
   LM_last_symbol
 };
 
 // Accents
+///
 #define LM_acute '\''
+///
 #define LM_grave  '`'
+///
 #define LM_hat '^'
+///
 #define LM_tilde '~'
+///
 #define LM_dot  '.'
+///
 #define LM_bar '-'
 
+///
 enum Math_Accent_enum {
+  ///
   LM_ddot = LM_last_symbol,
-  LM_check, LM_vec, LM_breve, LM_not
+  ///
+  LM_check,
+  ///
+  LM_vec,
+  ///
+  LM_breve,
+  ///
+  LM_not
 };
 
+///
 #define LM_quad  4
+///
 #define LM_qquad 5
 
 #endif
index 34a92e59da3959304a75359d58437cedf2f77c00..80cfc15ccb54089a12835484716cc428aa9e5531 100644 (file)
@@ -55,17 +55,17 @@ public:
                               int, void *);
 private:
        ///
-       LyXView *owner;
+       LyXView * owner;
        ///
        string text;
        ///
        string text_stored;
        ///
-       FL_OBJECT *add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
+       FL_OBJECT * add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
         ///
-       FL_OBJECT *timer;
+       FL_OBJECT * timer;
        ///
-       FL_OBJECT *the_buffer;
+       FL_OBJECT * the_buffer;
        ///
        string cur_cmd;
         ///
@@ -76,7 +76,9 @@ private:
         int history_idx, history_cnt;
         ///
         void addHistory(string const &cmd) { 
-               if (history_cnt == 0 || (history_cnt>0 && cmd!= history[(history_cnt-1) % MAX_HISTORY])) {
+               if (history_cnt == 0
+                   || (history_cnt > 0
+                       && cmd != history[(history_cnt - 1) % MAX_HISTORY])) {
                    history[history_cnt % MAX_HISTORY] = cmd;
                    ++history_cnt;
                }
index 8593ff6e6399493c60247cd662d71b4f622edbbf..ed6af5c6e0f4de83b4c52d6009c9cc88822a5dff 100644 (file)
 
 class BufferView;
 
-/** MarkLastWord should only be used immidiately after NextWord().
- If you give control back to the user, you _have_ to call EndOfSpellCheck()
- or SelectLastWord(), otherwise segfaults should appear.
- */
-//void EndOfSpellCheck();
-///
-//void SelectLastWord();
-
 /** This function has to be implemented by the spell checker.
     It will show the spellcheker form*/ 
 void ShowSpellChecker(BufferView *);
index efb7c58b220194c25f96a5aeca5660734e00f787..fd361cd514918a9f9c05b989515f3dc3dc7953ce 100644 (file)
 
 #include "LOstream.h"
 
+// I don't really like this, but too please doc++...(Lgb)
+using std::ostream;
+
 #ifdef TEST_DEBUGSTREAM
 #include <string>
-///
 struct Debug {
-       ///
        enum type {
-               ///
                NONE = 0,
-               ///
                INFO       = (1 << 0),   // 1
-               ///
                WARN       = (1 << 1),   // 2
-               ///
                CRIT       = (1 << 2)   // 4
        };
-       ///
        static const type ANY = type(INFO | WARN | CRIT);
-
-       /** A function to convert symbolic string names on debug levels
-           to their numerical value.
-       */
        static Debug::type value(string const & val) {
                if (val == "NONE") return Debug::NONE;
                if (val == "INFO") return Debug::INFO;
@@ -46,7 +38,6 @@ struct Debug {
                if (val == "CRIT") return Debug::CRIT;
                return Debug::NONE;
        }
-
 };
 #endif
 
@@ -87,18 +78,11 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
-
+class DebugStream : public ostream
+{
 // This workaround is needed only for gcc 2.8.1 (and possibly egcs
 // 1.0.x), which generates a compiler error when subclassing from
 // std::. (JMarc)
-#ifdef CXX_WORKING_NAMESPACES
-///
-class DebugStream : public std::ostream
-#else
-///
-class DebugStream : public ostream
-#endif
-{
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
@@ -108,8 +92,8 @@ public:
        DebugStream(char const * f, Debug::type t = Debug::NONE);
 
        ///
-       virtual ~DebugStream();
-       
+       ~DebugStream();
+
        /// Sets the debug level to t.
        void level(Debug::type t) {
                dt = Debug::type(t & Debug::ANY);
index 47802465ba2f647fa664ffdb55b4f30cdc025a8e..b2f8caad182a92e9ef83c54d3e07c7e7cad4b4f3 100644 (file)
@@ -24,7 +24,8 @@
 
 #include "LString.h"
 
-/** Use objects of this class to get information about files. */
+/** Use objects of this class to get information about files.
+ */
 class FileInfo {
 public:
        ///
@@ -90,10 +91,14 @@ public:
        
        /// Permission flags
        enum perm_test {
-               rperm = R_OK, // test for read permission
-               wperm = W_OK, // test for write permission
-               xperm = X_OK, // test for execute (search) permission
-               eperm = F_OK  // test for existence of file
+               /// test for read permission
+               rperm = R_OK,
+               /// test for write permission
+               wperm = W_OK,
+               /// test for execute (search) permission
+               xperm = X_OK,
+               /// test for existence of file
+               eperm = F_OK
        };
        /// Test whether the current user has a given set of permissions
        bool access(int p);
@@ -122,7 +127,7 @@ public:
        ///
        int getError() const;
        ///
-       enum {
+       enum Err {
                ///
                NoErr = -1
        };
index f44f9ceaa201956f4f704e12669f28e2005b98ed..a62e16b3435a474b94fa194bdaec419fd45f2f26 100644 (file)
 
 extern void emergencySave();
 
+/** Live assertion.
+    This is a debug tool to ensure that the assertion holds. If it don't hole
+    we run #emergencySave()# and then #lyx::abort".
+    @param assertion this should evaluate to true unless you want an abort.
+*/
 template<class A>
 inline
 void Assert(A assertion)
@@ -22,6 +27,9 @@ void Assert(A assertion)
 
 #else
 
+/** Dummy assertion.
+    When compiling without assertions we use this no-op function.
+*/
 template<class A>
 inline
 void Assert(A /*assertion*/) {}
@@ -30,4 +38,3 @@ void Assert(A /*assertion*/) {}
 
 //} // end of namespace LyX
 #endif /* LASSERT_H */
-
index ae1d41b4489b2f5f619770bda2350ccdbc0c51a8..6db4f410597d8d8c17c921ba80d8e0aa1f55e3cd 100644 (file)
@@ -56,20 +56,4 @@ private:
        Impl * impl;
 };
 
-
-// We comment out these, we can comment them in when we need them.
-#if 0
-// some built in regular expressions
-
-extern const LRegex LRXwhite;          // = "[ \n\t\r\v\f]+"
-extern const LRegex LRXint;            // = "-?[0-9]+"
-extern const LRegex LRXdouble;         // = "-?\\(\\([0-9]+\\.[0-9]*\\)\\|
-                                       //    \\([0-9]+\\)\\|\\(\\.[0-9]+\\)\\)
-                                       //    \\([eE][---+]?[0-9]+\\)?"
-//extern const LRegex LRXalpha;          // = "[A-Za-z]+"
-//extern const LRegex LRXlowercase;      // = "[a-z]+"
-//extern const LRegex LRXuppercase;      // = "[A-Z]+"
-//extern const LRegex LRXalphanum;       // = "[0-9A-Za-z]+"
-extern const LRegex LRXidentifier;     // = "[A-Za-z_][A-Za-z0-9_]*"
-#endif
 #endif
index 826e9858417d49155dfa77a6d175195da8f58978..d97a1f35e0789ac2cdf0274d5bc9328a31a6e621 100644 (file)
 #include "LString.h"
 #include <vector>
 
+///
 class StrPool {
 public:
-        // delete all the strings that have been allocated by add()
+        /// delete all the strings that have been allocated by add()
         ~StrPool();
-        // Make a copy of the string, and remember it in the pool
+        /// Make a copy of the string, and remember it in the pool
         char const * add(string const & str);
         
 private:
+       ///
        typedef std::vector<char const *> Pool;
+       ///
         Pool pool_;
 };
 
index cfb67731bd5ae51ac9cdfd629ee4b760c98508e0..87315c5adfce516b3912eb9cecbabb8cc006adde 100644 (file)
@@ -5,34 +5,50 @@
 
 #include "LAssert.h"
 
+///
 template <class T, size_t s>
 class block {
 public:
+       ///
        typedef T value_type;
+       ///
        typedef size_t size_type;
+       ///
        typedef T * pointer;
+       ///
        typedef T const * const_pointer;
+       ///
        typedef T & reference;
+       ///
        typedef T const & const_reference;
+       ///
        typedef T * iterator;
+       ///
        typedef T const * const_iterator;
+       ///
        size_type size() const { return s; }
+       ///
        reference at(int i) {
                Assert(i >= 0 && i < s);
                return arr[i];
        }
+       ///
        const_reference at(int i) const {
                Assert(i >= 0 && i < s);
                return arr[i];
        }
+       ///
        reference operator[](int i) { return arr[i]; }
+       ///
        const_reference operator[](int i) const { return arr[i]; }
+       ///
        void operator=(block const & b) {
                Assert(b.size() == size());
                for (size_t i = 0; i < size(); ++i) {
                        arr[i] == b[i];
                }
        }
+       ///
        bool operator==(block const & b) const {
                Assert(b.size() == size());
                for (size_t i = 0; i < size(); ++i) {
@@ -40,11 +56,16 @@ public:
                }
                return true;
        }
+       ///
        iterator begin() { return arr[0]; }
+       ///
        iterator end() { return arr[s]; }
+       ///
        const_iterator begin() const { return arr[0]; }
+       ///
        const_iterator end() const { return arr[s]; }
 private:
+       ///
        T arr[s];
 };
 
index 2e2aa0060bb86322032920d01f4cd0ad5eaad514..289e702e801870daa88a303809a1347345042bef 100644 (file)
@@ -58,7 +58,7 @@ string const FileSearch(string const & path, string const & name,
     1: dir writeable
     0: not writeable
    -1: error- couldn't find out, or unsure
-  */
+*/
 int IsDirWriteable (string const & path);
 
 /** Is a file readable ?
index eea7fdbf4933776450e8b6d130631b9c968fd22a..1c90c07598a7fcab7d55af0299044376cf6be1d9 100644 (file)
@@ -1,8 +1,9 @@
 // -*- C++ -*-
 
-/** This is a collection of string helper functions that works
-    together with string (and later also with STL String. Some of these
-    would certainly benefit from a rewrite/optimization.
+/*
+  This is a collection of string helper functions that works
+  together with string (and later also with STL String. Some of these
+  would certainly benefit from a rewrite/optimization.
 */
 
 #ifndef LSTRINGS_H
@@ -30,22 +31,20 @@ int compare_no_case(string const & s, string const & s2);
 ///
 int compare_no_case(string const & s, string const & s2, unsigned int len);
 
-
+///
 inline
 int compare(char const * a, char const * b)
 {
        return strcmp(a, b);
 }
 
-
-
+///
 inline
 int compare(char const * a, char const * b, unsigned int len)
 {
        return strncmp(a, b, len);
 }
 
-
 ///
 bool isStrInt(string const & str);
 
@@ -70,7 +69,7 @@ string const lowercase(string const &);
 ///
 string const uppercase(string const &);
 
-// convert T to string
+/// convert T to string
 template<typename T>
 inline
 string const tostr(T const & t) 
@@ -94,6 +93,7 @@ string const tostr(T const & t)
 #endif
 }
 
+///
 inline
 string const tostr(bool b)
 {
index 52f2361a03b5ae535f1d891f1e186b326eb9055e..c7974f05479527ad75f0f2901414919e232bc402 100644 (file)
 // XDR_format causes an abort that's hard to track down.  GDB says the abort
 // occurs in code from a different function to the one being run before the
 // abort!  (XTL-1.3.pl.11)
+///
 typedef GIOP_format<auto_mem_buffer> gui_format;
 
-//@name XTL assistants
-//@{
-/** Simplify the use of the XTL.  The caller is responsible for creating their
+/*  Simplify the use of the XTL.  The caller is responsible for creating their
     own memory buffer.  The buffer type isn't a template parameter because I 
     need/want the forward declared buffer class in some other header files
     thereby avoiding an extra file dependency.
     ARRae 20000423
  */
+
 /// Externalize a structure into a buffer.
 template<class Input>
 void getInMem(Input const & in, auto_mem_buffer & mb) {
@@ -50,6 +50,6 @@ void setFromMem(Input & in, auto_mem_buffer & mb) {
        obj_input<gui_format> input(gf);
        input.simple(in);
 }
-//@}
+
 
 #endif
index 3933cf0b63475920cf1ba629fe86c05db2ec289c..cfde2af5baf1db23c93abe6ccb3133439bc1bef7 100644 (file)
@@ -20,6 +20,7 @@
 
 // This should have been a namespace
 #ifdef CXX_WORKING_NAMESPACES
+///
 namespace lyx {
        ///
        char * getcwd(char * buffer, size_t size);
@@ -41,6 +42,7 @@ namespace lyx {
        int putenv(char const * str);
 }
 #else
+///
 struct lyx {
        ///
        static char * getcwd(char * buffer, size_t size);
index c594ed99b5b5ebccacd424cb8ddc98d664795f94..d8b0df2cbdc1d4ed424b1b26de0f6a734621977c 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <cstring> // for size_t
 
-/* A string class for LyX
+/** A string class for LyX
   
   This is a permanent String class. It is modeled closely after the C++ STL
   string class. In comparison with STL string lyxstring lack support for
@@ -159,7 +159,7 @@ public:
        /// #lyxstring x("abc", 2) -> "ab"#
        lyxstring(value_type const *, size_type n);
        
-       /// #lyxstring x("abc")#
+       // #lyxstring x("abc")#
        lyxstring(value_type const *);
        
        /// lyxstring(5, 'n') -> "nnnnn"
index 2a2dc0b2161c7695420f4de61de0d920df443181..d2480670c3b5eebe6ffe93e83cc5c35dcdecffd0 100644 (file)
@@ -3,15 +3,16 @@
 #define PATH_H
 
 #include "LString.h"
-#include "support/filetools.h"
+#include "filetools.h"
 #include "lyxlib.h"
+#include "utility.hpp"
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 ///
-class Path {
+class Path : public noncopyable {
 public:
        ///
        explicit
@@ -50,6 +51,7 @@ private:
 // Path("/tmp");   // wrong
 // Path p("/tmp");  // right
 // we add this macro:
+///
 #define Path(x) unnamed_Path;
 // Tip gotten from Bobby Schmidt's column in C/C++ Users Journal
 
index cdbcb3529e37717e3be642bdcb5284922ade9c49..4ee99278b536988d06a2a758a799b8439df8c147 100644 (file)
 
     //  Contributed by Dave Abrahams
 
-    class noncopyable
-    {
-    protected:
+class noncopyable
+{
+protected:
         noncopyable(){}
-    private:  // emphasize the following members are private
+private:  // emphasize the following members are private
         noncopyable( const noncopyable& );
         const noncopyable& operator=( const noncopyable& );
-    }; // noncopyable
+}; // noncopyable
 
 //} // namespace boost
 
index 997103a902c30a7dde80b47e0c4890462070f374..68b93307c2e3ff88695c641823653ca9ad44c623 100644 (file)
 class LyXTable  {
 public:
     // Are the values of these enums important? (Lgb)
+    ///
     enum {
+       ///
        APPEND_ROW = 0,
+       ///
        APPEND_COLUMN = 1,
+       ///
        DELETE_ROW = 2,
+       ///
        DELETE_COLUMN = 3,
+       ///
        TOGGLE_LINE_TOP = 4,
+       ///
        TOGGLE_LINE_BOTTOM = 5,
+       ///
        TOGGLE_LINE_LEFT = 6,
+       ///
        TOGGLE_LINE_RIGHT = 7,
+       ///
        ALIGN_LEFT = 8, // what are these alignment enums used for?
+       ///
        ALIGN_RIGHT = 9,
+       ///
        ALIGN_CENTER = 10,
+       ///
        DELETE_TABLE = 11,
+       ///
        MULTICOLUMN = 12,
+       ///
        SET_ALL_LINES = 13,
+       ///
        UNSET_ALL_LINES = 14,
+       ///
        SET_LONGTABLE = 15,
+       ///
        UNSET_LONGTABLE = 16,
+       ///
        SET_PWIDTH = 17,
+       ///
        APPEND_CONT_ROW = 18,
+       ///
        SET_ROTATE_TABLE = 19,
+       ///
        UNSET_ROTATE_TABLE = 20,
+       ///
        SET_ROTATE_CELL = 21,
+       ///
        UNSET_ROTATE_CELL = 22,
+       ///
        SET_LINEBREAKS = 23,
+       ///
        SET_LTHEAD = 24,
+       ///
        SET_LTFIRSTHEAD = 25,
+       ///
        SET_LTFOOT = 26,
+       ///
        SET_LTLASTFOOT = 27,
+       ///
        SET_LTNEWPAGE = 28,
+       ///
        SET_SPECIAL_COLUMN = 29,
+       ///
        SET_SPECIAL_MULTI = 30
     };
-
+    ///
     enum {
+       ///
        CELL_NORMAL = 0,
+       ///
        CELL_BEGIN_OF_MULTICOLUMN = 1,
+       ///
        CELL_PART_OF_MULTICOLUMN = 2
     };
     /* konstruktor */
     ///
     LyXTable(int columns_arg, int rows_arg);
     ///
-    ///
     LyXTable(LyXTable const &);
     ///
     explicit
@@ -171,7 +205,7 @@ public:
     ///
     void Reinit();
 
-       ///
+    ///
     void Init(int columns_arg, int rows_arg);
 
     ///
@@ -181,9 +215,10 @@ public:
     ///
     int Latex(std::ostream &);
 
-    // cell <0 will tex the preamble
-    // returns the number of printed newlines
-    ///
+    /**
+       @param cell < 0 will tex the preamble
+       @return the number of printed newlines
+    */
     int TexEndOfCell(std::ostream &, int cell);
     ///
     int DocBookEndOfCell(std::ostream &, int cell, int & depth);
@@ -230,8 +265,9 @@ public:
     void AppendContRow(int cell);
     ///
     bool IsContRow(int cell);
-    /// returns the number of the cell which continues
-    /// or -1 if no ContRow
+    /**
+       @return number of the cell which coninues or -1 if no ContRow
+    */
     int CellHasContRow(int cell);
     ///
     bool RowHasContRow(int cell);
@@ -251,8 +287,8 @@ public:
     void SetLinebreaks(int cell, bool what);
     ///
     bool Linebreaks(int cell);
-    ///
-    /// Long Table Options
+    //
+    // Long Table Options
     ///
     void SetLTHead(int cell, bool first);
     ///
@@ -269,9 +305,7 @@ public:
     void SetLTNewPage(int cell, bool what);
     ///
     bool LTNewPage(int cell);
-    ///
-
-private: //////////////////////////////////////////////////////////////////
+private:
     ///
     struct cellstruct {
        ///
@@ -313,9 +347,13 @@ private: //////////////////////////////////////////////////////////////////
         rowstruct & operator=(rowstruct const &);
        ///
        bool top_line;
+       ///
        bool bottom_line;
+       ///
        bool is_cont_row;
+       ///
         int ascent_of_row;
+       ///
         int descent_of_row;
        /// This are for longtables only
        bool newpage;
@@ -330,10 +368,15 @@ private: //////////////////////////////////////////////////////////////////
         columnstruct & operator=(columnstruct const &);
        ///
        int alignment; // add approp. signedness
+       ///
        bool left_line;
+       ///
        bool right_line;
+       ///
        int  width_of_column;
+       ///
        string p_width;
+       ///
        string align_special;
     };
     ///
@@ -350,21 +393,25 @@ private: //////////////////////////////////////////////////////////////////
     cellstruct ** cell_info;
     ///
     int width_of_table;
+    //
+    // for long tables
+    /// row of endhead
+    int endhead;
+    /// row of endfirst head
+    int endfirsthead;
+    /// row of endfoot
+    int endfoot;
+    /// row of endlastfoot
+    int endlastfoot;
     ///
-    /// for long tables
-    ///
-    int endhead; // row of endhead
-    int endfirsthead; // row of endfirsthead
-    int endfoot; // row of endfoot
-    int endlastfoot; // row of endlastfoot
-    ///
-
     void set_row_column_number_info();
     /// Returns true if a complete update is necessary, otherwise false
     bool SetWidthOfMulticolCell(int cell, int new_width);
+    ///
     void recalculateMulticolCells(int cell, int new_width);
     /// Returns true if change
     bool calculate_width_of_column(int column);
+    ///
     bool calculate_width_of_column_NMC(int column); // no multi cells
     ///
     void calculate_width_of_table();
index cb2381ad3cbef512aea8333069f9d02c9632fe27..e3966812c9566555e6732160faffd210424cde9d 100644 (file)
@@ -30,58 +30,106 @@ class Buffer;
 ///
 class LyXTabular  {
 public:
-
+    ///
     enum {
+       ///
        APPEND_ROW = 0,
+       ///
        APPEND_COLUMN,
+       ///
        DELETE_ROW,
+       ///
        DELETE_COLUMN,
+       ///
        TOGGLE_LINE_TOP,
+       ///
        TOGGLE_LINE_BOTTOM,
+       ///
        TOGGLE_LINE_LEFT,
+       ///
        TOGGLE_LINE_RIGHT,
+       ///
        ALIGN_LEFT,
+       ///
        ALIGN_RIGHT,
+       ///
        ALIGN_CENTER,
+       ///
        VALIGN_TOP,
+       ///
        VALIGN_BOTTOM,
+       ///
        VALIGN_CENTER,
+       ///
        M_TOGGLE_LINE_TOP,
+       ///
        M_TOGGLE_LINE_BOTTOM,
+       ///
        M_TOGGLE_LINE_LEFT,
+       ///
        M_TOGGLE_LINE_RIGHT,
+       ///
        M_ALIGN_LEFT,
+       ///
        M_ALIGN_RIGHT,
+       ///
        M_ALIGN_CENTER,
+       ///
        M_VALIGN_TOP,
+       ///
        M_VALIGN_BOTTOM,
+       ///
        M_VALIGN_CENTER,
+       ///
        DELETE_TABULAR,
+       ///
        MULTICOLUMN,
+       ///
        SET_ALL_LINES,
+       ///
        UNSET_ALL_LINES,
+       ///
        SET_LONGTABULAR,
+       ///
        UNSET_LONGTABULAR,
+       ///
        SET_PWIDTH,
+       ///
        SET_MPWIDTH,
+       ///
        SET_ROTATE_TABULAR,
+       ///
        UNSET_ROTATE_TABULAR,
+       ///
        SET_ROTATE_CELL,
+       ///
        UNSET_ROTATE_CELL,
+       ///
        SET_USEBOX,
+       ///
        SET_LTHEAD,
+       ///
        SET_LTFIRSTHEAD,
+       ///
        SET_LTFOOT,
+       ///
        SET_LTLASTFOOT,
+       ///
        SET_LTNEWPAGE,
+       ///
        SET_SPECIAL_COLUMN,
+       ///
        SET_SPECIAL_MULTI,
+       ///
        LAST_ACTION
     };
-
+    ///
     enum {
+       ///
        CELL_NORMAL = 0,
+       ///
        CELL_BEGIN_OF_MULTICOLUMN,
+       ///
        CELL_PART_OF_MULTICOLUMN
     };
 
@@ -99,7 +147,6 @@ public:
     ///
     LyXTabular(InsetTabular *, int columns_arg, int rows_arg);
     ///
-    ///
     LyXTabular(InsetTabular *, LyXTabular const &);
     ///
     explicit
@@ -211,12 +258,15 @@ public:
     void Read(Buffer const *, LyXLex &);
     ///
     void OldFormatRead(LyXLex &, string const &);
-    ///
-    /// helper function for Latex returns number of newlines
+    //
+    // helper function for Latex returns number of newlines
     ///
     int TeXTopHLine(std::ostream &, int row) const;
+    ///
     int TeXBottomHLine(std::ostream &, int row) const;
+    ///
     int TeXCellPreamble(std::ostream &, int cell) const;
+    ///
     int TeXCellPostamble(std::ostream &, int cell) const;
     ///
     int Latex(Buffer const *, std::ostream &, bool, bool) const;
@@ -273,8 +323,8 @@ public:
     void SetUsebox(int cell, int what);
     ///
     int GetUsebox(int cell) const;
-    ///
-    /// Long Tabular Options
+    //
+    // Long Tabular Options
     ///
     void SetLTHead(int cell, bool first);
     ///
@@ -307,10 +357,10 @@ private: //////////////////////////////////////////////////////////////////
     struct cellstruct {
        ///
         cellstruct();
-       ///
 #ifdef INSET_POINTER
-       ~cellstruct();
        ///
+       ~cellstruct();
+       //
         cellstruct(cellstruct const &);
        ///
        cellstruct & operator=(cellstruct const &);
@@ -333,11 +383,12 @@ private: //////////////////////////////////////////////////////////////////
        bool left_line;
        ///
        bool right_line;
-       ///
-       /// 0 ... don't use a box
-       /// 1 ... use a parbox
-       /// 2 ... use a minipage
-       ///
+       /**
+          0 ... don't use a box
+          1 ... use a parbox
+          2 ... use a minipage
+          This should be made into an enum (Lgb)
+       */
        int usebox;
        ///
        int rotate;
@@ -348,44 +399,57 @@ private: //////////////////////////////////////////////////////////////////
        ///
        InsetText inset;
     };
+    ///
     typedef std::vector<cellstruct> cell_vector;
+    ///
     typedef std::vector<cell_vector> cell_vvector;
 
     ///
     struct rowstruct {
        ///
         rowstruct();
-       ///
+       //
            //~rowstruct();
-       ///
+       //
            // rowstruct & operator=(rowstruct const &);
        ///
        bool top_line;
+       ///
        bool bottom_line;
+       ///
         int ascent_of_row;
+       ///
         int descent_of_row;
        /// This are for longtabulars only
        bool newpage;
     };
+    ///
     typedef std::vector<rowstruct> row_vector;
 
     ///
     struct columnstruct {
        ///
         columnstruct();
-       ///
+       //
            //~columnstruct();
-       ///
+       //
            //columnstruct & operator=(columnstruct const &);
        ///
        int alignment;
+       ///
        int valignment;
+       ///
        bool left_line;
+       ///
        bool right_line;
+       ///
        int  width_of_column;
+       ///
        string p_width;
+       ///
        string align_special;
     };
+    ///
     typedef std::vector<columnstruct> column_vector;
 
     ///
@@ -408,15 +472,18 @@ private: //////////////////////////////////////////////////////////////////
     int width_of_tabular;
     ///
     int rotate;
-    ///
-    /// for long tabulars
+    //
+    // for long tabulars
     ///
     int is_long_tabular;
-    ///
-    int endhead; // row of endhead
-    int endfirsthead; // row of endfirsthead
-    int endfoot; // row of endfoot
-    int endlastfoot; // row of endlastfoot
+    /// row of endhead
+    int endhead;
+    /// row of endfirsthead
+    int endfirsthead;
+    /// row of endfoot
+    int endfoot;
+    /// row of endlastfoot
+    int endlastfoot;
     ///
     InsetTabular * owner_;
    
@@ -431,6 +498,7 @@ private: //////////////////////////////////////////////////////////////////
     void recalculateMulticolCells(int cell, int new_width);
     /// Returns true if change
     bool calculate_width_of_column(int column);
+    ///
     bool calculate_width_of_column_NMC(int column); // no multi cells
     ///
     void calculate_width_of_tabular();
index 24e888d87369e50b3833b3ca117cde9a1156a271..486f372eab7b0a0d4e2025f05543a826206ab5da 100644 (file)
@@ -37,8 +37,8 @@ extern char const * string_align[];
 // used all over. As it happens, that meant that these strings were included 
 // 27 times in the object file. (Asger)
 
-///
-//extern char const * tex_babel[];
+//
+// extern char const * tex_babel[];
 
 ///
 extern char const * tex_graphics[];
index c223cb6b4133564a71c135c9d8565bf639f3bd07..8a1f5b7f4fbf37fe83024a2cdf42fd8753c97ec6 100644 (file)
@@ -21,6 +21,7 @@
 #include "debug.h"
 
 using std::find_if;
+using std::endl;
 
 // Delete linked list
 void TexRow::reset()
index a467efb56896ca22d8831d741dc1f94f0128bb55..1e2ced161e492305a1655de3ce3c8de5436192b5 100644 (file)
 #include "debug.h"
 #include "LString.h"
 
+///
 class DebugTracer {
 public:
+       ///
        explicit
        DebugTracer(string const & s) : str(s) {
                lyxerr << string(depth, ' ') << "Trace begin : "
@@ -28,13 +30,16 @@ public:
                ++depth;
                
        }
+       ///
        ~DebugTracer() {
                --depth;
                lyxerr << string(depth, ' ') << "Trace end : "
                       << str << std::endl;
        }
 private:
+       ///
        string str;
+       ///
        static int depth;
 };
 
index 3c7628bd71428fa3f5ea9fbc174c303719470533..9c9f4e273115f63a212485cfe8ea16e008a53d67 100644 (file)
@@ -32,14 +32,14 @@ public:
   on tex-accents. Monostate
   */
 class DefaultTrans : public TransInterface {
-private:
-       ///
-       static bool init_;
 public:
        ///
        DefaultTrans();
        ///
        virtual string process(char, TransManager &);
+private:
+       ///
+       static bool init_;
 };
 
 
@@ -95,6 +95,7 @@ private:
 };
 
 
+///
 char * Trans::Match(unsigned char c)
 {
        return keymap_[c];
index e4052f975af862096fd291bddb6752b7854b38e4..df36f7cb0d46430b930ef4f72f4ee2910d1e365c 100644 (file)
@@ -5,26 +5,33 @@
 #include "LString.h"
 #include "tex-accent.h"
 
+///
 struct Keyexc {
-       char c;         /* character to make exception */
-       string data;    /* exception data */
+       /// character to make exception
+       char c;
+       /// exception data
+       string data;
        Keyexc * next;
-       bool combined;  // Combination with another deadkey
-       tex_accent accent;      // The accent combined with
+       /// Combination with another deadkey
+       bool combined;
+       /// The accent comined with
+       tex_accent accent;
 };
 
 ///
 typedef Keyexc * KmodException;
 
-//
-// 
-//
-
+///
 struct KmodInfo {
+       ///
        string data;
+       ///
        tex_accent accent;
+       ///
        string allowed;
-       KmodException exception_list;    
+       ///
+       KmodException exception_list;
+       ///
        KmodInfo();
 };
 
index 1a6917386f585e9708336643c3e1ab2654074819..f3abf31c13d8c45063450fc3035f9a4ff2e6d78e 100644 (file)
@@ -61,9 +61,7 @@ public:
 
 
 /// Init State
-class TransInitState : 
-       virtual public TransFSMData,
-       public TransState {
+class TransInitState :         virtual public TransFSMData, public TransState {
 public:
        ///
        TransInitState();
@@ -77,9 +75,7 @@ public:
 
 
 /// Deadkey State
-class TransDeadkeyState : 
-       virtual public TransFSMData,
-       public TransState {
+class TransDeadkeyState : virtual public TransFSMData, public TransState {
 public:
        ///
        TransDeadkeyState();
@@ -96,9 +92,7 @@ public:
 
 
 /// Combined State
-class TransCombinedState: 
-       virtual public TransFSMData,
-       public TransState {
+class TransCombinedState : virtual public TransFSMData, public TransState {
 public:
        ///
        TransCombinedState();
@@ -119,12 +113,10 @@ public:
 
 
 ///
-class TransFSM :       
-       virtual public TransFSMData,
-       public TransInitState,
-       public TransDeadkeyState,
-       public TransCombinedState
-{
+class TransFSM : virtual public TransFSMData,
+                public TransInitState,
+                public TransDeadkeyState,
+                public TransCombinedState {
 public:
        ///
        TransFSM();
index 830b055ed984744b51caf8042fb9627053d942ff..0e8652763ba36a5ff661c53d78b574a70ff0396c 100644 (file)
@@ -96,7 +96,6 @@ public:
        virtual void undoLast();
        ///
        virtual void getLog(string const &);
-private:
 };
 
 
index 1c7572a9e14a03d8cc3075dd000f707280901135..a6982d20d89e2f15be9ff014a497e552012d8794 100644 (file)
@@ -1,5 +1,8 @@
 /* Version and release date definition */
+///
 #define LYX_VERSION "1.1.6cvs"
+///
 #define LYX_RELEASE "Tue, Jun 6, 2000"
 /* This version string is intended to be used in files created by LyX */
+///
 #define LYX_DOCVERSION "LyX 1.1"
index e16f6fe793d36c4fb655558e87f7ad0e225781bb..fce31b09fdfe4361aa9943cffd3b74af34edac2d 100644 (file)
@@ -54,24 +54,19 @@ public:
                UNIT_NONE
        };
 
-       //@Man: constructors
-       //@{
        ///
        LyXLength() : val(0), uni(LyXLength::PT) {}
+       ///
        LyXLength(float v, LyXLength::UNIT u) : val(v), uni(u) {}
 
        /** "data" must be a decimal number, followed by a unit. */
        explicit
         LyXLength(string const & data);
-       //@}
        
-       //@Man: selectors
-       //@{
        ///
        float value() const         { return val; };
        ///
        LyXLength::UNIT unit() const { return uni; };
-       //@}
 
        /// conversion
        virtual string asString() const;
@@ -91,7 +86,7 @@ protected:
        LyXLength::UNIT uni;
 };
 
-
+///
 inline
 bool operator==(LyXLength const & l1, LyXLength const & l2)
 {
@@ -99,15 +94,14 @@ bool operator==(LyXLength const & l1, LyXLength const & l2)
                && l1.unit() == l2.unit();
 }
        
-
+///
 extern LyXLength::UNIT unitFromString (string const & data);
+///
 extern bool isValidLength(string const & data, LyXLength * result);
 
 /// LyXGlueLength class
 class LyXGlueLength : public LyXLength {
 public:
-       //@Man: constructors
-       //@{
        ///
        LyXGlueLength(float v,
                      LyXLength::UNIT u, 
@@ -127,10 +121,7 @@ public:
          4cm plus 10pt minus 10pt */
        explicit
         LyXGlueLength(string const & data);
-       //@}
        
-       //@Man: selectors
-       //@{
        ///
        float plusValue() const         { return plus_val; };
        ///
@@ -139,7 +130,6 @@ public:
        float minusValue() const         { return minus_val; };
        ///
        LyXLength::UNIT minusUnit() const { return minus_uni; };
-       //@}
 
        /// conversion
        virtual string asString() const;
@@ -159,7 +149,7 @@ protected:
        LyXLength::UNIT plus_uni, minus_uni;
 };
 
-
+///
 inline
 bool operator==(LyXGlueLength const & l1, LyXGlueLength const & l2)
 {
@@ -172,16 +162,29 @@ bool operator==(LyXGlueLength const & l1, LyXGlueLength const & l2)
 }
 
 
-
+///
 extern bool isValidGlueLength(string const & data, LyXGlueLength * result);
 
 ///  VSpace class
 class VSpace {
 public:
        ///
-       enum vspace_kind { NONE, DEFSKIP, 
-                          SMALLSKIP, MEDSKIP, BIGSKIP, 
-                          VFILL, LENGTH };
+       enum vspace_kind {
+               ///
+               NONE,
+               ///
+               DEFSKIP,
+               ///
+               SMALLSKIP,
+               ///
+               MEDSKIP,
+               ///
+               BIGSKIP,
+               ///
+               VFILL,
+               ///
+               LENGTH
+       };
        /// constructors
        VSpace() : 
                kin (NONE),