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 12/09/2023 20:15, Vadim Zeitlin ha scritto: > On Tue, 12 Sep 2023 19:43:56 +0200 Fulvio Senore wrote: > > FS> Since I have already solved the printing problem I could write some code > FS> to print in a simple way. > FS> > FS> How should I discuss and design this code? > > Sorry, I don't know how exactly should it be designed. Maybe we can just > simplify the existing wxPrintout (if necessary, by deriving some > wxSimplePrintout from it). Maybe we could somehow do without wxPrintout at > all, e.g. by handling some new wxEVT_PRINT_PAGE etc. > > At very high level, we need to identify the current pain points and try to > provide API avoiding them. This is not very helpful, of course, but I just > don't have enough time to write something that would be, sorry. > > If you can come up with something, please do post the proposed new API and > let's discuss it. > I did not express myself well enough, sorry. When I asked "How should I discuss and design this code?" I was thinking at the tools to use: this mailing list, the wx-dev one or something else. I was also thinking at the procedures to follow. Anyway the base idea is the following. Create a class to encapsulate a print job. Add methods to start the job, write text and some graphics primitives, to start a new page and to end the job starting the real printing process. All method calls are stored in memory until the job is ended, then real printing begins. A printout is created and all the commands are retrieved from memory ed executed in the printout. This ought to shield the user from the complexity of printing, presenting a very simple interface. Do you think that this is a reasonable approach? 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/330039fc-963b-ff4e-5913-14a03e0494f2%40fsoft.it.