Re: Problem printing text with wxWidgets 3.2.2.1
Fulvio Senore <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
Il 18/09/2023 23:35, Vadim Zeitlin ha scritto: > FS> The user's code is almost surely inside a class: just derive the user's > FS> class from the printing class, add the PrintPage() implementation and > FS> call the Print() method. > > Again, I don't really understand how is this different from deriving it > from wxPrintout? > For example, let's say that I want to print three lines of text at a size of 10 points. It is a trivial task that now requires to: - set a printer up - create a new class derived from wxPrintout - find a way to make a 10 point text print as 10 point (something like black magic) in this new class - make available the text to this class - print the text in the printout class With my proposal the task would require to: - derive the current class also from the new printing class (just a few chars since there is multiple inheritance) - add a PrintPage() method that prints the rows - call the inherited Print() method Again, the main advantage is not having to do with the printout concept and all the black magic needed to make it work. This is not aimed to people that have already successfully printed some text: they already know how to do it. The idea is to save some time and some headaches to people that has never printed before. Best regards Fulvio -- Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/0c372a69-22b9-4589-913f-f8cfb5f224ff%40fsoft.it.