Changeset 49

Show
Ignore:
Timestamp:
04/13/06 05:47:01 (3 years ago)
Author:
jordi
Message:

Added the doxygen documentation builder file in the "doc" directory. I've also wirtten the missing documentation for all files in "src", but not in "src/gtk" a it would be redundant.

Also I've been paranoic on spelling (I'm a very bad spelled) and spell checked all source files, changing some string. Updated the translations.

Location:
trunk
Files:
1 added
17 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r40 r49  
    66AM_INIT_AUTOMAKE 
    77AM_MAINTAINER_MODE 
     8 
     9dnl Parameters. 
     10AC_ARG_ENABLE([debug], [  --enable-debug          turn on debugging [[default=no]]]) 
     11if test "x$enable_debug" != "xyes"; then 
     12    DEBUGFLAGS="-DNDEBUG -DG_DISABLE_ASSERT" 
     13else 
     14    DEBUGFLAGS="-DDEBUG" 
     15fi 
     16CFLAGS="$CFLAGS -Wall -pedantic $DEBUGFLAGS" 
     17CXXFLAGS="$CXXFLAGS -Wall -pedantic -Wno-long-long $DEBUGFLAGS" 
    818 
    919dnl Check for programs. 
     
    5161src/gtk/Makefile    \ 
    5262tests/Makefile  \ 
    53 doc/Makefile]) 
     63doc/Makefile    \ 
     64doc/Doxyfile]) 
    5465AC_OUTPUT 
  • trunk/doc/Makefile.am

    r2 r49  
    11# Process this file with automake to produce a Makefile.in file. 
    22 
     3if build_reference 
     4reference: 
     5    doxygen Doxyfile 
     6else 
     7reference: 
     8 
     9endif 
     10 
     11clean-local: 
     12    rm -fr html 
     13 
     14all: reference 
  • trunk/po/ca.po

    r47 r49  
    99"Project-Id-Version: ePDFView 0.1.0\n" 
    1010"Report-Msgid-Bugs-To: jordi@emma-soft.com\n" 
    11 "POT-Creation-Date: 2006-04-12 22:27+0200\n" 
     11"POT-Creation-Date: 2006-04-13 11:46+0200\n" 
    1212"PO-Revision-Date: 2006-04-12 21:17+0200\n" 
    1313"Last-Translator:  <jordi@emma-soft.com>\n" 
     
    1717"Content-Transfer-Encoding: 8bit\n" 
    1818 
    19 #: src/IDocument.cxx:75 
     19#: src/IDocument.cxx:80 
    2020msgid "No error." 
    2121msgstr "Cap error." 
    2222 
    23 #: src/IDocument.cxx:78 
     23#: src/IDocument.cxx:83 
    2424msgid "File not found." 
    2525msgstr "No s'ha trobat el fitxer." 
    2626 
    27 #: src/IDocument.cxx:81 
     27#: src/IDocument.cxx:86 
    2828msgid "Couldn't read the page catalog." 
    2929msgstr "No s'ha pogut llegir el catàled de la pàgina." 
    3030 
    31 #: src/IDocument.cxx:84 
     31#: src/IDocument.cxx:89 
    3232msgid "The PDF file is damaged and can't be repaired." 
    3333msgstr "El fitxer PDF está fet malbé i no es pot reparar." 
    3434 
    35 #: src/IDocument.cxx:87 
     35#: src/IDocument.cxx:92 
    3636msgid "The file is encrypted and the password was incorrect or not supplied." 
    3737msgstr "" 
     
    3939"proveït." 
    4040 
    41 #: src/IDocument.cxx:90 
     41#: src/IDocument.cxx:95 
    4242msgid "Nonexistent or invalid highlight file." 
    4343msgstr "El fitxer de resalt no existeix o és invàlid." 
    4444 
    45 #: src/IDocument.cxx:93 
     45#: src/IDocument.cxx:98 
    4646msgid "Invalid printer." 
    4747msgstr "Impressora invàlida." 
    4848 
    49 #: src/IDocument.cxx:96 
     49#: src/IDocument.cxx:101 
    5050msgid "Error during printing." 
    5151msgstr "Error durant la impressió." 
    5252 
    53 #: src/IDocument.cxx:99 
     53#: src/IDocument.cxx:104 
    5454msgid "The PDF file doesn't allow that operation." 
    5555msgstr "El fitxer PDF no permet aquesta operació." 
    5656 
    57 #: src/IDocument.cxx:102 
     57#: src/IDocument.cxx:107 
    5858msgid "Invalid page number." 
    5959msgstr "Nombre de pàgina invàlid." 
    6060 
    61 #: src/IDocument.cxx:105 
     61#: src/IDocument.cxx:110 
    6262msgid "File I/O error." 
    6363msgstr "Error E/S de fitxer." 
    6464 
    65 #: src/IDocument.cxx:108 
     65#: src/IDocument.cxx:113 
    6666#, c-format 
    6767msgid "Unknown error (%d)." 
     
    8181msgstr "Viso de PDF" 
    8282 
    83 #: src/MainPter.cxx:276 src/MainPter.cxx:285 
     83#: src/MainPter.cxx:277 src/MainPter.cxx:286 
    8484msgid "Error Loading File" 
    8585msgstr "Error carregant fitxer" 
    8686 
    87 #: src/MainPter.cxx:277 
     87#: src/MainPter.cxx:278 
    8888msgid "The password you have supplier is not a valid password for this file." 
    8989msgstr "La contrsenya que heu donat no és vàlida per aquest fitxer." 
     
    238238 
    239239#: src/gtk/MainView.cxx:530 
    240 msgid "A lighweight PDF viewer" 
     240msgid "A lightweight PDF viewer" 
    241241msgstr "Un visor de PDF lleuger" 
    242242 
  • trunk/po/es.po

    r47 r49  
    99"Project-Id-Version: ePDFView 0.1.0\n" 
    1010"Report-Msgid-Bugs-To: jordi@emma-soft.com\n" 
    11 "POT-Creation-Date: 2006-04-12 22:27+0200\n" 
     11"POT-Creation-Date: 2006-04-13 11:46+0200\n" 
    1212"PO-Revision-Date: 2006-04-12 21:17+0200\n" 
    1313"Last-Translator:  <jordi@emma-soft.com>\n" 
     
    1818"Plural-Forms: nplurals=2; plural=(n != 1);\n" 
    1919 
    20 #: src/IDocument.cxx:75 
     20#: src/IDocument.cxx:80 
    2121msgid "No error." 
    2222msgstr "Ningún error." 
    2323 
    24 #: src/IDocument.cxx:78 
     24#: src/IDocument.cxx:83 
    2525msgid "File not found." 
    2626msgstr "Archivo no encontrado." 
    2727 
    28 #: src/IDocument.cxx:81 
     28#: src/IDocument.cxx:86 
    2929msgid "Couldn't read the page catalog." 
    3030msgstr "No se pudo leer el catálogo de la página." 
    3131 
    32 #: src/IDocument.cxx:84 
     32#: src/IDocument.cxx:89 
    3333msgid "The PDF file is damaged and can't be repaired." 
    3434msgstr "El archivo PDF está dañado y no puede ser reparado." 
    3535 
    36 #: src/IDocument.cxx:87 
     36#: src/IDocument.cxx:92 
    3737msgid "The file is encrypted and the password was incorrect or not supplied." 
    3838msgstr "" 
    3939"El archivo está encriptado y la contraseña era incorrecta o no proporcionada" 
    4040 
    41 #: src/IDocument.cxx:90 
     41#: src/IDocument.cxx:95 
    4242msgid "Nonexistent or invalid highlight file." 
    4343msgstr "El archivo de resaltado no existe o es invalido." 
    4444 
    45 #: src/IDocument.cxx:93 
     45#: src/IDocument.cxx:98 
    4646msgid "Invalid printer." 
    4747msgstr "Impresora inválida." 
    4848 
    49 #: src/IDocument.cxx:96 
     49#: src/IDocument.cxx:101 
    5050msgid "Error during printing." 
    5151msgstr "Error durante la impresión." 
    5252 
    53 #: src/IDocument.cxx:99 
     53#: src/IDocument.cxx:104 
    5454msgid "The PDF file doesn't allow that operation." 
    5555msgstr "El archivo PDF no permita esta operación." 
    5656 
    57 #: src/IDocument.cxx:102 
     57#: src/IDocument.cxx:107 
    5858msgid "Invalid page number." 
    5959msgstr "Número de página inválido." 
    6060 
    61 #: src/IDocument.cxx:105 
     61#: src/IDocument.cxx:110 
    6262msgid "File I/O error." 
    6363msgstr "Error E/S de archivo." 
    6464 
    65 #: src/IDocument.cxx:108 
     65#: src/IDocument.cxx:113 
    6666#, c-format 
    6767msgid "Unknown error (%d)." 
     
    8181msgstr "Visor de PDF" 
    8282 
    83 #: src/MainPter.cxx:276 src/MainPter.cxx:285 
     83#: src/MainPter.cxx:277 src/MainPter.cxx:286 
    8484msgid "Error Loading File" 
    8585msgstr "Error Cargando el Archivo" 
    8686 
    87 #: src/MainPter.cxx:277 
     87#: src/MainPter.cxx:278 
    8888msgid "The password you have supplier is not a valid password for this file." 
    8989msgstr "" 
     
    239239 
    240240#: src/gtk/MainView.cxx:530 
    241 msgid "A lighweight PDF viewer" 
     241msgid "A lightweight PDF viewer" 
    242242msgstr "Un visor de PDF ligero" 
    243243 
  • trunk/src/DocumentIndex.cxx

    r43 r49  
    3838/// @brief Get the number of children for this index. 
    3939/// 
    40 /// @return The number of children index that the current index has. 
     40/// @return The number of children this index has. 
    4141/// 
    4242gint 
  • trunk/src/DocumentIndex.h

    r4 r49  
    2323    /// 
    2424    /// @class DocumentIndex 
    25     /// @brief Stores the index name, action and children. 
     25    /// @brief Stores the document's index name, action and its children. 
    2626    /// 
    2727    /// Some documents have an index with them. This index can be used to 
  • trunk/src/DocumentPage.cxx

    r43 r49  
    3434 
    3535/// 
    36 /// @brief Deletes all dinamycally allocated memory for DocumentPage. 
     36/// @brief Deletes all dynamically allocated memory for DocumentPage. 
    3737/// 
    3838DocumentPage::~DocumentPage () 
     
    4545/// 
    4646/// Gets the actual pixels the page is formed of. The format of the image 
    47 /// is RGB, using 3 bytes per pixel and a total of getWidth() * getHeight () 
     47/// is RGB, using 3 bytes per pixel and a total of getWidth() * getHeight() 
    4848/// pixels. 
    4949/// 
     
    7474/// 
    7575/// The row stride is the bytes between two consecutive rows of the page's  
    76 /// image retrived by getData(). Currently this value is 3 * getWidth (),  
     76/// image retrieved by getData(). Currently this value is 3 * getWidth(),  
    7777/// because I use 3 bytes per pixel, but this can change, so better use this 
    7878/// function. 
  • trunk/src/DocumentPage.h

    r19 r49  
    2121namespace ePDFView 
    2222{ 
     23    /// 
     24    /// @class DocumentPage 
     25    /// @brief A single document's page. 
     26    /// 
     27    /// Contains the rendered image of a single document's page. 
     28    /// 
    2329    class DocumentPage 
    2430    { 
    2531        public: 
    26             DocumentPage (); 
    27             ~DocumentPage (); 
     32            DocumentPage (void); 
     33            ~DocumentPage (void); 
    2834             
    2935            guchar *getData (void); 
  • trunk/src/IDocument.cxx

    r45 r49  
    3636 
    3737/// 
    38 /// @brief Gets the Document's error quark. 
     38/// @brief Gets the IDocument's error quark. 
    3939/// 
    4040/// The first time it's called will create the new quark value for the  
     
    4242/// quark value. 
    4343/// 
    44 /// @return The Document's quark. 
     44/// The error quark is used by Glib's g_set_error() function to set the  
     45/// domain in that the error happened. EPDFVIEW_DOCUMENT_ERROR has been 
     46/// defined to call this function, use that defined string when using 
     47/// g_set_error() inside a document's class. 
     48/// 
     49/// @return The IDocument's quark. 
    4550/// 
    4651GQuark 
     
    114119 
    115120/// 
    116 /// @brief Constructs a new Document object. 
     121/// @brief Constructs a new IDocument object. 
    117122/// 
    118123IDocument::IDocument () 
     
    139144 
    140145/// 
    141 /// @brief Deletes all dynamically created objects of Document. 
     146/// @brief Deletes all dynamically created objects of IDocument. 
    142147/// 
    143148IDocument::~IDocument () 
     
    215220/// @brief Gets the document's subject. 
    216221/// 
    217 /// @return The subject of the document or an empty string ig the document don't 
     222/// @return The subject of the document or an empty string if the document don't 
    218223///         have subject. 
    219224/// 
     
    243248/// @brief Gets the document's keywords. 
    244249/// 
    245 /// @return An string with all keywords separated by whitespace, or an empty 
     250/// @return An string with all keywords separated by white space, or an empty 
    246251///         string if the document have no keywords. 
    247252/// 
     
    259264/// @brief Sets the document's keywords. 
    260265/// 
    261 /// @param keywords A whitespace separated list of keywords. 
     266/// @param keywords A white space separated list of keywords. 
    262267/// 
    263268void 
     
    326331/// @brief Gets the document's format. 
    327332/// 
    328 /// @returns The PDF version of the document or an empty string if the version 
     333/// @returns The version of the document or an empty string if the version 
    329334///          is not available (usually only when the document has not been 
    330335///          loaded yet). 
     
    341346 
    342347/// 
    343 /// @brief Sets the document format. 
     348/// @brief Sets the document's format. 
    344349/// 
    345350/// @param format Set the format in which the document is. 
     
    353358 
    354359/// 
    355 /// @brief Gets if the document is linearized. 
    356 /// 
    357 /// @return The string "Yes" if the document is optimized for web viewing, "No" 
    358 ///         if it's not optimized or an empty string if this information is 
     360/// @brief Gets if the document is linearised. 
     361/// 
     362/// @return The string "Yes" if the document is optimised for web viewing, "No" 
     363///         if it's not optimised or an empty string if this information is 
    359364///         not available. 
    360365/// 
     
    370375 
    371376/// 
    372 /// @brief Sets if the document is linearized. 
     377/// @brief Sets if the document is linearised. 
    373378/// 
    374379/// @param linearized Set to TRUE if the document is linearized.  
    375 ///                   False otherwise. 
     380///                   FALSE otherwise. 
    376381/// 
    377382void 
     
    513518/// 
    514519/// @return The file name that contains the document, or an empty string 
    515 ///         if the document isn't loeaded yet. 
     520///         if the document isn't loaded yet. 
    516521/// 
    517522const gchar * 
     
    533538IDocument::setFileName (const gchar *fileName) 
    534539{ 
    535     g_assert (NULL != fileName && "Tried to set a NULL filename."); 
     540    g_assert (NULL != fileName && "Tried to set a NULL file name."); 
    536541 
    537542    g_free (m_FileName); 
     
    605610/// Changes the current page to be the page @a pageNum. If @a pageNum is 
    606611/// greater than the document's last page, then the current page becomes 
    607 /// the last page. If @pageNum is instead less then the first page (i.e.,  
     612/// the last page. If @a pageNum is instead less then the first page (i.e.,  
    608613/// <= 0) then the current page becomes the first (i.e., 1). 
    609614/// 
     
    651656/// @brief Rotates 90 to the left. 
    652657/// 
    653 /// Substract 90 degress to the document's rotation. 
     658/// Substract 90 degrees to the document's rotation. 
    654659/// 
    655660void 
     
    666671/// @brief Rotates 90 to the right. 
    667672/// 
    668 /// Adds 90 degress to the document's rotation. 
     673/// Adds 90 degrees to the document's rotation. 
    669674/// 
    670675void 
     
    677682/// @brief Checks if is possible to zoom in. 
    678683/// 
    679 /// Checks if after zooming int the zoom level will be below the max level. 
     684/// Checks if after zooming in the zoom level will be below the max level. 
    680685/// 
    681686gboolean 
     
    688693/// @brief Checks if is possible to zoom out. 
    689694/// 
    690 /// Checks if after zoomin out the zoom level will be above the min level. 
     695/// Checks if after zooming out the zoom level will be above the min level. 
    691696/// 
    692697gboolean 
     
    710715/// @brief Zooms In. 
    711716/// 
    712 /// Adds a fixed ammount to the scale / zoom level. 
     717/// Adds a fixed amount to the scale / zoom level if the zoom level has not 
     718/// reached the max. 
     719/// 
     720/// @see canZoomIn() 
    713721/// 
    714722void 
     
    724732/// @brief Zooms Out. 
    725733/// 
    726 /// Substracts a fixed amount to the scale / zoom level. 
     734/// Substracts a fixed amount to the scale / zoom level is the zoom level 
     735/// has not reached the min. 
     736/// 
     737/// @see canZoomOut() 
    727738/// 
    728739void 
     
    761772/// @brief Zooms the document to fit the width. 
    762773/// 
    763 /// It tries to get the best zooms / sclale level that will let the document 
    764 /// fit into @a width, wihtout looking into any height. 
     774/// It tries to get the best zooms / scale level that will let the document 
     775/// fit into @a width, without looking into any height. 
    765776/// 
    766777/// @param width The width to fit the document to. 
  • trunk/src/IDocument.h

    r22 r49  
    3535        /// Couldn't open the PDF file. 
    3636        DocumentErrorOpenFile = 1, 
    37         /// Coudln't read the page catalog. 
     37        /// Couldn't read the page catalog. 
    3838        DocumentErrorBadCatalog = 2, 
    3939        /// PDF file is damaged and couldn't be repaired. 
     
    6666        PageModeOC, 
    6767        PageModeAttach, 
    68         // Not yet defined. 
     68        /// Not set yet. 
    6969        PageModeUnset 
    7070    } PageMode; 
     
    8181        PageLayoutTwoPageLeft, 
    8282        PageLayoutTwoPageRight, 
    83         // Not yet defined. 
     83        // Not set yet. 
    8484        PageLayoutUnset 
    8585    } PageLayout; 
    8686 
    8787    /// 
    88     /// @class Document 
    89     /// @brief Has information about a single document. 
    90     /// 
    91     /// Every PDF handled by the application is represented as a Document 
    92     /// class. All information about the document, number of pages, current 
    93     /// page, etc. is inside this class. 
     88    /// @class IDocument 
     89    /// @brief Interface for documents. 
     90    /// 
     91    /// Every document type that the application can handle must be  
     92    /// created from this base class. 
     93    /// Besides the abstracts methods for open a document, this class also 
     94    /// handles the rotation and zoom levels for any IDocument's child class. 
    9495    /// 
    9596    class IDocument 
     
    9899            virtual ~IDocument (void); 
    99100 
     101            /// 
     102            /// @brief Checks if the document has been loaded. 
     103            /// 
     104            /// @return TRUE if the document has been loaded or FALSE otherwise. 
     105            /// 
    100106            virtual gboolean isLoaded (void) = 0; 
     107 
     108            /// 
     109            /// @brief Load a document file. 
     110            /// 
     111            /// Tries to open the document file @a filename using @a password 
     112            /// as a password to decrypt the document. 
     113            /// 
     114            /// The rotation degree is reset to 0 and the scale level to 1.0f 
     115            /// 
     116            /// @param filename The path, absolute or relative, to the flame  
     117            ///                 to open. 
     118            /// @param password The password to use to decrypt @a filename. If 
     119            ///                 the file is not encrypted, you can set it to 
     120            ///                 NULL. 
     121            /// @param error Location to store any error that could happen or 
     122            ///              set to NULL to ignore errors. 
     123            /// 
     124            /// @return TRUE if the file could be opened. FALSE otherwise. 
     125            ///  
    101126            virtual gboolean loadFile (const gchar *filename,  
    102127                                       const gchar *password,  
    103128                                       GError **error) = 0; 
     129            /// 
     130            /// @brief Gets the current page's unscaled size. 
     131            /// 
     132            /// Retrieves the width and height of the current page before 
     133            /// scaling, but after rotate it. 
     134            /// 
     135            /// @param width The location to save the page's width. 
     136            /// @param height The location to save the page's height. 
     137            /// 
     138            virtual void getPageSize (gdouble *width, gdouble *height) = 0; 
     139 
     140            /// 
     141            /// @brief Renders the current page. 
     142            /// 
     143            /// Rendering the current page means to get the pixels for the 
     144            /// current page image given the current rotation and scale level. 
     145            /// 
     146            /// @return A DocumentPage with the image. The returned page must 
     147            ///         be freed by calling delete when done with it. 
     148            /// 
     149            virtual DocumentPage *renderPage (void) = 0; 
     150 
     151             
    104152            const gchar *getTitle (void); 
    105153            void setTitle (const gchar *title); 
     
    121169            void setLinearized (gboolean linearized); 
    122170            const gchar *getCreationDate (void); 
    123             void setCreationDate (const char *date); 
     171            void setCreationDate (const gchar *date); 
    124172            const gchar *getModifiedDate (void); 
    125173            void setModifiedDate (const gchar *date); 
     
    133181            DocumentIndex &getDocumentIndex (void); 
    134182 
    135             void goToFirstPage (); 
    136             void goToLastPage (); 
    137             void goToNextPage (); 
     183            void goToFirstPage (void); 
     184            void goToLastPage (void); 
     185            void goToNextPage (void); 
    138186            void goToPage (gint pageNum); 
    139             void goToPreviousPage (); 
     187            void goToPreviousPage (void); 
    140188 
    141189            gint getRotation (void); 
     
    150198            void zoomToFit (gint width, gint height); 
    151199            void zoomToWidth (gint width); 
    152  
    153             virtual void getPageSize (gdouble *width, gdouble *height) = 0; 
    154             virtual DocumentPage *renderPage (void) = 0; 
    155200 
    156201            static GQuark getErrorQuark (void); 
  • trunk/src/IMainView.h

    r36