Magical Harbour

1,070 views
Skip to first unread message

Ash

unread,
Dec 30, 2019, 1:44:04 PM12/30/19
to Harbour Users
Hello Everyone.

It is something special when simple tools help us perform magic. For example ...

Keyboard did that. I am old enough to remember entering a byte of data through front panel switches!
dBase did that.
Clipper did that.
Harbour does that.

Harbour could do that even more with GUI. But when?

Let us begin with Windows GTWIN. How can we implement the following control in GUI format?

@ <row>, <col> GET <v> PUSHBUTTON ;
                  [VALID <valid>] [WHEN <when>] ;
                  [CAPTION <cap>] [MESSAGE <msg>] [COLOR <clr>] ;
                  [FOCUS <fb>] [STATE <sb>] [STYLE <stl>] ;
                  [SEND <snd>] [GUISEND <gsnd>] [BITMAP <bmap>] ;
                  [SIZE X <sX> Y <sY>] [CAPOFF X <cX> Y <cY>] ;
                  [BMPOFF X <bX> Y <bY>] 

... and then

@ <row>, <col> GET <v> EDIT
@ <row>, <col> GET <v> CHECKBOX 
@ <top>, <left>, <bottom>, <right> GET <v> LISTBOX
@ <top>, <left>, <bottom>, <right> GET <v> RADIOGROUP
@ <top>, <left>, <bottom>, <right> GET <v> TBROWSE

Armed with these controls, we can build respectable looking applications and improve GTWIN as time goes by. I nearly got there with GTWVW but failed due inadequate knowledge of C. 

I'll be happy to share my work.

Regards.
Ash

Francesco Perillo

unread,
Dec 30, 2019, 6:05:27 PM12/30/19
to harbou...@googlegroups.com
have you checked qtcontribs? pritpal created a get system using qt gui controls.

there is also gtqt, a gt for using qt "canvas" to simulate text mode. 

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/f82d622a-90c4-4625-980f-f10483dbca0b%40googlegroups.com.

Ash

unread,
Dec 30, 2019, 9:41:13 PM12/30/19
to Harbour Users
Hello Francesco,

My existing code base will require extensive changes to work with qtcontribs. As well, a number of QT DLLs will have to accompany the resulting EXE.

BTW, where would I find more information about gtqt and does it QT DLLs to work?

Regards.
Ash

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 harbou...@googlegroups.com.

Francesco Perillo

unread,
Dec 31, 2019, 1:19:08 AM12/31/19
to harbou...@googlegroups.com
gtqt is in contrib and you have to include qt dll. przemek wrote it.

I really can't remember now the details but pritpal wrote a GET system replacement to easily port old code to qt.


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.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/88a9fd11-73a6-4b27-bb30-85544a35c832%40googlegroups.com.

Maurizio la Cecilia

unread,
Dec 31, 2019, 7:00:22 AM12/31/19
to Harbour User Group
Hi Ash,
it's just the path I'm suggesting and that I adopted to have a flexible development tool.
Alexander Kresin did some of similar for his HWGui library and Pritpal Bedi the same for his QTcontrib. 
For me it was a joke to code a centralised form processor capable to interface multiple CUI and GUI libraries using only HBMK_HAS_* to accomplish the needed hooks.

Eleving the abstraction level of the GET system to a resource descriptor we could obtain the independent layer, linkable with the wanted CUI/GUI library.

The problem was well focused by Francesco Perillo: how much of us is available to recode his front end to accomplish this new interface?

If you want to share your gtwvw work we could try to code a centralised form processor linkable to gtwvt, gtwvw, HWGui and QTcontrib. Same could be done for other libraries, but my knowledge of them is poor.

Best regards and happy new year.
--
Maurizio

--
--
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.

Ash

unread,
Dec 31, 2019, 10:48:02 AM12/31/19
to Harbour Users
Hello Maurizio,

This file contains all of my work on this subject.


My method is based on information found in GTWVW contrib. Please review the enclosed PDF file where I have given an example of what I was thinking of. I am not suggesting that we use GTWVW; we can use QT, GTWVG or GTWVT instead. 

All I was interested in is the simplicity of application code that looks like xBase and not C. Let me give you an example:

USE customer NEW
or
dbUseArea( .T., , "customer" )

Regards.
Ash
Hi Ash,

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 harbou...@googlegroups.com.

Maurizio la Cecilia

unread,
Jan 3, 2020, 12:23:15 PM1/3/20
to Harbour User Group
Hi Ash,
sorry for late reply, but I'm currently sink.
I'll read ASAP the PDF and I'll try to integrate your work in my development tool.
--
Maurizio



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.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/1e185443-1fe6-4bf6-8396-f4009a2a3926%40googlegroups.com.

Luigi Ferraris

unread,
Jan 5, 2020, 11:52:53 AM1/5/20
to Harbour Users
Il giorno martedì 31 dicembre 2019 16:48:02 UTC+1, Ash ha scritto:
Hello Maurizio,

This file contains all of my work on this subject.


My method is based on information found in GTWVW contrib. Please review the enclosed PDF file where I have given an example of what I was thinking of. I am not suggesting that we use GTWVW; we can use QT, GTWVG or GTWVT instead. 


As a little suggestion: take a look to this https://github.com/tfonrouge/HBTui

All I was interested in is the simplicity of application code that looks like xBase and not C. Let me give you an example:

Is not the first time (on this forum) I read "application code like XBase and not C".  Really, I don't understand what it means.
as very example
PROCEDURE showSomething()
   LOCAL oform
   WITH OBJECT oform := window()
      :setTitle( "the window title" )
      :setSize( 200, 40 )
      ......
   END WITH
   oForm:show()
RETURN

When I read "XBASE and not C" means: code like this? Can you help me to understand?

BR
Luigi

Ash

unread,
Jan 5, 2020, 1:13:05 PM1/5/20
to Harbour Users
Hello Luigi,

Code example you have cited here is very clear. It reminds me of Clipper and Class(Y).

If you now review harbour/core/contrib/gtwvw/tests/demo.prg. Please see a code snippet below.

It is a very good example for creating a GUI application using GTWVW but only serves as a proof of concept. Business applications written in this way are very hard to maintain. Now if we can have a GTWVW, GTWVG or QT front-end in Harbour so that standard xBase commands can be used to harness the power these libraries, business applications code will be more Clipper-like instead of a lot of function calls like C. Applications will also be easier to maintain.

If Harbour had its own GUI library that is tightly integrated with existing commands like @...GET, @...BUTTON or @...CHECKBOX, we would attract more users from the business community. 

Regards.
Ash

   // x init window
   nCurWindow := wvw_nOpenWindow( "GET Demo", nTop, nLeft, nBottom, nRight )
   IF nCurWindow == 0
      lboxmessage( "Failed Opening new window!" )
      RETURN
   ENDIF

   wvw_SetIcon( , "vr_1.ico" )

   ResetMiscObjects( nCurWindow )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawLabel( nWindow, 1, nRight - nLeft, cLabel, 2,, RGB( 255, 255, 255 ), RGB( 198, 198, 198 ), "Arial", s_afontinfo[ 2 ], , , , , .T., .T. ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxRecessed( nWindow, 7 - nTop, 61 - nLeft, 13 - nTop, 70 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxGroup( nWindow, 15 - nTop, 59 - nLeft, 18 - nTop, 72 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxGroup( nWindow, 5 - nTop, 6 - nLeft, 19 - nTop, 44 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawImage( nWindow, 8 - nTop, 62 - nLeft, 12 - nTop, 69 - nLeft, "vouch1.bmp" ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxRecessed( nWindow, 7 - nTop, 48 - nLeft, 13 - nTop, 55 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | x := nWindow, AEval( GetList, {| oGet | wvw_DrawBoxGet( x, oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) } )

   wvwm_ResetMouseObjects( nCurWindow )

   /* we now use native push button
   wvwm_AddMouseObjects( nCurWindow, WVWMouseButton():New("Info", MaxRow() - 1, MaxCol() - 15, , , {|| xDebugInfo() } ))
   */
   wvw_pbCreate( nCurWindow, MaxRow() - 1, MaxCol() - 15, MaxRow() - 1, MaxCol() - 5, "Info", NIL, {|| xDebugInfo() }, NIL )

   CLS   // x init window
   nCurWindow := wvw_nOpenWindow( "GET Demo", nTop, nLeft, nBottom, nRight )
   IF nCurWindow == 0
      lboxmessage( "Failed Opening new window!" )
      RETURN
   ENDIF

   wvw_SetIcon( , "vr_1.ico" )

   ResetMiscObjects( nCurWindow )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawLabel( nWindow, 1, nRight - nLeft, cLabel, 2,, RGB( 255, 255, 255 ), RGB( 198, 198, 198 ), "Arial", s_afontinfo[ 2 ], , , , , .T., .T. ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxRecessed( nWindow, 7 - nTop, 61 - nLeft, 13 - nTop, 70 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxGroup( nWindow, 15 - nTop, 59 - nLeft, 18 - nTop, 72 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxGroup( nWindow, 5 - nTop, 6 - nLeft, 19 - nTop, 44 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawImage( nWindow, 8 - nTop, 62 - nLeft, 12 - nTop, 69 - nLeft, "vouch1.bmp" ) } )
   AddMiscObjects( nCurWindow, {| nWindow | wvw_DrawBoxRecessed( nWindow, 7 - nTop, 48 - nLeft, 13 - nTop, 55 - nLeft ) } )
   AddMiscObjects( nCurWindow, {| nWindow | x := nWindow, AEval( GetList, {| oGet | wvw_DrawBoxGet( x, oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) } )

   wvwm_ResetMouseObjects( nCurWindow )

   /* we now use native push button
   wvwm_AddMouseObjects( nCurWindow, WVWMouseButton():New("Info", MaxRow() - 1, MaxCol() - 15, , , {|| xDebugInfo() } ))
   */
   wvw_pbCreate( nCurWindow, MaxRow() - 1, MaxCol() - 15, MaxRow() - 1, MaxCol() - 5, "Info", NIL, {|| xDebugInfo() }, NIL )

   CLS

Alain Aupeix

unread,
Jan 5, 2020, 1:53:21 PM1/5/20
to harbou...@googlegroups.com
Le 05/01/2020 à 19:13, Ash a écrit :
> If Harbour had its own GUI library that is tightly integrated with
> existing commands like @...GET, @...BUTTON or @...CHECKBOX, we would
> attract more users from the business community.

Hwgui has always these kind of commands and functions, and is
independant of OS, what GTWVW, GTWVG aren't.
For QT, There are a few problems with QT

A+
--
------------------------------------------------------------------------
Alain Aupeix
http://jujuland.pagesperso-orange.fr/
http://pissobi-lacassagne.pagesperso-orange.fr/
------------------------------------------------------------------------
U.buntu 12.04 & Xu.buntu 16.04 | G.ramps 3.4.9-1 | H.arbour 3.2.0dev
(2019-03-12 10:42) | Hw.Gui (2797)
------------------------------------------------------------------------

Ash

unread,
Jan 5, 2020, 7:03:39 PM1/5/20
to Harbour Users
Hello Alain,

HWGUI is quite good, I agree. It is not line/column coordinate based but that is not a major issue. Accompanying Debugger is good as well. The only thing that holds me back is the Designer utility. I have found xDesigner which is much better but there is neither support nor documentation for it.


Regards.
Ash

Alain Aupeix

unread,
Jan 6, 2020, 3:51:27 AM1/6/20
to harbou...@googlegroups.com
Le 06/01/2020 à 01:03, Ash a écrit :
> Hello Alain,
>
> HWGUI is quite good, I agree. It is not line/column coordinate based
> but that is not a major issue. Accompanying Debugger is good as well.
> The only thing that holds me back is the Designer utility. I have
> found xDesigner which is much better but there is neither support nor
> documentation for it.
>
> https://sourceforge.net/projects/hwguidesigner/files/

It seems to be is only for Windows, and as you said, no doc to build ...

Personnaly, I just use an editor (gedit or mousepad) with syntax color.
To build, I use a linux version I made of hwmake.

Владимир Владимир

unread,
Jan 6, 2020, 7:03:28 AM1/6/20
to Harbour Users

В чем проблема то?  
В том, что парсер не поддерживает такой вид синтаксиса?  



Ash

unread,
Jan 6, 2020, 2:35:53 PM1/6/20
to Harbour Users
A more recent and more capable version of xdesigner is available here.


Regards.
Ash

fdaniele

unread,
Jan 7, 2020, 5:19:28 AM1/7/20
to Harbour Users
sorry but I see xdesigner for the first time and I find it splendid.
but where do I find some documentation to configure it?
Thanks in advance
best regards
Daniele

Ash

unread,
Jan 7, 2020, 8:40:15 AM1/7/20
to Harbour Users
Hello Daniele,

 ... I find it splendid.
 I believe this Designer provides a reasonably easy way of building GUI applications using HWGUI and would be welcomed by the Harbour community. 

I am working with the owner of xDesigner to confirm if the generated code can be used in Harbour/MinGW built applications. There is no documentation available at the moment. So, please wait a while for more news. 

Regards.
Ash

fdaniele

unread,
Jan 7, 2020, 2:20:29 PM1/7/20
to Harbour Users
thanks mr. ash, you are an artist ... 

seems the glorious VB6 


David Allen

unread,
Jan 7, 2020, 2:28:26 PM1/7/20
to harbou...@googlegroups.com
Thank you Ash.

Respectfully,
David

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/cc915d7a-bb2b-42f2-ae5f-7c4082f1265a%40googlegroups.com.

Ash

unread,
Jan 7, 2020, 8:58:54 PM1/7/20
to Harbour Users
Hello Everyone,

Here is how you can have HWGUI Designer up and running with Harbour for testing. The developer has indicated that the Designer will be updated in due course to HWGUI V2.22.

- Download hwgui v 2.17 from 


... and unzip to c:\hwgui

- Open Command Prompt and then issue the following commands. My Harbour is in c:\hb32 folder.

cd c:\hwgui
SET HB_PATH=c:\hb32

hbmk2 hwgui.hbp procmisc.hbp hbxml.hbp hbactivex.hbp hwg_contrib.hbp hwgdebug.hbp

hwgui libraries are now built and ready for use. You might see a couple of warnings however.

- Download designer.zip from


- Unzip Designer.zip into c:\designer folder and start the Designer program. Please note that there is no documentation at the moment but Designer is fairly intuitive. Just have a go. 

If there is enough interest, I will start a new thread just for the designer.

Regards.
Ash



On Tuesday, January 7, 2020 at 2:28:26 PM UTC-5, David Allen wrote:
Thank you Ash.

Respectfully,
David

On Tue, Jan 7, 2020 at 7:40 AM Ash <jun...@gmail.com> wrote:
Hello Daniele,

 ... I find it splendid.
 I believe this Designer provides a reasonably easy way of building GUI applications using HWGUI and would be welcomed by the Harbour community. 

I am working with the owner of xDesigner to confirm if the generated code can be used in Harbour/MinGW built applications. There is no documentation available at the moment. So, please wait a while for more news. 

Regards.
Ash


On Tuesday, January 7, 2020 at 5:19:28 AM UTC-5, fdaniele wrote:
sorry but I see xdesigner for the first time and I find it splendid.
but where do I find some documentation to configure it?
Thanks in advance
best regards
Daniele

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

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 harbou...@googlegroups.com.
Message has been deleted

Riztan Gutierrez

unread,
Jan 9, 2020, 1:33:45 PM1/9/20
to harbou...@googlegroups.com
Hello, I am not a friend of the absolute positioning of the widgets, but if I can collaborate in adapting the syntax so that it is compatible with the t-gtk, it will be a pleasure.

Regards

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/f82d622a-90c4-4625-980f-f10483dbca0b%40googlegroups.com.


--


 Riztan Gutiérrez                     www.gtxbase.org                              www.gtkbase.org

  • Linux User: # 494267
  • Ubuntu User: # 28329


Reply all
Reply to author
Forward
0 new messages