Commit 9fa3bb52a927c34c458574d6f355d31315e743ae

sammy 2008-05-01T10:04:14

* Moved C constructor bindings to FTFont.h and FTLayout.h so that they appear in the same file in the generated documentation. * Various minor documentation updates.

diff --git a/.gitignore b/.gitignore
index a052639..b483744 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ stamp-h1
 demo/FTGLDemo
 demo/FTGLMFontDemo
 test/CTest
-test/FTGLTest
+test/CXXTest
 docs/doc-stamp
+docs/doxygen.cfg
 docs/html
diff --git a/src/FTGL/FTFont.h b/src/FTGL/FTFont.h
index 5962e2b..cd02d54 100644
--- a/src/FTGL/FTFont.h
+++ b/src/FTGL/FTFont.h
@@ -308,6 +308,13 @@ class FTGL_EXPORT FTFont
 
 FTGL_BEGIN_C_DECLS
 
+FTGL_EXPORT FTGLfont *ftglCreateBitmapFont(const char *fontname);
+FTGL_EXPORT FTGLfont *ftglCreateExtrudeFont(const char *fontname);
+FTGL_EXPORT FTGLfont *ftglCreateOutlineFont(const char *fontname);
+FTGL_EXPORT FTGLfont *ftglCreatePixmapFont(const char *fontname);
+FTGL_EXPORT FTGLfont *ftglCreatePolygonFont(const char *fontname);
+FTGL_EXPORT FTGLfont *ftglCreateTextureFont(const char *fontname);
+
 FTGL_EXPORT void ftglDestroyFont(FTGLfont*);
 
 FTGL_EXPORT int ftglAttachFile (FTGLfont*, const char*);
diff --git a/src/FTGL/FTGLBitmapFont.h b/src/FTGL/FTGLBitmapFont.h
index e3f5697..f91d658 100644
--- a/src/FTGL/FTGLBitmapFont.h
+++ b/src/FTGL/FTGLBitmapFont.h
@@ -71,9 +71,5 @@ class FTGL_EXPORT FTBitmapFont : public FTFont
 
 #endif //__cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLfont *ftglCreateBitmapFont(const char *fontname);
-FTGL_END_C_DECLS
-
 #endif  //  __FTBitmapFont__
 
diff --git a/src/FTGL/FTGLExtrdFont.h b/src/FTGL/FTGLExtrdFont.h
index 563bd0b..05963cd 100644
--- a/src/FTGL/FTGLExtrdFont.h
+++ b/src/FTGL/FTGLExtrdFont.h
@@ -72,9 +72,5 @@ class FTGL_EXPORT FTExtrudeFont : public FTFont
 
 #endif //__cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLfont *ftglCreateExtrudeFont(const char *fontname);
-FTGL_END_C_DECLS
-
 #endif // __FTExtrudeFont__
 
diff --git a/src/FTGL/FTGLOutlineFont.h b/src/FTGL/FTGLOutlineFont.h
index e9cf3d8..510b0f4 100644
--- a/src/FTGL/FTGLOutlineFont.h
+++ b/src/FTGL/FTGLOutlineFont.h
@@ -71,8 +71,4 @@ class FTGL_EXPORT FTOutlineFont : public FTFont
 
 #endif //__cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLfont *ftglCreateOutlineFont(const char *fontname);
-FTGL_END_C_DECLS
-
 #endif // __FTOutlineFont__
diff --git a/src/FTGL/FTGLPixmapFont.h b/src/FTGL/FTGLPixmapFont.h
index 7c211b0..0b241cf 100644
--- a/src/FTGL/FTGLPixmapFont.h
+++ b/src/FTGL/FTGLPixmapFont.h
@@ -71,9 +71,5 @@ class FTGL_EXPORT FTPixmapFont : public FTFont
 
 #endif // __cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLfont *ftglCreatePixmapFont(const char *fontname);
-FTGL_END_C_DECLS
-
 #endif  //  __FTPixmapFont__
 
diff --git a/src/FTGL/FTGLPolygonFont.h b/src/FTGL/FTGLPolygonFont.h
index c4560b6..9acff59 100644
--- a/src/FTGL/FTGLPolygonFont.h
+++ b/src/FTGL/FTGLPolygonFont.h
@@ -71,9 +71,5 @@ class FTGL_EXPORT FTPolygonFont : public FTFont
 
 #endif //__cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLfont *ftglCreatePolygonFont(const char *fontname);
-FTGL_END_C_DECLS
-
 #endif  //  __FTPolygonFont__
 
diff --git a/src/FTGL/FTGLTextureFont.h b/src/FTGL/FTGLTextureFont.h
index 46d4855..02e3f8f 100644
--- a/src/FTGL/FTGLTextureFont.h
+++ b/src/FTGL/FTGLTextureFont.h
@@ -71,11 +71,5 @@ class  FTGL_EXPORT FTTextureFont : public FTFont
 
 #endif //__cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLfont *ftglCreateTextureFont(const char *fontname);
-FTGL_END_C_DECLS
-
 #endif // __FTTextureFont__
 
-
-
diff --git a/src/FTGL/FTGlyph.h b/src/FTGL/FTGlyph.h
index d174154..b7c62e4 100644
--- a/src/FTGL/FTGlyph.h
+++ b/src/FTGL/FTGlyph.h
@@ -95,7 +95,7 @@ class FTGL_EXPORT FTGlyph
 FTGL_BEGIN_C_DECLS
 
 FTGL_EXPORT FTGLglyph *ftglCreateBitmapGlyph(FT_GlyphSlot glyph);
-FTGL_EXPORT FTGLglyph *ftglCreateExtrdGlyph(FT_GlyphSlot glyph, float depth,
+FTGL_EXPORT FTGLglyph *ftglCreateExtrudeGlyph(FT_GlyphSlot glyph, float depth,
                                 float frontOutset, float backOutset,
                                 int useDisplayList);
 FTGL_EXPORT FTGLglyph *ftglCreateOutlineGlyph(FT_GlyphSlot glyph, float outset,
diff --git a/src/FTGL/FTLayout.h b/src/FTGL/FTLayout.h
index 81f00f1..b87e8cb 100644
--- a/src/FTGL/FTLayout.h
+++ b/src/FTGL/FTLayout.h
@@ -78,13 +78,15 @@ class FTGL_EXPORT FTLayout
 
 FTGL_BEGIN_C_DECLS
 
+FTGL_EXPORT FTGLlayout *ftglCreateSimpleLayout(void);
+
 FTGL_EXPORT void ftglDestroyLayout(FTGLlayout*);
 
-FTGL_EXPORT void  ftglLayoutBBox (FTGLlayout *, const char*, float []);
+FTGL_EXPORT void ftglLayoutBBox (FTGLlayout *, const char*, float []);
 
-FTGL_EXPORT void  ftglLayoutRender      (FTGLlayout *, const char*);
-FTGL_EXPORT void  ftglLayoutRenderMode  (FTGLlayout *, const char *, int);
-FTGL_EXPORT void  ftglLayoutRenderSpace (FTGLlayout *, const char *, float);
+FTGL_EXPORT void ftglLayoutRender      (FTGLlayout *, const char *);
+FTGL_EXPORT void ftglLayoutRenderMode  (FTGLlayout *, const char *, int);
+FTGL_EXPORT void ftglLayoutRenderSpace (FTGLlayout *, const char *, float);
 
 FTGL_EXPORT void      ftglLayoutSetFont (FTGLlayout *, FTGLfont*);
 FTGL_EXPORT FTGLfont* ftglLayoutGetFont (FTGLlayout *);
diff --git a/src/FTGL/FTPoint.h b/src/FTGL/FTPoint.h
index 3c0331c..09a861c 100644
--- a/src/FTGL/FTPoint.h
+++ b/src/FTGL/FTPoint.h
@@ -35,7 +35,7 @@
 
 
 /**
- * FTPoint class is a basic 3 dimensional point or vector.
+ * FTPoint class is a basic 3-dimensional point or vector.
  */
 class FTGL_EXPORT FTPoint
 {
diff --git a/src/FTGL/FTSimpleLayout.h b/src/FTGL/FTSimpleLayout.h
index fbfed6f..10ada2f 100644
--- a/src/FTGL/FTSimpleLayout.h
+++ b/src/FTGL/FTSimpleLayout.h
@@ -36,6 +36,14 @@
 
 class FTFont;
 
+/**
+ * FTSimpleLayout is a specialisation of FTLayout for simple text boxes.
+ *
+ * This class has basic support for text wrapping, left, right and centered
+ * alignment, and text justification.
+ *
+ * @see     FTLayout
+ */
 class FTGL_EXPORT FTSimpleLayout : public FTLayout
 {
     public:
@@ -51,7 +59,7 @@ class FTGL_EXPORT FTSimpleLayout : public FTLayout
         ~FTSimpleLayout() {}
 
         /**
-         * Set he font to use for rendering the text.
+         * Set the font to use for rendering the text.
          *
          * @param fontInit A pointer to the new font.  The font is
          *                 referenced by this but will not be
@@ -125,9 +133,5 @@ class FTGL_EXPORT FTSimpleLayout : public FTLayout
 
 #endif //__cplusplus
 
-FTGL_BEGIN_C_DECLS
-    FTGL_EXPORT FTGLlayout *ftglCreateSimpleLayout(void);
-FTGL_END_C_DECLS
-
 #endif  /* __FTSimpleLayout__ */