Visual Lib with (GTWVT / XWC)

395 views
Skip to first unread message

Qatan

unread,
Oct 6, 2014, 1:00:09 PM10/6/14
to harbou...@googlegroups.com
Hello all,
 
Does anyone has any idea for the easiest and best way to make GTWVT (Windows) and XWC (Linux) (if possible) to have a slightly better look and feel as we did in the past using the not so famous “Visual Lib”?
 
To know what I am writing about, please look these images: http://dropcanvas.com/0k5ep
 
The images show how it looks like in xHarbour (someone modified the Courier New font... but I hope there is an easier and nicer way of getting the same visual result, isn’t it?)
 
How it was done in Clipper? I think it was just a modification on the DOS fonts... that’s all.
 
Is there anyway to do it in Harbour? How?
 
Thanks for any help.
 
Qatan
 

elch

unread,
Oct 6, 2014, 2:40:52 PM10/6/14
to harbou...@googlegroups.com

Hi Qatan,


you mean the first picture with 'Sistema Gerente' ?

Looks for me like 'hand-drawn' with lines, not like a HUGE font.


These 'lifted looking' areas in the other pictures are also only 2 white and

two grey lines around an area.

That looks all a bit what Pritpal did with GTWVG -- but pure Windows API :-(


As you mentioned the [ first in white :-))) (i'm still laughing) ] barcode demo:

that are the hb_gfx* functions. Sure also they will be translated 'low level' to something,

what the OS or the GT can do.

But this way there is a 'layer' between you and the GT.

Check for gfx.prg and gfx2.prg demo in the tests directory !


---

About your question on developer list about image display with hbfimage contrib:

sure an example since longer in preparation :-)

Will show not only persistent bitmap preview in a re-sizeable ! window,

but with a 'trick' also PDF viewing ...

Patience, bedrock just since some 'hours' in upstream available,

and last questions around in work ..


best regards

Rolf

Qatan

unread,
Oct 6, 2014, 7:26:59 PM10/6/14
to harbou...@googlegroups.com
Hello Rolf,
 
You are right. That is ‘hand-drawn’ but I am wasn’t talking about that.
 
That was made with xHarbour by a Brazilian programmer that just changes the Courier New font to add some “graphic” elements.
 
For me it was pretty interesting but I wonder if someone knows a easier and more stable way of doing something similar to the “Visual Lib” for Clipper...
 
I wasn’t thinking about something similar to WVG or hb_gfx* funcitons.... but something much simpler... that could work in Windows/Linux without difference.
 
Maybe a way to temporary change the font from inside the EXE? This is exactly
Any ideas are welcome.
 
Regards,
 
Qatan
--
--
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

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

elch

unread,
Oct 7, 2014, 12:15:25 AM10/7/14
to harbou...@googlegroups.com
Hello Qatan,

now is clear what your 'asimoes' did - and what you mean.

You should have pointed immediate to the thread, very nice starting with the sentence:

After a sleepless night ...

Because modifying fonts is a time consuming task, i know from old experience.


The problem: changing the active used font have an immediate effect on what is

displayed -- with the next needed window refresh.

Modifying 'on the fly' a font is done by Harbour, if you use the attribute

'HB_GTI_FONTA_DRAWBOX': then these box chars (lines and edges) are really

'drawn' by Harbour instead using the charset.


---

In earlier times are only 'one byte' aka 256 chars possible. And regularly the

whole set was somehow needed, leaving very less room for above 'gameplay'.

Now we have UTF8 support in Harbour, aka multiple bytes, aka more than 256

chars possible.

So you 'only' have to find a font, which e.g. offer you the 'Wingdings' or

Dingbat area, see:

http://en.wikipedia.org/wiki/Dingbat

Or if you have too much time left, you can take a font editor and must make

them yourself.


--

Graphic primitives, aka lines, circles and rectangles should look the same

in Windows, Linux and elsewhere.

What i have different to you in mind was called 'hybrid mode' in a commercial

product. That means your style of thinking mostly remain in text coordinates,

but additional graphics are not forbidden ..


P.S.

i get 'pimples' if a hear or read 'Visual' .. :-))


best regards

Rolf

Qatan

unread,
Oct 7, 2014, 4:04:54 AM10/7/14
to harbou...@googlegroups.com
Hello Rolf,
 
    Yes, it is time consuming and like you I have old experiences with that from the beginning of the 90’s...
    You are right about my style of thinking... I am very cautious about any “hybrid” mode (like WVG) because it simply doesn’t seem right to me... not to mention OS dependent (and who knows what else dependent of).
    I was trying to get something very simple... just a few modifications on the char table and in my case doesn’t have to be UTF-8 or something alike... Basically I am trying to replicate the solution from the 90’s in Harbour but I am not yet sure it is possible to do the way I think. Actually I don’t really like UTF-8 so much... seems heavy. ISO8859-1 does the job for me.
    Do you remember the old Norton Utilities 6-8? http://en.wikipedia.org/wiki/VGA-compatible_text_mode
    That’s what I am looking for as ‘visual’ result... interesting... isn’t it? But of course I will not go forward if it’s way too complex or risks a program of being buggy, crash or just freeze. This is one of the reasons why I don’t use WVG (because it’s too complex and mixes too much with Windows only API – for me looks like a big mess)... I prefer a simple visual that just works...
    How does this HB_GTI_FONTA_DRAWBOX work? Do you have a practical example?
   Thanks for your reply.
    Regards,
 
Qatan
--

elch

unread,
Oct 7, 2014, 5:25:32 AM10/7/14
to harbou...@googlegroups.com
Hello Qatan,

to open an window and to display therein characters:

you have to contact the OS to display it for you, no other chance. And not your problem, but task of the GT.

Same apply to graphic primitives like mentioned lines and circles.

ANY actually and future OS will have such basic functionality - and also older had.

Gone are the 70?ties with really only character based screens. Even an Apple-II from '82 could do 16 color graphics.

But i am not willing to rely on any special OS GUI features, like calling an OS dependent progress-bar, a complex GUI browse-system, etc .....



    Do you remember the old Norton ...
... Commander !

NORTON rules !!

Linux clone is named Midnight Commander [mc] and is the most used tool here.

One of the absolutely first softwares to be installed after fresh OS setup.


    How does this HB_GTI_FONTA_DRAWBOX work? Do you have a practical example?

hb_GtInfo( HB_GTI_FONTATTRIBUTE, HB_GTI_FONTA_DRAWBOX )

:-)

[ sure, right understood you question, but it's GT dependend: drawing lines and filled rectangles graphics in size of a character cell, see first point of post :-) ]


best regards

Rolf

Clippero

unread,
Oct 7, 2014, 6:56:08 AM10/7/14
to harbou...@googlegroups.com
[Esp]

Qué bueno ver que hay mas gente intentando hacer lo mismo que yo.
Tengo sistemas migrados de Clipper a Harbour, en modo consola y estoy buscando desde hace un tiempo una forma de poder migrar a la interfase gráfica, sin perder los @ SAY, @ GET, @ PROMPT etc.

Todavía no di con algo que me conforme 100 %

Hasta ahora por lo que he visto con GTWVG se puede lograr mucha cosa, pero es 100 % dependiente de Windows, en Linux, no funcionaría.

Con QT, Hbqt, y esas libs, se puede lograr mucha cosa, actualmente estoy probando con eso.
El tema es no perder el sistema de coordenadas que tengo actualmente en mi código (ROW(), COL(), MAXROW(), MAXCOL(), etc.)
En mi caso es impensable re-escribir el código, la idea es mantener el código sin tocar lo más posible.
Con QT hice menús, browses, etc. pero es todo a pura coordenada gráfica y mucho widgets, que corren dentro de una ventana.
Para una aplicación nacida de cero, se podría pensar en dicho sistema, incluso partiendo de un diseñador gráfico y yendo luego al código.
Pero para sistema ya hechos re-escribir el código y lograr que quede bien, implica invertir un tiempo que no dispongo.

Si alguien sigue avanzando en este camino, estoy dispuesto a compartir mis experiencias, a lo mejor llegamos a algo bueno y podemos ayudar a alguien mas.

Fermín


[Eng by google]

Good to see there are more people trying to do the same thing.
Clipper systems have migrated to Harbour, in console mode and am looking for some time for a way to migrate to the graphical interface , without losing the @ SAY , ​​@ GET, @ PROMPT etc.

Not yet I found something under me 100 %

So far from what I 've seen with GTWVG can achieve a lot of things , but it is 100 % dependent on Windows , Linux , would not work.

With QT , Hbqt and these libs , you can achieve a lot of things , I'm currently testing with that.
The issue is not to lose the coordinate system I currently have in my code (ROW () , COL () , MAXROW () , MAXCOL (), etc. )
In my case it is unthinkable to re- write the code , the idea is to keep the code as much as possible without touching .
With QT did menus, browses , etc. but it's all a pure graphic coordinate and much widgets that run within a window .
For a born- zero application, you might think of such a system, even assuming a graphic designer and then going to the code.
But for system events and re- write the code and make look good, means investing some time I do not have .

If someone continues to progress on this path , I am willing to share my experiences , maybe we got a good thing and we can help someone else.

Qatan

unread,
Oct 7, 2014, 9:10:25 AM10/7/14
to harbou...@googlegroups.com
Hello Rolf,
 
I also loved Norton Commander! I remember that the first time I saw the “graphic”  NU 6.0 and with the mouse pointer I got impressed... I was using SideKick for editing programs (S.K. was the best programing editor at that time because it rested on memory and you could just press Ctrl+Alt to swap from the editor to the program. It was a time when you didn’t have Window$ and all the options available...). Not to mention the ‘QEdit’ editor! Who made Clipper programs without one of those?
For a while I used FAR (on Windows it’s very nice) – it was recommended by Viktor long time ago and of course Midnight is a nice option even in Window$ although I am really used to the traditional Explorer but in Linux surely would be my first option.
Well... the time passed... and the closest to the Norton “graphic” interface was the so called “Visual Lib”. It was a set of functions but what interested me most was the changing on the lines/circles that could make a simple TUI program looks nicer...
 
I will look the first point of post to see how I can do it but I have to admit I am getting slower with the years (and a bit lazy also Winking smile).
I will post any advance (or I will cry out if I am stuck...).
Thanks for your comments and help
 
Qatan
 
 
From: elch
Sent: Tuesday, October 07, 2014 11:25 AM
Subject: Re: [harbour-users] Re: Visual Lib with (GTWVT / XWC)
 
wlEmoticon-winkingsmile[1].png
Reply all
Reply to author
Forward
0 new messages