Show
Ignore:
Timestamp:
10/09/08 09:30:57 (3 months ago)
Author:
FM
Message:

revised richtext headers

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wxWidgets/trunk/interface/wx/richtext/richtextprint.h

    r55912 r56199  
    77///////////////////////////////////////////////////////////////////////////// 
    88 
     9 
     10/** 
     11    These are the header and footer page identifiers, passed to functions such 
     12    as wxRichTextHeaderFooterData::SetFooterText to specify the odd or even page 
     13    for the text. 
     14*/ 
     15enum wxRichTextOddEvenPage { 
     16    wxRICHTEXT_PAGE_ODD, 
     17    wxRICHTEXT_PAGE_EVEN, 
     18    wxRICHTEXT_PAGE_ALL, 
     19}; 
     20 
     21 
     22/** 
     23    These are the location identifiers for passing to functions such as 
     24    wxRichTextHeaderFooterData::SetFooterText(), to specify whether the text 
     25    is on the left, centre or right of the page. 
     26*/ 
     27enum wxRichTextPageLocation { 
     28    wxRICHTEXT_PAGE_LEFT, 
     29    wxRICHTEXT_PAGE_CENTRE, 
     30    wxRICHTEXT_PAGE_RIGHT 
     31}; 
     32 
     33 
    934/** 
    1035    @class wxRichTextHeaderFooterData 
     
    1237 
    1338    This class represents header and footer data to be passed to the 
    14     wxRichTextPrinting and 
    15     wxRichTextPrintout classes. 
     39    wxRichTextPrinting and wxRichTextPrintout classes. 
    1640 
    1741    Headers and footers can be specified independently for odd, even or both page 
    18     sides. Different text can be specified 
    19     for left, centre and right locations on the page, and the font and text colour 
    20     can also 
    21     be specified. You can specify the following keywords in header and footer text, 
    22     which will 
     42    sides. Different text can be specified for left, centre and right locations 
     43    on the page, and the font and text colour can also be specified. 
     44 
     45    You can specify the following keywords in header and footer text, which will 
    2346    be substituted for the actual values during printing and preview. 
    2447 
    25     @@DATE@: the current date. 
    26     @@PAGESCNT@: the total number of pages. 
    27     @@PAGENUM@: the current page number. 
    28     @@TIME@: the current time. 
    29     @@TITLE@: the title of the document, as passed to the wxRichTextPrinting or 
    30     wxRichTextLayout constructor. 
     48    - @@DATE@: the current date. 
     49    - @@PAGESCNT@: the total number of pages. 
     50    - @@PAGENUM@: the current page number. 
     51    - @@TIME@: the current time. 
     52    - @@TITLE@: the title of the document, as passed to the wxRichTextPrinting or 
     53      wxRichTextLayout constructor. 
    3154 
    3255    @library{wxrichtext} 
     
    5780        Returns the font specified for printing the header and footer. 
    5881    */ 
    59     const wxFont GetFont() const; 
     82    const wxFont& GetFont() const; 
    6083 
    6184    /** 
     
    160183    @class wxRichTextPrintout 
    161184 
    162     This class implements print layout for wxRichTextBuffer. Instead of using it 
    163     directly, you 
    164     should normally use the wxRichTextPrinting class. 
     185    This class implements print layout for wxRichTextBuffer. 
     186    Instead of using it directly, you should normally use the wxRichTextPrinting class. 
    165187 
    166188    @library{wxrichtext} 
     
    171193public: 
    172194    /** 
    173         ) 
    174195        Constructor. 
    175196    */ 
    176     wxRichTextPrintout(); 
     197    wxRichTextPrintout(const wxString& title = wxT("Printout")); 
    177198 
    178199    /** 
     
    226247 
    227248    /** 
    228         Sets the buffer to print. wxRichTextPrintout does not manage this pointer; it 
    229         should 
    230         be managed by the calling code, such as wxRichTextPrinting. 
     249        Sets the buffer to print. wxRichTextPrintout does not manage this pointer; 
     250        it should be managed by the calling code, such as wxRichTextPrinting. 
    231251    */ 
    232252    void SetRichTextBuffer(wxRichTextBuffer* buffer); 
     
    248268public: 
    249269    /** 
    250         , @b wxWindow*@e parentWindow = @NULL) 
    251         Constructor. Optionally pass a title to be used in the preview frame and 
    252         printing wait dialog, and 
    253         also a parent window for these windows. 
    254     */ 
    255     wxRichTextPrinting(); 
    256  
    257     /** 
    258         A convenience function to get the footer text. See wxRichTextHeaderFooterData 
    259         for details. 
     270        Constructor. 
     271 
     272        Optionally pass a title to be used in the preview frame and printing wait 
     273        dialog, and also a parent window for these windows. 
     274    */ 
     275    wxRichTextPrinting(const wxString& name = wxT("Printing"), 
     276                       wxWindow* parentWindow = NULL); 
     277 
     278    /** 
     279        A convenience function to get the footer text. 
     280        See wxRichTextHeaderFooterData for details. 
    260281    */ 
    261282    wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, 
     
    268289 
    269290    /** 
    270         A convenience function to get the header text. See wxRichTextHeaderFooterData 
    271         for details. 
     291        A convenience function to get the header text. 
     292        See wxRichTextHeaderFooterData for details. 
    272293    */ 
    273294    wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, 
     
    280301 
    281302    /** 
    282         Returns the parent window to be used for the preview window and printing wait 
    283         dialog. 
     303        Returns the parent window to be used for the preview window and printing 
     304        wait dialog. 
    284305    */ 
    285306    wxWindow* GetParentWindow() const; 
     
    306327 
    307328    /** 
    308         Shows a preview window for the given buffer. The function takes its own copy of 
    309         @e buffer. 
     329        Shows a preview window for the given buffer. 
     330        The function takes its own copy of @a buffer. 
    310331    */ 
    311332    bool PreviewBuffer(const wxRichTextBuffer& buffer); 
    312333 
    313334    /** 
    314         Shows a preview window for the given file. @a richTextFile can be a text file 
    315         or XML file, or other file 
     335        Shows a preview window for the given file. 
     336 
     337        @a richTextFile can be a text file or XML file, or other file 
    316338        depending on the available file handlers. 
    317339    */ 
     
    319341 
    320342    /** 
    321         Prints the given buffer. The function takes its own copy of @e buffer. 
     343        Prints the given buffer. The function takes its own copy of @a buffer. 
    322344    */ 
    323345    bool PrintBuffer(const wxRichTextBuffer& buffer); 
    324346 
    325347    /** 
    326         Prints the given file. @a richTextFile can be a text file or XML file, or other 
    327         file 
    328         depending on the available file handlers. 
     348        Prints the given file. @a richTextFile can be a text file or XML file, 
     349        or other file depending on the available file handlers. 
    329350    */ 
    330351    bool PrintFile(const wxString& richTextFile); 
    331352 
    332353    /** 
    333         A convenience function to set the footer text. See wxRichTextHeaderFooterData 
    334         for details. 
     354        A convenience function to set the footer text. 
     355        See wxRichTextHeaderFooterData for details. 
    335356    */ 
    336357    void SetFooterText(const wxString& text, 
     
    354375 
    355376    /** 
    356         A convenience function to set the header text. See wxRichTextHeaderFooterData 
    357         for details. 
     377        A convenience function to set the header text. 
     378        See wxRichTextHeaderFooterData for details. 
    358379    */ 
    359380    void SetHeaderText(const wxString& text, 
     
    367388 
    368389    /** 
    369         Sets the parent window to be used for the preview window and printing wait 
    370         dialog. 
     390        Sets the parent window to be used for the preview window and printing 
     391        wait dialog. 
    371392    */ 
    372393    void SetParentWindow(wxWindow* parent);