GTWVG + Save/Restore Screen + new GT + CLEAR

232 views
Skip to first unread message

José M. C. Quintas

unread,
Aug 7, 2012, 1:14:57 PM8/7/12
to harbou...@googlegroups.com
I use anything like this in main menu:
...
Save Screen To x
Eval({||Test()})
Restore Screen From x
...

All was working ok, but now I create an new window to Test() using gtwvg
functions.

Function Test()
oCrt := wvgCrt():new()
oCrt:show()
...
oCrt:Destroy()
Return NIL

When return to main program, the screen is not restored.
Adding an CLEAR before restore screen, all works ok.

Save Screen To x
Eval({||Teste()})
CLEAR // <----------- With this, next line works ok
Restore Screen From x

Is needed some extra code after return to main GT/Window?

I use only text, but try add this function of demowvg1.PRG, with no success.

/* This function must be linked with the application */
FUNCTION Wvt_Paint()
WvtPaintObjects()
RETURN NIL

Jos� M. C. Quintas

José M. C. Quintas

unread,
Aug 7, 2012, 9:02:12 PM8/7/12
to harbou...@googlegroups.com
wvt_savescreen() and wvt_restscreen() solve some problems.

Now problem is with an image in background.
I try for hours but can't solve.
If use Wvt_Paint(), text is send to background, and image over it.
How I can set image to background and text on front?
And what can I do when resizing window? backgound image is removed.

And... where to find gtwvg docs?

Jos� M. C. Quintas


-----Mensagem Original-----
From: Jos� M. C. Quintas
Sent: Tuesday, August 07, 2012 2:14 PM
To: harbou...@googlegroups.com
Subject: [harbour-users] GTWVG + Save/Restore Screen + new GT + CLEAR
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

Pritpal Bedi

unread,
Aug 7, 2012, 9:53:11 PM8/7/12
to harbou...@googlegroups.com
Hi


wvt_savescreen() and wvt_restscreen() solve some problems.

No, they did not.
Try to understand the concept of GUI emulation of 
gtWVG. All GUI elements are imposed over the 
CUI controls. These are painted on top of CUI buffer
from within the WM_PAINT event. This is not a 
pure GUI where you can put image behind the text.

Also there is no documention in written form.
All is demonstrated in gtwvg/tests/wvgdemo.prg ++.
Get the concept from there and apply to your code.

Also do not send any request to enhance/change that GT.
I may not be concentrating onto it in immediate future.
 
Pritpal Bedi
a student of software analysis & concepts

José M. C. Quintas

unread,
Aug 8, 2012, 12:56:13 AM8/8/12
to harbou...@googlegroups.com
It is without doubt an excellent job.

But I speak as a Clipper user text mode.
I have no idea what would be the behavior of Windows, if this is easy or
difficult to do, if this is possible, or if final job will be slow.

Let's put object aside and think about the screen as ... a screen.
The screen with squares, which may contain text or graphics.

@ 5, 5 say "the text"
@ 6, 5 to 7,10 graphic "image.jpg"

Once the graph on the screen, become part of the screen, not to be treated
separately.

@ 5, 5 graphicprompt "image.jpg"
@ 6, 5 graphicprompt "image2.jpg"
menu to nOpc

As with text, a graphic will always be drawn on top of each other, and erase
earlier.

For the harbor, everything would be handled by Inkey () as is done for
screen text.
Just look at row / col of the mouse click. whether it is text or graphic
does not matter, just import a region where the click was made, as is done
in text.
If SaveScreen / RestoreScreen can be used to power, will be better.

This is what I imagined for an environment intermediate between console and
GUI.
No matter what's on screen, only when drawing need to know if text or
graphic.
As I said earlier, I am speaking only as a former user Clipper, on how this
was made before Windows.
Do not know if this is not possible, do not know if this will be extremely
slow, do not know if objects is the fatest way.

Perhaps the use of objects is so common nowadays that nobody think of doing
in the old way.
Escuse me if english errors, and if this text is an stupid question, but I
don't know if could be done in this way, without isolated objects.

Jos� M. C. Quintas
Reply all
Reply to author
Forward
0 new messages