Changeset 148

Show
Ignore:
Timestamp:
05/05/06 15:43:37 (2 years ago)
Author:
jordi
Message:

Added all missing comments for all functions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Config.cxx

    r113 r148  
    9191/// This is the main "entry point" for the configuration. All classes that 
    9292/// want to get configuration must call this function to retrieve the 
    93 /// configuration object. The first time this funcion is called creates 
     93/// configuration object. The first time this function is called creates 
    9494/// the object. 
    9595/// 
  • trunk/src/Config.h

    r100 r148  
    5858             
    5959        protected: 
     60            /// The configuration values. 
    6061            GKeyFile *m_Values; 
    6162             
     
    6364            Config (Config &config) { } 
    6465 
     66            /// The global configuration object that is returned by 
     67            /// ePDFView::Config::getConfig() function. 
    6568            static Config *m_Config; 
     69            /// This is for test only purposes. If this variables is 
     70            /// set to false, the Config class doesn't load 
     71            /// the configuration values from the file and doesn't save 
     72            /// it when destroyed. 
    6673            static gboolean m_LoadFile; 
    6774 
    68             gboolean getBoolean (const gchar *group, const char *key, 
     75            gboolean getBoolean (const gchar *group, const gchar *key, 
    6976                                 gboolean defaultValue); 
    70             gint getInteger (const gchar *group, const char *key,  
     77            gint getInteger (const gchar *group, const gchar *key,  
    7178                             gint defaultValue); 
    72             gchar *getString (const gchar *group, const char *key,  
     79            gchar *getString (const gchar *group, const gchar *key,  
    7380                              const gchar *defaultValue); 
    7481    }; 
  • trunk/src/DocumentLink.cxx

    r147 r148  
    2121using namespace ePDFView; 
    2222 
     23/// 
     24/// @brief Construct a new DocumentLink object. 
     25/// 
     26/// @param x1 The X coordinate of the link's top-left corner. 
     27/// @param y1 The Y coordinate of the link's top-left corner. 
     28/// @param x2 The X coordinate of the link's bottom-right corner. 
     29/// @param y2 The Y coordinate of the link's bottom-right corner. 
     30/// @param destinationPage The page number the links points to. 
     31/// 
    2332DocumentLink::DocumentLink (gdouble x1, gdouble y1, gdouble x2, gdouble y2, 
    2433                            gint destinationPage) 
     
    3140} 
    3241 
     42/// 
     43/// @brief Destroys all dynamically allocated memory by DocumentLink. 
     44/// 
    3345DocumentLink::~DocumentLink () 
    3446{ 
    3547} 
    3648 
     49/// 
     50/// @brief Gets the destination page number. 
     51/// 
     52/// @return The page number the link's points at. 
     53/// 
    3754gint 
    3855DocumentLink::getDestinationPage () 
     
    4158} 
    4259 
     60/// 
     61/// @brief Checks if a position is over the link. 
     62/// 
     63/// This function just check that the given position (x, y) is either 
     64/// inside the link's rectangle (i.e., is over the link) or not. 
     65/// 
     66/// @param x The X coordinate of the position to check. 
     67/// @param y The Y coordinate of the position to check. 
     68/// 
     69/// @return TRUE if the position is over the link. FALSE otherwise. 
     70/// 
    4371gboolean 
    4472DocumentLink::positionIsOver (gint x, gint y) 
  • trunk/src/DocumentLink.h

    r147 r148  
    2121namespace ePDFView 
    2222{ 
     23    /// 
     24    /// @class DocumentLink 
     25    /// @brief A single link on a page. 
     26    /// 
     27    /// This class is used by ePDFView::DocumentPage to maintain a list 
     28    /// of all links that a single page have. A link, in this version of 
     29    /// ePDFView, is just a rectangle on a page that points to another page. 
     30    /// 
    2331    class DocumentLink 
    2432    { 
     
    3240 
    3341        protected: 
     42            /// The number of the link's destination page. 
    3443            gint m_DestinationPage; 
     44            /// The X coordinate of the link's top-left corner. 
    3545            gdouble m_X1; 
     46            /// The X coordinate of the link's bottom-right corner. 
    3647            gdouble m_X2; 
     48            /// The Y coordinate of the link's top-left corner. 
    3749            gdouble m_Y1; 
     50            /// The Y coordinate of the link's bottom-right corner. 
    3851            gdouble m_Y2; 
    3952    }; 
  • trunk/src/DocumentOutline.h

    r61 r148  
    5050            void setDestination (gint destination); 
    5151 
    52         private: 
     52        protected: 
     53            /// The list of this outline's children. 
    5354            GList *m_Children; 
     55            /// The page number this outline points to. 
    5456            gint m_Destination; 
     57            /// @brief This is used to know which child to return when calling 
     58            /// the DocumentOutline::getNextChild() function. 
    5559            GList *m_LastReturnedChild; 
     60            /// The outline's parent outline. 
    5661            DocumentOutline *m_Parent; 
     62            /// The outline's name or title. 
    5763            gchar *m_Title; 
    5864    }; 
  • trunk/src/DocumentPage.cxx

    r147 r148  
    5151} 
    5252 
     53/// 
     54/// @brief Adds a new link to the page. 
     55/// 
     56/// When rendering the page, the responsible document will extract the 
     57/// links from the page and call this function with each links it find. 
     58///  
     59/// @param link The link to add. The DocumentPage class will delete it. 
     60/// 
    5361void 
    5462DocumentPage::addLink (DocumentLink *link) 
     
    7583} 
    7684 
     85/// 
     86/// @brief Gets the link for a given position. 
     87/// 
     88/// This function will get the link whose rectangle is under the position 
     89/// passed as parameter. 
     90/// 
     91/// @param x The X coordinate of the link's position. 
     92/// @param y The Y coordinate of the link's position. 
     93/// 
     94/// @return The link under the position (x, y) or NULL if no link exists. 
     95/// 
    7796DocumentLink * 
    7897DocumentPage::getLinkAtPosition (gint x, gint y) 
  • trunk/src/DocumentPage.h

    r147 r148  
    4141            gboolean newPage (gint width, gint height); 
    4242 
    43         private: 
     43        protected: 
     44            /// The page's image. 
    4445            guchar *m_Data; 
     46            /// The page's height. 
    4547            gint m_Height; 
     48            /// The page's width. 
    4649            gint m_Width; 
     50            /// The list of links from the page. 
    4751            GList *m_LinkList; 
    4852    }; 
  • trunk/src/IDocument.cxx

    r147 r148  
    169169} 
    170170 
     171/// 
     172/// @brief Attaches a new observer object. 
     173/// 
     174/// When a changes happens on the document all classes that 
     175/// have been attached to the document will receive a notification 
     176/// of such a change. 
     177/// 
     178/// @param observer The observer object to attach. 
     179/// 
    171180void 
    172181IDocument::attach (const IDocumentObserver *observer) 
     
    177186} 
    178187 
    179 void 
    180 IDocument::deattach (const IDocumentObserver *observer) 
    181 
    182     g_assert (NULL != observer && "Tried to deattach a NULL observer."); 
     188/// 
     189/// @brief Detaches an observer object. 
     190/// 
     191/// When a previously attached object is detached no longer receives 
     192/// notification messages when the document is changed. 
     193/// 
     194/// @param observer The observer object to detach. 
     195/// 
     196void 
     197IDocument::detach (const IDocumentObserver *observer) 
     198
     199    g_assert (NULL != observer && "Tried to detach a NULL observer."); 
    183200 
    184201    m_Observers = g_list_remove_all (m_Observers, observer); 
    185202} 
    186203 
     204/// 
     205/// @brief The document has been loaded. 
     206/// 
     207/// This is called when the JobLoad class is done. It in turn notifies 
     208/// all attached observers about this situation. 
     209/// 
    187210void 
    188211IDocument::notifyLoad () 
     
    200223} 
    201224 
     225/// 
     226/// @brief The document couldn't be loaded. 
     227/// 
     228/// This is called by the JobLoad class when the document couldn't 
     229/// be opened. It in turns notifies all attached observers. 
     230/// 
     231/// @param error The error message of why couldn't open the document. 
     232/// 
    202233void 
    203234IDocument::notifyLoadError (const GError *error) 
     
    211242} 
    212243 
     244/// 
     245/// @brief The document couldn't be loaded because it's encrypted. 
     246/// 
     247/// This is called by the JobLoad class when the document to load is 
     248/// encrypted and no password or an invalid one was supplied. It in turns 
     249/// notifies all attached observers. 
     250/// 
     251/// @param fileName The file that was trying to load. 
     252/// @param reload TRUE if the document was trying to reload, FALSE if it 
     253///               was being loaded as new. 
     254/// @param error The error message that the operation produced. 
     255/// 
    213256void 
    214257IDocument::notifyLoadPassword (const gchar *fileName, gboolean reload, 
     
    223266} 
    224267 
     268/// 
     269/// @brief The current page has been changed. 
     270/// 
     271/// This is called when the current page has been changed. It notifies 
     272/// all attached observers about this. 
     273/// 
    225274void 
    226275IDocument::notifyPageChanged () 
     
    235284} 
    236285 
     286/// 
     287/// @brief A document's page has been rendered. 
     288/// 
     289/// This is called by the JobRender class when it finished to render 
     290/// a document's page. 
     291/// 
     292/// @param pageNumber The number of the page that has been rendered. 
     293/// @param age The age that the page had when started to be rendered. 
     294/// @param pageImage The rendered page's image. 
     295/// 
    237296void 
    238297IDocument::notifyPageRendered (gint pageNumber, guint32 age, 
     
    253312} 
    254313 
     314/// 
     315/// @brief The page has been rotated. 
     316/// 
     317/// This is called when the page rotation changes. It notifies all 
     318/// attached observer about this. 
     319/// 
    255320void 
    256321IDocument::notifyPageRotated () 
     
    265330} 
    266331 
     332/// 
     333/// @brief The page's zoom has been changed. 
     334/// 
     335/// This is called when the page scale has been changed. It notifies 
     336/// all attached observers about this. 
     337/// 
    267338void 
    268339IDocument::notifyPageZoomed () 
     
    277348} 
    278349 
     350/// 
     351/// @brief The document has been reloaded. 
     352/// 
     353/// This is called by the JobLoad class when the document has been reloaded. 
     354/// It in turns notifies all attached observers about this. 
     355/// 
    279356void 
    280357IDocument::notifyReload () 
     
    293370} 
    294371 
     372/// 
     373/// @brief Loads a file. 
     374/// 
     375/// This is used when loading a new file name. 
     376/// 
     377/// @param fileName The file name to load. 
     378/// @param password The password to use to load the file or NULL if no 
     379///                 password is used. 
     380/// 
    295381void 
    296382IDocument::load (const gchar *fileName, const gchar *password) 
     
    307393} 
    308394 
     395/// 
     396/// @brief Reloads the document. 
     397/// 
     398/// Opens again the same file name using the previously used password. 
     399/// 
    309400void 
    310401IDocument::reload (void) 
     
    759850/// @brief Gets the document's current page image. 
    760851/// 
    761 /// @return The rendered image of the current page. 
     852/// @return The rendered image of the current page or NULL if the image 
     853///         is not yet available. 
    762854/// 
    763855DocumentPage * 
    764856IDocument::getCurrentPage () 
    765857{ 
    766     volatile PageCache *cachedPage = getCachedPage (m_CurrentPage); 
     858    PageCache *cachedPage = getCachedPage (m_CurrentPage); 
    767859    if ( NULL == cachedPage ) 
    768860    { 
     
    11511243} 
    11521244 
     1245/// 
     1246/// @brief Retrieves a page from the cache. 
     1247/// 
     1248/// @param pageNum The number of the page to get from the cache. 
     1249/// 
     1250/// @return The page cached if the page is in the cache or NULL if it's not 
     1251///         in the cache. 
     1252/// 
    11531253PageCache * 
    11541254IDocument::getCachedPage (gint pageNum) 
     
    12101310/// 
    12111311/// Deletes all elements from the cache. This must be done from 
    1212 /// the derivated classes destructor. 
     1312/// the derived classes destructor. 
    12131313/// 
    12141314void 
     
    12271327} 
    12281328 
     1329/// 
     1330/// @brief Checks if the current page has a link on a given position. 
     1331/// 
     1332/// Checks if under a given position the document's current page have a  
     1333/// link. 
     1334/// 
     1335/// @param x The X coordinate of the position to check. 
     1336/// @param y The Y coordinate of the position to check. 
     1337/// 
     1338/// @return TRUE if the document's current page has a link under the given 
     1339///         position. FALSE otherwise. 
     1340/// 
    12291341gboolean 
    12301342IDocument::hasLinkAtPosition (gint x, gint y) 
     
    12421354} 
    12431355 
     1356/// 
     1357/// @brief Actives a link under a given position. 
     1358/// 
     1359/// Activating a link means following the link: goes to the page 
     1360/// that the links point to. 
     1361/// 
     1362/// @param x The X coordinate of the current page's link to activate. 
     1363/// @param y The Y coordinate of the current page's link to activate. 
     1364/// 
    12441365void 
    12451366IDocument::activateLinkAtPosition (gint x, gint y) 
  • trunk/src/IDocument.h

    r147 r148  
    106106    } PageLayout; 
    107107 
    108  
     108    /// 
     109    /// @brief A cached page. 
     110    /// 
    109111    typedef struct 
    110112    { 
     113        /// The page's age in the cache. 
    111114        guint32 age; 
     115        /// The page's number. 
    112116        gint pageNumber; 
     117        /// The rendered page image. 
    113118        DocumentPage *pageImage; 
    114119    } PageCache; 
     
    183188 
    184189            void attach (const IDocumentObserver *observer); 
    185             void deattach (const IDocumentObserver *observer); 
     190            void detach (const IDocumentObserver *observer); 
    186191 
    187192            void notifyLoad (void); 
     
    270275            void refreshCache (void); 
    271276 
     277            /// The document's author. 
    272278            gchar *m_Author; 
     279            /// The document's creation date and time. 
    273280            gchar *m_CreationDate; 
     281            /// The document's software creator. 
    274282            gchar *m_Creator; 
     283            /// The document's currently shown page. 
    275284            gint m_CurrentPage; 
     285            /// The document's format. 
    276286            gchar *m_Format; 
     287            /// The document's password. 
    277288            gchar *m_FileName; 
     289            /// The document's keyword. 
    278290            gchar *m_Keywords; 
     291            /// Tells if the document is linearized or not. 
    279292            gchar *m_Linearized; 
     293            /// The document's modification date and time. 
    280294            gchar *m_ModifiedDate; 
     295            /// @brief The list of classes that will receive notifications 
     296            /// when the document changes. 
    281297            GList *m_Observers; 
     298            /// The document's outline or index. 
    282299            DocumentOutline *m_Outline; 
     300            /// The cache of already rendered document's pages. 
    283301            GList *m_PageCache; 
     302            /// The age that will get the next page of the cache. 
    284303            gint m_PageCacheAge; 
     304            /// The document's page layout. 
    285305            PageLayout m_PageLayout; 
     306            /// The document's page mode. 
    286307            PageMode m_PageMode; 
     308            /// The number of pages the document has. 
    287309            gint m_PageNumber; 
     310            /// The last password used to open the document. 
    288311            gchar *m_Password; 
     312            /// The document's software producer. 
    289313            gchar *m_Producer; 
     314            /// The document's current rotation in degrees. 
    290315            gint m_Rotation; 
     316            /// The document's current zoom or scale level. 
    291317            gdouble m_Scale; 
     318            /// The document's subject. 
    292319            gchar *m_Subject; 
     320            /// The document's title. 
    293321            gchar *m_Title; 
    294322    }; 
  • trunk/src/IDocumentObserver.h

    r136 r148  
    2121namespace ePDFView 
    2222{ 
     23    /// @class IDocumentObserver 
     24    /// @brief Interface for IDocument's observers. 
     25    /// 
     26    /// A document observer is just a class that receives notifications 
     27    /// of the document when it changes its state. 
     28    /// 
    2329    class IDocumentObserver 
    2430    { 
    2531        public: 
     32            /// @brief Destroys all dynamically allocated memory. 
    2633            virtual ~IDocumentObserver (void) { } 
    27             
     34        
     35            /// 
     36            /// @brief The document has been loaded. 
     37            /// 
     38            /// This function is called when the document has been 
     39            /// loaded successfully. 
     40            /// 
    2841            virtual void notifyLoad (void) { } 
     42             
     43            /// 
     44            /// @brief The document couldn't be loaded due an error. 
     45            /// 
     46            /// This function is called when the document couldn't be 
     47            /// loaded because of an error. The error message is 
     48            /// passed as a parameter. 
     49            /// 
     50            /// @param error The error code and message. 
     51            /// 
    2952            virtual void notifyLoadError (const GError *error) { } 
     53 
     54            /// 
     55            /// @brief The document is encrypted. 
     56            /// 
     57            /// This function is called when the document couldn't be 
     58            /// loaded because it's encrypted and no password or an invalid 
     59            /// password was supplied. 
     60            /// 
     61            /// @param fileName The file name that was trying to load. 
     62            /// @param reload TRUE if it was trying to reload the file, FALSE 
     63            ///               if it was trying to load a new file. 
     64            /// @param error The error message and code that the operation 
     65            ///              produced. 
    3066            virtual void notifyLoadPassword (const gchar *fileName, 
    3167                                             gboolean reload, 
    3268                                             const GError *error) { } 
     69 
     70            /// 
     71            /// @brief The current page has been changed. 
     72            /// 
     73            /// This function is called when the current page has been 
     74            /// replaced by a new one. 
     75            ///  
     76            /// @param pageNum The number of the new page. 
     77            /// 
    3378            virtual void notifyPageChanged (gint pageNum) { } 
     79 
     80            /// 
     81            /// @brief The current page has been rotated. 
     82            /// 
     83            /// This function is called when the current page has been 
     84            /// rotated. 
     85            /// 
     86            /// @param rotation The rotation angle in degrees. 
     87            /// 
    3488            virtual void notifyPageRotated (gint rotation) { } 
     89 
     90            /// 
     91            /// @brief The current page has been scaled. 
     92            /// 
     93            /// This function is called when the current page zoom level 
     94            /// has been changed. 
     95            /// 
     96            /// @param zoom The current scale. 
     97            /// 
    3598            virtual void notifyPageZoomed (gdouble zoom) { } 
     99 
     100            /// 
     101            /// @brief The document has been reloaded. 
     102            /// 
     103            /// This function is called when the document has been reloaded 
     104            /// successfully. 
     105            /// 
    36106            virtual void notifyReload (void) { } 
    37107 
    38108        protected: 
     109            /// 
     110            /// @brief Constructs a new IDocumentObserver object. 
    39111            IDocumentObserver (void) { } 
    40112    }; 
  • trunk/src/IJob.cxx

    r130 r148  
    2020using namespace ePDFView; 
    2121 
     22/// The queue of jobs to run in background. 
    2223GAsyncQueue *IJob::m_JobsQueue = NULL; 
    2324 
     25/// 
     26/// @brief Clears the list of jobs. 
     27/// 
     28/// This is mainly used for the test suites when they are going 
     29/// to delete the document class and don't want to generate segmentation 
     30/// faults. It just pops all queued jobs without run them. 
     31/// 
    2432void 
    2533IJob::clearQueue (void) 
     
    3341} 
    3442 
     43/// 
     44/// @brief The job dispatcher. 
     45/// 
     46/// This function is the one that will run in a thread. What it does is 
     47/// just pop queued jobs from the queue and then runs them. 
     48/// 
    3549gpointer 
    3650IJob::dispatcher (gpointer data) 
     
    4660} 
    4761 
     62/// 
     63/// @brief Initialises the job dispatcher. 
     64/// 
     65/// This function must be the first called before any other jobs-related 
     66/// function, as it does initialised the thread subsystem, created the 
     67/// threaded dispatcher() function and initialised the job queue. 
     68/// 
    4869void 
    4970IJob::init () 
     
    6182} 
    6283 
     84/// 
     85/// @brief Adds a new job to the queue. 
     86/// 
     87/// It adds a new job to the queued jobs that will be dispatched by 
     88/// the dispatch() function. 
     89/// 
     90/// @param job The job to add to the queue. 
     91/// 
    6392void 
    6493IJob::queue (IJob *job) 
  • trunk/src/IJob.h

    r130 r148  
    3131namespace ePDFView 
    3232{ 
     33    /// @class IJob 
     34    /// @brief Interface for jobs. 
     35    /// 
     36    /// A Job is simply a process that will be processed in background 
     37    /// by the dispatch() function. 
     38    /// 
    3339    class IJob 
    3440    { 
    3541        public: 
     42            /// @brief Destroys all dynamically allocated memory for IJob. 
    3643            virtual ~IJob (void) { } 
    3744 
     
    4148            static void queue (IJob *job); 
    4249             
     50            /// 
     51            /// @brief Runs the job. 
     52            /// 
     53            /// This is called by the dispatcher() function when 
     54            /// the job must start its work. It's the job's entry point. 
     55            /// 
     56            /// @return TRUE if the job must be deleted after the 
     57            ///         call to run(). FALSE if the job will be 
     58            ///         deleted by himself. 
     59            /// 
    4360            virtual gboolean run (void) = 0; 
    4461             
     
    4663            static GAsyncQueue *m_JobsQueue; 
    4764 
     65            /// @brief Creates a new IJob object. 
    4866            IJob () { } 
    4967    }; 
  • trunk/src/IMainView.h

    r140 r148  
    5757 
    5858            /// 
    59             /// @brief Actives or desactives the zoom to fit. 
     59            /// @brief Actives or datives the zoom to fit. 
    6060            /// 
    6161            /// The view must change the state of the zoom to fit option 
    6262            /// to @a active. 
    6363            /// 
    64             /// @param active TRUE if the option must be actived, FALSE 
     64            /// @param active TRUE if the option must be activated, FALSE 
    6565            ///               otherwise. 
    6666            /// 
     
    6868            
    6969            /// 
    70             /// @brief Actives or desactives the zoom to width. 
     70            /// @brief Actives or deactivates the zoom to width. 
    7171            /// 
    7272            /// The view must change the state of the zoom to width option 
    7373            /// to @a active. 
    7474            /// 
    75             /// @param active TRUE if the option must be actived, FALSE 
     75            /// @param active TRUE if the option must be activated, FALSE 
    7676            ///               otherwise. 
    7777            /// 
     
    8484            /// the toolkit's specific open dialog. 
    8585            /// 
    86             /// @param folder The last folder used to open a file. This is 
    87             ///               used to show this folder when the open dialog 
    88             ///               appears. 
     86            /// @param lastFolder The last folder used to open a file. This is 
     87            ///                   used to show this folder when the open dialog 
     88            ///                   appears. 
    8989            /// 
    9090            /// @return A copy of the file name that the user will try to open 
     
    337337 
    338338            /// 
    339             /// @brief Shows the statusbar. 
    340             /// 
    341             /// The view must show the statusbar or hide it depending 
     339            /// @brief Shows the status bar. 
     340            /// 
     341            /// The view must show the status bar or hide it depending 
    342342            /// on the @a show parameter. 
    343343            /// 
    344             /// @param show TRUE if the statusbar must be shown,  
     344            /// @param show TRUE if the status bar must be shown,  
    345345            ///             FALSE otherwise. 
    346346            /// 
     
    348348             
    349349            /// 
    350             /// @brief Shows the toobar. 
     350            /// @brief Shows the tool bar. 
    351351            /// 
    352352            /// The view must show the toolbar or hide it depending 
  • trunk/src/IPageView.h

    r147 r148  
    2424    class PagePter; 
    2525 
     26    /// 
     27    /// @brief The possible cursor for the page view. 
     28    /// 
    2629    enum PageCursor 
    2730    { 
     
    4144        /// No scroll. 
    4245        PAGE_SCROLL_NONE, 
    43         /// Scroll to the begining of the page. 
     46        /// Scroll to the beginning of the page. 
    4447        PAGE_SCROLL_START, 
    4548        /// Scroll to the bottom of the page. 
    4649        PAGE_SCROLL_END 
    4750    }; 
    48     
     51   
     52    /// 
     53    /// @class IPageView. 
     54    /// @brief Interface for the page view. 
     55    /// 
     56    /// The page view is the responsible to show the page's image, 
     57    /// handle the scroll of it and the links. It will also tell 
     58    /// the available width and height space when doing a zoom to fit or 
     59    /// zoom to width. 
     60    /// 
    4961    class IPageView 
    5062    { 
    5163        public: 
     64            /// 
     65            /// @brief Destroys all dynamically allocated memory. 
     66            /// 
    5267            virtual ~IPageView (void) { } 
     68 
     69            /// 
     70            /// @brief Sets the view's presenter. 
     71            /// 
     72            /// @param pter The presenter that controls the view and the 
     73            ///             view sends notices to. 
     74            /// 
    5375            virtual void setPresenter (PagePter *pter) { m_Pter = pter; } 
     76 
     77            /// 
     78            /// @brief Gets the view's presenter. 
     79            /// 
     80            /// @return The presenter that controls the view or NULL if 
     81            ///         it was not set. 
     82            /// 
    5483            PagePter *getPresenter (void) { return m_Pter; } 
    5584 
     
    123152             
    124153        protected: 
     154            /// 
     155            /// @brief Creates a new IPageView object. 
     156            /// 
    125157            IPageView (void) { m_Pter = NULL; } 
    126158             
     159            /// @brief The view's presenter. 
    127160            PagePter *m_Pter; 
    128161    }; 
  • trunk/src/JobLoad.cxx

    r136 r148  
    102102/// @brief Check if we are reloading. 
    103103/// 
    104 /// @return TREU if are reloading, FALSE otherwise. 
     104/// @return TRUE if are reloading, FALSE otherwise. 
    105105/// 
    106106gboolean 
     
    111111 
    112112/// 
    113 /// @brief Open the document. 
    114 /// 
     113/// @brief Opens the document. 
    115114/// 
    116115gboolean 
  • trunk/src/JobLoad.h

    r136 r148  
    4949 
    5050        protected: 
     51            /// The document to notify when loaded or on error. 
    5152            IDocument *m_Document; 
     53            /// The error produced when loading. 
    5254            GError *m_Error; 
     55            /// The file name to load or reload. 
    5356            gchar *m_FileName; 
     57            /// The password to use when loading the file. 
    5458            gchar *m_Password; 
     59            /// Tells if we are reloading or loading from new. 
    5560            gboolean m_Reload; 
    5661    }; 
  • trunk/src/JobRender.cxx

    r145 r148  
    2222G_LOCK_DEFINE (JobRender); 
    2323 
     24/// Tells if we can render more pages or not. Used in test suites only. 
    2425gboolean JobRender::m_CanProcessJobs = TRUE; 
     26/// This tells the minimum age the jobs must have in order to process them. 
    2527guint32 JobRender::m_MinAge = 0; 
    2628 
     
    2830static gboolean job_render_done (gpointer data); 
    2931 
     32/// 
     33/// @brief Creates a new JobRender object. 
     34/// 
    3035JobRender::JobRender (): 
    3136    IJob () 
     
    3742} 
    3843 
     44/// 
     45/// @brief Deletes all dynamically allocated memory for JobRender. 
     46/// 
    3947JobRender::~JobRender() 
    4048{ 
    4149} 
    4250 
     51/// 
     52/// @brief Renders a page. 
     53/// 
    4354gboolean 
    4455JobRender::run (void) 
     
    5768} 
    5869 
     70/// 
     71/// @brief Gets the job's age. 
     72/// 
     73/// @return The age of the job. 
     74/// 
    5975guint32 
    6076JobRender::getAge () 
     
    6379} 
    6480 
     81/// 
     82/// @brief Gets the document to get the page to render. 
     83/// 
     84/// @return The document class to use to render the page or NULL if can't 
     85///         process more jobs (test only.) 
     86/// 
    6587IDocument * 
    6688JobRender::getDocument () 
     
    7698} 
    7799 
     100/// 
     101/// @brief Gets the rendered page image. 
     102/// 
     103/// @return The rendered page image as returned by the document class. 
     104/// 
    78105DocumentPage * 
    79106JobRender::getPageImage () 
     
    82109} 
    83110 
     111/// 
     112/// @brief Gets the page number to render. 
     113/// 
     114/// @return The number of the page to render. 
     115/// 
    84116gint 
    85117JobRender::getPageNumber () 
     
    88120} 
    89121 
     122/// 
     123/// @brief Sets the job's age. 
     124/// 
     125/// @param age The job's age. 
     126/// 
    90127void 
    91128JobRender::setAge (guint32 age) 
     
    94131} 
    95132 
     133/// 
     134/// @brief Sets the document class to use to render. 
     135/// 
     136/// @param document The document class to us