From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail From: "ldries46" Newsgroups: comp.lang.ada References: <57a1973c$0$12033$e4fe514c@news.kpn.nl> <57a1c6a7$0$12136$e4fe514c@news.kpn.nl> <57a2d3a9$0$20631$e4fe514c@news.kpn.nl> In-Reply-To: Subject: Re: GtkAda. Printing Date: Thu, 4 Aug 2016 13:39:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 Message-ID: <57a3297e$0$20642$e4fe514c@news.kpn.nl> NNTP-Posting-Host: 77.168.179.107 X-Trace: 1470310782 dreader33.news.xs4all.nl 20642 77.168.179.107:51561 X-Complaints-To: abuse@kpn.nl Xref: news.eternal-september.org comp.lang.ada:31283 Date: 2016-08-04T13:39:13+02:00 List-Id: I tried the various files from the Gtkada examples but they use almost the same methods I do. The only thing I cannot find in these files is how to use On_Draw_Page and that is the point that causes my trouble. When outcommenting the all works correct can see the Print dialog and I even can start the print. This print is empty, because the draw_page event is not connected with the Draw_Page routine. To create that the On_Draw_Page routine is necessary. And that still is creating the troubles. The Call rouine is of the following type : Cb_Gtk_Print_Operation_Gtk_Print_Context_Gint_Void. Describes as type Cb_Gtk_Print_Operation_Gtk_Print_Context_Gint_Void is not null access procedure (Self : access Gtk_Print_Operation_Record'Class; Context : not null access Gtk.Print_Context.Gtk_Print_Context_Record'Class; Page_Nr : Gint); Until now I have tried Draw_Page and Draw_Page'Access L. Dries "Dmitry A. Kazakov" schreef in bericht news:nnup8m$6jg$1@gioia.aioe.org... On 2016-08-04 07:33, ldries46 wrote: > I still cannot find how to address the draw_page routine ib there You must use correct types. That's all. If Draw_Page does not match expected parameters profile wrap it into another subprogram. GtkAda has examples (testgtk). Read the example of printing (create_print.adb). Modify it for your case. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de