Changeset 56199 for wxWidgets/trunk/interface/wx/richtext/richtextprint.h
- Timestamp:
- 10/09/08 09:30:57 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
wxWidgets/trunk/interface/wx/richtext/richtextprint.h
r55912 r56199 7 7 ///////////////////////////////////////////////////////////////////////////// 8 8 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 */ 15 enum 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 */ 27 enum wxRichTextPageLocation { 28 wxRICHTEXT_PAGE_LEFT, 29 wxRICHTEXT_PAGE_CENTRE, 30 wxRICHTEXT_PAGE_RIGHT 31 }; 32 33 9 34 /** 10 35 @class wxRichTextHeaderFooterData … … 12 37 13 38 This class represents header and footer data to be passed to the 14 wxRichTextPrinting and 15 wxRichTextPrintout classes. 39 wxRichTextPrinting and wxRichTextPrintout classes. 16 40 17 41 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 23 46 be substituted for the actual values during printing and preview. 24 47 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 or30 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. 31 54 32 55 @library{wxrichtext} … … 57 80 Returns the font specified for printing the header and footer. 58 81 */ 59 const wxFont GetFont() const;82 const wxFont& GetFont() const; 60 83 61 84 /** … … 160 183 @class wxRichTextPrintout 161 184 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. 165 187 166 188 @library{wxrichtext} … … 171 193 public: 172 194 /** 173 )174 195 Constructor. 175 196 */ 176 wxRichTextPrintout( );197 wxRichTextPrintout(const wxString& title = wxT("Printout")); 177 198 178 199 /** … … 226 247 227 248 /** 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. 231 251 */ 232 252 void SetRichTextBuffer(wxRichTextBuffer* buffer); … … 248 268 public: 249 269 /** 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. 260 281 */ 261 282 wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, … … 268 289 269 290 /** 270 A convenience function to get the header text. See wxRichTextHeaderFooterData271 for details.291 A convenience function to get the header text. 292 See wxRichTextHeaderFooterData for details. 272 293 */ 273 294 wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, … … 280 301 281 302 /** 282 Returns the parent window to be used for the preview window and printing wait283 dialog.303 Returns the parent window to be used for the preview window and printing 304 wait dialog. 284 305 */ 285 306 wxWindow* GetParentWindow() const; … … 306 327 307 328 /** 308 Shows a preview window for the given buffer. The function takes its own copy of309 @ebuffer.329 Shows a preview window for the given buffer. 330 The function takes its own copy of @a buffer. 310 331 */ 311 332 bool PreviewBuffer(const wxRichTextBuffer& buffer); 312 333 313 334 /** 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 316 338 depending on the available file handlers. 317 339 */ … … 319 341 320 342 /** 321 Prints the given buffer. The function takes its own copy of @ ebuffer.343 Prints the given buffer. The function takes its own copy of @a buffer. 322 344 */ 323 345 bool PrintBuffer(const wxRichTextBuffer& buffer); 324 346 325 347 /** 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. 329 350 */ 330 351 bool PrintFile(const wxString& richTextFile); 331 352 332 353 /** 333 A convenience function to set the footer text. See wxRichTextHeaderFooterData334 for details.354 A convenience function to set the footer text. 355 See wxRichTextHeaderFooterData for details. 335 356 */ 336 357 void SetFooterText(const wxString& text, … … 354 375 355 376 /** 356 A convenience function to set the header text. See wxRichTextHeaderFooterData357 for details.377 A convenience function to set the header text. 378 See wxRichTextHeaderFooterData for details. 358 379 */ 359 380 void SetHeaderText(const wxString& text, … … 367 388 368 389 /** 369 Sets the parent window to be used for the preview window and printing wait370 dialog.390 Sets the parent window to be used for the preview window and printing 391 wait dialog. 371 392 */ 372 393 void SetParentWindow(wxWindow* parent);
