Changeset 49
- Timestamp:
- 04/13/06 05:47:01 (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 17 modified
-
configure.ac (modified) (2 diffs)
-
doc/Doxyfile.in (added)
-
doc/Makefile.am (modified) (1 diff)
-
po/ca.po (modified) (5 diffs)
-
po/es.po (modified) (4 diffs)
-
src/DocumentIndex.cxx (modified) (1 diff)
-
src/DocumentIndex.h (modified) (1 diff)
-
src/DocumentPage.cxx (modified) (3 diffs)
-
src/DocumentPage.h (modified) (1 diff)
-
src/IDocument.cxx (modified) (21 diffs)
-
src/IDocument.h (modified) (7 diffs)
-
src/IMainView.h (modified) (2 diffs)
-
src/MainPter.cxx (modified) (5 diffs)
-
src/MainPter.h (modified) (1 diff)
-
src/PDFDocument.cxx (modified) (17 diffs)
-
src/PDFDocument.h (modified) (1 diff)
-
src/gtk/MainView.cxx (modified) (5 diffs)
-
src/main.cxx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r40 r49 6 6 AM_INIT_AUTOMAKE 7 7 AM_MAINTAINER_MODE 8 9 dnl Parameters. 10 AC_ARG_ENABLE([debug], [ --enable-debug turn on debugging [[default=no]]]) 11 if test "x$enable_debug" != "xyes"; then 12 DEBUGFLAGS="-DNDEBUG -DG_DISABLE_ASSERT" 13 else 14 DEBUGFLAGS="-DDEBUG" 15 fi 16 CFLAGS="$CFLAGS -Wall -pedantic $DEBUGFLAGS" 17 CXXFLAGS="$CXXFLAGS -Wall -pedantic -Wno-long-long $DEBUGFLAGS" 8 18 9 19 dnl Check for programs. … … 51 61 src/gtk/Makefile \ 52 62 tests/Makefile \ 53 doc/Makefile]) 63 doc/Makefile \ 64 doc/Doxyfile]) 54 65 AC_OUTPUT -
trunk/doc/Makefile.am
r2 r49 1 1 # Process this file with automake to produce a Makefile.in file. 2 2 3 if build_reference 4 reference: 5 doxygen Doxyfile 6 else 7 reference: 8 9 endif 10 11 clean-local: 12 rm -fr html 13 14 all: reference -
trunk/po/ca.po
r47 r49 9 9 "Project-Id-Version: ePDFView 0.1.0\n" 10 10 "Report-Msgid-Bugs-To: jordi@emma-soft.com\n" 11 "POT-Creation-Date: 2006-04-1 2 22:27+0200\n"11 "POT-Creation-Date: 2006-04-13 11:46+0200\n" 12 12 "PO-Revision-Date: 2006-04-12 21:17+0200\n" 13 13 "Last-Translator: <jordi@emma-soft.com>\n" … … 17 17 "Content-Transfer-Encoding: 8bit\n" 18 18 19 #: src/IDocument.cxx: 7519 #: src/IDocument.cxx:80 20 20 msgid "No error." 21 21 msgstr "Cap error." 22 22 23 #: src/IDocument.cxx: 7823 #: src/IDocument.cxx:83 24 24 msgid "File not found." 25 25 msgstr "No s'ha trobat el fitxer." 26 26 27 #: src/IDocument.cxx:8 127 #: src/IDocument.cxx:86 28 28 msgid "Couldn't read the page catalog." 29 29 msgstr "No s'ha pogut llegir el catà led de la pà gina." 30 30 31 #: src/IDocument.cxx:8 431 #: src/IDocument.cxx:89 32 32 msgid "The PDF file is damaged and can't be repaired." 33 33 msgstr "El fitxer PDF está fet malbé i no es pot reparar." 34 34 35 #: src/IDocument.cxx: 8735 #: src/IDocument.cxx:92 36 36 msgid "The file is encrypted and the password was incorrect or not supplied." 37 37 msgstr "" … … 39 39 "proveït." 40 40 41 #: src/IDocument.cxx:9 041 #: src/IDocument.cxx:95 42 42 msgid "Nonexistent or invalid highlight file." 43 43 msgstr "El fitxer de resalt no existeix o és invà lid." 44 44 45 #: src/IDocument.cxx:9 345 #: src/IDocument.cxx:98 46 46 msgid "Invalid printer." 47 47 msgstr "Impressora invà lida." 48 48 49 #: src/IDocument.cxx: 9649 #: src/IDocument.cxx:101 50 50 msgid "Error during printing." 51 51 msgstr "Error durant la impressió." 52 52 53 #: src/IDocument.cxx: 9953 #: src/IDocument.cxx:104 54 54 msgid "The PDF file doesn't allow that operation." 55 55 msgstr "El fitxer PDF no permet aquesta operació." 56 56 57 #: src/IDocument.cxx:10 257 #: src/IDocument.cxx:107 58 58 msgid "Invalid page number." 59 59 msgstr "Nombre de pà gina invà lid." 60 60 61 #: src/IDocument.cxx:1 0561 #: src/IDocument.cxx:110 62 62 msgid "File I/O error." 63 63 msgstr "Error E/S de fitxer." 64 64 65 #: src/IDocument.cxx:1 0865 #: src/IDocument.cxx:113 66 66 #, c-format 67 67 msgid "Unknown error (%d)." … … 81 81 msgstr "Viso de PDF" 82 82 83 #: src/MainPter.cxx:27 6 src/MainPter.cxx:28583 #: src/MainPter.cxx:277 src/MainPter.cxx:286 84 84 msgid "Error Loading File" 85 85 msgstr "Error carregant fitxer" 86 86 87 #: src/MainPter.cxx:27 787 #: src/MainPter.cxx:278 88 88 msgid "The password you have supplier is not a valid password for this file." 89 89 msgstr "La contrsenya que heu donat no és và lida per aquest fitxer." … … 238 238 239 239 #: src/gtk/MainView.cxx:530 240 msgid "A ligh weight PDF viewer"240 msgid "A lightweight PDF viewer" 241 241 msgstr "Un visor de PDF lleuger" 242 242 -
trunk/po/es.po
r47 r49 9 9 "Project-Id-Version: ePDFView 0.1.0\n" 10 10 "Report-Msgid-Bugs-To: jordi@emma-soft.com\n" 11 "POT-Creation-Date: 2006-04-1 2 22:27+0200\n"11 "POT-Creation-Date: 2006-04-13 11:46+0200\n" 12 12 "PO-Revision-Date: 2006-04-12 21:17+0200\n" 13 13 "Last-Translator: <jordi@emma-soft.com>\n" … … 18 18 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 19 20 #: src/IDocument.cxx: 7520 #: src/IDocument.cxx:80 21 21 msgid "No error." 22 22 msgstr "Ningún error." 23 23 24 #: src/IDocument.cxx: 7824 #: src/IDocument.cxx:83 25 25 msgid "File not found." 26 26 msgstr "Archivo no encontrado." 27 27 28 #: src/IDocument.cxx:8 128 #: src/IDocument.cxx:86 29 29 msgid "Couldn't read the page catalog." 30 30 msgstr "No se pudo leer el catálogo de la página." 31 31 32 #: src/IDocument.cxx:8 432 #: src/IDocument.cxx:89 33 33 msgid "The PDF file is damaged and can't be repaired." 34 34 msgstr "El archivo PDF está dañado y no puede ser reparado." 35 35 36 #: src/IDocument.cxx: 8736 #: src/IDocument.cxx:92 37 37 msgid "The file is encrypted and the password was incorrect or not supplied." 38 38 msgstr "" 39 39 "El archivo está encriptado y la contraseña era incorrecta o no proporcionada" 40 40 41 #: src/IDocument.cxx:9 041 #: src/IDocument.cxx:95 42 42 msgid "Nonexistent or invalid highlight file." 43 43 msgstr "El archivo de resaltado no existe o es invalido." 44 44 45 #: src/IDocument.cxx:9 345 #: src/IDocument.cxx:98 46 46 msgid "Invalid printer." 47 47 msgstr "Impresora inválida." 48 48 49 #: src/IDocument.cxx: 9649 #: src/IDocument.cxx:101 50 50 msgid "Error during printing." 51 51 msgstr "Error durante la impresión." 52 52 53 #: src/IDocument.cxx: 9953 #: src/IDocument.cxx:104 54 54 msgid "The PDF file doesn't allow that operation." 55 55 msgstr "El archivo PDF no permita esta operación." 56 56 57 #: src/IDocument.cxx:10 257 #: src/IDocument.cxx:107 58 58 msgid "Invalid page number." 59 59 msgstr "Número de página inválido." 60 60 61 #: src/IDocument.cxx:1 0561 #: src/IDocument.cxx:110 62 62 msgid "File I/O error." 63 63 msgstr "Error E/S de archivo." 64 64 65 #: src/IDocument.cxx:1 0865 #: src/IDocument.cxx:113 66 66 #, c-format 67 67 msgid "Unknown error (%d)." … … 81 81 msgstr "Visor de PDF" 82 82 83 #: src/MainPter.cxx:27 6 src/MainPter.cxx:28583 #: src/MainPter.cxx:277 src/MainPter.cxx:286 84 84 msgid "Error Loading File" 85 85 msgstr "Error Cargando el Archivo" 86 86 87 #: src/MainPter.cxx:27 787 #: src/MainPter.cxx:278 88 88 msgid "The password you have supplier is not a valid password for this file." 89 89 msgstr "" … … 239 239 240 240 #: src/gtk/MainView.cxx:530 241 msgid "A ligh weight PDF viewer"241 msgid "A lightweight PDF viewer" 242 242 msgstr "Un visor de PDF ligero" 243 243 -
trunk/src/DocumentIndex.cxx
r43 r49 38 38 /// @brief Get the number of children for this index. 39 39 /// 40 /// @return The number of children index that the currentindex has.40 /// @return The number of children this index has. 41 41 /// 42 42 gint -
trunk/src/DocumentIndex.h
r4 r49 23 23 /// 24 24 /// @class DocumentIndex 25 /// @brief Stores the index name, action andchildren.25 /// @brief Stores the document's index name, action and its children. 26 26 /// 27 27 /// Some documents have an index with them. This index can be used to -
trunk/src/DocumentPage.cxx
r43 r49 34 34 35 35 /// 36 /// @brief Deletes all d inamycally allocated memory for DocumentPage.36 /// @brief Deletes all dynamically allocated memory for DocumentPage. 37 37 /// 38 38 DocumentPage::~DocumentPage () … … 45 45 /// 46 46 /// 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() 48 48 /// pixels. 49 49 /// … … 74 74 /// 75 75 /// The row stride is the bytes between two consecutive rows of the page's 76 /// image retri ved by getData(). Currently this value is 3 * getWidth(),76 /// image retrieved by getData(). Currently this value is 3 * getWidth(), 77 77 /// because I use 3 bytes per pixel, but this can change, so better use this 78 78 /// function. -
trunk/src/DocumentPage.h
r19 r49 21 21 namespace ePDFView 22 22 { 23 /// 24 /// @class DocumentPage 25 /// @brief A single document's page. 26 /// 27 /// Contains the rendered image of a single document's page. 28 /// 23 29 class DocumentPage 24 30 { 25 31 public: 26 DocumentPage ( );27 ~DocumentPage ( );32 DocumentPage (void); 33 ~DocumentPage (void); 28 34 29 35 guchar *getData (void); -
trunk/src/IDocument.cxx
r45 r49 36 36 37 37 /// 38 /// @brief Gets the Document's error quark.38 /// @brief Gets the IDocument's error quark. 39 39 /// 40 40 /// The first time it's called will create the new quark value for the … … 42 42 /// quark value. 43 43 /// 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. 45 50 /// 46 51 GQuark … … 114 119 115 120 /// 116 /// @brief Constructs a new Document object.121 /// @brief Constructs a new IDocument object. 117 122 /// 118 123 IDocument::IDocument () … … 139 144 140 145 /// 141 /// @brief Deletes all dynamically created objects of Document.146 /// @brief Deletes all dynamically created objects of IDocument. 142 147 /// 143 148 IDocument::~IDocument () … … 215 220 /// @brief Gets the document's subject. 216 221 /// 217 /// @return The subject of the document or an empty string i gthe document don't222 /// @return The subject of the document or an empty string if the document don't 218 223 /// have subject. 219 224 /// … … 243 248 /// @brief Gets the document's keywords. 244 249 /// 245 /// @return An string with all keywords separated by white space, or an empty250 /// @return An string with all keywords separated by white space, or an empty 246 251 /// string if the document have no keywords. 247 252 /// … … 259 264 /// @brief Sets the document's keywords. 260 265 /// 261 /// @param keywords A white space separated list of keywords.266 /// @param keywords A white space separated list of keywords. 262 267 /// 263 268 void … … 326 331 /// @brief Gets the document's format. 327 332 /// 328 /// @returns The PDFversion of the document or an empty string if the version333 /// @returns The version of the document or an empty string if the version 329 334 /// is not available (usually only when the document has not been 330 335 /// loaded yet). … … 341 346 342 347 /// 343 /// @brief Sets the document format.348 /// @brief Sets the document's format. 344 349 /// 345 350 /// @param format Set the format in which the document is. … … 353 358 354 359 /// 355 /// @brief Gets if the document is lineari zed.356 /// 357 /// @return The string "Yes" if the document is optimi zed for web viewing, "No"358 /// if it's not optimi zed or an empty string if this information is360 /// @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 359 364 /// not available. 360 365 /// … … 370 375 371 376 /// 372 /// @brief Sets if the document is lineari zed.377 /// @brief Sets if the document is linearised. 373 378 /// 374 379 /// @param linearized Set to TRUE if the document is linearized. 375 /// F alseotherwise.380 /// FALSE otherwise. 376 381 /// 377 382 void … … 513 518 /// 514 519 /// @return The file name that contains the document, or an empty string 515 /// if the document isn't lo eaded yet.520 /// if the document isn't loaded yet. 516 521 /// 517 522 const gchar * … … 533 538 IDocument::setFileName (const gchar *fileName) 534 539 { 535 g_assert (NULL != fileName && "Tried to set a NULL file name.");540 g_assert (NULL != fileName && "Tried to set a NULL file name."); 536 541 537 542 g_free (m_FileName); … … 605 610 /// Changes the current page to be the page @a pageNum. If @a pageNum is 606 611 /// 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., 608 613 /// <= 0) then the current page becomes the first (i.e., 1). 609 614 /// … … 651 656 /// @brief Rotates 90 to the left. 652 657 /// 653 /// Substract 90 degre ss to the document's rotation.658 /// Substract 90 degrees to the document's rotation. 654 659 /// 655 660 void … … 666 671 /// @brief Rotates 90 to the right. 667 672 /// 668 /// Adds 90 degre ss to the document's rotation.673 /// Adds 90 degrees to the document's rotation. 669 674 /// 670 675 void … … 677 682 /// @brief Checks if is possible to zoom in. 678 683 /// 679 /// Checks if after zooming in tthe zoom level will be below the max level.684 /// Checks if after zooming in the zoom level will be below the max level. 680 685 /// 681 686 gboolean … … 688 693 /// @brief Checks if is possible to zoom out. 689 694 /// 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. 691 696 /// 692 697 gboolean … … 710 715 /// @brief Zooms In. 711 716 /// 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() 713 721 /// 714 722 void … … 724 732 /// @brief Zooms Out. 725 733 /// 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() 727 738 /// 728 739 void … … 761 772 /// @brief Zooms the document to fit the width. 762 773 /// 763 /// It tries to get the best zooms / sc lale level that will let the document764 /// fit into @a width, wi htout 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. 765 776 /// 766 777 /// @param width The width to fit the document to. -
trunk/src/IDocument.h
r22 r49 35 35 /// Couldn't open the PDF file. 36 36 DocumentErrorOpenFile = 1, 37 /// Cou dln't read the page catalog.37 /// Couldn't read the page catalog. 38 38 DocumentErrorBadCatalog = 2, 39 39 /// PDF file is damaged and couldn't be repaired. … … 66 66 PageModeOC, 67 67 PageModeAttach, 68 // Not yet defined.68 /// Not set yet. 69 69 PageModeUnset 70 70 } PageMode; … … 81 81 PageLayoutTwoPageLeft, 82 82 PageLayoutTwoPageRight, 83 // Not yet defined.83 // Not set yet. 84 84 PageLayoutUnset 85 85 } PageLayout; 86 86 87 87 /// 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. 94 95 /// 95 96 class IDocument … … 98 99 virtual ~IDocument (void); 99 100 101 /// 102 /// @brief Checks if the document has been loaded. 103 /// 104 /// @return TRUE if the document has been loaded or FALSE otherwise. 105 /// 100 106 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 /// 101 126 virtual gboolean loadFile (const gchar *filename, 102 127 const gchar *password, 103 128 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 104 152 const gchar *getTitle (void); 105 153 void setTitle (const gchar *title); … … 121 169 void setLinearized (gboolean linearized); 122 170 const gchar *getCreationDate (void); 123 void setCreationDate (const char *date);171 void setCreationDate (const gchar *date); 124 172 const gchar *getModifiedDate (void); 125 173 void setModifiedDate (const gchar *date); … … 133 181 DocumentIndex &getDocumentIndex (void); 134 182 135 void goToFirstPage ( );136 void goToLastPage ( );137 void goToNextPage ( );183 void goToFirstPage (void); 184 void goToLastPage (void); 185 void goToNextPage (void); 138 186 void goToPage (gint pageNum); 139 void goToPreviousPage ( );187 void goToPreviousPage (void); 140 188 141 189 gint getRotation (void); … … 150 198 void zoomToFit (gint width, gint height); 151 199 void zoomToWidth (gint width); 152 153 virtual void getPageSize (gdouble *width, gdouble *height) = 0;154 virtual DocumentPage *renderPage (void) = 0;155 200 156 201 static GQuark getErrorQuark (void); -
trunk/src/IMainView.h
r36
