* Printing with GtkADA
@ 2008-06-20 14:29 ldries46
2008-06-20 15:13 ` Dmitry A. Kazakov
0 siblings, 1 reply; 4+ messages in thread
From: ldries46 @ 2008-06-20 14:29 UTC (permalink / raw)
I am trying to create ADA programs in windows XP. Therefore I am using
GTKAda. I cannot find any reference to how to print the info in a TextView
window. I am using the text view window for convienience and have found
various possibilities but not how to print or even how to sned something to
a windows printer.
Can anyone tell me how that must be done
L. Dries
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Printing with GtkADA
2008-06-20 14:29 Printing with GtkADA ldries46
@ 2008-06-20 15:13 ` Dmitry A. Kazakov
2008-06-21 12:05 ` ldries46
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry A. Kazakov @ 2008-06-20 15:13 UTC (permalink / raw)
On Fri, 20 Jun 2008 16:29:48 +0200, ldries46 wrote:
> Therefore I am using
> GTKAda. I cannot find any reference to how to print the info in a TextView
> window.
Gtk's Gtk_Text_View uses the MVC model. That means you have to change the
model in order to make the viewer to show anything. In short you should
modify the text buffer of the widget in order to make Text_View to show it.
For example, you could use Set_Text. See for Gtk_Text_Buffer
http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-text_buffer.html
(the function Get_Buffer returns the current text buffer of the widget)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Printing with GtkADA
2008-06-20 15:13 ` Dmitry A. Kazakov
@ 2008-06-21 12:05 ` ldries46
2008-06-21 13:38 ` Dmitry A. Kazakov
0 siblings, 1 reply; 4+ messages in thread
From: ldries46 @ 2008-06-21 12:05 UTC (permalink / raw)
It 's clear to me how to get my text buffer back. Now I want to send it to
the printer within windows, so I want to see for instance the windows
printer dialog to choose my printer (or PDF creator) or a GTK alternative
for it. The last would be better if I want to design my program in a Windows
enviroment and run it also in a Linux enviroment for instance.
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> schreef in bericht
news:17ibcqwjp5k8x$.1mqnp1id4k4f9.dlg@40tude.net...
> On Fri, 20 Jun 2008 16:29:48 +0200, ldries46 wrote:
>
>> Therefore I am using
>> GTKAda. I cannot find any reference to how to print the info in a
>> TextView
>> window.
>
> Gtk's Gtk_Text_View uses the MVC model. That means you have to change the
> model in order to make the viewer to show anything. In short you should
> modify the text buffer of the widget in order to make Text_View to show
> it.
> For example, you could use Set_Text. See for Gtk_Text_Buffer
>
> http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-text_buffer.html
>
> (the function Get_Buffer returns the current text buffer of the widget)
>
> --
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Printing with GtkADA
2008-06-21 12:05 ` ldries46
@ 2008-06-21 13:38 ` Dmitry A. Kazakov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry A. Kazakov @ 2008-06-21 13:38 UTC (permalink / raw)
On Sat, 21 Jun 2008 14:05:53 +0200, ldries46 wrote:
> It 's clear to me how to get my text buffer back. Now I want to send it to
> the printer within windows, so I want to see for instance the windows
> printer dialog to choose my printer (or PDF creator) or a GTK alternative
> for it.
I see it is not GtkTextView, it is printing what you need. GTK+ has
printing API[*]. But AFAIK it is not yet supported in GtkAda 2.10.
You should do these bindings by yourself (which should be not that
difficult) or else wait for some next version of GtkAda. If you are a
paying AdaCore customer, you might ask them to do it for you.
(AdaCore maintains GtkAda)
------------
* http://library.gnome.org/devel/gtk/stable/Printing.html
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-21 13:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-20 14:29 Printing with GtkADA ldries46
2008-06-20 15:13 ` Dmitry A. Kazakov
2008-06-21 12:05 ` ldries46
2008-06-21 13:38 ` Dmitry A. Kazakov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox