Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

capi:print a window?

0 views
Skip to first unread message

Jose Carlos Senciales

unread,
Nov 22, 2001, 9:50:38 AM11/22/01
to
Hi, I'm trying to print a capi window using the capi library on windows
NT with Lispworks.

I´ve been looking for some print fuction in capi reference manual but
only i´ve found fuctions to print
plain text.

I wonder if anyone knows any capi function it could help me to print
full windows or graphics.

Thanks.

--
José Carlos Senciales Chaves.


Arthur Lemmens

unread,
Nov 22, 2001, 10:33:44 AM11/22/01
to Jose Carlos Senciales

Jose Carlos Senciales wrote:

> I wonder if anyone knows any capi function it could help me to print
> full windows or graphics.

CAPI:SIMPLE-PRINT-PORT provides an easy way to print the contents of
a capi window. You can also use stuff like CAPI:WITH-PRINT-JOB and
CAPI:WITH-PAGE, but that's a bit more complicated.

Clive Tong

unread,
Nov 22, 2001, 11:00:16 AM11/22/01
to
Jose Carlos Senciales <joc...@lcc.uma.es> writes:

> Hi, I'm trying to print a capi window using the capi library on windows
> NT with Lispworks.
>
> I´ve been looking for some print fuction in capi reference manual but
> only i´ve found fuctions to print
> plain text.
>
> I wonder if anyone knows any capi function it could help me to print
> full windows or graphics.

Capi:simple-print-port and capi:with-print-job might be what you are
looking for.

For example:

(capi:with-print-job (port)
(capi:with-page-transform (10 10 100 100 :clip t)
(gp:draw-circle port 10 10 20)))

Jose Carlos Senciales

unread,
Nov 22, 2001, 11:17:03 AM11/22/01
to

Clive Tong wrote:

I´m sorry but with this two fuctions i can´t print a full capi:interface.

I need some function similar to (capi:print-interface interface), of course,
this function doesn´t exits.

But i looking for some similar .Some function it prints all elements on
window, the buttons, graphics, input-panes, etc...


Thanks very much

Jose Carlos Senciales

unread,
Nov 22, 2001, 11:06:27 AM11/22/01
to Arthur Lemmens
I´ve tried CAPI:SIMPLE-PRINT-PORT , but this function only print a
capi:output-pane and i wanted to print
a capi window defined by (capi:define-interface ()........) with
buttons,menus, a lot of textinput , etc...i think
this function can´t help me. :-(

This function is very useful for printting only the contents of the output
pane.

thanks a lot.

Arthur Lemmens wrote:

--
José Carlos Senciales Chaves.


Jochen Schmidt

unread,
Nov 22, 2001, 1:18:12 PM11/22/01
to
Jose Carlos Senciales wrote:

> I?ve tried CAPI:SIMPLE-PRINT-PORT , but this function only print a


> capi:output-pane and i wanted to print
> a capi window defined by (capi:define-interface ()........) with
> buttons,menus, a lot of textinput , etc...i think

> this function can?t help me. :-(

Maybe what you want is more like what a "screen-shot" utility does?

ciao,
Jochen


--
http://www.dataheaven.de

Wade Humeniuk

unread,
Nov 22, 2001, 12:32:21 PM11/22/01
to
> I´m sorry but with this two fuctions i can´t print a full capi:interface.
>
> I need some function similar to (capi:print-interface interface), of
course,
> this function doesn´t exits.
>
> But i looking for some similar .Some function it prints all elements on
> window, the buttons, graphics, input-panes, etc...

If you are using Windows you can dig into the MSDN Library and determine the
win32 api functions to call to print a screen shot of your window. However
if you have graphics like vector drawings they will come out very poorly on
the printer. Or just select the window and hit ALT-<PrtScrn> and paste the
image into Paint. Or get a screen shot utility program.

From you previous posts I think you are looking to print graphics (and thus
an output-pane). Why do you need to print the buttons?

Wade


Jose Carlos Senciales

unread,
Nov 22, 2001, 12:48:52 PM11/22/01
to

Wade Humeniuk wrote:

Because i have a big spreadsheet and then i need print all like i´m seeing on
screen.
then i have to print a lot of text-input-panel and some buttons showing states.

thanks a lot.

Jose Carlos Senciales

unread,
Nov 22, 2001, 1:01:22 PM11/22/01
to

Jochen Schmidt wrote:

More or less but not exactly, i need only print a spreadsheet with a lot
of inputs.

Anyway Thanks very much.

Kenny Tilton

unread,
Nov 22, 2001, 1:17:25 PM11/22/01
to

Jose Carlos Senciales wrote:
>
>> Because i have a big spreadsheet and then i need print all like i´m seeing on
> screen.
> then i have to print a lot of text-input-panel and some buttons showing states.

Apologies if you already know this, but the way this works is to draw
your window contents to a printer. Does CAPi have functions which return
a printer port or something? if so, pass that printer port (or stream or
whatever they call it) to your draw functions. You might have to work
out scaling issues to fit the page.

kenny
clinisys

Wade Humeniuk

unread,
Nov 22, 2001, 2:40:38 PM11/22/01
to
> Because i have a big spreadsheet and then i need print all like i´m seeing
on
> screen.
> then i have to print a lot of text-input-panel and some buttons showing
states.
>

You might translate your spreadsheet into a pinboard-layout containing a
grid-layout of item-pinboard-object (for text-input-panes) that corresponds
to your actual window. pinboard-layouts are output-panes (graphics-ports)
and can be printed. The buttons are another matter. You might want to copy
them into a drawn-pinboard-object (or image-pinboard-object) or use
gp:draw-image to draw it into the pinboard-layout. Then you will be able to
print your spreadsheet There are probably a lot of details invloved but I
think it is doable.

Basically comes down to drawing the data on the screen in an equivalent
format into an output-pane. Anyway you do it will involve quite a bit of
work.

I am not sure but if you layout a text-input-pane inside a pinboard-layout
is it accessible for printing? I do not know the answer to that.

Wade


0 new messages